Skip to content

Commit

Permalink
Release 100.0.0 (#3667)
Browse files Browse the repository at this point in the history
Co-authored-by: Elliot Winkler <[email protected]>
  • Loading branch information
Gudahtt and mcmire authored Dec 14, 2023
1 parent 9cd6067 commit 894122b
Show file tree
Hide file tree
Showing 21 changed files with 112 additions and 53 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "99.0.0",
"version": "100.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/utils": "^8.2.0"
},
"devDependencies": {
Expand Down
65 changes: 56 additions & 9 deletions packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,54 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [21.0.0]
### Added
- Add `codefiTokenPricesServiceV2` ([#3600](https://github.com/MetaMask/core/pull/3600))
- This object can be used for the new `tokenPricesService` argument for TokenRatesController. It uses an internal API to fetch prices for tokens instead of CoinGecko.
- Add `CodefiTokenPricesServiceV2` ([#3600](https://github.com/MetaMask/core/pull/3600), [#3655](https://github.com/MetaMask/core/pull/3655), [#3655](https://github.com/MetaMask/core/pull/3655))
- This class can be used for the new `tokenPricesService` argument for TokenRatesController. It uses a MetaMask API to fetch prices for tokens instead of CoinGecko.
- The `CodefiTokenPricesServiceV2` will retry if the token price update fails
- We retry each request up to 3 times using a randomized exponential backoff strategy
- If the token price update still fails 12 times consecutively (3 update attempts, each of which has 4 calls due to retries), we stop trying for 30 minutes before we try again.
- Add polling by `networkClientId` to `AccountTrackerController` ([#3586](https://github.com/MetaMask/core/pull/3586))
- A new state property, `accountByChainId` has been added for keeping track of account balances across chains
- `AccountTrackerController` implements `PollingController` and can now poll by `networkClientId` via the new methods `startPollingByNetworkClientId`, `stopPollingByPollingToken`, and `stopPollingByPollingToken`.
- `AccountTrackerController` accepts an optional `networkClientId` value on the `refresh` method
- `AccountTrackerController` accepts an optional `networkClientId` value as the last parameter of the `syncBalanceWithAddresses` method
- Support token detection on Base and zkSync ([#3584](https://github.com/MetaMask/core/pull/3584))
- Support token detection on Arbitrum and Optimism ([#2035](https://github.com/MetaMask/core/pull/2035))

### Changed
- **BREAKING:** TokenRatesController now takes a required argument `tokenPricesService` ([#3600](https://github.com/MetaMask/core/pull/3600))
- **BREAKING:** `TokenRatesController` now takes a required argument `tokenPricesService` ([#3600](https://github.com/MetaMask/core/pull/3600))
- This object is responsible for fetching the prices for tokens held by this controller.
- **BREAKING:** Update signature of `TokenRatesController.updateExchangeRatesByChainId` ([#3600](https://github.com/MetaMask/core/pull/3600), [#3653](https://github.com/MetaMask/core/pull/3653))
- Change the type of `tokenAddresses` from `string[]` to `Hex[]`
- **BREAKING:** Change signature of `TokenRatesController.fetchAndMapExchangeRates` ([#3600](https://github.com/MetaMask/core/pull/3600), [#3653](https://github.com/MetaMask/core/pull/3653))
- This method now takes an object with shape `{ tokenAddresses: Hex[]; chainId: Hex; nativeCurrency: string; }` rather than positional arguments
- Update TokenListController to fetch prefiltered set of tokens from the API, reducing response data and removing the need for filtering logic ([#2054](https://github.com/MetaMask/core/pull/2054))
- Update TokenRatesController to request token rates from the Price API in batches of 100 ([#3650](https://github.com/MetaMask/core/pull/3650))
- **BREAKING:** `AccountTrackerController` constructor params object requires `getCurrentChainId` and `getNetworkClientById` hooks ([#3586](https://github.com/MetaMask/core/pull/3586))
- These are needed for the new "polling by `networkClientId`" feature
- **BREAKING:** `AccountTrackerController` has a new required state property, `accountByChainId`([#3586](https://github.com/MetaMask/core/pull/3586))
- This is needed to track balances accross chains. It was introduced for the "polling by `networkClientId`" feature, but is useful on its own as well.
- **BREAKING**: `AccountTrackerController` adds a mutex to `refresh` making it only possible for one call to be executed at time ([#3586](https://github.com/MetaMask/core/pull/3586))
- **BREAKING**: `TokensController.watchAsset` now performs on-chain validation of the asset's symbol and decimals, if they're defined in the contract ([#1745](https://github.com/MetaMask/core/pull/1745))
- The `TokensController` constructor no longer accepts a `getERC20TokenName` option. It was no longer needed due to this change.
- Add new method `_getProvider`, though this is intended for internal use and should not be called externally.
- Additionally, if the symbol and decimals are defined in the contract, they are no longer required to be passed to `watchAsset`
- **BREAKING:** Update controllers that rely on provider to listen to `NetworkController:networkDidChange` instead of `NetworkController:stateChange` ([#3610](https://github.com/MetaMask/core/pull/3610))
- The `networkDidChange` event is safer in cases where the provider is used because the provider is guaranteed to have been updated by the time that event is emitted. The same is not true of the `stateChange` event.
- The following controllers now accept a `onNetworkDidChange` constructor option instead of a `onNetworkStateChange` option:
- `TokensController`
- `AssetsContractController`
- Update `@metamask/polling-controller` to v3 ([#3636](https://github.com/MetaMask/core/pull/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.
- The affected controllers are:
- `AccountTrackerController`
- `CurrencyRateController`
- `NftDetectionController`
- `TokenDetectionController`
- `TokenListController`
- `TokenRatesController`
- Update `@metamask/controller-utils` to v7 ([#3636](https://github.com/MetaMask/core/pull/3636))
- Update `TokenListController` to fetch prefiltered set of tokens from the API, reducing response data and removing the need for filtering logic ([#2054](https://github.com/MetaMask/core/pull/2054))
- Update `TokenRatesController` to request token rates from the Price API in batches of 100 ([#3650](https://github.com/MetaMask/core/pull/3650))
- Add dependencies `cockatiel` and `lodash` ([#3586](https://github.com/MetaMask/core/pull/3586), [#3655](https://github.com/MetaMask/core/pull/3655))

### Removed
- **BREAKING:** Remove `fetchExchangeRate` method from TokenRatesController ([#3600](https://github.com/MetaMask/core/pull/3600))
Expand All @@ -26,10 +61,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- This method was previously used in TokenRatesController to access the CoinGecko API. There is no equivalent.
- **BREAKING:** Remove `CoinGeckoResponse` and `CoinGeckoPlatform` types ([#3600](https://github.com/MetaMask/core/pull/3600))
- These types were previously used in TokenRatesController to represent data returned from the CoinGecko API. There is no equivalent.
- **BREAKING**: The TokenRatesController now only supports updating and polling rates for tokens tracked by the TokensController ([#3639](https://github.com/MetaMask/core/pull/3639))
- The `tokenAddresses` option has been removed from `startPollingByNetworkClientId`
- The `tokenContractAddresses` option has been removed from `updateExchangeRatesByChainId`
- **BREAKING**: `TokenRatesController.fetchAndMapExchangeRates` is no longer exposed publicly ([#3621](https://github.com/MetaMask/core/pull/3621))

### Fixed
- Fix TokenRatesController to prevent redundant token rate updates when tokens change ([#3647](https://github.com/MetaMask/core/pull/3647), [#3663](https://github.com/MetaMask/core/pull/3663))
- Prevent `TokenRatesController` from making redundant token rate updates when tokens change ([#3647](https://github.com/MetaMask/core/pull/3647), [#3663](https://github.com/MetaMask/core/pull/3663))
- Previously, token rates would be re-fetched for the globally selected network on all TokensController state changes, but now token rates are always performed for a deduplicated and normalized set of addresses, and changes to this set determine whether rates should be re-fetched.
- Prevent redundant overlapping token rate updates in `TokenRatesController` ([#3635](https://github.com/MetaMask/core/pull/3635))
- Fix `TokenRatesController` bug where the `contractExchangeRates` state would sometimes be stale after calling `updateExchangeRatesByChainId` ([#3624](https://github.com/MetaMask/core/pull/3624))
- Make `TokenRatesController.updateExchangeRatesByChainId` respect `disabled` state ([#3596](https://github.com/MetaMask/core/pull/3596))
- Fix error in `NftController` when attempt to get NFT information from on-chain fails, and ensure metadata always contains contract address and blank `name` field ([#3629](https://github.com/MetaMask/core/pull/3629))
- When fetching on-chain NFT information fails, we now proceed with whatever we have (either the OpenSea metadata, or a blank metadata object)
- Previously, if we were unable to retrieve NFT metadata from on-chain or OpenSea, the returned NFT metadata would be missing a `name` field and the contract address. Now the returned metadata always has those entries, though the `name` is set to `null`.
- This affects `watchNft` and `addNft` methods

## [20.0.0]
### Added
Expand Down Expand Up @@ -434,7 +480,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[21.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[20.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[19.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[18.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/assets-controllers",
"version": "20.0.0",
"version": "21.0.0",
"description": "Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -38,11 +38,11 @@
"@metamask/approval-controller": "^5.0.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/contract-metadata": "^2.4.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/eth-query": "^4.0.0",
"@metamask/metamask-eth-abis": "3.0.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/polling-controller": "^2.0.0",
"@metamask/polling-controller": "^3.0.0",
"@metamask/preferences-controller": "^5.0.0",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/utils": "^8.2.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/controller-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [7.0.0]
### Changed
- **BREAKING:** Make `safelyExecute` generic so they preserve types ([#3629](https://github.com/MetaMask/core/pull/3629))
- Update `successfulFetch` so that a URL instance can now be passed to it ([#3600](https://github.com/MetaMask/core/pull/3600))
- Update `handleFetch` so that a URL instance can now be passed to it ([#3600](https://github.com/MetaMask/core/pull/3600))

Expand Down Expand Up @@ -189,7 +192,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

All changes listed after this point were applied to this package following the monorepo conversion.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.1.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[6.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[5.0.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion packages/controller-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/controller-utils",
"version": "6.1.0",
"version": "7.0.0",
"description": "Data and convenience functions shared by multiple packages",
"keywords": [
"MetaMask",
Expand Down
2 changes: 1 addition & 1 deletion packages/ens-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@ethersproject/providers": "^5.7.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/utils": "^8.2.0",
"ethereum-ens-network-map": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/gas-fee-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/eth-query": "^4.0.0",
"@metamask/ethjs-unit": "^0.2.1",
"@metamask/network-controller": "^17.0.0",
"@metamask/polling-controller": "^2.0.0",
"@metamask/polling-controller": "^3.0.0",
"@metamask/utils": "^8.2.0",
"@types/uuid": "^8.3.0",
"ethereumjs-util": "^7.0.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/logging-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/message-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/eth-sig-util": "^7.0.1",
"@metamask/utils": "^8.2.0",
"@types/uuid": "^8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/network-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/eth-json-rpc-infura": "^9.0.0",
"@metamask/eth-json-rpc-middleware": "^12.0.1",
"@metamask/eth-json-rpc-provider": "^2.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/permission-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@metamask/approval-controller": "^5.0.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/json-rpc-engine": "^7.3.0",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/utils": "^8.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/phishing-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@types/punycode": "^2.1.0",
"eth-phishing-detect": "^1.2.0",
"punycode": "^2.1.1"
Expand Down
10 changes: 9 additions & 1 deletion packages/polling-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.0.0]
### Added
- `BlockTrackerPollingController`, `BlockTrackerPollingControllerV1` and `BlockTrackerPollingControllerOnly` have been added and can be used by subclasses to poll with a blockTracker using the same API as the `StaticIntervalPollingController` versions - the only exception is the requirement to implement the abstract method `_getNetworkClientById` on subclasses.

### Changed
- **BREAKING:** `PollingController`, `PollingControllerV1` and `PollingControllerOnly` are all removed and replaced by `StaticIntervalPollingController`, `StaticIntervalPollingControllerV1` and `StaticIntervalPollingControllerOnly` ([#3636](https://github.com/MetaMask/core/pull/3636))

## [2.0.0]
### Changed
- **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
Expand Down Expand Up @@ -46,7 +53,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
[3.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[1.0.2]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
[1.0.1]: https://github.com/MetaMask/core/compare/@metamask/[email protected]...@metamask/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions packages/polling-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/polling-controller",
"version": "2.0.0",
"version": "3.0.0",
"description": "Polling Controller is the base for controllers that polling by networkClientId",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/utils": "^8.2.0",
"@types/uuid": "^8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/preferences-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0"
"@metamask/controller-utils": "^7.0.0"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/queued-request-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@metamask/approval-controller": "^5.0.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/json-rpc-engine": "^7.3.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/rpc-errors": "^6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/signature-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@metamask/approval-controller": "^5.0.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/keyring-controller": "^10.0.0",
"@metamask/logging-controller": "^2.0.0",
"@metamask/message-manager": "^7.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@ethersproject/abi": "^5.7.0",
"@metamask/approval-controller": "^5.0.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/eth-query": "^4.0.0",
"@metamask/gas-fee-controller": "^11.0.0",
"@metamask/metamask-eth-abis": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/user-operation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
},
"dependencies": {
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^6.1.0",
"@metamask/controller-utils": "^7.0.0",
"@metamask/eth-query": "^4.0.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/polling-controller": "^2.0.0",
"@metamask/polling-controller": "^3.0.0",
"@metamask/utils": "^8.2.0",
"ethereumjs-util": "^7.0.10",
"immer": "^9.0.6",
Expand Down
Loading

0 comments on commit 894122b

Please sign in to comment.