diff --git a/.changeset/orange-mayflies-suffer.md b/.changeset/orange-mayflies-suffer.md new file mode 100644 index 0000000..a697c6a --- /dev/null +++ b/.changeset/orange-mayflies-suffer.md @@ -0,0 +1,15 @@ +--- +"@peeramid-labs/eds": major +--- + +- Removed metadata from compilation artifact +- Renamed CodeIndex artifacts into ERC7744 to be more explicit +- Adjusted tests +- Bumped compilation for ERC7744 to solidity 0.8.28 +- Added artifacts to npm package exports to allow 3rd party projects deploy ERC7744 on their own + +## Breaking changes +- ERC7744 Code Index address changes to `0xC0dE1D2F7662c63796E544B2647b2A94EE658E07` +- ICodeIndexRef.sol was removed, you can now directly interface from IERC7744 +- ICodeIndex.sol and CodeIndex.sol renamed to IERC7744.sol and ERC7744.sol + diff --git a/.prettierignore b/.prettierignore index bbb080b..bb50a13 100644 --- a/.prettierignore +++ b/.prettierignore @@ -277,3 +277,4 @@ types/typechain bin/ types +abi/ \ No newline at end of file diff --git a/README.md b/README.md index 94607fb..2193c7f 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,35 @@ # **Ethereum Distribution System** -The Ethereum Distribution System (EDS) is an open and decentralized, fully on-chain distribution (factory) system for Ethereum smart contracts. Using EDS enables developers to publish and reuse each other's code in a trustless manner. Built-in system for [semantic versioning](http://semver.org/), managing versions and combining into higher level distributions allows developers to avoid using upgradability patterns, instead relying on version control. +The Ethereum Distribution System (EDS) is an open and decentralized, fully on-chain distribution (factory) system for Ethereum smart contracts. Using EDS enables developers to publish and reuse each other's code in a trustless manner. Built-in system for [semantic versioning](http://semver.org/), managing versions and combining into higher level distributions allows developers to avoid using upgradability patterns, instead relying on version control. System provisions for generic interfaces for distributors, developers and installers, each with their own responsibilities and constraints. ## **Use cases** -* **Factory Framework**: Instead of writing own factory, just write a distribution and register it -* **Ship faster**: Reduce the number of needed deployment artifacts to ship your project. Re-using other packages instead\! -* **Security oracles**: Disconnect vulnerable code from your users in O(1) -* **Semantic versioning with EIP712**: Instead of having to figure out "what to write in EIP712 constructor" just use the built in version control system\! -* **User owned upgradability**: Get more user trust by allowing them to decide when to upgrade -* **Improve user UX**: Configure trust within instance or distribution, so that your users do not need to set allowances and issue permits anymore\! -* **On-chain github**: Refer bytecode instead of location using ([ERC7744](https://eips.ethereum.org/EIPS/eip-7744)) +* **Factory Framework**: Instead of writing own factory, just write a distribution and register it +* **Ship faster**: Reduce the number of needed deployment artifacts to ship your project. Re-using other packages instead\! +* **Security oracles**: Disconnect vulnerable code from your users in O(1) +* **Semantic versioning with EIP712**: Instead of having to figure out "what to write in EIP712 constructor" just use the built in version control system\! +* **User owned upgradability**: Get more user trust by allowing them to decide when to upgrade +* **Improve user UX**: Configure trust within instance or distribution, so that your users do not need to set allowances and issue permits anymore\! +* **On-chain github**: Refer bytecode instead of location using ([ERC7744](https://eips.ethereum.org/EIPS/eip-7744)) * **Better Monetize your apps and services**: As your application becomes distributed, and wrapped, you may directly build in payment systems and subscription models on-chain\! ## **Overview** This system acts as a generalized and efficient factory which is designed in one-fits-all principle. It achieves this by splitting EDS users in following groups: -* **Developers**: Create a distributable (stateless) software that can be instantiated. It can use already deployed contracts and functionality\! -* **Distributors**: Security firms and traditional distributor agencies. Ensure that distributions they list are secure (think of this as a runtime checked audit attestation), trusted and act in their user interest\! +* **Developers**: Create a distributable (stateless) software that can be instantiated. It can use already deployed contracts and functionality\! +* **Distributors**: Security firms and traditional distributor agencies. Ensure that distributions they list are secure (think of this as a runtime checked audit attestation), trusted and act in their user interest\! * **Smart accounts**: Use Distributor software to plug it into your smart account\! -IN the background, there is extensive use of proxies to map instances, that are proxies, to a right functionality. Instances are also treated as middlewares that are hooked to the distributor with use of [ERC7746](https://eips.ethereum.org/EIPS/eip-7746), in such a way that the caller cannot reach the functionality without first checking with the distributor. The distributor in turn, by default, checks if the instance is a valid distribution. +IN the background, there is extensive use of proxies to map instances, that are proxies, to a right functionality. Instances are also treated as middlewares that are hooked to the distributor with use of [ERC7746](https://eips.ethereum.org/EIPS/eip-7746), in such a way that the caller cannot reach the functionality without first checking with the distributor. The distributor in turn, by default, checks if the instance is a valid distribution. If the developer wants to manage multiple versions of the same resource, they can create a *Repository* contract to add their own index on top of global. ## Project status: Alpha -We are open for discussion, whether this should be managed trough a governing body as a DAO. +We are open for discussion, whether this should be managed trough a governing body as a DAO. -If you want to be up to date, express your opinion or not miss a thing, please +If you want to be up to date, express your opinion or not miss a thing, please - subscribe to our twitter: https://x.com/peeramid_labs - join our discord: https://discord.gg/EddGgGUuWC @@ -54,8 +54,8 @@ System components are broken down into four domains: Permission-less, Developer, ##### CodeIndex ([ERC-7744](https://eips.ethereum.org/EIPS/eip-7744)) -A stateful, permissionless contract allowing anyone to register associations between bytecode and its on-chain location. Any smart contract may be indexed by `CodeIndex` based on its bytecode. -Proposed `CREATE2` implementation with deterministic address : `0xc0D31d398c5ee86C5f8a23FA253ee8a586dA03Ce` +A stateful, permission less contract allowing anyone to register associations between bytecode and its on-chain location. Any smart contract may be indexed by `CodeIndex` based on its bytecode. +Proposed `CREATE2` implementation with deterministic address : `0xC0dE1D2F7662c63796E544B2647b2A94EE658E07` ##### `Distribution` @@ -108,12 +108,12 @@ Larger example of usage can be found in [Rankify project repo](https://github.co ## Support || Contribute -If you want to support this project, please click "sponsor" button, or see our gitcoin page: +If you want to support this project, please click "sponsor" button, or see our gitcoin page: https://explorer.gitcoin.co/#/projects/0xd4427d0ffc2b8f58c4ef28410deed1158a7d5e405d6cd5bedb0487441d2ba452 -You can reach out us on Discord: https://discord.gg/EddGgGUuWC +You can reach out us on Discord: https://discord.gg/EddGgGUuWC diff --git a/deploy/01_codeIndex.ts b/deploy/ERC7744.ts similarity index 56% rename from deploy/01_codeIndex.ts rename to deploy/ERC7744.ts index 7c2f822..aa8b63b 100644 --- a/deploy/01_codeIndex.ts +++ b/deploy/ERC7744.ts @@ -7,16 +7,22 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deploy } = deployments; const { deployer } = await getNamedAccounts(); - const salt = "0x220a70730c743a005cfd55180805d2c0d5b8c7695c5496100dcffa91c02befce"; + // generated with cast create2 --starts-with c0de1d + // const bigIntValue = BigInt( + // "50974397650477774973013714513428960054656154370774770732424793889552745009750" + // ); + // // Convert to a hexadecimal string + // const salt = "0x" + bigIntValue.toString(16); + const salt = "0x70b27c94ed692bfb60748cee464ef910d4bf768ac1f3a63eeb4c05258f629256"; console.log("salt", salt); - const result = await deploy("CodeIndex", { + const result = await deploy("ERC7744", { deterministicDeployment: salt, from: deployer, skipIfAlreadyDeployed: true }); - console.log("CodeIndex deployed at", result.address); + console.log("ERC7744 deployed at", result.address); if (result.bytecode) { const codeHash = ethers.utils.keccak256(result.bytecode); console.log(`CodeHash: ${codeHash}`); @@ -24,4 +30,4 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { }; export default func; -func.tags = ["code_index"]; +func.tags = ["ERC7744"]; diff --git a/hardhat.config.ts b/hardhat.config.ts index 0bae5f5..c19fd81 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -116,11 +116,14 @@ export default { solidity: { compilers: [ { - version: "0.8.20", + version: "0.8.28", settings: { optimizer: { enabled: true, runs: 200000 + }, + metadata: { + bytecodeHash: "none" } } } diff --git a/package.json b/package.json index 8706897..462d3fb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "src", "types", "scripts", - "docs" + "docs", + "artifacts" ], "description": "Generalized factory implementation for reproducible ethereum smart contract instantiation", "scripts": { @@ -77,6 +78,6 @@ "cli-table": "^0.3.11", "hardhat-gas-reporter": "^1.0.9", "ts-node": "^10.9.1", - "typescript": "^5.2.2" + "typescript": "^5.7.3" } } diff --git a/playbook/utils/deploy-to-local-anvil.sh b/playbook/utils/deploy-to-local-anvil.sh index de7169d..dd37c89 100755 --- a/playbook/utils/deploy-to-local-anvil.sh +++ b/playbook/utils/deploy-to-local-anvil.sh @@ -5,4 +5,4 @@ sed -i '' 's|// import '\''./playbook'\''|import '\''./playbook'\''|' ./hardhat. rm -rf ./deployments/localhost export NODE_ENV=TEST -pnpm hardhat deploy --tags code_index --network localhost +pnpm hardhat deploy --tags ERC7744 --network localhost diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7aa075..d0562ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,13 +34,13 @@ importers: version: 0.3.11 hardhat-gas-reporter: specifier: ^1.0.9 - version: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + version: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@17.0.45)(typescript@5.5.4) + version: 10.9.2(@types/node@17.0.45)(typescript@5.7.3) typescript: - specifier: ^5.2.2 - version: 5.5.4 + specifier: ^5.7.3 + version: 5.7.3 devDependencies: '@changesets/changelog-github': specifier: ^0.4.8 @@ -56,13 +56,13 @@ importers: version: 9.9.1 '@nomicfoundation/hardhat-chai-matchers': specifier: ^1.0.1 - version: 1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-network-helpers': specifier: ^1.0.9 - version: 1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-toolbox': specifier: ^2.0.2 - version: 2.0.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-network-helpers@1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomiclabs/hardhat-etherscan@3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(@typechain/hardhat@7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4)))(@types/chai@4.3.17)(@types/mocha@9.1.1)(@types/node@17.0.45)(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat-gas-reporter@1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(solidity-coverage@0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4) + version: 2.0.2(d65r24y6qyodup7on6bdh6rryu) '@nomiclabs/buidler': specifier: ^1.4.8 version: 1.4.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -71,19 +71,19 @@ importers: version: 1.3.4(@nomiclabs/buidler@1.4.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(web3@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@nomiclabs/hardhat-ethers': specifier: ^2.0.6 - version: 2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) '@nomiclabs/hardhat-etherscan': specifier: ^3.1.0 - version: 3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) '@typechain/ethers-v5': specifier: ^11.1.2 - version: 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4) + version: 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3) '@typechain/hardhat': specifier: ^7.0.0 - version: 7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4)) + version: 7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3)) '@typechain/web3-v1': specifier: ^6.0.1 - version: 6.0.7(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4)(web3-core@1.10.4)(web3-eth-contract@1.10.4)(web3@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 6.0.7(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3)(web3-core@1.10.4)(web3-eth-contract@1.10.4)(web3@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@types/cli-table': specifier: ^0.3.0 version: 0.3.4 @@ -95,7 +95,7 @@ importers: version: 2.6.11 '@typescript-eslint/parser': specifier: ^8.4.0 - version: 8.4.0(eslint@9.9.1)(typescript@5.5.4) + version: 8.4.0(eslint@9.9.1)(typescript@5.7.3) chai: specifier: ^4.3.6 version: 4.5.0 @@ -125,19 +125,19 @@ importers: version: 15.9.0 hardhat: specifier: ^2.10.0 - version: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + version: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) hardhat-abi-exporter: specifier: ^2.9.0 - version: 2.10.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 2.10.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) hardhat-contract-sizer: specifier: ^2.6.1 - version: 2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) hardhat-deploy: specifier: ^0.12.2 version: 0.12.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) hardhat-tracer: specifier: ^3.1.0 - version: 3.1.0(bufferutil@4.0.8)(chai@4.5.0)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + version: 3.1.0(bufferutil@4.0.8)(chai@4.5.0)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) keccak: specifier: ^3.0.1 version: 3.0.4 @@ -152,16 +152,16 @@ importers: version: 1.4.1(prettier@3.3.3) solhint: specifier: ^3.6.2 - version: 3.6.2(typescript@5.5.4) + version: 3.6.2(typescript@5.7.3) solidity-coverage: specifier: ^0.8.5 - version: 0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) solidity-docgen: specifier: ^0.6.0-beta.36 - version: 0.6.0-beta.36(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + version: 0.6.0-beta.36(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) typechain: specifier: ^8.0.0 - version: 8.3.2(typescript@5.5.4) + version: 8.3.2(typescript@5.7.3) packages: @@ -4090,8 +4090,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true @@ -5062,44 +5062,44 @@ snapshots: '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - '@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': + '@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.7.0 - '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) + '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) '@types/chai-as-promised': 7.1.8 chai: 4.5.0 chai-as-promised: 7.1.2(chai@4.5.0) deep-eql: 4.1.4 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) ordinal: 1.0.3 - '@nomicfoundation/hardhat-network-helpers@1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': + '@nomicfoundation/hardhat-network-helpers@1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: ethereumjs-util: 7.1.5 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) - ? '@nomicfoundation/hardhat-toolbox@2.0.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-network-helpers@1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@nomiclabs/hardhat-etherscan@3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(@typechain/hardhat@7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4)))(@types/chai@4.3.17)(@types/mocha@9.1.1)(@types/node@17.0.45)(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat-gas-reporter@1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(solidity-coverage@0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4)' - : dependencies: + '@nomicfoundation/hardhat-toolbox@2.0.2(d65r24y6qyodup7on6bdh6rryu)': + dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@nomicfoundation/hardhat-chai-matchers': 1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-network-helpers': 1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@nomiclabs/hardhat-etherscan': 3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - '@typechain/ethers-v5': 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4) - '@typechain/hardhat': 7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4)) + '@nomicfoundation/hardhat-chai-matchers': 1.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-network-helpers': 1.0.11(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@nomiclabs/hardhat-etherscan': 3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@typechain/ethers-v5': 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3) + '@typechain/hardhat': 7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3)) '@types/chai': 4.3.17 '@types/mocha': 9.1.1 '@types/node': 17.0.45 chai: 4.5.0 ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) - hardhat-gas-reporter: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) - solidity-coverage: 0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)) - ts-node: 10.9.2(@types/node@17.0.45)(typescript@5.5.4) - typechain: 8.3.2(typescript@5.5.4) - typescript: 5.5.4 + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) + hardhat-gas-reporter: 1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + solidity-coverage: 0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)) + ts-node: 10.9.2(@types/node@17.0.45)(typescript@5.7.3) + typechain: 8.3.2(typescript@5.7.3) + typescript: 5.7.3 '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2': optional: true @@ -5207,12 +5207,12 @@ snapshots: safe-buffer: 5.2.1 util.promisify: 1.1.2 - '@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': + '@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) - '@nomiclabs/hardhat-etherscan@3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))': + '@nomiclabs/hardhat-etherscan@3.1.8(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/address': 5.7.0 @@ -5220,7 +5220,7 @@ snapshots: chalk: 2.4.2 debug: 4.3.6(supports-color@8.1.1) fs-extra: 7.0.1 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) lodash: 4.17.21 semver: 6.3.1 table: 6.8.2 @@ -5341,31 +5341,31 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4)': + '@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3)': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.5.4) - typechain: 8.3.2(typescript@5.5.4) - typescript: 5.5.4 + ts-essentials: 7.0.3(typescript@5.7.3) + typechain: 8.3.2(typescript@5.7.3) + typescript: 5.7.3 - '@typechain/hardhat@7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))': + '@typechain/hardhat@7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@typechain/ethers-v5': 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4) + '@typechain/ethers-v5': 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) fs-extra: 9.1.0 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) - typechain: 8.3.2(typescript@5.5.4) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) + typechain: 8.3.2(typescript@5.7.3) - '@typechain/web3-v1@6.0.7(typechain@8.3.2(typescript@5.5.4))(typescript@5.5.4)(web3-core@1.10.4)(web3-eth-contract@1.10.4)(web3@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@typechain/web3-v1@6.0.7(typechain@8.3.2(typescript@5.7.3))(typescript@5.7.3)(web3-core@1.10.4)(web3-eth-contract@1.10.4)(web3@1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: lodash: 4.17.21 - ts-essentials: 7.0.3(typescript@5.5.4) - typechain: 8.3.2(typescript@5.5.4) + ts-essentials: 7.0.3(typescript@5.7.3) + typechain: 8.3.2(typescript@5.7.3) web3: 1.10.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) web3-core: 1.10.4 web3-eth-contract: 1.10.4 @@ -5457,16 +5457,16 @@ snapshots: '@types/semver@7.5.8': {} - '@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.6(supports-color@8.1.1) eslint: 9.9.1 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -5477,7 +5477,7 @@ snapshots: '@typescript-eslint/types@8.4.0': {} - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.4.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 @@ -5486,9 +5486,9 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.7.3) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -6103,14 +6103,14 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig@8.3.6(typescript@5.5.4): + cosmiconfig@8.3.6(typescript@5.7.3): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.3 crc-32@1.2.2: {} @@ -7353,17 +7353,17 @@ snapshots: ajv: 6.12.6 har-schema: 2.0.0 - hardhat-abi-exporter@2.10.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)): + hardhat-abi-exporter@2.10.1(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)): dependencies: '@ethersproject/abi': 5.7.0 delete-empty: 3.0.0 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) - hardhat-contract-sizer@2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)): + hardhat-contract-sizer@2.10.0(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)): dependencies: chalk: 4.1.2 cli-table3: 0.6.5 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) strip-ansi: 6.0.1 hardhat-deploy@0.12.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): @@ -7397,11 +7397,11 @@ snapshots: - supports-color - utf-8-validate - hardhat-gas-reporter@1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10): + hardhat-gas-reporter@1.0.10(bufferutil@4.0.8)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10): dependencies: array-uniq: 1.0.3 eth-gas-reporter: 0.2.27(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) sha1: 1.1.1 transitivePeerDependencies: - '@codechecks/client' @@ -7409,20 +7409,20 @@ snapshots: - debug - utf-8-validate - hardhat-tracer@3.1.0(bufferutil@4.0.8)(chai@4.5.0)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10): + hardhat-tracer@3.1.0(bufferutil@4.0.8)(chai@4.5.0)(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10): dependencies: chai: 4.5.0 chalk: 4.1.2 debug: 4.3.6(supports-color@8.1.1) ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) semver: 7.6.3 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10): + hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 @@ -7468,8 +7468,8 @@ snapshots: uuid: 8.3.2 ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - ts-node: 10.9.2(@types/node@17.0.45)(typescript@5.5.4) - typescript: 5.5.4 + ts-node: 10.9.2(@types/node@17.0.45)(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - bufferutil - c-kzg @@ -8937,7 +8937,7 @@ snapshots: transitivePeerDependencies: - debug - solhint@3.6.2(typescript@5.5.4): + solhint@3.6.2(typescript@5.7.3): dependencies: '@solidity-parser/parser': 0.16.2 ajv: 6.12.6 @@ -8945,7 +8945,7 @@ snapshots: ast-parents: 0.0.1 chalk: 4.1.2 commander: 10.0.1 - cosmiconfig: 8.3.6(typescript@5.5.4) + cosmiconfig: 8.3.6(typescript@5.7.3) fast-diff: 1.3.0 glob: 8.1.0 ignore: 5.3.2 @@ -8965,7 +8965,7 @@ snapshots: dependencies: array.prototype.findlast: 1.2.5 - solidity-coverage@0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)): + solidity-coverage@0.8.12(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)): dependencies: '@ethersproject/abi': 5.7.0 '@solidity-parser/parser': 0.18.0 @@ -8976,7 +8976,7 @@ snapshots: ghost-testrpc: 0.0.2 global-modules: 2.0.0 globby: 10.0.2 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) jsonschema: 1.4.1 lodash: 4.17.21 mocha: 10.7.3 @@ -8988,10 +8988,10 @@ snapshots: shelljs: 0.8.5 web3-utils: 1.10.4 - solidity-docgen@0.6.0-beta.36(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10)): + solidity-docgen@0.6.0-beta.36(hardhat@2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10)): dependencies: handlebars: 4.7.8 - hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) + hardhat: 2.22.8(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3))(typescript@5.7.3)(utf-8-validate@5.0.10) solidity-ast: 0.4.56 sort-keys-length@1.0.1: @@ -9258,9 +9258,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - ts-api-utils@1.3.0(typescript@5.5.4): + ts-api-utils@1.3.0(typescript@5.7.3): dependencies: - typescript: 5.5.4 + typescript: 5.7.3 ts-command-line-args@2.5.1: dependencies: @@ -9271,11 +9271,11 @@ snapshots: ts-essentials@2.0.12: {} - ts-essentials@7.0.3(typescript@5.5.4): + ts-essentials@7.0.3(typescript@5.7.3): dependencies: - typescript: 5.5.4 + typescript: 5.7.3 - ts-node@10.9.2(@types/node@17.0.45)(typescript@5.5.4): + ts-node@10.9.2(@types/node@17.0.45)(typescript@5.7.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -9289,7 +9289,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.5.4 + typescript: 5.7.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -9332,7 +9332,7 @@ snapshots: type@2.7.3: {} - typechain@8.3.2(typescript@5.5.4): + typechain@8.3.2(typescript@5.7.3): dependencies: '@types/prettier': 2.7.3 debug: 4.3.6(supports-color@8.1.1) @@ -9343,8 +9343,8 @@ snapshots: mkdirp: 1.0.4 prettier: 2.8.8 ts-command-line-args: 2.5.1 - ts-essentials: 7.0.3(typescript@5.5.4) - typescript: 5.5.4 + ts-essentials: 7.0.3(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -9386,7 +9386,7 @@ snapshots: typedarray@0.0.6: {} - typescript@5.5.4: {} + typescript@5.7.3: {} typical@4.0.0: {} diff --git a/src/CodeIndex.sol b/src/ERC7744.sol similarity index 57% rename from src/CodeIndex.sol rename to src/ERC7744.sol index bd7a076..b9118b6 100644 --- a/src/CodeIndex.sol +++ b/src/ERC7744.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity 0.8.20; -import "./ICodeIndex.sol"; +pragma solidity 0.8.28; +import {IERC7744} from "./IERC7744.sol"; /** * @title Byte Code Indexer Contract @@ -8,19 +8,28 @@ import "./ICodeIndex.sol"; * @dev This allows to query contracts by their bytecode instead of addresses. * @author Tim Pechersky (@Peersky) */ -contract CodeIndex is ICodeIndex { +contract ERC7744 is IERC7744 { mapping(bytes32 => address) private index; + function isValidContainer(address container) private view returns (bool) { + bytes memory code = container.code; + bytes32 codeHash = container.codehash; + bytes32 eip7702Hash = bytes32(0xeadcdba66a79ab5dce91622d1d75c8cff5cff0b96944c3bf1072cd08ce018329); + // Contract should have non-empty code and valid codehash + return (code.length > 0 && codeHash != bytes32(0) && codeHash != eip7702Hash); + } + /** * @notice Registers a contract in the index by its bytecode hash * @param container The contract to register * @dev `msg.codeHash` will be used - * @dev It will revert if the contract is already indexed + * @dev It will revert if the contract is already indexed or if returns EIP7702 hash */ function register(address container) external { address etalon = index[container.codehash]; + require(isValidContainer(container), "Invalid container"); if (etalon != address(0)) { - revert alreadyExists(container.codehash, etalon); + if (isValidContainer(etalon)) revert alreadyExists(container.codehash, container); } index[container.codehash] = container; emit Indexed(container, container.codehash); @@ -35,4 +44,4 @@ contract CodeIndex is ICodeIndex { function get(bytes32 id) external view returns (address) { return index[id]; } -} \ No newline at end of file +} diff --git a/src/ICodeIndexDep.sol b/src/ICodeIndexDep.sol deleted file mode 100644 index eee6fbb..0000000 --- a/src/ICodeIndexDep.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: CC0-1.0 -pragma solidity >=0.8.0 <0.9.0; - -// This file is exactly same as ./ICodeIndexer.sol\ -// With exception for more loose pragma version -// Updating the CodeIndex pragma directly would cause changing the deployed bytecode for ERC7744 -interface ICodeIndex { - event Indexed(address indexed container, bytes32 indexed codeHash); - error alreadyExists(bytes32 id, address source); - - function register(address container) external; - - function get(bytes32 id) external view returns (address); -} diff --git a/src/ICodeIndex.sol b/src/IERC7744.sol similarity index 83% rename from src/ICodeIndex.sol rename to src/IERC7744.sol index aadd4f4..77c4dfe 100644 --- a/src/ICodeIndex.sol +++ b/src/IERC7744.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity 0.8.20; +pragma solidity >=0.8.0 <0.9.0; -interface ICodeIndex { +interface IERC7744 { event Indexed(address indexed container, bytes32 indexed codeHash); error alreadyExists(bytes32 id, address source); function register(address container) external; function get(bytes32 id) external view returns (address); -} \ No newline at end of file +} diff --git a/src/abstracts/CodeIndexer.sol b/src/abstracts/CodeIndexer.sol index bbe3a35..9b8de03 100644 --- a/src/abstracts/CodeIndexer.sol +++ b/src/abstracts/CodeIndexer.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: CC0-1.0 pragma solidity >=0.8.0 <0.9.0; -import "../ICodeIndexDep.sol"; +import {IERC7744 as ICodeIndex} from "../IERC7744.sol"; abstract contract CodeIndexer { //Create2 contract - ICodeIndex private constant INDEX_CONTRACT = ICodeIndex(0xc0D31d398c5ee86C5f8a23FA253ee8a586dA03Ce); + ICodeIndex private constant INDEX_CONTRACT = ICodeIndex(0xC0dE1D2F7662c63796E544B2647b2A94EE658E07); constructor() {} // @inheritdoc ICodeIndex function getContractsIndex() internal pure returns (ICodeIndex) { diff --git a/test/eds/CodeHashDistribution.ts b/test/eds/CodeHashDistribution.ts index f99155b..c425559 100644 --- a/test/eds/CodeHashDistribution.ts +++ b/test/eds/CodeHashDistribution.ts @@ -1,22 +1,22 @@ import { ethers } from "hardhat"; import { expect } from "chai"; -import { CodeHashDistribution, CodeHashDistribution__factory, CodeIndex } from "../../types"; +import { CodeHashDistribution, CodeHashDistribution__factory, ERC7744 } from "../../types"; import { deployments } from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import utils from "../utils"; describe("CloneHashDistribution", function () { - let codeIndex: CodeIndex; + let codeIndex: ERC7744; let deployer: SignerWithAddress; beforeEach(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); deployer = (await ethers.getSigners())[0]; - const codeIndexDeployment = await deployments.get("CodeIndex"); - codeIndex = new ethers.Contract(codeIndexDeployment.address, CodeIndex.interface).connect( + const codeIndexDeployment = await deployments.get("ERC7744"); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; + ) as ERC7744; }); it("Can instantiate a contract", async function () { diff --git a/test/eds/CodeIndex.ts b/test/eds/CodeIndex.ts index f068459..f02e166 100644 --- a/test/eds/CodeIndex.ts +++ b/test/eds/CodeIndex.ts @@ -1,40 +1,28 @@ import { ethers } from "hardhat"; import { expect } from "chai"; -import { CodeIndex, TestFacet } from "../../types"; +import { ERC7744, TestFacet } from "../../types"; import hre, { deployments } from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -describe("CloneDistribution", function () { - let codeIndex: CodeIndex; +describe("Code Index", function () { + let codeIndex: ERC7744; let testContract: TestFacet; let deployer: SignerWithAddress; beforeEach(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); - - const initCodeHash = ethers.utils.keccak256(CodeIndex.bytecode); - console.log(`Init Code Hash: ${initCodeHash}`); - deployer = (await ethers.getSigners())[0]; - // Convert to a BigInt since the value is too large for standard Number types - const bigIntValue = BigInt( - "42759584821269276073726276772598488633863215600876260121819881722816808625192" - ); - // Convert to a hexadecimal string - const hexValue = "0x" + bigIntValue.toString(16); - const result = await hre.deployments.deploy("CodeIndex", { - deterministicDeployment: hexValue, - from: deployer.address, - skipIfAlreadyDeployed: true - }); - codeIndex = new ethers.Contract(result.address, CodeIndex.interface).connect( + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); + const codeIndexDeployment = await deployments.get("ERC7744"); + const { deployer: _deployer } = await hre.getNamedAccounts(); + deployer = await ethers.getSigner(_deployer); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; - console.log("CodeIndex deployed at", result.address); + ) as ERC7744; + const TestContract = await ethers.getContractFactory("TestFacet"); testContract = (await TestContract.deploy()) as TestFacet; }); - it("should emit Distributed event", async function () { + it("should emit Indexed event", async function () { // const code = await testContract.provider.getCode(testContract.address); expect(await codeIndex.register(testContract.address)).to.emit(codeIndex, "Indexed"); }); diff --git a/test/eds/Distributor.ts b/test/eds/Distributor.ts index 8caa4c1..1388c41 100644 --- a/test/eds/Distributor.ts +++ b/test/eds/Distributor.ts @@ -1,7 +1,7 @@ import { ethers } from "hardhat"; import { expect } from "chai"; import { - CodeIndex, + ERC7744, MockCloneDistribution__factory, OwnableDistributor, OwnableDistributor__factory, @@ -12,7 +12,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import utils from "../utils"; describe("Distributor", function () { - let codeIndex: CodeIndex; + let codeIndex: ERC7744; let distributor: OwnableDistributor; let deployer: SignerWithAddress; let owner: SignerWithAddress; @@ -20,13 +20,13 @@ describe("Distributor", function () { let cloneDistributionId: any; beforeEach(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); [deployer, owner] = await ethers.getSigners(); - const codeIndexDeployment = await deployments.get("CodeIndex"); - codeIndex = new ethers.Contract(codeIndexDeployment.address, CodeIndex.interface).connect( + const codeIndexDeployment = await deployments.get("ERC7744"); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; + ) as ERC7744; const Distributor = (await ethers.getContractFactory( "OwnableDistributor" diff --git a/test/eds/Installer.ts b/test/eds/Installer.ts index 479f2d6..34cad4c 100644 --- a/test/eds/Installer.ts +++ b/test/eds/Installer.ts @@ -1,7 +1,7 @@ import { ethers } from "hardhat"; import { expect } from "chai"; import { - CodeIndex, + ERC7744, MockCloneDistribution, MockCloneDistribution__factory, MockInstaller, @@ -13,7 +13,7 @@ import { deployments } from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; describe("Installer", function () { - let codeIndex: CodeIndex; + let codeIndex: ERC7744; let distributor: OwnableDistributor; let deployer: SignerWithAddress; let owner: SignerWithAddress; @@ -23,13 +23,13 @@ describe("Installer", function () { let installer: MockInstaller; beforeEach(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); [deployer, owner, target] = await ethers.getSigners(); - const codeIndexDeployment = await deployments.get("CodeIndex"); - codeIndex = new ethers.Contract(codeIndexDeployment.address, CodeIndex.interface).connect( + const codeIndexDeployment = await deployments.get("ERC7744"); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; + ) as ERC7744; const Distributor = (await ethers.getContractFactory( "OwnableDistributor" diff --git a/test/eds/Repository.ts b/test/eds/Repository.ts index 7b4d61d..41b6198 100644 --- a/test/eds/Repository.ts +++ b/test/eds/Repository.ts @@ -1,7 +1,7 @@ import { ethers } from "hardhat"; import { expect } from "chai"; import { - CodeIndex, + ERC7744, MockCloneDistribution__factory, MockInstaller, MockInstaller__factory, @@ -13,8 +13,8 @@ import { import { deployments } from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; -describe("Installer", function () { - let codeIndex: CodeIndex; +describe("Repository", function () { + let codeIndex: ERC7744; let distributor: OwnableDistributor; let deployer: SignerWithAddress; let owner: SignerWithAddress; @@ -27,13 +27,13 @@ describe("Installer", function () { let repository: Repository; beforeEach(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); [deployer, owner, target] = await ethers.getSigners(); - const codeIndexDeployment = await deployments.get("CodeIndex"); - codeIndex = new ethers.Contract(codeIndexDeployment.address, CodeIndex.interface).connect( + const codeIndexDeployment = await deployments.get("ERC7744"); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; + ) as ERC7744; const Repository = (await ethers.getContractFactory( "OwnableRepository" diff --git a/test/eds/TokenizedDistributor.ts b/test/eds/TokenizedDistributor.ts index 3e3c760..9854e81 100644 --- a/test/eds/TokenizedDistributor.ts +++ b/test/eds/TokenizedDistributor.ts @@ -5,7 +5,7 @@ import { MockERC20__factory, MockTokenizedDistributor, MockTokenizedDistributor__factory, - CodeIndex, + ERC7744, MockCloneDistribution__factory } from "../../types"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; @@ -13,7 +13,7 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; describe("TokenizedDistributor", function () { let mockToken: MockERC20; let distributor: MockTokenizedDistributor; - let codeIndex: CodeIndex; + let codeIndex: ERC7744; let deployer: SignerWithAddress; let owner: SignerWithAddress; let addr1: SignerWithAddress; @@ -22,13 +22,13 @@ describe("TokenizedDistributor", function () { const defaultCost = ethers.utils.parseEther("1"); before(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); [deployer, owner] = await ethers.getSigners(); - const codeIndexDeployment = await deployments.get("CodeIndex"); - codeIndex = new ethers.Contract(codeIndexDeployment.address, CodeIndex.interface).connect( + const codeIndexDeployment = await deployments.get("ERC7744"); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; + ) as ERC7744; [owner, addr1] = await ethers.getSigners(); const CloneDistribution = (await ethers.getContractFactory( "MockCloneDistribution" diff --git a/test/eds/VersionDistributor.ts b/test/eds/VersionDistributor.ts index 8906d35..18b33e5 100644 --- a/test/eds/VersionDistributor.ts +++ b/test/eds/VersionDistributor.ts @@ -1,8 +1,8 @@ import { ethers, network } from "hardhat"; import { expect } from "chai"; import { - CloneDistribution, - CodeIndex, + MockCloneDistribution, + ERC7744, MockCloneDistribution__factory, OwnableDistributor__factory, OwnableRepository__factory, @@ -15,21 +15,21 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import utils from "../utils"; describe("Version Distributor", function () { - let codeIndex: CodeIndex; + let codeIndex: ERC7744; let distributor: OwnableDistributor; let deployer: SignerWithAddress; let owner: SignerWithAddress; - let mockDistr: CloneDistribution; + let mockDistr: MockCloneDistribution; let repository: Repository; beforeEach(async function () { - await deployments.fixture("code_index"); // This is the key addition - const CodeIndex = await ethers.getContractFactory("CodeIndex"); + await deployments.fixture("ERC7744"); // This is the key addition + const ERC7744 = await ethers.getContractFactory("ERC7744"); [deployer, owner] = await ethers.getSigners(); - const codeIndexDeployment = await deployments.get("CodeIndex"); - codeIndex = new ethers.Contract(codeIndexDeployment.address, CodeIndex.interface).connect( + const codeIndexDeployment = await deployments.get("ERC7744"); + codeIndex = new ethers.Contract(codeIndexDeployment.address, ERC7744.interface).connect( deployer - ) as CodeIndex; + ) as ERC7744; const Repository = (await ethers.getContractFactory( "OwnableRepository"