diff --git a/hardhat.config.ts b/hardhat.config.ts index f8266cd5..697f9212 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -129,7 +129,7 @@ const config: HardhatUserConfig = { }, typechain: { outDir: "types", - target: "ethers-v5", + target: "ethers-v6", }, }; diff --git a/package.json b/package.json index a0a15c68..861559c0 100644 --- a/package.json +++ b/package.json @@ -7,19 +7,14 @@ "url": "https://github.com/PaulRBerg" }, "devDependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/hardhat-chai-matchers": "^1.0.4", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.6", - "@nomicfoundation/hardhat-toolbox": "^2.0.0", - "@nomiclabs/hardhat-ethers": "^2.2.1", - "@nomiclabs/hardhat-etherscan": "^3.1.2", + "@nomicfoundation/hardhat-toolbox": "^3.0.0", + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-verify": "^1.0.0", "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@typechain/ethers-v5": "^10.1.1", - "@typechain/hardhat": "^6.1.4", + "@typechain/ethers-v6": "^0.4.0", + "@typechain/hardhat": "^8.0.0", "@types/chai": "^4.3.4", "@types/fs-extra": "^9.0.13", "@types/mocha": "^10.0.0", @@ -31,7 +26,7 @@ "dotenv": "^16.0.3", "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", - "ethers": "^5.7.2", + "ethers": "^6.4.0", "fs-extra": "^10.1.0", "hardhat": "^2.12.2", "hardhat-deploy": "^0.11.29", @@ -46,7 +41,7 @@ "solidity-coverage": "^0.8.2", "ts-generator": "^0.1.1", "ts-node": "^10.9.1", - "typechain": "^8.1.1", + "typechain": "^8.2.0", "typescript": "^4.9.3" }, "files": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41eca6ab..e8b96b79 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,45 +1,30 @@ lockfileVersion: '6.0' devDependencies: - '@ethersproject/abi': - specifier: ^5.7.0 - version: 5.7.0 - '@ethersproject/abstract-signer': - specifier: ^5.7.0 - version: 5.7.0 - '@ethersproject/bignumber': - specifier: ^5.7.0 - version: 5.7.0 - '@ethersproject/bytes': - specifier: ^5.7.0 - version: 5.7.0 - '@ethersproject/providers': - specifier: ^5.7.2 - version: 5.7.2 '@nomicfoundation/hardhat-chai-matchers': - specifier: ^1.0.4 - version: 1.0.4(@nomiclabs/hardhat-ethers@2.2.1)(chai@4.3.7)(ethers@5.7.2)(hardhat@2.12.2) + specifier: ^2.0.0 + version: 2.0.0(@nomicfoundation/hardhat-ethers@3.0.0)(chai@4.3.7)(ethers@6.4.0)(hardhat@2.12.2) + '@nomicfoundation/hardhat-ethers': + specifier: ^3.0.0 + version: 3.0.0(ethers@6.4.0)(hardhat@2.12.2) '@nomicfoundation/hardhat-network-helpers': specifier: ^1.0.6 version: 1.0.6(hardhat@2.12.2) '@nomicfoundation/hardhat-toolbox': - specifier: ^2.0.0 - version: 2.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.4)(@nomicfoundation/hardhat-network-helpers@1.0.6)(@nomiclabs/hardhat-ethers@2.2.1)(@nomiclabs/hardhat-etherscan@3.1.2)(@typechain/ethers-v5@10.1.1)(@typechain/hardhat@6.1.4)(@types/chai@4.3.4)(@types/mocha@10.0.0)(@types/node@18.11.9)(chai@4.3.7)(ethers@5.7.2)(hardhat-gas-reporter@1.0.9)(hardhat@2.12.2)(solidity-coverage@0.8.2)(ts-node@10.9.1)(typechain@8.1.1)(typescript@4.9.3) - '@nomiclabs/hardhat-ethers': - specifier: ^2.2.1 - version: 2.2.1(ethers@5.7.2)(hardhat@2.12.2) - '@nomiclabs/hardhat-etherscan': - specifier: ^3.1.2 - version: 3.1.2(hardhat@2.12.2) + specifier: ^3.0.0 + version: 3.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.0)(@nomicfoundation/hardhat-ethers@3.0.0)(@nomicfoundation/hardhat-network-helpers@1.0.6)(@nomicfoundation/hardhat-verify@1.0.0)(@typechain/ethers-v6@0.4.0)(@typechain/hardhat@8.0.0)(@types/chai@4.3.4)(@types/mocha@10.0.0)(@types/node@18.11.9)(chai@4.3.7)(ethers@6.4.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.12.2)(solidity-coverage@0.8.2)(ts-node@10.9.1)(typechain@8.2.0)(typescript@4.9.3) + '@nomicfoundation/hardhat-verify': + specifier: ^1.0.0 + version: 1.0.0(hardhat@2.12.2) '@trivago/prettier-plugin-sort-imports': specifier: ^4.0.0 version: 4.0.0(@vue/compiler-sfc@3.3.4)(prettier@2.8.4) - '@typechain/ethers-v5': - specifier: ^10.1.1 - version: 10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.1.1)(typescript@4.9.3) + '@typechain/ethers-v6': + specifier: ^0.4.0 + version: 0.4.0(ethers@6.4.0)(typechain@8.2.0)(typescript@4.9.3) '@typechain/hardhat': - specifier: ^6.1.4 - version: 6.1.4(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.1.1)(ethers@5.7.2)(hardhat@2.12.2)(typechain@8.1.1) + specifier: ^8.0.0 + version: 8.0.0(@typechain/ethers-v6@0.4.0)(ethers@6.4.0)(hardhat@2.12.2)(typechain@8.2.0) '@types/chai': specifier: ^4.3.4 version: 4.3.4 @@ -74,8 +59,8 @@ devDependencies: specifier: ^8.5.0 version: 8.5.0(eslint@8.28.0) ethers: - specifier: ^5.7.2 - version: 5.7.2 + specifier: ^6.4.0 + version: 6.4.0 fs-extra: specifier: ^10.1.0 version: 10.1.0 @@ -119,8 +104,8 @@ devDependencies: specifier: ^10.9.1 version: 10.9.1(@types/node@18.11.9)(typescript@4.9.3) typechain: - specifier: ^8.1.1 - version: 8.1.1(typescript@4.9.3) + specifier: ^8.2.0 + version: 8.2.0(typescript@4.9.3) typescript: specifier: ^4.9.3 version: 4.9.3 @@ -806,6 +791,10 @@ packages: uuid: 7.0.3 dev: true + /@noble/hashes@1.1.2: + resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==} + dev: true + /@noble/hashes@1.2.0: resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} dev: true @@ -974,26 +963,35 @@ packages: - supports-color dev: true - /@nomicfoundation/hardhat-chai-matchers@1.0.4(@nomiclabs/hardhat-ethers@2.2.1)(chai@4.3.7)(ethers@5.7.2)(hardhat@2.12.2): - resolution: {integrity: sha512-n/5UMwGaUK2zM8ALuMChVwB1lEPeDTb5oBjQ1g7hVsUdS8x+XG9JIEp4Ze6Bwy98tghA7Y1+PCH4SNE2P3UQ2g==} + /@nomicfoundation/hardhat-chai-matchers@2.0.0(@nomicfoundation/hardhat-ethers@3.0.0)(chai@4.3.7)(ethers@6.4.0)(hardhat@2.12.2): + resolution: {integrity: sha512-e2ZFunJBIWDcFKIxQt6GpFRRKUn8ZshoiZ5cmgaKOR1S9XwimiCs2aLUCZ/xjNrdl049kPqdVKYDj6aYeR6WuQ==} peerDependencies: - '@nomiclabs/hardhat-ethers': ^2.0.0 + '@nomicfoundation/hardhat-ethers': ^3.0.0 chai: ^4.2.0 - ethers: ^5.0.0 + ethers: ^6.1.0 hardhat: ^2.9.4 dependencies: '@ethersproject/abi': 5.7.0 - '@nomiclabs/hardhat-ethers': 2.2.1(ethers@5.7.2)(hardhat@2.12.2) + '@nomicfoundation/hardhat-ethers': 3.0.0(ethers@6.4.0)(hardhat@2.12.2) '@types/chai-as-promised': 7.1.5 chai: 4.3.7 chai-as-promised: 7.1.1(chai@4.3.7) - chalk: 2.4.2 deep-eql: 4.1.3 - ethers: 5.7.2 + ethers: 6.4.0 hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) ordinal: 1.0.3 dev: true + /@nomicfoundation/hardhat-ethers@3.0.0(ethers@6.4.0)(hardhat@2.12.2): + resolution: {integrity: sha512-0A2hs39YUta//O9EcITnFw/iGzUztJ4FB4UIc2mgdZ2nXvDZUmkQO+Vtdt/guJ6gP66EPbwvFW7t1SRReMGrvg==} + peerDependencies: + ethers: ^6.1.0 + hardhat: ^2.0.0 + dependencies: + ethers: 6.4.0 + hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) + dev: true + /@nomicfoundation/hardhat-network-helpers@1.0.6(hardhat@2.12.2): resolution: {integrity: sha512-a35iVD4ycF6AoTfllAnKm96IPIzzHpgKX/ep4oKc2bsUKFfMlacWdyntgC/7d5blyCTXfFssgNAvXDZfzNWVGQ==} peerDependencies: @@ -1003,50 +1001,65 @@ packages: hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) dev: true - /@nomicfoundation/hardhat-toolbox@2.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@nomicfoundation/hardhat-chai-matchers@1.0.4)(@nomicfoundation/hardhat-network-helpers@1.0.6)(@nomiclabs/hardhat-ethers@2.2.1)(@nomiclabs/hardhat-etherscan@3.1.2)(@typechain/ethers-v5@10.1.1)(@typechain/hardhat@6.1.4)(@types/chai@4.3.4)(@types/mocha@10.0.0)(@types/node@18.11.9)(chai@4.3.7)(ethers@5.7.2)(hardhat-gas-reporter@1.0.9)(hardhat@2.12.2)(solidity-coverage@0.8.2)(ts-node@10.9.1)(typechain@8.1.1)(typescript@4.9.3): - resolution: {integrity: sha512-BoOPbzLQ1GArnBZd4Jz4IU8FY3RY4nUwpXlfymXwxlXNimngkPRJj7ivVNurD7igohEjf90v/Axn2M5WwAdCJQ==} + /@nomicfoundation/hardhat-toolbox@3.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.0)(@nomicfoundation/hardhat-ethers@3.0.0)(@nomicfoundation/hardhat-network-helpers@1.0.6)(@nomicfoundation/hardhat-verify@1.0.0)(@typechain/ethers-v6@0.4.0)(@typechain/hardhat@8.0.0)(@types/chai@4.3.4)(@types/mocha@10.0.0)(@types/node@18.11.9)(chai@4.3.7)(ethers@6.4.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.12.2)(solidity-coverage@0.8.2)(ts-node@10.9.1)(typechain@8.2.0)(typescript@4.9.3): + resolution: {integrity: sha512-MsteDXd0UagMksqm9KvcFG6gNKYNa3GGNCy73iQ6bEasEgg2v8Qjl6XA5hjs8o5UD5A3153B6W2BIVJ8SxYUtA==} peerDependencies: - '@ethersproject/abi': ^5.4.7 - '@ethersproject/providers': ^5.4.7 - '@nomicfoundation/hardhat-chai-matchers': ^1.0.0 + '@nomicfoundation/hardhat-chai-matchers': ^2.0.0 + '@nomicfoundation/hardhat-ethers': ^3.0.0 '@nomicfoundation/hardhat-network-helpers': ^1.0.0 - '@nomiclabs/hardhat-ethers': ^2.0.0 - '@nomiclabs/hardhat-etherscan': ^3.0.0 - '@typechain/ethers-v5': ^10.1.0 - '@typechain/hardhat': ^6.1.2 + '@nomicfoundation/hardhat-verify': ^1.0.0 + '@typechain/ethers-v6': ^0.4.0 + '@typechain/hardhat': ^8.0.0 '@types/chai': ^4.2.0 - '@types/mocha': ^9.1.0 + '@types/mocha': '>=9.1.0' '@types/node': '>=12.0.0' chai: ^4.2.0 - ethers: ^5.4.7 + ethers: ^6.4.0 hardhat: ^2.11.0 hardhat-gas-reporter: ^1.0.8 solidity-coverage: ^0.8.1 ts-node: '>=8.0.0' - typechain: ^8.1.0 + typechain: ^8.2.0 typescript: '>=4.5.0' dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/hardhat-chai-matchers': 1.0.4(@nomiclabs/hardhat-ethers@2.2.1)(chai@4.3.7)(ethers@5.7.2)(hardhat@2.12.2) + '@nomicfoundation/hardhat-chai-matchers': 2.0.0(@nomicfoundation/hardhat-ethers@3.0.0)(chai@4.3.7)(ethers@6.4.0)(hardhat@2.12.2) + '@nomicfoundation/hardhat-ethers': 3.0.0(ethers@6.4.0)(hardhat@2.12.2) '@nomicfoundation/hardhat-network-helpers': 1.0.6(hardhat@2.12.2) - '@nomiclabs/hardhat-ethers': 2.2.1(ethers@5.7.2)(hardhat@2.12.2) - '@nomiclabs/hardhat-etherscan': 3.1.2(hardhat@2.12.2) - '@typechain/ethers-v5': 10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.1.1)(typescript@4.9.3) - '@typechain/hardhat': 6.1.4(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.1.1)(ethers@5.7.2)(hardhat@2.12.2)(typechain@8.1.1) + '@nomicfoundation/hardhat-verify': 1.0.0(hardhat@2.12.2) + '@typechain/ethers-v6': 0.4.0(ethers@6.4.0)(typechain@8.2.0)(typescript@4.9.3) + '@typechain/hardhat': 8.0.0(@typechain/ethers-v6@0.4.0)(ethers@6.4.0)(hardhat@2.12.2)(typechain@8.2.0) '@types/chai': 4.3.4 '@types/mocha': 10.0.0 '@types/node': 18.11.9 chai: 4.3.7 - ethers: 5.7.2 + ethers: 6.4.0 hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) hardhat-gas-reporter: 1.0.9(hardhat@2.12.2) solidity-coverage: 0.8.2(hardhat@2.12.2) ts-node: 10.9.1(@types/node@18.11.9)(typescript@4.9.3) - typechain: 8.1.1(typescript@4.9.3) + typechain: 8.2.0(typescript@4.9.3) typescript: 4.9.3 dev: true + /@nomicfoundation/hardhat-verify@1.0.0(hardhat@2.12.2): + resolution: {integrity: sha512-R3UM/w2+e4D9PZRaeJHbC0caHSu/FV3ykAFBFg+RPNsfSzNgtHeRJXS+V+2HnVJYPaucBUD0v/6qtU8BZAouoQ==} + peerDependencies: + hardhat: ^2.0.4 + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/address': 5.7.0 + cbor: 8.1.0 + chalk: 2.4.2 + debug: 4.3.4(supports-color@8.1.1) + hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) + lodash.clonedeep: 4.5.0 + semver: 6.3.0 + table: 6.8.1 + undici: 5.22.1 + transitivePeerDependencies: + - supports-color + dev: true + /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1: resolution: {integrity: sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==} engines: {node: '>= 10'} @@ -1153,36 +1166,6 @@ packages: '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 dev: true - /@nomiclabs/hardhat-ethers@2.2.1(ethers@5.7.2)(hardhat@2.12.2): - resolution: {integrity: sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg==} - peerDependencies: - ethers: ^5.0.0 - hardhat: ^2.0.0 - dependencies: - ethers: 5.7.2 - hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) - dev: true - - /@nomiclabs/hardhat-etherscan@3.1.2(hardhat@2.12.2): - resolution: {integrity: sha512-IEikeOVq0C/7CY6aD74d8L4BpGoc/FNiN6ldiPVg0QIFIUSu4FSGA1dmtJZJKk1tjpwgrfTLQNWnigtEaN9REg==} - peerDependencies: - hardhat: ^2.0.4 - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/address': 5.7.0 - cbor: 5.2.0 - chalk: 2.4.2 - debug: 4.3.4(supports-color@8.1.1) - fs-extra: 7.0.1 - hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) - lodash: 4.17.21 - semver: 6.3.0 - table: 6.8.1 - undici: 5.22.1 - transitivePeerDependencies: - - supports-color - dev: true - /@scure/base@1.1.1: resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} dev: true @@ -1319,43 +1302,33 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true - /@typechain/ethers-v5@10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.1.1)(typescript@4.9.3): - resolution: {integrity: sha512-o6nffJBxwmeX1ZiZpdnP/tqGd/7M7iYvQC88ZXaFFoyAGh7eYncynzVjOJV0XmaKzAc6puqyqZrnva+gJbk4sw==} + /@typechain/ethers-v6@0.4.0(ethers@6.4.0)(typechain@8.2.0)(typescript@4.9.3): + resolution: {integrity: sha512-vD3Agzz63Gf2XlU3ed2/y+8dLWQj+wf+4Eq+0JXsyOio/plyV5F6r0yYe+s3XdGI858U3Sr263pl8mliDrUqbw==} peerDependencies: - '@ethersproject/abi': ^5.0.0 - '@ethersproject/bytes': ^5.0.0 - '@ethersproject/providers': ^5.0.0 - ethers: ^5.1.3 - typechain: ^8.1.1 - typescript: '>=4.3.0' + ethers: 6.x + typechain: ^8.2.0 + typescript: '>=4.7.0' dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/providers': 5.7.2 - ethers: 5.7.2 + ethers: 6.4.0 lodash: 4.17.21 ts-essentials: 7.0.3(typescript@4.9.3) - typechain: 8.1.1(typescript@4.9.3) + typechain: 8.2.0(typescript@4.9.3) typescript: 4.9.3 dev: true - /@typechain/hardhat@6.1.4(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@10.1.1)(ethers@5.7.2)(hardhat@2.12.2)(typechain@8.1.1): - resolution: {integrity: sha512-S8k5d1Rjc+plwKpkorlifmh72M7Ki0XNUOVVLtdbcA/vLaEkuqZSJFdddpBgS5QxiJP+6CbRa/yO6EVTE2+fMQ==} + /@typechain/hardhat@8.0.0(@typechain/ethers-v6@0.4.0)(ethers@6.4.0)(hardhat@2.12.2)(typechain@8.2.0): + resolution: {integrity: sha512-XUVbqlMx8tJTOmzZCD/r196CidtNWAnTBZRcYxjLTKgcJMvc/kHQpWBnVMMB5QHxVKpYpCiz8g07FYCpG8rrjA==} peerDependencies: - '@ethersproject/abi': ^5.4.7 - '@ethersproject/providers': ^5.4.7 - '@typechain/ethers-v5': ^10.1.1 - ethers: ^5.4.7 + '@typechain/ethers-v6': ^0.4.0 + ethers: ^6.1.0 hardhat: ^2.9.9 - typechain: ^8.1.1 + typechain: ^8.2.0 dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@typechain/ethers-v5': 10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.1.1)(typescript@4.9.3) - ethers: 5.7.2 + '@typechain/ethers-v6': 0.4.0(ethers@6.4.0)(typechain@8.2.0)(typescript@4.9.3) + ethers: 6.4.0 fs-extra: 9.1.0 hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3) - typechain: 8.1.1(typescript@4.9.3) + typechain: 8.2.0(typescript@4.9.3) dev: true /@types/async-eventemitter@0.2.1: @@ -1439,6 +1412,10 @@ packages: resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} dev: true + /@types/node@18.15.13: + resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} + dev: true + /@types/node@8.10.66: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} dev: true @@ -1711,6 +1688,10 @@ packages: resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} dev: true + /aes-js@4.0.0-beta.5: + resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} + dev: true + /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -1975,10 +1956,6 @@ packages: engines: {node: '>=14.0.0'} dev: true - /bignumber.js@9.1.1: - resolution: {integrity: sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==} - dev: true - /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} @@ -2135,12 +2112,11 @@ packages: engines: {node: '>=6'} dev: true - /cbor@5.2.0: - resolution: {integrity: sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==} - engines: {node: '>=6.0.0'} + /cbor@8.1.0: + resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} + engines: {node: '>=12.19'} dependencies: - bignumber.js: 9.1.1 - nofilter: 1.0.4 + nofilter: 3.1.0 dev: true /chai-as-promised@7.1.1(chai@4.3.7): @@ -3001,6 +2977,22 @@ packages: - utf-8-validate dev: true + /ethers@6.4.0: + resolution: {integrity: sha512-nksaMCwX+BOdV2NQ1/57OehSD2JtujbhrdC2+Fb9VpvBO0WO6h+WWwu3oMMw7aUiTa5lvQcWX1vl4aOy7Q3CTg==} + engines: {node: '>=14.0.0'} + dependencies: + '@adraffy/ens-normalize': github.com/ricmoo/ens-normalize.js/2d040533e57e4f25f9a7cc4715e219658ad454b5 + '@noble/hashes': 1.1.2 + '@noble/secp256k1': 1.7.1 + '@types/node': 18.15.13 + aes-js: 4.0.0-beta.5 + tslib: 2.4.0 + ws: 8.5.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + /ethjs-unit@0.1.6: resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} engines: {node: '>=6.5.0', npm: '>=3'} @@ -4243,6 +4235,10 @@ packages: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} dev: true + /lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + dev: true + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -4566,9 +4562,9 @@ packages: resolution: {integrity: sha512-+M0PwXeU80kRohZ3aT4J/OnR+l9/KD2nVLNNoRgFtnf+umQVFdGBAO2N8+nCnEi0xlh/Wk3zOGC+vNNx+uM79Q==} dev: true - /nofilter@1.0.4: - resolution: {integrity: sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==} - engines: {node: '>=8'} + /nofilter@3.1.0: + resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} + engines: {node: '>=12.19'} dev: true /nopt@3.0.6: @@ -5796,6 +5792,10 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true + /tslib@2.4.0: + resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} + dev: true + /tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} dev: true @@ -5862,8 +5862,8 @@ packages: engines: {node: '>=8'} dev: true - /typechain@8.1.1(typescript@4.9.3): - resolution: {integrity: sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ==} + /typechain@8.2.0(typescript@4.9.3): + resolution: {integrity: sha512-tZqhqjxJ9xAS/Lh32jccTjMkpx7sTdUVVHAy5Bf0TIer5QFNYXotiX74oCvoVYjyxUKDK3MXHtMFzMyD3kE+jg==} hasBin: true peerDependencies: typescript: '>=4.3.0' @@ -6140,6 +6140,19 @@ packages: optional: true dev: true + /ws@8.5.0: + resolution: {integrity: sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /xmlhttprequest@1.8.0: resolution: {integrity: sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==} engines: {node: '>=0.4.0'} @@ -6238,3 +6251,9 @@ packages: dependencies: ethers: 5.7.2 dev: true + + github.com/ricmoo/ens-normalize.js/2d040533e57e4f25f9a7cc4715e219658ad454b5: + resolution: {tarball: https://codeload.github.com/ricmoo/ens-normalize.js/tar.gz/2d040533e57e4f25f9a7cc4715e219658ad454b5} + name: '@adraffy/ens-normalize' + version: 1.9.0 + dev: true diff --git a/tasks/accounts.ts b/tasks/accounts.ts index 570836af..9174751e 100644 --- a/tasks/accounts.ts +++ b/tasks/accounts.ts @@ -1,10 +1,9 @@ -import { Signer } from "@ethersproject/abstract-signer"; import { task } from "hardhat/config"; task("accounts", "Prints the list of accounts", async (_taskArgs, hre) => { - const accounts: Signer[] = await hre.ethers.getSigners(); + const accounts = await hre.ethers.getSigners(); for (const account of accounts) { - console.log(await account.getAddress()); + console.log(account.address); } }); diff --git a/tasks/greet.ts b/tasks/greet.ts index ded95012..7e69d0b8 100644 --- a/tasks/greet.ts +++ b/tasks/greet.ts @@ -1,10 +1,6 @@ -import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { task } from "hardhat/config"; import type { TaskArguments } from "hardhat/types"; -import type { Greeter } from "../../types/Greeter"; -import type { Greeter__factory } from "../../types/factories/Greeter__factory"; - task("task:setGreeting") .addParam("greeting", "Say hello, be nice") .addParam("account", "Specify which account [0, 9]") @@ -13,9 +9,9 @@ task("task:setGreeting") const Greeter = await deployments.get("Greeter"); - const signers: SignerWithAddress[] = await ethers.getSigners(); + const signers = await ethers.getSigners(); - const greeter = await ethers.getContractAt("Greeter", Greeter.address); + const greeter = await ethers.getContractAt("Greeter", Greeter.address); await greeter.connect(signers[taskArguments.account]).setGreeting(taskArguments.greeting); diff --git a/tasks/taskDeploy.ts b/tasks/taskDeploy.ts index 2e69bff0..13f4ee37 100644 --- a/tasks/taskDeploy.ts +++ b/tasks/taskDeploy.ts @@ -1,16 +1,12 @@ -import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { task } from "hardhat/config"; import type { TaskArguments } from "hardhat/types"; -import type { Greeter } from "../../types/Greeter"; -import type { Greeter__factory } from "../../types/factories/Greeter__factory"; - task("task:deployGreeter") .addParam("greeting", "Say hello, be nice") .setAction(async function (taskArguments: TaskArguments, { ethers }) { - const signers: SignerWithAddress[] = await ethers.getSigners(); - const greeterFactory: Greeter__factory = await ethers.getContractFactory("Greeter"); - const greeter: Greeter = await greeterFactory.connect(signers[0]).deploy(taskArguments.greeting); - await greeter.deployed(); - console.log("Greeter deployed to: ", greeter.address); + const signers = await ethers.getSigners(); + const greeterFactory = await ethers.getContractFactory("Greeter"); + const greeter = await greeterFactory.connect(signers[0]).deploy(taskArguments.greeting); + await greeter.waitForDeployment(); + console.log("Greeter deployed to: ", await greeter.getAddress()); }); diff --git a/test/greeter/Greeter.fixture.ts b/test/greeter/Greeter.fixture.ts index 768d5645..6636c07c 100644 --- a/test/greeter/Greeter.fixture.ts +++ b/test/greeter/Greeter.fixture.ts @@ -1,17 +1,16 @@ -import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signer-with-address"; import { ethers } from "hardhat"; import type { Greeter } from "../../types/Greeter"; import type { Greeter__factory } from "../../types/factories/Greeter__factory"; export async function deployGreeterFixture(): Promise<{ greeter: Greeter }> { - const signers: SignerWithAddress[] = await ethers.getSigners(); - const admin: SignerWithAddress = signers[0]; + const signers = await ethers.getSigners(); + const admin = signers[0]; - const greeting: string = "Hello, world!"; - const greeterFactory: Greeter__factory = await ethers.getContractFactory("Greeter"); - const greeter: Greeter = await greeterFactory.connect(admin).deploy(greeting); - await greeter.deployed(); + const greeting = "Hello, world!"; + const greeterFactory = await ethers.getContractFactory("Greeter"); + const greeter = await greeterFactory.connect(admin).deploy(greeting); + await greeter.waitForDeployment(); return { greeter }; } diff --git a/test/greeter/Greeter.ts b/test/greeter/Greeter.ts index 36731815..7f531db5 100644 --- a/test/greeter/Greeter.ts +++ b/test/greeter/Greeter.ts @@ -1,5 +1,4 @@ import { loadFixture } from "@nomicfoundation/hardhat-network-helpers"; -import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signer-with-address"; import { ethers } from "hardhat"; import type { Signers } from "../types"; @@ -10,7 +9,7 @@ describe("Unit tests", function () { before(async function () { this.signers = {} as Signers; - const signers: SignerWithAddress[] = await ethers.getSigners(); + const signers = await ethers.getSigners(); this.signers.admin = signers[0]; this.loadFixture = loadFixture; diff --git a/test/types.ts b/test/types.ts index 8c9791b2..3e7cb89f 100644 --- a/test/types.ts +++ b/test/types.ts @@ -1,4 +1,4 @@ -import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signer-with-address"; +import type { SignerWithAddress } from "@nomicfoundation/hardhat-ethers/dist/src/signer-with-address"; import type { Greeter } from "../types/Greeter"; diff --git a/tsconfig.json b/tsconfig.json index 30e1a6f4..734e21a2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "esModuleInterop": true, "experimentalDecorators": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es2020"], "module": "commonjs", "moduleResolution": "node", "noImplicitAny": true, @@ -14,9 +14,9 @@ "resolveJsonModule": true, "sourceMap": true, "strict": true, - "target": "es6" + "target": "es2020" }, "exclude": ["node_modules"], "files": ["./hardhat.config.ts"], - "include": ["src/**/*", "tasks/**/*", "test/**/*", "deploy/**/*"] + "include": ["src/**/*", "tasks/**/*", "test/**/*", "deploy/**/*", "types/"] }