Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 100.0.0 #3667

Merged
merged 16 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "^6.2.0",
"@metamask/utils": "^8.2.0"
},
"devDependencies": {
Expand Down
53 changes: 46 additions & 7 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
mcmire marked this conversation as resolved.
Show resolved Hide resolved
- `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
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
- 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
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
- **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
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
- 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` 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))
mcmire marked this conversation as resolved.
Show resolved Hide resolved
- **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))
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
- Additionally, if the symbol and decimals are defined in the contract, they are no longer required to be passed to `watchAsset`
- **BREAKING**: The TokenRatesController now only supports updating and polling rates for tokens tracked by the TokensController ([#3639](https://github.com/MetaMask/core/pull/3639))
mcmire marked this conversation as resolved.
Show resolved Hide resolved
- 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))
mcmire marked this conversation as resolved.
Show resolved Hide resolved
- **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))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adonesky1 does this sound right to you?

I noticed that that PR didn't include any change entries for this package, but it does seem to me that it at least added these underscore-prefixed methods.

- 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 `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))

### Removed
- **BREAKING:** Remove `fetchExchangeRate` method from TokenRatesController ([#3600](https://github.com/MetaMask/core/pull/3600))
Expand All @@ -28,8 +63,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- These types were previously used in TokenRatesController to represent data returned from the CoinGecko API. There is no equivalent.

### 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))

## [20.0.0]
### Added
Expand Down Expand Up @@ -434,7 +472,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": "^6.2.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
5 changes: 4 additions & 1 deletion packages/controller-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ 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]

## [6.2.0]
### Changed
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
- Update `successfulFetch` so that a URL instance can now be passed to it ([#3600](https://github.com/MetaMask/core/pull/3600))
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
- 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 +191,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]
[6.2.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": "6.2.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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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))
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved

## [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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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": "^6.2.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
Loading