Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-getnftcontractinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
OGPoyraz authored Jul 25, 2024
2 parents eafbc14 + a99ce6a commit 820b9be
Show file tree
Hide file tree
Showing 96 changed files with 3,445 additions and 2,654 deletions.
1 change: 1 addition & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ignores:
- '@metamask/create-release-branch'
- 'depcheck'
- 'eslint-interactive'
- 'rimraf'
- 'simple-git-hooks'
- 'ts-node'
- 'typedoc'
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
/packages/name-controller @MetaMask/confirmations
/packages/signature-controller @MetaMask/confirmations
/packages/transaction-controller @MetaMask/confirmations

/packages/phishing-controller @MetaMask/product-safety

This file was deleted.

8 changes: 4 additions & 4 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,19 @@ gen_enforced_field(WorkspaceCwd, 'scripts.changelog:update', CorrectChangelogUpd
\+ atom_concat(ExpectedPrefix, _, ChangelogUpdateCommand).

% All non-root packages must have the same "test" script.
gen_enforced_field(WorkspaceCwd, 'scripts.test', 'jest --reporters=jest-silent-reporter') :-
gen_enforced_field(WorkspaceCwd, 'scripts.test', 'NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter') :-
WorkspaceCwd \= '.'.

% All non-root packages must have the same "test:clean" script.
gen_enforced_field(WorkspaceCwd, 'scripts.test:clean', 'jest --clearCache') :-
gen_enforced_field(WorkspaceCwd, 'scripts.test:clean', 'NODE_OPTIONS=--experimental-vm-modules jest --clearCache') :-
WorkspaceCwd \= '.'.

% All non-root packages must have the same "test:verbose" script.
gen_enforced_field(WorkspaceCwd, 'scripts.test:verbose', 'jest --verbose') :-
gen_enforced_field(WorkspaceCwd, 'scripts.test:verbose', 'NODE_OPTIONS=--experimental-vm-modules jest --verbose') :-
WorkspaceCwd \= '.'.

% All non-root packages must have the same "test:watch" script.
gen_enforced_field(WorkspaceCwd, 'scripts.test:watch', 'jest --watch') :-
gen_enforced_field(WorkspaceCwd, 'scripts.test:watch', 'NODE_OPTIONS=--experimental-vm-modules jest --watch') :-
WorkspaceCwd \= '.'.

% All dependency ranges must be recognizable (this makes it possible to apply
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "176.0.0",
"version": "179.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down Expand Up @@ -57,8 +57,8 @@
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/eth-block-tracker": "^9.0.3",
"@metamask/eth-json-rpc-provider": "^4.1.1",
"@metamask/json-rpc-engine": "^9.0.1",
"@metamask/utils": "^9.0.0",
"@metamask/json-rpc-engine": "^9.0.2",
"@metamask/utils": "^9.1.0",
"@types/jest": "^27.4.1",
"@types/node": "^16.18.54",
"@typescript-eslint/eslint-plugin": "^5.62.0",
Expand All @@ -82,10 +82,11 @@
"nock": "^13.3.1",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.4.5",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.8.0",
"ts-node": "^10.9.1",
"tsup": "^8.0.2",
"typescript": "~4.9.5",
"typescript": "~5.0.4",
"yargs": "^17.7.2"
},
"packageManager": "yarn@4.2.2",
Expand Down
24 changes: 12 additions & 12 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,39 @@
"changelog:update": "../../scripts/update-changelog.sh @metamask/accounts-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/accounts-controller",
"publish:preview": "yarn npm publish --tag preview",
"test": "jest --reporters=jest-silent-reporter",
"test:clean": "jest --clearCache",
"test:verbose": "jest --verbose",
"test:watch": "jest --watch"
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^6.0.1",
"@metamask/base-controller": "^6.0.2",
"@metamask/eth-snap-keyring": "^4.3.1",
"@metamask/keyring-api": "^8.0.0",
"@metamask/keyring-api": "^8.0.1",
"@metamask/keyring-controller": "^17.1.1",
"@metamask/snaps-sdk": "^4.2.0",
"@metamask/snaps-utils": "^7.4.0",
"@metamask/utils": "^9.0.0",
"@metamask/snaps-sdk": "^6.1.1",
"@metamask/snaps-utils": "^7.8.1",
"@metamask/utils": "^9.1.0",
"deepmerge": "^4.2.2",
"ethereum-cryptography": "^2.1.2",
"immer": "^9.0.6",
"uuid": "^8.3.2"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/snaps-controllers": "^8.1.1",
"@metamask/snaps-controllers": "^9.3.1",
"@types/jest": "^27.4.1",
"@types/readable-stream": "^2.3.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~4.9.5"
"typescript": "~5.0.4"
},
"peerDependencies": {
"@metamask/keyring-controller": "^17.0.0",
"@metamask/snaps-controllers": "^8.1.1"
"@metamask/snaps-controllers": "^9.3.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function createExpectedInternalAccount({
};

