diff --git a/.changeset/itchy-clouds-wait.md b/.changeset/itchy-clouds-wait.md new file mode 100644 index 000000000..3b476ba64 --- /dev/null +++ b/.changeset/itchy-clouds-wait.md @@ -0,0 +1,6 @@ +--- +'@openzeppelin/wizard': minor +'@openzeppelin/wizard-common': patch +--- + +**Breaking change**: Use ERC20Bridgeable from OpenZeppelin Contracts 5.4.0 instead of Community Contracts diff --git a/package.json b/package.json index 76fbbd892..77cf1226c 100644 --- a/package.json +++ b/package.json @@ -30,10 +30,10 @@ "devDependencies": { "@eslint/js": "^9.21.0", "concurrently": "^9.1.2", - "eslint": "^9.21.0", + "eslint": "^9.33.0", "eslint-config-prettier": "^10.1.1", "eslint-plugin-prettier": "^5.2.6", - "eslint-plugin-unicorn": "^59.0.0", + "eslint-plugin-unicorn": "^60.0.0", "prettier": "^3.5.3", "prettier-plugin-svelte": "^3.3.3", "typescript": "^5.7.3", diff --git a/packages/common/src/ai/descriptions/solidity.ts b/packages/common/src/ai/descriptions/solidity.ts index f6438fdd3..e5df01346 100644 --- a/packages/common/src/ai/descriptions/solidity.ts +++ b/packages/common/src/ai/descriptions/solidity.ts @@ -30,7 +30,7 @@ export const solidityERC20Descriptions = { flashmint: "Whether to include built-in flash loans to allow lending tokens without requiring collateral as long as they're returned in the same transaction.", crossChainBridging: - 'Whether to allow authorized bridge contracts to mint and burn tokens for cross-chain transfers. Options are to use custom bridges on any chain, or the SuperchainERC20 standard with the predeployed SuperchainTokenBridge. Emphasize that these features are experimental, not audited and are subject to change. The SuperchainERC20 feature is only available on chains in the Superchain, and requires deploying your contract to the same address on every chain in the Superchain.', + 'Whether to allow authorized bridge contracts to mint and burn tokens for cross-chain transfers. Options are to use custom bridges on any chain, or the SuperchainERC20 standard with the predeployed SuperchainTokenBridge. The SuperchainERC20 feature is only available on chains in the Superchain, and requires deploying your contract to the same address on every chain in the Superchain.', premintChainId: 'The chain ID of the network on which to premint tokens.', callback: 'Whether to include support for code execution after transfers and approvals on recipient contracts in a single transaction.', diff --git a/packages/core/solidity/package.json b/packages/core/solidity/package.json index 804075fab..d69be91d2 100644 --- a/packages/core/solidity/package.json +++ b/packages/core/solidity/package.json @@ -23,8 +23,8 @@ }, "devDependencies": { "@openzeppelin/community-contracts": "https://github.com/OpenZeppelin/openzeppelin-community-contracts", - "@openzeppelin/contracts": "^5.3.0", - "@openzeppelin/contracts-upgradeable": "^5.3.0", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", "@types/node": "^20.0.0", "@types/semver": "^7.5.7", "ava": "^6.0.0", @@ -36,4 +36,4 @@ "ts-node": "^10.4.0", "typescript": "^5.0.0" } -} +} \ No newline at end of file diff --git a/packages/core/solidity/src/account.test.ts.md b/packages/core/solidity/src/account.test.ts.md index da256f549..7eee5100a 100644 --- a/packages/core/solidity/src/account.test.ts.md +++ b/packages/core/solidity/src/account.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -36,7 +36,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -69,7 +69,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -96,7 +96,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -124,7 +124,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -152,7 +152,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -181,7 +181,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -218,7 +218,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -259,7 +259,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -294,7 +294,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -335,7 +335,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -377,7 +377,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -395,7 +395,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -419,7 +419,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -437,7 +437,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -456,7 +456,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -475,7 +475,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -497,7 +497,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -525,7 +525,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -581,7 +581,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -631,7 +631,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -687,7 +687,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -744,7 +744,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -770,7 +770,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -804,7 +804,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -830,7 +830,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -857,7 +857,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -884,7 +884,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -914,7 +914,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -950,7 +950,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1014,7 +1014,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1074,7 +1074,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1138,7 +1138,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1203,7 +1203,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1229,7 +1229,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1263,7 +1263,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1289,7 +1289,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1316,7 +1316,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1343,7 +1343,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1373,7 +1373,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1409,7 +1409,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1473,7 +1473,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1533,7 +1533,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1597,7 +1597,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1662,7 +1662,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1688,7 +1688,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1722,7 +1722,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1748,7 +1748,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1775,7 +1775,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1802,7 +1802,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1832,7 +1832,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -1868,7 +1868,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1932,7 +1932,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -1992,7 +1992,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -2056,7 +2056,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -2121,7 +2121,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2163,7 +2163,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2213,7 +2213,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2255,7 +2255,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2298,7 +2298,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2341,7 +2341,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2387,7 +2387,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2439,7 +2439,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -2519,7 +2519,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -2595,7 +2595,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -2675,7 +2675,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -2756,7 +2756,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2806,7 +2806,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2864,7 +2864,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2916,7 +2916,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -2969,7 +2969,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -3022,7 +3022,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -3076,7 +3076,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ @@ -3136,7 +3136,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -3225,7 +3225,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -3310,7 +3310,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ @@ -3399,7 +3399,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ diff --git a/packages/core/solidity/src/account.test.ts.snap b/packages/core/solidity/src/account.test.ts.snap index 13cd60956..e8d46f625 100644 Binary files a/packages/core/solidity/src/account.test.ts.snap and b/packages/core/solidity/src/account.test.ts.snap differ diff --git a/packages/core/solidity/src/contract.test.ts.md b/packages/core/solidity/src/contract.test.ts.md index 8a9748522..f0f01afb2 100644 --- a/packages/core/solidity/src/contract.test.ts.md +++ b/packages/core/solidity/src/contract.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -21,7 +21,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Footec {␊ @@ -33,7 +33,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Bar} from "./Bar.sol";␊ @@ -47,7 +47,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Bar} from "./Bar.sol";␊ @@ -62,7 +62,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Bar} from "./Bar.sol";␊ @@ -77,7 +77,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Bar} from "./Bar.sol";␊ @@ -93,7 +93,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -105,7 +105,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -125,7 +125,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -149,7 +149,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -162,7 +162,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -177,7 +177,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -192,7 +192,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Bar} from "./Bar.sol";␊ @@ -209,7 +209,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -224,7 +224,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -240,7 +240,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -253,7 +253,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Foo {␊ @@ -267,7 +267,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract FooBarBaz {␊ @@ -279,7 +279,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ /// @custom:security-contact security@example.com␊ diff --git a/packages/core/solidity/src/contract.test.ts.snap b/packages/core/solidity/src/contract.test.ts.snap index e51df0f83..f14822349 100644 Binary files a/packages/core/solidity/src/contract.test.ts.snap and b/packages/core/solidity/src/contract.test.ts.snap differ diff --git a/packages/core/solidity/src/custom.test.ts.md b/packages/core/solidity/src/custom.test.ts.md index e23c2db14..7906d5648 100644 --- a/packages/core/solidity/src/custom.test.ts.md +++ b/packages/core/solidity/src/custom.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract MyContract {␊ @@ -21,7 +21,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract Contract {␊ @@ -33,7 +33,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ @@ -57,7 +57,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ @@ -75,7 +75,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ @@ -106,7 +106,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract MyContract {␊ @@ -118,7 +118,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ @@ -133,7 +133,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -150,7 +150,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ @@ -165,7 +165,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ diff --git a/packages/core/solidity/src/custom.test.ts.snap b/packages/core/solidity/src/custom.test.ts.snap index 62f68ccd2..6e45868eb 100644 Binary files a/packages/core/solidity/src/custom.test.ts.snap and b/packages/core/solidity/src/custom.test.ts.snap differ diff --git a/packages/core/solidity/src/environments/hardhat/package-lock.json b/packages/core/solidity/src/environments/hardhat/package-lock.json index 26d9cf4de..e16f27b65 100644 --- a/packages/core/solidity/src/environments/hardhat/package-lock.json +++ b/packages/core/solidity/src/environments/hardhat/package-lock.json @@ -9,8 +9,8 @@ "version": "0.0.1", "license": "ISC", "devDependencies": { - "@nomicfoundation/hardhat-toolbox": "^6.0.0", - "@openzeppelin/contracts": "^5.0.0", + "@nomicfoundation/hardhat-toolbox": "^6.1.0", + "@openzeppelin/contracts": "^5.4.0", "hardhat": "^2.16.1" } }, @@ -704,56 +704,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@metamask/eth-sig-util": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", - "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^6.2.1", - "ethjs-util": "^0.1.6", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, "node_modules/@noble/ciphers": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", @@ -851,28 +801,28 @@ } }, "node_modules/@nomicfoundation/edr": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.8.0.tgz", - "integrity": "sha512-dwWRrghSVBQDpt0wP+6RXD8BMz2i/9TI34TcmZqeEAZuCLei3U9KZRgGTKVAM1rMRvrpf5ROfPqrWNetKVUTag==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.11.3.tgz", + "integrity": "sha512-kqILRkAd455Sd6v8mfP3C1/0tCOynJWY+Ir+k/9Boocu2kObCrsFgG+ZWB7fSBVdd9cPVSNrnhWS+V+PEo637g==", "dev": true, "license": "MIT", "dependencies": { - "@nomicfoundation/edr-darwin-arm64": "0.8.0", - "@nomicfoundation/edr-darwin-x64": "0.8.0", - "@nomicfoundation/edr-linux-arm64-gnu": "0.8.0", - "@nomicfoundation/edr-linux-arm64-musl": "0.8.0", - "@nomicfoundation/edr-linux-x64-gnu": "0.8.0", - "@nomicfoundation/edr-linux-x64-musl": "0.8.0", - "@nomicfoundation/edr-win32-x64-msvc": "0.8.0" + "@nomicfoundation/edr-darwin-arm64": "0.11.3", + "@nomicfoundation/edr-darwin-x64": "0.11.3", + "@nomicfoundation/edr-linux-arm64-gnu": "0.11.3", + "@nomicfoundation/edr-linux-arm64-musl": "0.11.3", + "@nomicfoundation/edr-linux-x64-gnu": "0.11.3", + "@nomicfoundation/edr-linux-x64-musl": "0.11.3", + "@nomicfoundation/edr-win32-x64-msvc": "0.11.3" }, "engines": { "node": ">= 18" } }, "node_modules/@nomicfoundation/edr-darwin-arm64": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.8.0.tgz", - "integrity": "sha512-sKTmOu/P5YYhxT0ThN2Pe3hmCE/5Ag6K/eYoiavjLWbR7HEb5ZwPu2rC3DpuUk1H+UKJqt7o4/xIgJxqw9wu6A==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.11.3.tgz", + "integrity": "sha512-w0tksbdtSxz9nuzHKsfx4c2mwaD0+l5qKL2R290QdnN9gi9AV62p9DHkOgfBdyg6/a6ZlnQqnISi7C9avk/6VA==", "dev": true, "license": "MIT", "engines": { @@ -880,9 +830,9 @@ } }, "node_modules/@nomicfoundation/edr-darwin-x64": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.8.0.tgz", - "integrity": "sha512-8ymEtWw1xf1Id1cc42XIeE+9wyo3Dpn9OD/X8GiaMz9R70Ebmj2g+FrbETu8o6UM+aL28sBZQCiCzjlft2yWAg==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.11.3.tgz", + "integrity": "sha512-QR4jAFrPbOcrO7O2z2ESg+eUeIZPe2bPIlQYgiJ04ltbSGW27FblOzdd5+S3RoOD/dsZGKAvvy6dadBEl0NgoA==", "dev": true, "license": "MIT", "engines": { @@ -890,9 +840,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.8.0.tgz", - "integrity": "sha512-h/wWzS2EyQuycz+x/SjMRbyA+QMCCVmotRsgM1WycPARvVZWIVfwRRsKoXKdCftsb3S8NTprqBdJlOmsFyETFA==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.11.3.tgz", + "integrity": "sha512-Ktjv89RZZiUmOFPspuSBVJ61mBZQ2+HuLmV67InNlh9TSUec/iDjGIwAn59dx0bF/LOSrM7qg5od3KKac4LJDQ==", "dev": true, "license": "MIT", "engines": { @@ -900,9 +850,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-arm64-musl": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.8.0.tgz", - "integrity": "sha512-gnWxDgdkka0O9GpPX/gZT3REeKYV28Guyg13+Vj/bbLpmK1HmGh6Kx+fMhWv+Ht/wEmGDBGMCW1wdyT/CftJaQ==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.11.3.tgz", + "integrity": "sha512-B3sLJx1rL2E9pfdD4mApiwOZSrX0a/KQSBWdlq1uAhFKqkl00yZaY4LejgZndsJAa4iKGQJlGnw4HCGeVt0+jA==", "dev": true, "license": "MIT", "engines": { @@ -910,9 +860,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-x64-gnu": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.8.0.tgz", - "integrity": "sha512-DTMiAkgAx+nyxcxKyxFZk1HPakXXUCgrmei7r5G7kngiggiGp/AUuBBWFHi8xvl2y04GYhro5Wp+KprnLVoAPA==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.11.3.tgz", + "integrity": "sha512-D/4cFKDXH6UYyKPu6J3Y8TzW11UzeQI0+wS9QcJzjlrrfKj0ENW7g9VihD1O2FvXkdkTjcCZYb6ai8MMTCsaVw==", "dev": true, "license": "MIT", "engines": { @@ -920,9 +870,9 @@ } }, "node_modules/@nomicfoundation/edr-linux-x64-musl": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.8.0.tgz", - "integrity": "sha512-iTITWe0Zj8cNqS0xTblmxPbHVWwEtMiDC+Yxwr64d7QBn/1W0ilFQ16J8gB6RVVFU3GpfNyoeg3tUoMpSnrm6Q==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.11.3.tgz", + "integrity": "sha512-ergXuIb4nIvmf+TqyiDX5tsE49311DrBky6+jNLgsGDTBaN1GS3OFwFS8I6Ri/GGn6xOaT8sKu3q7/m+WdlFzg==", "dev": true, "license": "MIT", "engines": { @@ -930,88 +880,19 @@ } }, "node_modules/@nomicfoundation/edr-win32-x64-msvc": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.8.0.tgz", - "integrity": "sha512-mNRDyd/C3j7RMcwapifzv2K57sfA5xOw8g2U84ZDvgSrXVXLC99ZPxn9kmolb+dz8VMm9FONTZz9ESS6v8DTnA==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.11.3.tgz", + "integrity": "sha512-snvEf+WB3OV0wj2A7kQ+ZQqBquMcrozSLXcdnMdEl7Tmn+KDCbmFKBt3Tk0X3qOU4RKQpLPnTxdM07TJNVtung==", "dev": true, "license": "MIT", "engines": { "node": ">= 18" } }, - "node_modules/@nomicfoundation/ethereumjs-common": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", - "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nomicfoundation/ethereumjs-util": "9.0.4" - } - }, - "node_modules/@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", - "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", - "dev": true, - "license": "MPL-2.0", - "bin": { - "rlp": "bin/rlp.cjs" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@nomicfoundation/ethereumjs-tx": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", - "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.4", - "@nomicfoundation/ethereumjs-rlp": "5.0.4", - "@nomicfoundation/ethereumjs-util": "9.0.4", - "ethereum-cryptography": "0.1.3" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "c-kzg": "^2.1.2" - }, - "peerDependenciesMeta": { - "c-kzg": { - "optional": true - } - } - }, - "node_modules/@nomicfoundation/ethereumjs-util": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", - "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@nomicfoundation/ethereumjs-rlp": "5.0.4", - "ethereum-cryptography": "0.1.3" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "c-kzg": "^2.1.2" - }, - "peerDependenciesMeta": { - "c-kzg": { - "optional": true - } - } - }, "node_modules/@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.8.tgz", - "integrity": "sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.1.0.tgz", + "integrity": "sha512-GPhBNafh1fCnVD9Y7BYvoLnblnvfcq3j8YDbO1gGe/1nOFWzGmV7gFu5DkwFXF+IpYsS+t96o9qc/mPu3V3Vfw==", "dev": true, "license": "MIT", "peer": true, @@ -1022,16 +903,16 @@ "ordinal": "^1.0.3" }, "peerDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ethers": "^3.1.0", "chai": "^4.2.0", - "ethers": "^6.1.0", - "hardhat": "^2.9.4" + "ethers": "^6.14.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-ethers": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz", - "integrity": "sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.1.0.tgz", + "integrity": "sha512-jx6fw3Ms7QBwFGT2MU6ICG292z0P81u6g54JjSV105+FbTZOF4FJqPksLfDybxkkOeq28eDxbqq7vpxRYyIlxA==", "dev": true, "license": "MIT", "peer": true, @@ -1040,20 +921,20 @@ "lodash.isequal": "^4.5.0" }, "peerDependencies": { - "ethers": "^6.1.0", - "hardhat": "^2.0.0" + "ethers": "^6.14.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-ignition": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.10.tgz", - "integrity": "sha512-UScXyLLG5rEm+ANchQYCDOsskdXl6ux3oCPgC24PKE/QMJEib5crGZIo8spAyzdK6vOnRW6i4FG+1qvoO0AGWA==", + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.13.tgz", + "integrity": "sha512-G4XGPWvxs9DJhZ6PE1wdvKjHkjErWbsETf4c7YxO6GUz+MJGlw+PtgbnCwhL3tQzSq3oD4MB0LGi+sK0polpUA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@nomicfoundation/ignition-core": "^0.15.10", - "@nomicfoundation/ignition-ui": "^0.15.10", + "@nomicfoundation/ignition-core": "^0.15.13", + "@nomicfoundation/ignition-ui": "^0.15.12", "chalk": "^4.0.0", "debug": "^4.3.2", "fs-extra": "^10.0.0", @@ -1061,29 +942,29 @@ "prompts": "^2.4.2" }, "peerDependencies": { - "@nomicfoundation/hardhat-verify": "^2.0.1", - "hardhat": "^2.18.0" + "@nomicfoundation/hardhat-verify": "^2.1.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-ignition-ethers": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.10.tgz", - "integrity": "sha512-P90glRiBbR4mnMKP/LePovfUJjYT2YWJjx7118i7yxssUwcaW9wFohb4bFh+236N1tqM4q7aGx9cBvHNgve3zA==", + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.14.tgz", + "integrity": "sha512-eq+5n+c1DW18/Xp8/QrHBBvG5QaKUxYF/byol4f1jrnZ1zAy0OrqEa/oaNFWchhpLalX7d7suk/2EL0PbT0CDQ==", "dev": true, "license": "MIT", "peer": true, "peerDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.4", - "@nomicfoundation/hardhat-ignition": "^0.15.10", - "@nomicfoundation/ignition-core": "^0.15.10", - "ethers": "^6.7.0", - "hardhat": "^2.18.0" + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition": "^0.15.13", + "@nomicfoundation/ignition-core": "^0.15.13", + "ethers": "^6.14.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-network-helpers": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.12.tgz", - "integrity": "sha512-xTNQNI/9xkHvjmCJnJOTyqDSl8uq1rKb2WOVmixQxFtRd7Oa3ecO8zM0cyC2YmOK+jHB9WPZ+F/ijkHg1CoORA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.1.0.tgz", + "integrity": "sha512-ZS+NulZuR99NUHt2VwcgZvgeD6Y63qrbORNRuKO+lTowJxNVsrJ0zbRx1j5De6G3dOno5pVGvuYSq2QVG0qCYg==", "dev": true, "license": "MIT", "peer": true, @@ -1091,29 +972,29 @@ "ethereumjs-util": "^7.1.4" }, "peerDependencies": { - "hardhat": "^2.9.5" + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.0.0.tgz", - "integrity": "sha512-3qm3VuDp5xD8UyfhYPPfZHnCc0M/V5yfRSTSDdOuI8DTrmYJkMNW7QrTNGalMCigWn3suBghSw9YcMOyGDJ7Lg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.1.0.tgz", + "integrity": "sha512-iAIl6pIK3F4R3JXeq+b6tiShXUrp1sQRiPfqoCMUE7QLUzoFifzGV97IDRL6e73pWsMKpUQBsHBvTCsqn+ZdpA==", "dev": true, "license": "MIT", "peerDependencies": { - "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", - "@nomicfoundation/hardhat-ethers": "^3.0.0", - "@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.0", - "@nomicfoundation/hardhat-verify": "^2.0.0", + "@nomicfoundation/hardhat-chai-matchers": "^2.1.0", + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.14", + "@nomicfoundation/hardhat-network-helpers": "^1.1.0", + "@nomicfoundation/hardhat-verify": "^2.1.0", "@typechain/ethers-v6": "^0.5.0", "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", "@types/mocha": ">=9.1.0", - "@types/node": ">=18.0.0", + "@types/node": ">=20.0.0", "chai": "^4.2.0", "ethers": "^6.14.0", - "hardhat": "^2.11.0", + "hardhat": "^2.26.0", "hardhat-gas-reporter": "^2.3.0", "solidity-coverage": "^0.8.1", "ts-node": ">=8.0.0", @@ -1122,9 +1003,9 @@ } }, "node_modules/@nomicfoundation/hardhat-verify": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.13.tgz", - "integrity": "sha512-i57GX1sC0kYGyRVnbQrjjyBTpWTKgrvKC+jH8CMKV6gHp959Upb8lKaZ58WRHIU0espkulTxLnacYeUDirwJ2g==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.1.tgz", + "integrity": "sha512-K1plXIS42xSHDJZRkrE2TZikqxp9T4y6jUMUNI/imLgN5uCcEQokmfU0DlyP9zzHncYK92HlT5IWP35UVCLrPw==", "dev": true, "license": "MIT", "peer": true, @@ -1140,13 +1021,13 @@ "undici": "^5.14.0" }, "peerDependencies": { - "hardhat": "^2.0.4" + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/ignition-core": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.10.tgz", - "integrity": "sha512-AWvCviNlBkPT8EKcg34N+yUdQTYFiC/HdpfFZdw8oMFuAs9SMZE0zQA9gJQSCay41GbuyXt2Kietp5/1/nlBIA==", + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.13.tgz", + "integrity": "sha512-Z4T1WIbw0EqdsN9RxtnHeQXBi7P/piAmCu8bZmReIdDo/2h06qgKWxjDoNfc9VBFZJ0+Dx79tkgQR3ewxMDcpA==", "dev": true, "license": "MIT", "peer": true, @@ -1155,7 +1036,7 @@ "@nomicfoundation/solidity-analyzer": "^0.1.1", "cbor": "^9.0.0", "debug": "^4.3.2", - "ethers": "^6.7.0", + "ethers": "^6.14.0", "fs-extra": "^10.0.0", "immer": "10.0.2", "lodash": "4.17.21", @@ -1202,9 +1083,9 @@ } }, "node_modules/@nomicfoundation/ignition-ui": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.10.tgz", - "integrity": "sha512-82XQPF+1fvxTimDUPgDVwpTjHjfjFgFs84rERbBiMLQbz6sPtgTlV8HHrlbMx8tT/JKCI/SCU4gxV8xA4CPfcg==", + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.12.tgz", + "integrity": "sha512-nQl8tusvmt1ANoyIj5RQl9tVSEmG0FnNbtwnWbTim+F8JLm4YLHWS0yEgYUZC+BEO3oS0D8r6V8a02JGZJgqiQ==", "dev": true, "peer": true }, @@ -1305,9 +1186,9 @@ } }, "node_modules/@openzeppelin/contracts": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.3.0.tgz", - "integrity": "sha512-zj/KGoW7zxWUE8qOI++rUM18v+VeLTTzKs/DJFkSzHpQFPD/jKKF0TrMxBfGLl3kpdELCNccvB3zmofSzm4nlA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", "dev": true, "license": "MIT" }, @@ -1649,11 +1530,12 @@ } }, "node_modules/@types/bn.js": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", - "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*" } @@ -1689,13 +1571,6 @@ "@types/node": "*" } }, - "node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -1718,6 +1593,7 @@ "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.20.0" } @@ -1728,6 +1604,7 @@ "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*" } @@ -1746,6 +1623,7 @@ "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*" } @@ -2046,16 +1924,33 @@ "node": ">= 4.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz", - "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -2067,11 +1962,12 @@ "license": "MIT" }, "node_modules/base-x": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", - "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "safe-buffer": "^5.0.1" } @@ -2094,7 +1990,8 @@ "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/bn.js": { "version": "5.2.1", @@ -2190,6 +2087,7 @@ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -2205,6 +2103,7 @@ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "base-x": "^3.0.2" } @@ -2215,6 +2114,7 @@ "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -2233,7 +2133,8 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/bytes": { "version": "3.1.2", @@ -2245,6 +2146,26 @@ "node": ">= 0.8" } }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -2260,6 +2181,24 @@ "node": ">= 0.4" } }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -2392,6 +2331,7 @@ "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "inherits": "^2.0.4", "safe-buffer": "^5.2.1" @@ -2668,6 +2608,7 @@ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -2682,6 +2623,7 @@ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -2814,6 +2756,25 @@ "license": "MIT", "peer": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3117,6 +3078,7 @@ "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", @@ -3135,51 +3097,6 @@ "setimmediate": "^1.0.5" } }, - "node_modules/ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "deprecated": "This library has been deprecated and usage is discouraged.", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - } - }, - "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/ethereumjs-abi/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, "node_modules/ethereumjs-util": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", @@ -3271,21 +3188,6 @@ "license": "MIT", "peer": true }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -3300,6 +3202,7 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -3443,6 +3346,23 @@ } } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -3462,9 +3382,9 @@ } }, "node_modules/form-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", - "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "dev": true, "license": "MIT", "peer": true, @@ -3887,22 +3807,17 @@ } }, "node_modules/hardhat": { - "version": "2.22.19", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.19.tgz", - "integrity": "sha512-jptJR5o6MCgNbhd7eKa3mrteR+Ggq1exmE5RUL5ydQEVKcZm0sss5laa86yZ0ixIavIvF4zzS7TdGDuyopj0sQ==", + "version": "2.26.2", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.26.2.tgz", + "integrity": "sha512-uIETdC1MAWSnu+48B+583r3b8JqHtkBGEiXoAPV5hcXYGkCW5Fnnpn7SIgPa8owhObm9oUqIqMXMJ6H92N7Pyg==", "dev": true, "license": "MIT", "dependencies": { + "@ethereumjs/util": "^9.1.0", "@ethersproject/abi": "^5.1.2", - "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/edr": "^0.8.0", - "@nomicfoundation/ethereumjs-common": "4.0.4", - "@nomicfoundation/ethereumjs-tx": "5.0.4", - "@nomicfoundation/ethereumjs-util": "9.0.4", + "@nomicfoundation/edr": "^0.11.3", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", @@ -3913,7 +3828,6 @@ "enquirer": "^2.3.0", "env-paths": "^2.2.0", "ethereum-cryptography": "^1.0.3", - "ethereumjs-abi": "^0.6.8", "find-up": "^5.0.0", "fp-ts": "1.19.3", "fs-extra": "^7.0.1", @@ -3922,6 +3836,7 @@ "json-stream-stringify": "^3.1.4", "keccak": "^3.0.2", "lodash": "^4.17.11", + "micro-eth-signer": "^0.14.0", "mnemonist": "^0.38.0", "mocha": "^10.0.0", "p-map": "^4.0.0", @@ -4010,13 +3925,134 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/hardhat-gas-reporter/node_modules/ethereum-cryptography": { + "node_modules/hardhat-gas-reporter/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/hardhat/node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "dev": true, + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/hardhat/node_modules/@ethereumjs/util": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.1.0.tgz", + "integrity": "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/hardhat/node_modules/@ethereumjs/util/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/@ethereumjs/util/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/@ethereumjs/util/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", @@ -4024,43 +4060,30 @@ "@scure/bip39": "1.3.0" } }, - "node_modules/hardhat-gas-reporter/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "node_modules/hardhat/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "dev": true, - "license": "ISC", - "peer": true, + "license": "MIT", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "@noble/hashes": "1.4.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://paulmillr.com/funding/" } }, - "node_modules/hardhat-gas-reporter/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "node_modules/hardhat/node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, + "license": "MIT", "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">= 16" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://paulmillr.com/funding/" } }, "node_modules/hardhat/node_modules/@noble/hashes": { @@ -4191,6 +4214,20 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -4228,6 +4265,7 @@ "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -4437,6 +4475,20 @@ "node": ">=8" } }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4476,6 +4528,7 @@ "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6.5.0", "npm": ">=3" @@ -4501,6 +4554,23 @@ "node": ">=8" } }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -4514,6 +4584,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4833,6 +4911,7 @@ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -4859,6 +4938,47 @@ "node": ">= 8" } }, + "node_modules/micro-eth-signer": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/micro-eth-signer/-/micro-eth-signer-0.14.0.tgz", + "integrity": "sha512-5PLLzHiVYPWClEvZIXXFu5yutzpadb73rnQCpUqIHu3No3coFuWQNfE5tkBQJ7djuLYl6aRLaS0MgWJYGoqiBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.8.1", + "@noble/hashes": "~1.7.1", + "micro-packed": "~0.7.2" + } + }, + "node_modules/micro-eth-signer/node_modules/@noble/curves": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.2.tgz", + "integrity": "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.7.2" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micro-eth-signer/node_modules/@noble/hashes": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.2.tgz", + "integrity": "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/micro-ftch": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", @@ -4867,6 +4987,29 @@ "license": "MIT", "peer": true }, + "node_modules/micro-packed": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/micro-packed/-/micro-packed-0.7.3.tgz", + "integrity": "sha512-2Milxs+WNC00TRlem41oRswvw31146GiSaoCT7s3Xi2gMUglW5QBeqlQaZeHr5tJx9nm3i57LNXPqxOOaWtTYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micro-packed/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -5498,22 +5641,61 @@ } }, "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", + "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "~1.1.3", + "create-hmac": "^1.1.7", + "ripemd160": "=2.0.1", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.11", + "to-buffer": "^1.2.0" }, "engines": { "node": ">=0.12" } }, + "node_modules/pbkdf2/node_modules/create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" + } + }, + "node_modules/pbkdf2/node_modules/hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/pbkdf2/node_modules/ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^2.0.0", + "inherits": "^2.0.1" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -5545,6 +5727,17 @@ "node": ">=6" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -5799,6 +5992,7 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -5810,6 +6004,7 @@ "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", "dev": true, "license": "MPL-2.0", + "peer": true, "dependencies": { "bn.js": "^5.2.0" }, @@ -6021,7 +6216,8 @@ "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/secp256k1": { "version": "4.0.4", @@ -6030,6 +6226,7 @@ "dev": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "dependencies": { "elliptic": "^6.5.7", "node-addon-api": "^5.0.0", @@ -6040,11 +6237,12 @@ } }, "node_modules/secp256k1/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/secp256k1/node_modules/elliptic": { "version": "6.6.1", @@ -6052,6 +6250,7 @@ "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -6067,7 +6266,8 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/semver": { "version": "6.3.1", @@ -6089,12 +6289,32 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/setprototypeof": { "version": "1.2.0", @@ -6104,17 +6324,25 @@ "license": "ISC" }, "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", "dev": true, "license": "(MIT AND BSD-3-Clause)", + "peer": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" }, "bin": { "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/sha1": { @@ -6660,6 +6888,7 @@ "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "is-hex-prefixed": "1.0.0" }, @@ -6820,6 +7049,22 @@ "node": ">=0.6.0" } }, + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6942,20 +7187,6 @@ "dev": true, "license": "MIT" }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true, - "license": "Unlicense" - }, - "node_modules/tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", - "dev": true, - "license": "Unlicense" - }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -7121,6 +7352,22 @@ "node": ">= 4.0.0" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/typescript": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", @@ -7180,7 +7427,8 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/universalify": { "version": "2.0.1", @@ -7441,6 +7689,29 @@ "which": "bin/which" } }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", diff --git a/packages/core/solidity/src/environments/hardhat/package.json b/packages/core/solidity/src/environments/hardhat/package.json index ee8d8a1af..625705c98 100644 --- a/packages/core/solidity/src/environments/hardhat/package.json +++ b/packages/core/solidity/src/environments/hardhat/package.json @@ -9,8 +9,8 @@ "author": "", "license": "ISC", "devDependencies": { - "@openzeppelin/contracts": "^5.0.0", - "@nomicfoundation/hardhat-toolbox": "^6.0.0", + "@openzeppelin/contracts": "^5.4.0", + "@nomicfoundation/hardhat-toolbox": "^6.1.0", "hardhat": "^2.16.1" } } diff --git a/packages/core/solidity/src/environments/hardhat/upgradeable/package-lock.json b/packages/core/solidity/src/environments/hardhat/upgradeable/package-lock.json index cc70e3b10..b7cb42b38 100644 --- a/packages/core/solidity/src/environments/hardhat/upgradeable/package-lock.json +++ b/packages/core/solidity/src/environments/hardhat/upgradeable/package-lock.json @@ -9,9 +9,9 @@ "version": "0.0.1", "license": "ISC", "devDependencies": { - "@nomicfoundation/hardhat-toolbox": "^6.0.0", - "@openzeppelin/contracts": "^5.0.0", - "@openzeppelin/contracts-upgradeable": "^5.0.0", + "@nomicfoundation/hardhat-toolbox": "^6.1.0", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", "@openzeppelin/hardhat-upgrades": "^3.0.0", "hardhat": "^2.16.1" } @@ -1565,9 +1565,9 @@ } }, "node_modules/@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.8.tgz", - "integrity": "sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.1.0.tgz", + "integrity": "sha512-GPhBNafh1fCnVD9Y7BYvoLnblnvfcq3j8YDbO1gGe/1nOFWzGmV7gFu5DkwFXF+IpYsS+t96o9qc/mPu3V3Vfw==", "dev": true, "license": "MIT", "peer": true, @@ -1578,16 +1578,16 @@ "ordinal": "^1.0.3" }, "peerDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ethers": "^3.1.0", "chai": "^4.2.0", - "ethers": "^6.1.0", - "hardhat": "^2.9.4" + "ethers": "^6.14.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-ethers": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz", - "integrity": "sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.1.0.tgz", + "integrity": "sha512-jx6fw3Ms7QBwFGT2MU6ICG292z0P81u6g54JjSV105+FbTZOF4FJqPksLfDybxkkOeq28eDxbqq7vpxRYyIlxA==", "dev": true, "license": "MIT", "peer": true, @@ -1596,20 +1596,20 @@ "lodash.isequal": "^4.5.0" }, "peerDependencies": { - "ethers": "^6.1.0", - "hardhat": "^2.0.0" + "ethers": "^6.14.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-ignition": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.10.tgz", - "integrity": "sha512-UScXyLLG5rEm+ANchQYCDOsskdXl6ux3oCPgC24PKE/QMJEib5crGZIo8spAyzdK6vOnRW6i4FG+1qvoO0AGWA==", + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.13.tgz", + "integrity": "sha512-G4XGPWvxs9DJhZ6PE1wdvKjHkjErWbsETf4c7YxO6GUz+MJGlw+PtgbnCwhL3tQzSq3oD4MB0LGi+sK0polpUA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@nomicfoundation/ignition-core": "^0.15.10", - "@nomicfoundation/ignition-ui": "^0.15.10", + "@nomicfoundation/ignition-core": "^0.15.13", + "@nomicfoundation/ignition-ui": "^0.15.12", "chalk": "^4.0.0", "debug": "^4.3.2", "fs-extra": "^10.0.0", @@ -1617,29 +1617,29 @@ "prompts": "^2.4.2" }, "peerDependencies": { - "@nomicfoundation/hardhat-verify": "^2.0.1", - "hardhat": "^2.18.0" + "@nomicfoundation/hardhat-verify": "^2.1.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-ignition-ethers": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.10.tgz", - "integrity": "sha512-P90glRiBbR4mnMKP/LePovfUJjYT2YWJjx7118i7yxssUwcaW9wFohb4bFh+236N1tqM4q7aGx9cBvHNgve3zA==", + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.14.tgz", + "integrity": "sha512-eq+5n+c1DW18/Xp8/QrHBBvG5QaKUxYF/byol4f1jrnZ1zAy0OrqEa/oaNFWchhpLalX7d7suk/2EL0PbT0CDQ==", "dev": true, "license": "MIT", "peer": true, "peerDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.4", - "@nomicfoundation/hardhat-ignition": "^0.15.10", - "@nomicfoundation/ignition-core": "^0.15.10", - "ethers": "^6.7.0", - "hardhat": "^2.18.0" + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition": "^0.15.13", + "@nomicfoundation/ignition-core": "^0.15.13", + "ethers": "^6.14.0", + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-network-helpers": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.12.tgz", - "integrity": "sha512-xTNQNI/9xkHvjmCJnJOTyqDSl8uq1rKb2WOVmixQxFtRd7Oa3ecO8zM0cyC2YmOK+jHB9WPZ+F/ijkHg1CoORA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.1.0.tgz", + "integrity": "sha512-ZS+NulZuR99NUHt2VwcgZvgeD6Y63qrbORNRuKO+lTowJxNVsrJ0zbRx1j5De6G3dOno5pVGvuYSq2QVG0qCYg==", "dev": true, "license": "MIT", "peer": true, @@ -1647,29 +1647,29 @@ "ethereumjs-util": "^7.1.4" }, "peerDependencies": { - "hardhat": "^2.9.5" + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/hardhat-toolbox": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.0.0.tgz", - "integrity": "sha512-3qm3VuDp5xD8UyfhYPPfZHnCc0M/V5yfRSTSDdOuI8DTrmYJkMNW7QrTNGalMCigWn3suBghSw9YcMOyGDJ7Lg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.1.0.tgz", + "integrity": "sha512-iAIl6pIK3F4R3JXeq+b6tiShXUrp1sQRiPfqoCMUE7QLUzoFifzGV97IDRL6e73pWsMKpUQBsHBvTCsqn+ZdpA==", "dev": true, "license": "MIT", "peerDependencies": { - "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", - "@nomicfoundation/hardhat-ethers": "^3.0.0", - "@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.0", - "@nomicfoundation/hardhat-verify": "^2.0.0", + "@nomicfoundation/hardhat-chai-matchers": "^2.1.0", + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.14", + "@nomicfoundation/hardhat-network-helpers": "^1.1.0", + "@nomicfoundation/hardhat-verify": "^2.1.0", "@typechain/ethers-v6": "^0.5.0", "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", "@types/mocha": ">=9.1.0", - "@types/node": ">=18.0.0", + "@types/node": ">=20.0.0", "chai": "^4.2.0", "ethers": "^6.14.0", - "hardhat": "^2.11.0", + "hardhat": "^2.26.0", "hardhat-gas-reporter": "^2.3.0", "solidity-coverage": "^0.8.1", "ts-node": ">=8.0.0", @@ -1678,9 +1678,9 @@ } }, "node_modules/@nomicfoundation/hardhat-verify": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.14.tgz", - "integrity": "sha512-z3iVF1WYZHzcdMMUuureFpSAfcnlfJbJx3faOnGrOYg6PRTki1Ut9JAuRccnFzMHf1AmTEoSUpWcyvBCoxL5Rg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.1.tgz", + "integrity": "sha512-K1plXIS42xSHDJZRkrE2TZikqxp9T4y6jUMUNI/imLgN5uCcEQokmfU0DlyP9zzHncYK92HlT5IWP35UVCLrPw==", "dev": true, "license": "MIT", "peer": true, @@ -1696,13 +1696,13 @@ "undici": "^5.14.0" }, "peerDependencies": { - "hardhat": "^2.24.1" + "hardhat": "^2.26.0" } }, "node_modules/@nomicfoundation/ignition-core": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.10.tgz", - "integrity": "sha512-AWvCviNlBkPT8EKcg34N+yUdQTYFiC/HdpfFZdw8oMFuAs9SMZE0zQA9gJQSCay41GbuyXt2Kietp5/1/nlBIA==", + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.13.tgz", + "integrity": "sha512-Z4T1WIbw0EqdsN9RxtnHeQXBi7P/piAmCu8bZmReIdDo/2h06qgKWxjDoNfc9VBFZJ0+Dx79tkgQR3ewxMDcpA==", "dev": true, "license": "MIT", "peer": true, @@ -1711,7 +1711,7 @@ "@nomicfoundation/solidity-analyzer": "^0.1.1", "cbor": "^9.0.0", "debug": "^4.3.2", - "ethers": "^6.7.0", + "ethers": "^6.14.0", "fs-extra": "^10.0.0", "immer": "10.0.2", "lodash": "4.17.21", @@ -1758,9 +1758,9 @@ } }, "node_modules/@nomicfoundation/ignition-ui": { - "version": "0.15.10", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.10.tgz", - "integrity": "sha512-82XQPF+1fvxTimDUPgDVwpTjHjfjFgFs84rERbBiMLQbz6sPtgTlV8HHrlbMx8tT/JKCI/SCU4gxV8xA4CPfcg==", + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.12.tgz", + "integrity": "sha512-nQl8tusvmt1ANoyIj5RQl9tVSEmG0FnNbtwnWbTim+F8JLm4YLHWS0yEgYUZC+BEO3oS0D8r6V8a02JGZJgqiQ==", "dev": true, "peer": true }, @@ -1871,20 +1871,20 @@ } }, "node_modules/@openzeppelin/contracts": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.3.0.tgz", - "integrity": "sha512-zj/KGoW7zxWUE8qOI++rUM18v+VeLTTzKs/DJFkSzHpQFPD/jKKF0TrMxBfGLl3kpdELCNccvB3zmofSzm4nlA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", "dev": true, "license": "MIT" }, "node_modules/@openzeppelin/contracts-upgradeable": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.3.0.tgz", - "integrity": "sha512-yVzSSyTMWO6rapGI5tuqkcLpcGGXA0UA1vScyV5EhE5yw8By3Ewex9rDUw8lfVw0iTkvR/egjfcW5vpk03lqZg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.4.0.tgz", + "integrity": "sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ==", "dev": true, "license": "MIT", "peerDependencies": { - "@openzeppelin/contracts": "5.3.0" + "@openzeppelin/contracts": "5.4.0" } }, "node_modules/@openzeppelin/defender-sdk-base-client": { @@ -3072,13 +3072,6 @@ "@types/node": "*" } }, - "node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -3484,14 +3477,14 @@ } }, "node_modules/axios": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.1.tgz", - "integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "dev": true, "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -4928,15 +4921,16 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -5360,19 +5354,17 @@ } }, "node_modules/hardhat": { - "version": "2.25.0", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.25.0.tgz", - "integrity": "sha512-yBiA74Yj3VnTRj7lhnn8GalvBdvsMOqTKRrRATSy/2v0VIR2hR0Jcnmfn4aQBLtGAnr3Q2c8CxL0g3LYegUp+g==", + "version": "2.26.2", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.26.2.tgz", + "integrity": "sha512-uIETdC1MAWSnu+48B+583r3b8JqHtkBGEiXoAPV5hcXYGkCW5Fnnpn7SIgPa8owhObm9oUqIqMXMJ6H92N7Pyg==", "dev": true, "license": "MIT", "dependencies": { "@ethereumjs/util": "^9.1.0", "@ethersproject/abi": "^5.1.2", - "@nomicfoundation/edr": "^0.11.1", + "@nomicfoundation/edr": "^0.11.3", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", diff --git a/packages/core/solidity/src/environments/hardhat/upgradeable/package.json b/packages/core/solidity/src/environments/hardhat/upgradeable/package.json index b3c685c4e..4da184ef9 100644 --- a/packages/core/solidity/src/environments/hardhat/upgradeable/package.json +++ b/packages/core/solidity/src/environments/hardhat/upgradeable/package.json @@ -9,10 +9,10 @@ "author": "", "license": "ISC", "devDependencies": { - "@openzeppelin/contracts": "^5.0.0", - "@openzeppelin/contracts-upgradeable": "^5.0.0", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", "@openzeppelin/hardhat-upgrades": "^3.0.0", - "@nomicfoundation/hardhat-toolbox": "^6.0.0", + "@nomicfoundation/hardhat-toolbox": "^6.1.0", "hardhat": "^2.16.1" } } diff --git a/packages/core/solidity/src/erc1155.test.ts.md b/packages/core/solidity/src/erc1155.test.ts.md index 12dc5ca16..5b7de2840 100644 --- a/packages/core/solidity/src/erc1155.test.ts.md +++ b/packages/core/solidity/src/erc1155.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -32,7 +32,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -55,7 +55,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -92,7 +92,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ @@ -115,7 +115,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -132,7 +132,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -156,7 +156,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -197,7 +197,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -234,7 +234,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -287,7 +287,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ @@ -324,7 +324,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -357,7 +357,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ @@ -440,7 +440,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ @@ -533,7 +533,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ diff --git a/packages/core/solidity/src/erc1155.test.ts.snap b/packages/core/solidity/src/erc1155.test.ts.snap index dfa322671..2809eaab0 100644 Binary files a/packages/core/solidity/src/erc1155.test.ts.snap and b/packages/core/solidity/src/erc1155.test.ts.snap differ diff --git a/packages/core/solidity/src/erc20.test.ts b/packages/core/solidity/src/erc20.test.ts index aa20d9c5c..41b3d0763 100644 --- a/packages/core/solidity/src/erc20.test.ts +++ b/packages/core/solidity/src/erc20.test.ts @@ -187,34 +187,14 @@ testERC20('erc20 crossChainBridging superchain managed', { access: 'managed', }); -test('erc20 crossChainBridging custom, upgradeable not allowed', async t => { - const error = t.throws(() => - buildERC20({ - name: 'MyToken', - symbol: 'MTK', - crossChainBridging: 'custom', - upgradeable: 'transparent', - }), - ); - t.is( - (error as OptionsError).messages.crossChainBridging, - 'Upgradeability is not currently supported with Cross-Chain Bridging', - ); +testERC20('erc20 crossChainBridging custom upgradeable', { + crossChainBridging: 'custom', + upgradeable: 'transparent', }); -test('erc20 crossChainBridging superchain, upgradeable not allowed', async t => { - const error = t.throws(() => - buildERC20({ - name: 'MyToken', - symbol: 'MTK', - crossChainBridging: 'superchain', - upgradeable: 'transparent', - }), - ); - t.is( - (error as OptionsError).messages.crossChainBridging, - 'Upgradeability is not currently supported with Cross-Chain Bridging', - ); +testERC20('erc20 crossChainBridging superchain upgradeable', { + crossChainBridging: 'superchain', + upgradeable: 'transparent', }); test('erc20 crossChainBridging superchain, premintChainId required', async t => { @@ -249,7 +229,7 @@ testERC20('erc20 premint chainId crossChainBridging superchain', { crossChainBridging: 'superchain', }); -testERC20('erc20 full crossChainBridging custom non-upgradeable', { +testERC20('erc20 full crossChainBridging custom upgradeable uups', { premint: '2000', access: 'roles', burnable: true, @@ -261,6 +241,7 @@ testERC20('erc20 full crossChainBridging custom non-upgradeable', { flashmint: true, crossChainBridging: 'custom', premintChainId: '10', + upgradeable: 'uups', }); testERC20('erc20 full upgradeable transparent', { diff --git a/packages/core/solidity/src/erc20.test.ts.md b/packages/core/solidity/src/erc20.test.ts.md index d144f5651..9c9af9619 100644 --- a/packages/core/solidity/src/erc20.test.ts.md +++ b/packages/core/solidity/src/erc20.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -25,7 +25,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -41,7 +41,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -58,7 +58,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -97,7 +97,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -140,7 +140,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ @@ -179,7 +179,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -219,7 +219,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -240,7 +240,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -256,7 +256,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -277,7 +277,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -298,7 +298,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -319,7 +319,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -344,7 +344,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -373,7 +373,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ @@ -390,7 +390,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -406,7 +406,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -442,7 +442,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -478,7 +478,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -523,7 +523,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -540,27 +540,27 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ - address public immutable TOKEN_BRIDGE;␊ + address public tokenBridge;␊ error Unauthorized();␊ ␊ - constructor(address tokenBridge)␊ + constructor(address tokenBridge_)␊ ERC20("MyToken", "MTK")␊ ERC20Permit("MyToken")␊ {␊ - require(tokenBridge != address(0), "Invalid TOKEN_BRIDGE address");␊ - TOKEN_BRIDGE = tokenBridge;␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ }␊ ␊ function _checkTokenBridge(address caller) internal view override {␊ - if (caller != TOKEN_BRIDGE) revert Unauthorized();␊ + if (caller != tokenBridge) revert Unauthorized();␊ }␊ }␊ ` @@ -570,29 +570,29 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, Ownable {␊ - address public immutable TOKEN_BRIDGE;␊ + address public tokenBridge;␊ error Unauthorized();␊ ␊ - constructor(address tokenBridge, address initialOwner)␊ + constructor(address tokenBridge_, address initialOwner)␊ ERC20("MyToken", "MTK")␊ ERC20Permit("MyToken")␊ Ownable(initialOwner)␊ {␊ - require(tokenBridge != address(0), "Invalid TOKEN_BRIDGE address");␊ - TOKEN_BRIDGE = tokenBridge;␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ }␊ ␊ function _checkTokenBridge(address caller) internal view override {␊ - if (caller != TOKEN_BRIDGE) revert Unauthorized();␊ + if (caller != tokenBridge) revert Unauthorized();␊ }␊ }␊ ` @@ -602,30 +602,30 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Burnable, Ownable, ERC20Permit {␊ - address public immutable TOKEN_BRIDGE;␊ + address public tokenBridge;␊ error Unauthorized();␊ ␊ - constructor(address tokenBridge, address initialOwner)␊ + constructor(address tokenBridge_, address initialOwner)␊ ERC20("MyToken", "MTK")␊ Ownable(initialOwner)␊ ERC20Permit("MyToken")␊ {␊ - require(tokenBridge != address(0), "Invalid TOKEN_BRIDGE address");␊ - TOKEN_BRIDGE = tokenBridge;␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ }␊ ␊ function _checkTokenBridge(address caller) internal view override {␊ - if (caller != TOKEN_BRIDGE) revert Unauthorized();␊ + if (caller != tokenBridge) revert Unauthorized();␊ }␊ ␊ function mint(address to, uint256 amount) public onlyOwner {␊ @@ -639,12 +639,12 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, AccessControl, ERC20Permit {␊ @@ -681,13 +681,13 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {AuthorityUtils} from "@openzeppelin/contracts/access/manager/AuthorityUtils.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, AccessManaged, ERC20Permit {␊ @@ -711,11 +711,11 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ @@ -740,11 +740,11 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ @@ -774,12 +774,12 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, AccessControl {␊ @@ -820,12 +820,12 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, AccessManaged {␊ @@ -849,12 +849,88 @@ Generated by [AVA](https://avajs.dev). }␊ ` +## erc20 crossChainBridging custom upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20PermitUpgradeable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address tokenBridge_) public initializer {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Permit_init("MyToken");␊ + ␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging superchain upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20PermitUpgradeable {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize() public initializer {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Permit_init("MyToken");␊ + }␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + }␊ + ` + ## erc20 premint ignores chainId when not crossChainBridging > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -875,30 +951,30 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ - address public immutable TOKEN_BRIDGE;␊ + address public tokenBridge;␊ error Unauthorized();␊ ␊ - constructor(address tokenBridge, address recipient)␊ + constructor(address tokenBridge_, address recipient)␊ ERC20("MyToken", "MTK")␊ ERC20Permit("MyToken")␊ {␊ - require(tokenBridge != address(0), "Invalid TOKEN_BRIDGE address");␊ - TOKEN_BRIDGE = tokenBridge;␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ if (block.chainid == 10) {␊ _mint(recipient, 2000 * 10 ** decimals());␊ }␊ }␊ ␊ function _checkTokenBridge(address caller) internal view override {␊ - if (caller != TOKEN_BRIDGE) revert Unauthorized();␊ + if (caller != tokenBridge) revert Unauthorized();␊ }␊ }␊ ` @@ -908,11 +984,11 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ ␊ contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ @@ -939,35 +1015,53 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## erc20 full crossChainBridging custom non-upgradeable +## erc20 full crossChainBridging custom upgradeable uups > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ - import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ - import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ - import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ - import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ - import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ - import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ - import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ - import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ - import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC1363Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC1363Upgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyToken is ERC20, ERC20Bridgeable, AccessControl, ERC20Burnable, ERC20Pausable, ERC1363, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, AccessControlUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, ERC1363Upgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ bytes32 public constant TOKEN_BRIDGE_ROLE = keccak256("TOKEN_BRIDGE_ROLE");␊ error Unauthorized();␊ bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");␊ ␊ - constructor(address defaultAdmin, address tokenBridge, address recipient, address pauser, address minter)␊ - ERC20("MyToken", "MTK")␊ - ERC20Permit("MyToken")␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address defaultAdmin, address tokenBridge, address recipient, address pauser, address minter, address upgrader)␊ + public initializer␊ {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Bridgeable_init();␊ + __AccessControl_init();␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __ERC1363_init();␊ + __ERC20Permit_init("MyToken");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ _grantRole(TOKEN_BRIDGE_ROLE, tokenBridge);␊ if (block.chainid == 10) {␊ @@ -975,6 +1069,7 @@ Generated by [AVA](https://avajs.dev). }␊ _grantRole(PAUSER_ROLE, pauser);␊ _grantRole(MINTER_ROLE, minter);␊ + _grantRole(UPGRADER_ROLE, upgrader);␊ }␊ ␊ function _checkTokenBridge(address caller) internal view override {␊ @@ -992,12 +1087,18 @@ Generated by [AVA](https://avajs.dev). function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ _mint(to, amount);␊ }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyRole(UPGRADER_ROLE)␊ + {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address from, address to, uint256 value)␊ internal␊ - override(ERC20, ERC20Pausable, ERC20Votes)␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ {␊ super._update(from, to, value);␊ }␊ @@ -1005,7 +1106,7 @@ Generated by [AVA](https://avajs.dev). function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ - override(ERC20Bridgeable, AccessControl, ERC1363)␊ + override(ERC20BridgeableUpgradeable, AccessControlUpgradeable, ERC1363Upgradeable)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ @@ -1014,7 +1115,7 @@ Generated by [AVA](https://avajs.dev). function nonces(address owner)␊ public␊ view␊ - override(ERC20Permit, Nonces)␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ returns (uint256)␊ {␊ return super.nonces(owner);␊ @@ -1027,7 +1128,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ @@ -1114,7 +1215,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ @@ -1211,7 +1312,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ diff --git a/packages/core/solidity/src/erc20.test.ts.snap b/packages/core/solidity/src/erc20.test.ts.snap index 33e9034f9..fe5aa7f88 100644 Binary files a/packages/core/solidity/src/erc20.test.ts.snap and b/packages/core/solidity/src/erc20.test.ts.snap differ diff --git a/packages/core/solidity/src/erc20.ts b/packages/core/solidity/src/erc20.ts index e9abf7525..b78738a95 100644 --- a/packages/core/solidity/src/erc20.ts +++ b/packages/core/solidity/src/erc20.ts @@ -5,7 +5,6 @@ import { addPauseFunctions } from './add-pausable'; import { defineFunctions } from './utils/define-functions'; import type { CommonOptions } from './common-options'; import { withCommonDefaults, defaults as commonDefaults } from './common-options'; -import type { Upgradeable } from './set-upgradeable'; import { setUpgradeable } from './set-upgradeable'; import { setInfo } from './set-info'; import { printContract } from './print'; @@ -90,7 +89,7 @@ export function buildERC20(opts: ERC20Options): ContractBuilder { addBase(c, allOpts.name, allOpts.symbol); if (allOpts.crossChainBridging) { - addCrossChainBridging(c, allOpts.crossChainBridging, allOpts.upgradeable, access); + addCrossChainBridging(c, allOpts.crossChainBridging, access); } if (allOpts.premint) { @@ -305,26 +304,15 @@ function addFlashMint(c: ContractBuilder) { }); } -function addCrossChainBridging( - c: ContractBuilder, - crossChainBridging: 'custom' | 'superchain', - upgradeable: Upgradeable, - access: Access, -) { +function addCrossChainBridging(c: ContractBuilder, crossChainBridging: 'custom' | 'superchain', access: Access) { const ERC20Bridgeable = { name: 'ERC20Bridgeable', - path: `@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol`, + path: `@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol`, }; c.addParent(ERC20Bridgeable); c.addOverride(ERC20Bridgeable, supportsInterface); - if (upgradeable) { - throw new OptionsError({ - crossChainBridging: 'Upgradeability is not currently supported with Cross-Chain Bridging', - }); - } - c.addOverride(ERC20Bridgeable, functions._checkTokenBridge); switch (crossChainBridging) { case 'custom': @@ -345,13 +333,13 @@ function addCustomBridging(c: ContractBuilder, access: Access) { switch (access) { case false: case 'ownable': { - const addedBridgeImmutable = c.addVariable(`address public immutable TOKEN_BRIDGE;`); + const addedBridgeImmutable = c.addVariable(`address public tokenBridge;`); if (addedBridgeImmutable) { - c.addConstructorArgument({ type: 'address', name: 'tokenBridge' }); - c.addConstructorCode(`require(tokenBridge != address(0), "Invalid TOKEN_BRIDGE address");`); - c.addConstructorCode(`TOKEN_BRIDGE = tokenBridge;`); + c.addConstructorArgument({ type: 'address', name: 'tokenBridge_' }); + c.addConstructorCode(`require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");`); + c.addConstructorCode(`tokenBridge = tokenBridge_;`); } - c.setFunctionBody([`if (caller != TOKEN_BRIDGE) revert Unauthorized();`], functions._checkTokenBridge, 'view'); + c.setFunctionBody([`if (caller != tokenBridge) revert Unauthorized();`], functions._checkTokenBridge, 'view'); break; } case 'roles': { diff --git a/packages/core/solidity/src/erc721.test.ts.md b/packages/core/solidity/src/erc721.test.ts.md index 2d4dcae6b..5cbc3f8d9 100644 --- a/packages/core/solidity/src/erc721.test.ts.md +++ b/packages/core/solidity/src/erc721.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -39,7 +39,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -58,7 +58,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -100,7 +100,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -136,7 +136,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -184,7 +184,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -237,7 +237,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -253,7 +253,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -290,7 +290,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -328,7 +328,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -351,7 +351,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -387,7 +387,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ @@ -410,7 +410,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ @@ -437,7 +437,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ @@ -471,7 +471,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ @@ -505,7 +505,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ @@ -548,7 +548,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ @@ -621,7 +621,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ @@ -702,7 +702,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ diff --git a/packages/core/solidity/src/erc721.test.ts.snap b/packages/core/solidity/src/erc721.test.ts.snap index 623412145..a2ed828ab 100644 Binary files a/packages/core/solidity/src/erc721.test.ts.snap and b/packages/core/solidity/src/erc721.test.ts.snap differ diff --git a/packages/core/solidity/src/governor.test.ts.md b/packages/core/solidity/src/governor.test.ts.md index cfb1351a9..e49920a89 100644 --- a/packages/core/solidity/src/governor.test.ts.md +++ b/packages/core/solidity/src/governor.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -99,7 +99,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -185,7 +185,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -277,7 +277,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -369,7 +369,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -458,7 +458,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -553,7 +553,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -639,7 +639,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -725,7 +725,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -817,7 +817,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -906,7 +906,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -992,7 +992,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1082,7 +1082,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1168,7 +1168,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1254,7 +1254,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1343,7 +1343,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1429,7 +1429,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1518,7 +1518,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ @@ -1604,7 +1604,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ diff --git a/packages/core/solidity/src/governor.test.ts.snap b/packages/core/solidity/src/governor.test.ts.snap index cf418a4b8..63d7cb468 100644 Binary files a/packages/core/solidity/src/governor.test.ts.snap and b/packages/core/solidity/src/governor.test.ts.snap differ diff --git a/packages/core/solidity/src/stablecoin.test.ts.md b/packages/core/solidity/src/stablecoin.test.ts.md index d0b292ea5..20e6861cf 100644 --- a/packages/core/solidity/src/stablecoin.test.ts.md +++ b/packages/core/solidity/src/stablecoin.test.ts.md @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -25,7 +25,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -42,7 +42,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -81,7 +81,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -124,7 +124,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ @@ -163,7 +163,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -203,7 +203,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -224,7 +224,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -240,7 +240,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -265,7 +265,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -294,7 +294,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ @@ -311,7 +311,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -327,7 +327,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -362,7 +362,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -408,7 +408,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -454,7 +454,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -490,7 +490,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -526,7 +526,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -571,7 +571,7 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ @@ -588,14 +588,14 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ import {ERC20Allowlist} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ - import {ERC20Bridgeable} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Bridgeable.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ import {ERC20Custodian} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ diff --git a/packages/core/solidity/src/stablecoin.test.ts.snap b/packages/core/solidity/src/stablecoin.test.ts.snap index 02308f8db..b1376b713 100644 Binary files a/packages/core/solidity/src/stablecoin.test.ts.snap and b/packages/core/solidity/src/stablecoin.test.ts.snap differ diff --git a/packages/core/solidity/src/utils/version.ts b/packages/core/solidity/src/utils/version.ts index 3daddc218..10ab4ab89 100644 --- a/packages/core/solidity/src/utils/version.ts +++ b/packages/core/solidity/src/utils/version.ts @@ -1,4 +1,4 @@ /** * Semantic version string representing of the minimum compatible version of Contracts to display in output. */ -export const compatibleContractsSemver = '^5.0.0'; +export const compatibleContractsSemver = '^5.4.0'; diff --git a/packages/core/solidity/src/zip-foundry.test.ts b/packages/core/solidity/src/zip-foundry.test.ts index c1214fa24..f35bf200b 100644 --- a/packages/core/solidity/src/zip-foundry.test.ts +++ b/packages/core/solidity/src/zip-foundry.test.ts @@ -50,6 +50,27 @@ test.serial('erc20 full', async t => { await runTest(c, t, opts); }); +test.serial('erc20 ownable, uups, crossChainBridging custom', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + premint: '2000', + access: 'ownable', + burnable: true, + mintable: true, + pausable: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + upgradeable: 'uups', + }; + const c = buildERC20(opts); + await runTest(c, t, opts); +}); + test.serial('erc20 uups, roles', async t => { const opts: GenericOptions = { kind: 'ERC20', diff --git a/packages/core/solidity/src/zip-foundry.test.ts.md b/packages/core/solidity/src/zip-foundry.test.ts.md index 50eb62664..94009d407 100644 --- a/packages/core/solidity/src/zip-foundry.test.ts.md +++ b/packages/core/solidity/src/zip-foundry.test.ts.md @@ -120,7 +120,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -201,6 +201,248 @@ Generated by [AVA](https://avajs.dev). `, ] +## erc20 ownable, uups, crossChainBridging custom + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts and Upgrades␊ + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@vX.Y.Z --quiet␊ + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt␊ + ␊ + # Add settings in foundry.toml␊ + echo "" >> foundry.toml␊ + echo "ffi = true" >> foundry.toml␊ + echo "ast = true" >> foundry.toml␊ + echo "build_info = true" >> foundry.toml␊ + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test --force␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol --force␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address tokenBridge_ = ;␊ + address recipient = ;␊ + address initialOwner = ;␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (tokenBridge_, recipient, initialOwner))␊ + );␊ + MyToken instance = MyToken(proxy);␊ + console.log("Proxy deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, OwnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address tokenBridge_, address recipient, address initialOwner)␊ + public initializer␊ + {␊ + __ERC20_init("My Token", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __Ownable_init(initialOwner);␊ + __ERC20Permit_init("My Token");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address tokenBridge_ = vm.addr(1);␊ + address recipient = vm.addr(2);␊ + address initialOwner = vm.addr(3);␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (tokenBridge_, recipient, initialOwner))␊ + );␊ + instance = MyToken(proxy);␊ + }␊ + ␊ + function testName() public view {␊ + assertEq(instance.name(), "My Token");␊ + }␊ + }␊ + `, + ] + ## erc20 uups, roles > Snapshot 1 @@ -329,7 +571,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ @@ -519,7 +761,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ @@ -685,7 +927,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -851,7 +1093,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ @@ -1010,7 +1252,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract MyContract {␊ @@ -1165,7 +1407,7 @@ Generated by [AVA](https://avajs.dev). }␊ `, `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ diff --git a/packages/core/solidity/src/zip-foundry.test.ts.snap b/packages/core/solidity/src/zip-foundry.test.ts.snap index 59fdb685e..c21d46207 100644 Binary files a/packages/core/solidity/src/zip-foundry.test.ts.snap and b/packages/core/solidity/src/zip-foundry.test.ts.snap differ diff --git a/packages/core/solidity/src/zip-hardhat.test.ts b/packages/core/solidity/src/zip-hardhat.test.ts index b8383e896..097e231ea 100644 --- a/packages/core/solidity/src/zip-hardhat.test.ts +++ b/packages/core/solidity/src/zip-hardhat.test.ts @@ -50,6 +50,27 @@ test.serial('erc20 full', async t => { await runIgnitionTest(c, t, opts); }); +test.serial('erc20 ownable, uups, crossChainBridging custom', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + premint: '2000', + access: 'ownable', + burnable: true, + mintable: true, + pausable: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + upgradeable: 'uups', + }; + const c = buildERC20(opts); + await runDeployScriptTest(c, t, opts); +}); + test.serial('erc721 upgradeable', async t => { const opts: GenericOptions = { kind: 'ERC721', diff --git a/packages/core/solidity/src/zip-hardhat.test.ts.md b/packages/core/solidity/src/zip-hardhat.test.ts.md index 71c7a583b..faf4023f1 100644 --- a/packages/core/solidity/src/zip-hardhat.test.ts.md +++ b/packages/core/solidity/src/zip-hardhat.test.ts.md @@ -10,7 +10,7 @@ Generated by [AVA](https://avajs.dev). [ `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ @@ -95,8 +95,8 @@ Generated by [AVA](https://avajs.dev). "author": "",␊ "license": "MIT",␊ "devDependencies": {␊ - "@openzeppelin/contracts": "^5.0.0",␊ - "@nomicfoundation/hardhat-toolbox": "^6.0.0",␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ "hardhat": "^2.16.1"␊ }␊ }`, @@ -131,13 +131,178 @@ Generated by [AVA](https://avajs.dev). `, ] +## erc20 ownable, uups, crossChainBridging custom + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, OwnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address tokenBridge_, address recipient, address initialOwner)␊ + public initializer␊ + {␊ + __ERC20_init("My Token", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __Ownable_init(initialOwner);␊ + __ERC20Permit_init("My Token");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + import "@openzeppelin/hardhat-upgrades";␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@openzeppelin/contracts-upgradeable": "^5.4.0",␊ + "@openzeppelin/hardhat-upgrades": "^3.0.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { ethers, upgrades } from "hardhat";␊ + ␊ + async function main() {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + // TODO: Set addresses for the contract arguments below␊ + const instance = await upgrades.deployProxy(ContractFactory, [tokenBridge_, recipient, initialOwner]);␊ + await instance.waitForDeployment();␊ + ␊ + console.log(\`Proxy deployed to ${await instance.getAddress()}\`);␊ + }␊ + ␊ + // We recommend this pattern to be able to use async/await everywhere␊ + // and properly handle errors.␊ + main().catch((error) => {␊ + console.error(error);␊ + process.exitCode = 1;␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers, upgrades } from "hardhat";␊ + ␊ + describe("MyToken", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + const tokenBridge_ = (await ethers.getSigners())[0].address;␊ + const recipient = (await ethers.getSigners())[1].address;␊ + const initialOwner = (await ethers.getSigners())[2].address;␊ + ␊ + const instance = await upgrades.deployProxy(ContractFactory, [tokenBridge_, recipient, initialOwner]);␊ + await instance.waitForDeployment();␊ + ␊ + expect(await instance.name()).to.equal("My Token");␊ + });␊ + });␊ + `, + ] + ## erc721 upgradeable > Snapshot 1 [ `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ @@ -192,10 +357,10 @@ Generated by [AVA](https://avajs.dev). "author": "",␊ "license": "MIT",␊ "devDependencies": {␊ - "@openzeppelin/contracts": "^5.0.0",␊ - "@openzeppelin/contracts-upgradeable": "^5.0.0",␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@openzeppelin/contracts-upgradeable": "^5.4.0",␊ "@openzeppelin/hardhat-upgrades": "^3.0.0",␊ - "@nomicfoundation/hardhat-toolbox": "^6.0.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ "hardhat": "^2.16.1"␊ }␊ }`, @@ -242,7 +407,7 @@ Generated by [AVA](https://avajs.dev). [ `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ @@ -287,8 +452,8 @@ Generated by [AVA](https://avajs.dev). "author": "",␊ "license": "MIT",␊ "devDependencies": {␊ - "@openzeppelin/contracts": "^5.0.0",␊ - "@nomicfoundation/hardhat-toolbox": "^6.0.0",␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ "hardhat": "^2.16.1"␊ }␊ }`, @@ -326,7 +491,7 @@ Generated by [AVA](https://avajs.dev). [ `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ contract MyContract {␊ @@ -360,8 +525,8 @@ Generated by [AVA](https://avajs.dev). "author": "",␊ "license": "MIT",␊ "devDependencies": {␊ - "@openzeppelin/contracts": "^5.0.0",␊ - "@nomicfoundation/hardhat-toolbox": "^6.0.0",␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ "hardhat": "^2.16.1"␊ }␊ }`, @@ -395,7 +560,7 @@ Generated by [AVA](https://avajs.dev). [ `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.0.0␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ @@ -435,10 +600,10 @@ Generated by [AVA](https://avajs.dev). "author": "",␊ "license": "MIT",␊ "devDependencies": {␊ - "@openzeppelin/contracts": "^5.0.0",␊ - "@openzeppelin/contracts-upgradeable": "^5.0.0",␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@openzeppelin/contracts-upgradeable": "^5.4.0",␊ "@openzeppelin/hardhat-upgrades": "^3.0.0",␊ - "@nomicfoundation/hardhat-toolbox": "^6.0.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ "hardhat": "^2.16.1"␊ }␊ }`, diff --git a/packages/core/solidity/src/zip-hardhat.test.ts.snap b/packages/core/solidity/src/zip-hardhat.test.ts.snap index 1863649b6..024a4cbe3 100644 Binary files a/packages/core/solidity/src/zip-hardhat.test.ts.snap and b/packages/core/solidity/src/zip-hardhat.test.ts.snap differ diff --git a/packages/mcp/src/solidity/tools/erc20.test.ts b/packages/mcp/src/solidity/tools/erc20.test.ts index aff8d0b05..4bb79d423 100644 --- a/packages/mcp/src/solidity/tools/erc20.test.ts +++ b/packages/mcp/src/solidity/tools/erc20.test.ts @@ -62,7 +62,5 @@ test('all', async t => { assertHasAllSupportedFields(t, params); - // Records an error in the snapshot, because some fields are incompatible with each other. - // This is ok, because we just need to check that all fields can be passed in. - await assertAPIEquivalence(t, params, erc20.print, true); + await assertAPIEquivalence(t, params, erc20.print); }); diff --git a/packages/ui/src/solidity/App.svelte b/packages/ui/src/solidity/App.svelte index 879871161..94525b674 100644 --- a/packages/ui/src/solidity/App.svelte +++ b/packages/ui/src/solidity/App.svelte @@ -118,12 +118,7 @@ downloadHardhat: false, downloadFoundry: false, }; - } else if ( - opts?.kind === 'Stablecoin' || - opts?.kind === 'RealWorldAsset' || - opts?.kind === 'Account' || - (opts?.kind === 'ERC20' && opts.crossChainBridging) - ) { + } else if (opts?.kind === 'Stablecoin' || opts?.kind === 'RealWorldAsset' || opts?.kind === 'Account') { return { openInRemix: false, downloadHardhat: false, diff --git a/packages/ui/src/solidity/ERC20Controls.svelte b/packages/ui/src/solidity/ERC20Controls.svelte index d0c484261..c52fd3b9a 100644 --- a/packages/ui/src/solidity/ERC20Controls.svelte +++ b/packages/ui/src/solidity/ERC20Controls.svelte @@ -170,27 +170,22 @@ -
- * Experimental: - These features are not audited and are subject to change -
-