All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Bump
@metamask/base-controller
from^7.0.0
to^7.1.0
(#5079)
- Bump
@metamask/controller-utils
from^11.4.3
to^11.4.4
(#5012) - Bump
@metamask/polling-controller
from^12.0.1
to^12.0.2
(#5012)
- Make implicit peer dependencies explicit (#4974)
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
@babel/runtime@^7.0.0
(required by@metamask/ethjs-unit
)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- Correct ESM-compatible build so that imports of the following packages that re-export other modules via
export *
are no longer corrupted: (#5011)@metamask/eth-query
bn.js
- Bump
@metamask/polling-controller
from^12.0.0
to^12.0.1
(#4870) - Bump
@metamask/base-controller
from^7.0.1
to^7.0.2
(#4862) - Bump
@metamask/controller-utils
from^11.4.0
to^11.4.3
(#4862, #4870, #4195)
- BREAKING: Bump
@metamask/network-controller
peer dependency to^22.0.0
(#4841) - Bump
@metamask/controller-utils
to^11.4.0
(#4834) - Bump
@metamask/utils
to^10.0.0
(#4831)
- BREAKING:
GasFeeController
now uses a new polling interface that accepts the generic parameterPollingInput
(#4752) - BREAKING: The inherited
AbstractPollingController
methodstartPollingByNetworkClientId
has been renamed tostartPolling
(#4752) - BREAKING: The inherited
AbstractPollingController
methodonPollingComplete
now returns the entire input object of typePollingInput
, instead of a network client id (#4752)
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
exports
field inpackage.json
linked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
- Remove chunk files (#4648).
- Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.
- BREAKING: Bump devDependency and peerDependency
@metamask/network-controller
from^20.0.0
to^21.0.0
(#4618, #4651) - Bump
@metamask/base-controller
from^6.0.2
to^7.0.0
(#4625, #4643) - Bump
@metamask/controller-utils
from^11.0.2
to^11.2.0
(#4639, #4651) - Bump
@metamask/polling-controller
from^9.0.1
to^10.0.0
(#4651) - Bump
typescript
from~5.0.4
to~5.2.2
(#4576, #4584)
- Remove
@metamask/network-controller
dependency #4556- This was listed under
peerDependencies
already, so it was redundant as a dependency.
- This was listed under
- Upgrade TypeScript version to
~5.0.4
and setmoduleResolution
option toNode16
(#3645) - Bump
@metamask/base-controller
from^6.0.0
to^6.0.2
(#4517, #4544) - Bump
@metamask/controller-utils
from^11.0.0
to^11.0.2
(#4517, #4544) - Bump
@metamask/polling-controller
from^9.0.0
to^9.0.1
(#4548) - Bump
@metamask/utils
from^8.3.0
to^9.1.0
(#4516, #4529)
- BREAKING: Bump peerDependency
@metamask/network-controller
to^20.0.0
(#4508) - Bump
@metamask/polling-controller
to^9.0.0
(#4508)
- BREAKING: Add constructor options to
GasFeeController
:EIP1559APIEndpoint
(required), andlegacyAPIEndpoint
(optional) which defaults toLEGACY_GAS_PRICES_API_URL
. (#4446)- These URLs are no longer hardcoded within the controller.
- BREAKING: Remove
infuraAPIKey
as a constructor option forGasFeeController
. This class field was previously used to construct and send theAuthorization
header for Infura gas API requests. (#4446)
- BREAKING: Bump minimum Node version to 18.18 (#3611)
- BREAKING: Bump dependency and peer dependency
@metamask/network-controller
to^19.0.0
(#4352) - Bump
@metamask/base-controller
to^6.0.0
(#4352) - Bump
@metamask/controller-utils
to^11.0.0
(#4352) - Bump
@metamask/polling-controller
to^8.0.0
(#4352)
- BREAKING: Bump dependency and peer dependency
@metamask/network-controller
to^18.1.3
(#4342) - Bump
@metamask/controller-utils
to^10.0.0
(#4342) - Bump
@metamask/polling-controller
to^7.0.0
(#4342)
- Add a metadata property for nonRPCGasFeeApisDisabled (#4245)
- Bump
@metamask/polling-controller
to^6.0.2
(#4234)
- Remove fee history fallback in favour of
eth_gasPrice
call (#4210)
- Add nonRPCGasFeeApisDisabled property to the gas fee controller, allowing the user to specify that they want to prevent network request to gas estimate services, and only want gas estimates to be based on rpc requests (eth_feeHistory and eth_gasPrice) to the provider. (#4094)
- Fix GasFeeController incorrectly setting globally selected state, so that state is only updated if the gasFeeEstimate fetched is for the currently selected network (#4214)
- BREAKING: The controller's constructor now requires
infuraAPIKey
. This is used to construct and send theAuthorization
header for Infura gas API requests. (#4068) - Bump dependency
@metamask/network-controller
to^18.1.0
(#4121)
- BREAKING: Remove the constructor options
legacyAPIEndpoint
andEIP1559APIEndpoint
. These URLs are now hardcoded within the controller. (#4068)
- Fix
types
field inpackage.json
(#4047)
- BREAKING: Add ESM build (#3998)
- It's no longer possible to import files from
./dist
directly.
- It's no longer possible to import files from
- BREAKING: Bump
@metamask/base-controller
to^5.0.0
(#4039)- This version has a number of breaking changes. See the changelog for more.
- BREAKING: Bump dependency and peer dependency on
@metamask/network-controller
to^18.0.0
(#4039) - Bump
@metamask/controller-utils
to^9.0.0
(#4039) - Bump
@metamask/polling-controller
to^6.0.0
(#4039)
- Replace
ethereumjs-util
withbn.js
(#3943) - Bump
@metamask/controller-utils
to^8.0.4
(#4007) - Bump
@metamask/ethjs-unit
to^0.3.0
(#3897) - Bump
@metamask/network-controller
to^17.2.1
(#4007) - Bump
@metamask/polling-controller
to^5.0.1
(#4007)
- Bump
@metamask/controller-utils
to^8.0.3
(#3915)
- BREAKING: Bump
@metamask/network-controller
peer dependency to^17.2.0
(#3821) - Bump
@metamask/utils
to^8.3.0
(#3769) - Bump
@metamask/base-controller
to^4.1.1
(#3760, #3821) - Bump
@metamask/controller-utils
to^8.0.2
(#3821) - Bump
@metamask/polling-controller
to^5.0.0
(#3821)
- BREAKING: Bump
@metamask/network-controller
dependency and peer dependency from^17.0.0
to^17.1.0
(#3695) - BREAKING: The
GasFeeController
now detects network changes using theNetworkController:networkDidChange
event instead ofNetworkController:stateChange
(#3610)- Additionally, the optional constructor parameter
onNetworkStateChange
has been replaced byonNetworkDidChange
- Additionally, the optional constructor parameter
- Bump
@metamask/base-controller
to^4.0.1
(#3695) - Bump
@metamask/controller-utils
to^8.0.1
(#3695, #3678, #3667, #3580) - Bump
@metamask/polling-controller
to^4.0.0
(#3695, #3667, #3636)- This update adds two new methods to each polling controller:
_startPollingByNetworkClientId
and_stopPollingByPollingTokenSetId
. These methods are intended for internal use, and should not be called directly.
- This update adds two new methods to each polling controller:
- BREAKING: Bump
@metamask/base-controller
to ^4.0.0 (#2063)- This is breaking because the type of the
messenger
has backward-incompatible changes. See the changelog for this package for more.
- This is breaking because the type of the
- Replace
ethjs-unit
^0.1.6 with@metamask/ethjs-unit
^0.2.1 (#2064) - Bump
@metamask/controller-utils
to ^6.0.0 (#2063) - Bump
@metamask/network-controller
to ^17.0.0 (#2063) - Bump
@metamask/polling-controller
to ^2.0.0 (#2063)
- BREAKING: Bump dependency and peer dependency on
@metamask/network-controller
to ^16.0.0 - Bump dependency
@metamask/eth-query
from ^3.0.1 to ^4.0.0 (#2028) - Bump dependency on
@metamask/polling-controller
to ^1.0.2 - Bump @metamask/utils from 8.1.0 to 8.2.0 (#1957)
- Add optional
networkClientId
argument to options object param offetchGasFeeEstimates
method which, if passed, fetches the required chainId and networkClient provider to fetch and store gasFee data appropriately. (#1891)
- BREAKING: Bump dependency on
@metamask/polling-controller
to ^1.0.0 - Bump dependency and peer dependency on
@metamask/network-controller
to ^15.1.0
- Add way to start and stop different polling sessions for the same network client ID by providing extra scoping data (#1776)
- Add optional second argument to
stopPollingByPollingToken
(formerlystopPollingByNetworkClientId
) - Add optional second argument to
onPollingCompleteByNetworkClientId
- Add optional second argument to
- BREAKING: Make
executePoll
private (#1810) - BREAKING: Rename
stopPollingByNetworkClientId
tostopPollingByPollingToken
(#1810) - BREAKING: Bump dependency and peer dependency on
@metamask/network-controller
to ^15.0.0 - BREAKING: Bump dependency on
@metamask/polling-controller
to ^0.2.0
- Add optional
gasFeeEstimatesByChainId
property to GasFeeController state (#1673 - Add dependency on
@metamask/polling-controller
([#1748])(#1748))
- BREAKING: Messenger must allow controller actions
NetworkController:getNetworkClientById
andNetworkController:getEIP1559Compatibility
(#1673 - Bump dependency on
@metamask/utils
to ^8.1.0 (#1639) - Bump dependency on
@metamask/base-controller
to ^3.2.3 - Bump dependency on
@metamask/controller-utils
to ^5.0.2 - Bump dependency and peer dependency on
@metamask/network-controller
to ^14.0.0
- Update TypeScript to v4.8.x (#1718)
- BREAKING: Bump peer dependency on
@metamask/network-controller
to ^13.0.0 (#1633) - Bump dependency on
@metamask/controller-utils
to ^5.0.0 (#1633)
- Bump dependency on
@metamask/base-controller
to ^3.2.1 - Bump dependency on
@metamask/controller-utils
to ^4.3.2 - Bump dependency and peer dependency on
@metamask/network-controller
to ^12.1.2
- Replace
eth-query
^2.1.2 with@metamask/eth-query
^3.0.1 (#1546)
- Bump dependency on
controller-utils
(#1447)- The new version of
controller-utils
addseth-query
to the list of dependencies. This dependency was added to improve internal types forgas-fee-controller
. This has no impact on users of the package.
- The new version of
- BREAKING: Bump to Node 16 (#1262)
- BREAKING: The
getChainId
constructor parameter now expects aHex
return type rather than a decimal string (#1367) - Add
@metamask/utils
dependency - BREAKING: The gas fee controller messenger now requires the
NetworkController:stateChange
event instead of theNetworkController:providerConfigChange
event (#1329)- This does not apply if
onNetworkStateChange
andgetChainId
are provided to the constructor
- This does not apply if
- BREAKING: The constructor parameter
onNetworkStateChange
now expects event handlers to be passed the full network state (#1329)- The type of the
onNetworkStateChange
parameter already expected the state to be provided, but it wasn't used before now
- The type of the
- BREAKING: Update
@metamask/network-controller
dependency and peer dependency
- BREAKING: peerDeps: @metamask/[email protected]>8.0.0 (#1196)
- Adjust types to align with new version of
NetworkController
(#1091)
- BREAKING: Make the EIP-1559 endpoint a required argument (#1083)
- BREAKING: Remove
isomorphic-fetch
(#1106)- Consumers must now import
isomorphic-fetch
or another polyfill themselves if they are running in an environment withoutfetch
- Consumers must now import
- BREAKING: Update
@metamask/network-controller
peer dependency to v3 (#1041) - Rename this repository to
core
(#1031) - Update
@metamask/controller-utils
package (#1041)
- This package will now warn if a required package is not present (#1003)
- BREAKING: Bump
@metamask/network-controller
to 2.0.0 (#995)- GasFeeController now expects NetworkController to respond to the
NetworkController:providerChangeConfig
event (previously namedNetworkController:providerChange
). If you are depending directly on@metamask/network-controller
, you should update your version to at least 2.0.0 as well.
- GasFeeController now expects NetworkController to respond to the
- Relax dependencies on
@metamask/base-controller
,@metamask/controller-utils
, and@metamask/network-controller
(use^
instead of~
) (#998)
-
Initial release
-
As a result of converting our shared controllers repo into a monorepo (#831), we've created this package from select parts of
@metamask/controllers
v33.0.0, namely:- Everything in
src/gas
All changes listed after this point were applied to this package following the monorepo conversion.
- Everything in
-