const methods =
accountTypeToMethods[type as unknown as keyof typeof accountTypeToMethods];
accountTypeToMethods[type as keyof typeof accountTypeToMethods];

const account = {
id,
Expand Down
5 changes: 4 additions & 1 deletion packages/accounts-controller/src/AccountsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ export class AccountsController extends BaseController<
...account,
metadata: { ...account.metadata, name: accountName },
};
// @ts-expect-error ts(2589)
// Do not remove this comment - This error is flaky: Comment out or restore the `ts-expect-error` directive below as needed.
// // @ts-expect-error Known issue - `Json` causes recursive error in immer `Draft`/`WritableDraft` types
currentState.internalAccounts.accounts[accountId] = internalAccount;
});
}
Expand Down Expand Up @@ -891,6 +892,8 @@ export class AccountsController extends BaseController<

const index = Math.max(
keyringAccounts.length + 1,
// ESLint is confused; this is a number.
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
lastDefaultIndexUsedForKeyringType + 1,
);

Expand Down
16 changes: 8 additions & 8 deletions packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"changelog:update": "../../scripts/update-changelog.sh @metamask/address-book-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/address-book-controller",
"publish:preview": "yarn npm publish --tag preview",
"test": "jest --reporters=jest-silent-reporter",
"test:clean": "jest --clearCache",
"test:verbose": "jest --verbose",
"test:watch": "jest --watch"
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^6.0.1",
"@metamask/controller-utils": "^11.0.1",
"@metamask/utils": "^9.0.0"
"@metamask/base-controller": "^6.0.2",
"@metamask/controller-utils": "^11.0.2",
"@metamask/utils": "^9.1.0"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
Expand All @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~4.9.5"
"typescript": "~5.0.4"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
12 changes: 6 additions & 6 deletions packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"changelog:update": "../../scripts/update-changelog.sh @metamask/announcement-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/announcement-controller",
"publish:preview": "yarn npm publish --tag preview",
"test": "jest --reporters=jest-silent-reporter",
"test:clean": "jest --clearCache",
"test:verbose": "jest --verbose",
"test:watch": "jest --watch"
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^6.0.1"
"@metamask/base-controller": "^6.0.2"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
Expand All @@ -51,7 +51,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~4.9.5"
"typescript": "~5.0.4"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
11 changes: 10 additions & 1 deletion packages/approval-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [7.0.2]

### Changed

- Bump TypeScript version to `~5.0.4` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645))
- Bump `@metamask/base-controller` from `^6.0.1` from `^6.0.2` ([#4544](https://github.com/MetaMask/core/pull/4544))
- Bump `@metamask/utils` from `^9.0.0` to `^9.1.0` ([#4529](https://github.com/MetaMask/core/pull/4529))

## [7.0.1]

### Changed
Expand Down Expand Up @@ -208,7 +216,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/approval-controller@7.0.1...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.2...HEAD
[7.0.2]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.1...@metamask/approval-controller@7.0.2
[7.0.1]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.0...@metamask/approval-controller@7.0.1
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@6.0.2...@metamask/approval-controller@7.0.0
[6.0.2]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@6.0.1...@metamask/approval-controller@6.0.2
Expand Down
16 changes: 8 additions & 8 deletions packages/approval-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/approval-controller",
"version": "7.0.1",
"version": "7.0.2",
"description": "Manages requests that require user approval",
"keywords": [
"MetaMask",
Expand Down Expand Up @@ -35,15 +35,15 @@
"changelog:update": "../../scripts/update-changelog.sh @metamask/approval-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/approval-controller",
"publish:preview": "yarn npm publish --tag preview",
"test": "jest --reporters=jest-silent-reporter",
"test:clean": "jest --clearCache",
"test:verbose": "jest --verbose",
"test:watch": "jest --watch"
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/base-controller": "^6.0.1",
"@metamask/base-controller": "^6.0.2",
"@metamask/rpc-errors": "^6.3.1",
"@metamask/utils": "^9.0.0",
"@metamask/utils": "^9.1.0",
"nanoid": "^3.1.31"
},
"devDependencies": {
Expand All @@ -55,7 +55,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~4.9.5"
"typescript": "~5.0.4"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
8 changes: 4 additions & 4 deletions packages/assets-controllers/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module.exports = merge(baseConfig, {
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 90.35,
functions: 96.74,
lines: 97.34,
statements: 97.36,
branches: 91.07,
functions: 97.51,
lines: 98.12,
statements: 98.03,
},
},

Expand Down
25 changes: 13 additions & 12 deletions packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,45 +35,46 @@
"changelog:update": "../../scripts/update-changelog.sh @metamask/assets-controllers",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/assets-controllers",
"publish:preview": "yarn npm publish --tag preview",
"test": "jest --reporters=jest-silent-reporter",
"test:clean": "jest --clearCache",
"test:verbose": "jest --verbose",
"test:watch": "jest --watch"
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@metamask/abi-utils": "^2.0.2",
"@metamask/abi-utils": "^2.0.3",
"@metamask/accounts-controller": "^17.2.0",
"@metamask/approval-controller": "^7.0.1",
"@metamask/base-controller": "^6.0.1",
"@metamask/approval-controller": "^7.0.2",
"@metamask/base-controller": "^6.0.2",
"@metamask/contract-metadata": "^2.4.0",
"@metamask/controller-utils": "^11.0.1",
"@metamask/controller-utils": "^11.0.2",
"@metamask/eth-query": "^4.0.0",
"@metamask/keyring-controller": "^17.1.1",
"@metamask/metamask-eth-abis": "^3.1.1",
"@metamask/network-controller": "^20.0.0",
"@metamask/polling-controller": "^9.0.0",
"@metamask/preferences-controller": "^13.0.0",
"@metamask/rpc-errors": "^6.3.1",
"@metamask/utils": "^9.0.0",
"@metamask/utils": "^9.1.0",
"@types/bn.js": "^5.1.5",
"@types/uuid": "^8.3.0",
"async-mutex": "^0.5.0",
"bn.js": "^5.2.1",
"cockatiel": "^3.1.2",
"immer": "^9.0.6",
"lodash": "^4.17.21",
"multiformats": "^9.5.2",
"multiformats": "^13.1.0",
"single-call-balance-checker-abi": "^1.0.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/ethjs-provider-http": "^0.3.0",
"@metamask/keyring-api": "^8.0.0",
"@metamask/keyring-api": "^8.0.1",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
Expand All @@ -85,7 +86,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~4.9.5"
"typescript": "~5.0.4"
},
"peerDependencies": {
"@metamask/accounts-controller": "^17.0.0",
Expand Down
Loading

0 comments on commit 820b9be

Please sign in to comment.