From 954304d81b29963b2de2f7bfdfbdd46a55b0e9eb Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Fri, 20 Dec 2024 15:53:38 +0100 Subject: [PATCH 1/9] add basic files to support sonic network --- contracts/deployments/sonic/.chainId | 1 + contracts/deployments/sonic/.migrations.json | 2 + contracts/dev.env | 2 + contracts/fork-test.sh | 3 + contracts/hardhat.config.js | 15 ++ contracts/node.sh | 3 + contracts/package.json | 15 +- contracts/test/helpers.js | 8 + contracts/utils/hardhat-helpers.js | 19 ++ contracts/yarn.lock | 232 +++++++++++++++++++ 10 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 contracts/deployments/sonic/.chainId create mode 100644 contracts/deployments/sonic/.migrations.json diff --git a/contracts/deployments/sonic/.chainId b/contracts/deployments/sonic/.chainId new file mode 100644 index 0000000000..bc768da71a --- /dev/null +++ b/contracts/deployments/sonic/.chainId @@ -0,0 +1 @@ +146 \ No newline at end of file diff --git a/contracts/deployments/sonic/.migrations.json b/contracts/deployments/sonic/.migrations.json new file mode 100644 index 0000000000..7a73a41bfd --- /dev/null +++ b/contracts/deployments/sonic/.migrations.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/contracts/dev.env b/contracts/dev.env index eae459ee53..82700f75c8 100644 --- a/contracts/dev.env +++ b/contracts/dev.env @@ -1,10 +1,12 @@ #providers PROVIDER_URL=[SET PROVIDER URL HERE] HOLESKY_PROVIDER_URL=[SET HOLESKY PROVIDER URL HERE] +SONIC_PROVIDER_URL=[SET SONIC PROVIDER URL] # Set it to latest block number or leave it empty BLOCK_NUMBER= HOLESKY_BLOCK_NUMBER= +SONIC_BLOCK_NUMBER= ARBITRUM_PROVIDER_URL=[SET PROVIDER URL HERE] diff --git a/contracts/fork-test.sh b/contracts/fork-test.sh index ce5f4d93e8..db6913769a 100755 --- a/contracts/fork-test.sh +++ b/contracts/fork-test.sh @@ -42,6 +42,9 @@ main() elif [[ $FORK_NETWORK_NAME == "holesky" ]]; then PROVIDER_URL=$HOLESKY_PROVIDER_URL; BLOCK_NUMBER=$HOLESKY_BLOCK_NUMBER; + elif [[ $FORK_NETWORK_NAME == "sonic" ]]; then + PROVIDER_URL=$SONIC_PROVIDER_URL; + BLOCK_NUMBER=$SONIC_BLOCK_NUMBER; elif [[ $FORK_NETWORK_NAME == "base" ]]; then PROVIDER_URL=$BASE_PROVIDER_URL; BLOCK_NUMBER=$BASE_BLOCK_NUMBER; diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index ab81ef5886..82b71408ed 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -10,7 +10,12 @@ const { isBaseFork, isBaseForkTest, isBaseUnitTest, + isSonic, + isSonicFork, + isSonicForkTest, + isSonicUnitTest, baseProviderUrl, + sonicProviderUrl, arbitrumProviderUrl, holeskyProviderUrl, adjustTheForkBlockNumber, @@ -20,6 +25,7 @@ const { require("@nomiclabs/hardhat-etherscan"); require("@nomiclabs/hardhat-waffle"); require("@nomiclabs/hardhat-solhint"); + require("hardhat-deploy"); require("hardhat-tracer"); require("hardhat-contract-sizer"); @@ -74,6 +80,8 @@ if (isHolesky || isHoleskyForkTest || isHoleskyFork) { paths.deploy = "deploy/holesky"; } else if (isBase || isBaseFork || isBaseForkTest || isBaseUnitTest) { paths.deploy = "deploy/base"; +} else if (isSonic || isSonicFork || isSonicForkTest || isSonicUnitTest) { + paths.deploy = "deploy/sonic"; } else { // holesky deployment files are in contracts/deploy/mainnet paths.deploy = "deploy/mainnet"; @@ -179,6 +187,13 @@ module.exports = { live: true, saveDeployments: true, }, + sonic: { + url: sonicProviderUrl, + accounts: [ + process.env.DEPLOYER_PK || privateKeys[0], + process.env.GOVERNOR_PK || privateKeys[0], + ], + } }, mocha: { bail: process.env.BAIL === "true", diff --git a/contracts/node.sh b/contracts/node.sh index 3fa6356927..cd3f5d5f3c 100755 --- a/contracts/node.sh +++ b/contracts/node.sh @@ -33,6 +33,9 @@ main() elif [[ $FORK_NETWORK_NAME == "holesky" ]]; then PROVIDER_URL=$HOLESKY_PROVIDER_URL; BLOCK_NUMBER=$HOLESKY_BLOCK_NUMBER; + elif [[ $FORK_NETWORK_NAME == "sonic" ]]; then + PROVIDER_URL=$SONIC_PROVIDER_URL; + BLOCK_NUMBER=$SONIC_BLOCK_NUMBER; elif [[ $FORK_NETWORK_NAME == "base" ]]; then PROVIDER_URL=$BASE_PROVIDER_URL; BLOCK_NUMBER=$BASE_BLOCK_NUMBER; diff --git a/contracts/package.json b/contracts/package.json index 41a2283c17..acf4b8c0b1 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -16,6 +16,7 @@ "node:arb": "FORK_NETWORK_NAME=arbitrumOne yarn run node:fork", "node:hol": "FORK_NETWORK_NAME=holesky yarn run node:fork", "node:base": "FORK_NETWORK_NAME=base yarn run node:fork", + "node:sonic": "FORK_NETWORK_NAME=sonic yarn run node:fork", "lint": "yarn run lint:js && yarn run lint:sol", "lint:js": "eslint \"test/**/*.js\" \"tasks/**/*.js\" \"deploy/**/*.js\"", "lint:sol": "solhint \"contracts/**/*.sol\"", @@ -25,10 +26,12 @@ "prettier:sol": "prettier --write \"contracts/**/*.sol\"", "test": "rm -rf deployments/hardhat && IS_TEST=true npx hardhat test", "test:base": "rm -rf deployments/hardhat && UNIT_TESTS_NETWORK=base IS_TEST=true npx hardhat test", + "test:sonic": "rm -rf deployments/hardhat && UNIT_TESTS_NETWORK=sonic IS_TEST=true npx hardhat test", "test:fork": "./fork-test.sh", "test:arb-fork": "FORK_NETWORK_NAME=arbitrumOne ./fork-test.sh", "test:base-fork": "FORK_NETWORK_NAME=base ./fork-test.sh", "test:hol-fork": "FORK_NETWORK_NAME=holesky ./fork-test.sh", + "test:sonic-fork": "FORK_NETWORK_NAME=sonic ./fork-test.sh", "test:fork:w_trace": "TRACE=true ./fork-test.sh", "fund": "FORK=true npx hardhat fund --network localhost", "echidna": "yarn run clean && rm -rf echidna-corpus && echidna . --contract Echidna --config echidna-config.yaml", @@ -43,14 +46,19 @@ "test:coverage:fork": "REPORT_COVERAGE=true ./fork-test.sh", "test:coverage:arb-fork": "REPORT_COVERAGE=true FORK_NETWORK_NAME=arbitrumOne ./fork-test.sh", "test:coverage:base-fork": "REPORT_COVERAGE=true FORK_NETWORK_NAME=base ./fork-test.sh", - "test:coverage:hol-fork": "REPORT_COVERAGE=true FORK_NETWORK_NAME=holesky ./fork-test.sh" + "test:coverage:hol-fork": "REPORT_COVERAGE=true FORK_NETWORK_NAME=holesky ./fork-test.sh", + "test:coverage:sonic-fork": "REPORT_COVERAGE=true FORK_NETWORK_NAME=sonic ./fork-test.sh" }, "author": "Origin Protocol Inc ", "license": "MIT", "devDependencies": { "@aws-sdk/client-kms": "^3.598.0", "@aws-sdk/client-s3": "^3.600.0", + "@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.9", + "@nomicfoundation/hardhat-verify": "^2.0.0", "@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-solhint": "^2.0.0", @@ -65,6 +73,10 @@ "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", + "@typechain/ethers-v6": "^0.5.0", + "@typechain/hardhat": "^9.0.0", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", "@uniswap/v3-core": "^1.0.0", "@uniswap/v3-periphery": "^1.1.1", "axios": "^1.4.0", @@ -96,6 +108,7 @@ "ssv-keys": "^1.1.0", "ssv-scanner": "github:bloxapp/ssv-scanner", "sync-fetch": "^0.5.2", + "ts-node": ">=8.0.0", "uuid": "^9.0.1", "web3-utils": "^1.5.2" }, diff --git a/contracts/test/helpers.js b/contracts/test/helpers.js index eae2879037..f0ebd61011 100644 --- a/contracts/test/helpers.js +++ b/contracts/test/helpers.js @@ -305,6 +305,10 @@ const isBase = hre.network.name == "base"; const isBaseFork = isFork && process.env.FORK_NETWORK_NAME == "base"; const isBaseOrFork = isBase || isBaseFork; const isBaseUnitTest = process.env.UNIT_TESTS_NETWORK === "base"; +const isSonic = hre.network.name == "sonic"; +const isSonicFork = isFork && process.env.FORK_NETWORK_NAME == "sonic"; +const isSonicOrFork = isSonic || isSonicFork; +const isSonicUnitTest = process.env.UNIT_TESTS_NETWORK === "sonic"; /// Advances the EVM time by the given number of seconds const advanceTime = async (seconds) => { @@ -838,6 +842,10 @@ module.exports = { isBaseFork, isBaseOrFork, isBaseUnitTest, + isSonic, + isSonicFork, + isSonicOrFork, + isSonicUnitTest, getOracleAddress, setOracleTokenPriceUsd, getOracleAddresses, diff --git a/contracts/utils/hardhat-helpers.js b/contracts/utils/hardhat-helpers.js index a40632a9e5..9a8d25e527 100644 --- a/contracts/utils/hardhat-helpers.js +++ b/contracts/utils/hardhat-helpers.js @@ -7,12 +7,16 @@ const isHoleskyFork = process.env.FORK_NETWORK_NAME === "holesky"; const isHolesky = process.env.NETWORK_NAME === "holesky"; const isBase = process.env.NETWORK_NAME === "base"; const isBaseFork = process.env.FORK_NETWORK_NAME === "base"; +const isSonic = process.env.NETWORK_NAME === "sonic"; +const isSonicFork = process.env.FORK_NETWORK_NAME === "sonic"; const isForkTest = isFork && process.env.IS_TEST === "true"; const isArbForkTest = isForkTest && isArbitrumFork; const isHoleskyForkTest = isForkTest && isHoleskyFork; const isBaseForkTest = isForkTest && isBaseFork; const isBaseUnitTest = process.env.UNIT_TESTS_NETWORK === "base"; +const isSonicForkTest = isForkTest && isSonicFork; +const isSonicUnitTest = process.env.UNIT_TESTS_NETWORK === "sonic"; const providerUrl = `${ process.env.LOCAL_PROVIDER_URL || process.env.PROVIDER_URL @@ -20,6 +24,7 @@ const providerUrl = `${ const arbitrumProviderUrl = `${process.env.ARBITRUM_PROVIDER_URL}`; const holeskyProviderUrl = `${process.env.HOLESKY_PROVIDER_URL}`; const baseProviderUrl = `${process.env.BASE_PROVIDER_URL}`; +const sonicProviderUrl = `${process.env.SONIC_PROVIDER_URL}`; const standaloneLocalNodeRunning = !!process.env.LOCAL_PROVIDER_URL; /** @@ -44,6 +49,10 @@ const adjustTheForkBlockNumber = () => { forkBlockNumber = process.env.BASE_BLOCK_NUMBER ? process.env.BASE_BLOCK_NUMBER : undefined; + } else if (isSonicForkTest) { + forkBlockNumber = process.env.SONIC_BLOCK_NUMBER + ? process.env.SONIC_BLOCK_NUMBER + : undefined; } else { forkBlockNumber = process.env.BLOCK_NUMBER ? Number(process.env.BLOCK_NUMBER) @@ -108,6 +117,8 @@ const getHardhatNetworkProperties = () => { chainId = 17000; } else if (isBaseFork && isFork) { chainId = 8453; + } else if (isSonicFork && isFork) { + chainId = 146; } else if (isFork) { // is mainnet fork chainId = 1; @@ -119,6 +130,8 @@ const getHardhatNetworkProperties = () => { provider = arbitrumProviderUrl; } else if (isHoleskyForkTest) { provider = holeskyProviderUrl; + } else if (isSonicForkTest) { + provider = sonicProviderUrl; } else if (isBaseForkTest) { provider = baseProviderUrl; } @@ -133,6 +146,7 @@ const networkMap = { 42161: "arbitrumOne", 1337: "hardhat", 8453: "base", + 146: "sonic", }; module.exports = { @@ -144,6 +158,10 @@ module.exports = { isBaseUnitTest, isHoleskyFork, isHolesky, + isSonic, + isSonicFork, + isSonicForkTest, + isSonicUnitTest, isForkTest, isArbForkTest, isHoleskyForkTest, @@ -154,4 +172,5 @@ module.exports = { getHardhatNetworkProperties, networkMap, baseProviderUrl, + sonicProviderUrl, }; diff --git a/contracts/yarn.lock b/contracts/yarn.lock index 56eb66971e..455aa07158 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -868,6 +868,13 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -1488,11 +1495,29 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@metamask/eth-sig-util@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" @@ -1693,6 +1718,29 @@ mcl-wasm "^0.7.1" rustbn.js "~0.2.0" +"@nomicfoundation/hardhat-chai-matchers@^2.0.0": + version "2.0.8" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.8.tgz#9c7cfc4ad0f0a5e9cf16aba8ab668c02f6e273aa" + integrity sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg== + dependencies: + "@types/chai-as-promised" "^7.1.3" + chai-as-promised "^7.1.1" + deep-eql "^4.0.1" + ordinal "^1.0.3" + +"@nomicfoundation/hardhat-ethers@^3.0.0": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz#af078f566373abeb77e11cbe69fe3dd47f8bfc27" + integrity sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA== + dependencies: + debug "^4.1.1" + lodash.isequal "^4.5.0" + +"@nomicfoundation/hardhat-ignition-ethers@^0.15.0": + version "0.15.9" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.9.tgz#706801c2e8c70b39c77377439bdb240c20eee76c" + integrity sha512-9PwwgLv3z2ec3B26mK0IjiFezHFFBcBcs1qKaRu8SanARE4b7RvrfiLIy8ZXE7HaxgPt32kSsQzehhzAwAIj1Q== + "@nomicfoundation/hardhat-network-helpers@^1.0.9": version "1.0.9" resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz#767449e8a2acda79306ac84626117583d95d25aa" @@ -1700,6 +1748,21 @@ dependencies: ethereumjs-util "^7.1.4" +"@nomicfoundation/hardhat-verify@^2.0.0": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.12.tgz#480819a245a2db0b127e473c62079f7b4f16daa8" + integrity sha512-Lg3Nu7DCXASQRVI/YysjuAX2z8jwOCbS0w5tz2HalWGSTZThqA0v9N0v0psHbKNqzPJa8bNOeapIVSziyJTnAg== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@ethersproject/address" "^5.0.2" + cbor "^8.1.0" + debug "^4.1.1" + lodash.clonedeep "^4.5.0" + picocolors "^1.1.0" + semver "^6.3.0" + table "^6.8.0" + undici "^5.14.0" + "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" @@ -2858,6 +2921,26 @@ dependencies: node-gyp-build "4.3.0" +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@typechain/ethers-v5@^10.0.0": version "10.2.1" resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz#50241e6957683281ecfa03fb5a6724d8a3ce2391" @@ -2866,6 +2949,21 @@ lodash "^4.17.15" ts-essentials "^7.0.1" +"@typechain/ethers-v6@^0.5.0": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz#42fe214a19a8b687086c93189b301e2b878797ea" + integrity sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA== + dependencies: + lodash "^4.17.15" + ts-essentials "^7.0.1" + +"@typechain/hardhat@^9.0.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.1.0.tgz#6985015f01dfb37ef2ca8a29c742d05890351ddc" + integrity sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA== + dependencies: + fs-extra "^9.1.0" + "@types/abstract-leveldown@*": version "7.2.1" resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-7.2.1.tgz#bb16403c17754b0c4d5772d71d03b924a03d4c80" @@ -2902,6 +3000,25 @@ "@types/node" "*" "@types/responselike" "^1.0.0" +"@types/chai-as-promised@^7.1.3": + version "7.1.8" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" + integrity sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw== + dependencies: + "@types/chai" "*" + +"@types/chai@*": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.0.1.tgz#2c3705555cf11f5f59c836a84c44afcfe4e5689d" + integrity sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA== + dependencies: + "@types/deep-eql" "*" + +"@types/chai@^4.2.0": + version "4.3.20" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" + integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== + "@types/concat-stream@^1.6.0": version "1.6.1" resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" @@ -2909,6 +3026,11 @@ dependencies: "@types/node" "*" +"@types/deep-eql@*": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" + integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== + "@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -2977,6 +3099,11 @@ dependencies: "@types/node" "*" +"@types/mocha@>=9.1.0": + version "10.0.10" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.10.tgz#91f62905e8d23cbd66225312f239454a23bebfa0" + integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q== + "@types/node-fetch@^2.6.1": version "2.6.4" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" @@ -3199,6 +3326,13 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn-walk@^8.1.1: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" + acorn@^6.0.7: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -3209,6 +3343,11 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.11.0, acorn@^8.4.1: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + address@^1.0.1: version "1.2.2" resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" @@ -3375,6 +3514,11 @@ anymatch@~3.1.1, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -3524,6 +3668,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -4010,6 +4159,13 @@ cbor@^8.0.0, cbor@^8.1.0: dependencies: nofilter "^3.1.0" +chai-as-promised@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041" + integrity sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw== + dependencies: + check-error "^1.0.2" + chai@^4.3.4: version "4.3.7" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" @@ -4466,6 +4622,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-fetch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" @@ -4597,6 +4758,13 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" +deep-eql@^4.0.1: + version "4.1.4" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + deep-eql@^4.1.2, deep-eql@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" @@ -5908,6 +6076,16 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -7447,6 +7625,16 @@ lodash.camelcase@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -7537,6 +7725,11 @@ magic-string@^0.30.3: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + markdown-table@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" @@ -8212,6 +8405,11 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +ordinal@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" + integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== + os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -8424,6 +8622,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== +picocolors@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -9867,6 +10070,25 @@ ts-essentials@^7.0.1: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== +ts-node@>=8.0.0: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + tslib@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" @@ -10188,6 +10410,11 @@ uuid@^9.0.0, uuid@^9.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -11006,6 +11233,11 @@ yargs@^17.5.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 51a3870c143df16bc03f5f61548145a1bb9fa79a Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Fri, 20 Dec 2024 15:58:16 +0100 Subject: [PATCH 2/9] add some more config --- contracts/hardhat.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index 82b71408ed..ee445bc015 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -219,6 +219,7 @@ module.exports = { arbitrumOne: MAINNET_DEPLOYER, holesky: HOLESKY_DEPLOYER, base: MAINNET_DEPLOYER, + sonic: MAINNET_DEPLOYER, }, governorAddr: { default: 1, @@ -242,6 +243,7 @@ module.exports = { mainnet: MAINNET_GOVERNOR, holesky: HOLESKY_DEPLOYER, // on Holesky the deployer is also the governor base: BASE_GOVERNOR, + sonic: MAINNET_GOVERNOR, }, /* Local node environment currently has no access to Decentralized governance * address, since the contract is in another repo. Once we merge the ousd-governance @@ -362,6 +364,14 @@ module.exports = { browserURL: "https://basescan.org", }, }, + { + network: "sonic", + chainId: 146, + urls: { + apiURL: "https://api.sonicscan.org/api", + browserURL: "https://sonicscan.org", + }, + }, ], }, gasReporter: { From 6c3179b75dc93860ed060e0f96082d8b9325535a Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Fri, 20 Dec 2024 16:02:13 +0100 Subject: [PATCH 3/9] add a basic deloyment file --- contracts/deploy/deployActions.js | 19 +- contracts/deploy/sonic/001_core.js | 80 ++++ contracts/hardhat.config.js | 24 +- contracts/package.json | 11 +- contracts/test/helpers.js | 5 + contracts/utils/addresses.js | 4 + contracts/utils/deploy.js | 17 +- contracts/yarn.lock | 626 +++++++++-------------------- 8 files changed, 320 insertions(+), 466 deletions(-) create mode 100644 contracts/deploy/sonic/001_core.js diff --git a/contracts/deploy/deployActions.js b/contracts/deploy/deployActions.js index 4944a896e5..6cc974c616 100644 --- a/contracts/deploy/deployActions.js +++ b/contracts/deploy/deployActions.js @@ -6,6 +6,7 @@ const { getOracleAddresses, isMainnet, isHolesky, + isSonicOrFork } = require("../test/helpers.js"); const { deployWithConfirmation, withConfirmation } = require("../utils/deploy"); const { @@ -1027,8 +1028,7 @@ const deployOracles = async () => { await deployWithConfirmation(contractName, args, oracleContract); const oracleRouter = await ethers.getContract("OracleRouter"); log("Deployed OracleRouter"); - - if (isHolesky) { + if (isHolesky || isSonicOrFork) { // no need to configure any feeds since they are hardcoded to a fixed feed // TODO: further deployments will require more intelligent separation of different // chains / environment oracle deployments @@ -1084,7 +1084,9 @@ const deployOracles = async () => { }; const deployOETHCore = async () => { - const { governorAddr } = await hre.getNamedAccounts(); + const { governorAddr, deployerAddr } = await hre.getNamedAccounts(); + const sDeloyer = await ethers.provider.getSigner(deployerAddr); + const assetAddresses = await getAssetAddresses(deployments); log(`Using asset addresses: ${JSON.stringify(assetAddresses, null, 2)}`); @@ -1095,14 +1097,16 @@ const deployOETHCore = async () => { await deployWithConfirmation("OETHProxy"); await deployWithConfirmation("OETHVaultProxy"); + const wrappedChainToken = isSonicOrFork ? assetAddresses.WS : assetAddresses.WETH; + // Main contracts const dOETH = await deployWithConfirmation("OETH"); const dOETHVault = await deployWithConfirmation("OETHVault"); const dOETHVaultCore = await deployWithConfirmation("OETHVaultCore", [ - assetAddresses.WETH, + wrappedChainToken, ]); const dOETHVaultAdmin = await deployWithConfirmation("OETHVaultAdmin", [ - assetAddresses.WETH, + wrappedChainToken, ]); // Get contract instances @@ -1119,8 +1123,9 @@ const deployOETHCore = async () => { cOETHVaultProxy.address ); + await cOETHProxy.connect(sDeloyer); await withConfirmation( - cOETHProxy["initialize(address,address,bytes)"]( + cOETHProxy.connect(sDeloyer)["initialize(address,address,bytes)"]( dOETH.address, governorAddr, [] @@ -1129,7 +1134,7 @@ const deployOETHCore = async () => { log("Initialized OETHProxy"); await withConfirmation( - cOETHVaultProxy["initialize(address,address,bytes)"]( + cOETHVaultProxy.connect(sDeloyer)["initialize(address,address,bytes)"]( dOETHVault.address, governorAddr, [] diff --git a/contracts/deploy/sonic/001_core.js b/contracts/deploy/sonic/001_core.js new file mode 100644 index 0000000000..d456ce1e47 --- /dev/null +++ b/contracts/deploy/sonic/001_core.js @@ -0,0 +1,80 @@ +const { + deployOracles, + deployOETHCore, + // deployOETHDripper, + // deployOETHHarvester, + // configureOETHVault, +} = require("../deployActions"); + +//const { withConfirmation } = require("../../utils/deploy"); +const { hardhatSetBalance } = require("../../test/_fund.js"); +const { isSonicFork } = require("../../test/helpers.js"); + +const mainExport = async () => { + console.log("Running 001_core deployment on Sonic..."); + const { governorAddr } = await getNamedAccounts(); + //const sGovernor = await ethers.provider.getSigner(governorAddr); + + + if (isSonicFork) { + const { deployerAddr } = await getNamedAccounts(); + await hardhatSetBalance(deployerAddr, "10000000000"); + } + + console.log("Deploying Oracles"); + await deployOracles(); + console.log("Deploying Core"); + await deployOETHCore(); + + //const cOETHDripper = await deployOETHDripper(); + // const cOETHHarvester = await deployOETHHarvester(cOETHDripper); + // await configureOETHVault(true); + + // const cVault = await ethers.getContractAt( + // "IVault", + // ( + // await ethers.getContract("OETHVaultProxy") + // ).address + // ); + + // const nativeStakingSSVStrategyProxy = await ethers.getContract( + // "NativeStakingSSVStrategyProxy" + // ); + + // const nativeStakingSSVStrategy = await ethers.getContractAt( + // "NativeStakingSSVStrategy", + // nativeStakingSSVStrategyProxy.address + // ); + + // await withConfirmation( + // nativeStakingSSVStrategy + // .connect(sGovernor) + // .setHarvesterAddress(cOETHHarvester.address) + // ); + + // await withConfirmation( + // cVault + // .connect(sGovernor) + // .approveStrategy(nativeStakingSSVStrategyProxy.address) + // ); + + // await withConfirmation( + // nativeStakingSSVStrategy.connect(sGovernor).setRegistrator(governorAddr) + // ); + + // await withConfirmation( + // nativeStakingSSVStrategy + // .connect(sGovernor) + // .setAccountingGovernor(governorAddr) + // ); + + console.log("001_core deploy done."); + return true; +}; + +mainExport.id = "001_core"; +mainExport.tags = []; +mainExport.dependencies = []; +mainExport.skip = () => false; + +module.exports = mainExport; diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index ee445bc015..616ffc4232 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -52,6 +52,8 @@ const MAINNET_MULTISIG = "0xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d899"; const MAINNET_CLAIM_ADJUSTER = MAINNET_DEPLOYER; const MAINNET_STRATEGIST = "0xf14bbdf064e3f67f51cd9bd646ae3716ad938fdc"; const HOLESKY_DEPLOYER = "0x1b94CA50D3Ad9f8368851F8526132272d1a5028C"; +// TODO: update when known +const SONIC_DEPLOYER = HOLESKY_DEPLOYER; const BASE_DEPLOYER = MAINNET_DEPLOYER; const BASE_GOVERNOR = "0x92A19381444A001d62cE67BaFF066fA1111d7202"; const BASE_STRATEGIST = "0x28bce2eE5775B652D92bB7c2891A89F036619703"; @@ -207,13 +209,17 @@ module.exports = { process.env.FORK === "true" ? isHoleskyFork ? HOLESKY_DEPLOYER - : MAINNET_DEPLOYER + : isSonicFork + ? SONIC_DEPLOYER + : MAINNET_DEPLOYER : 0, hardhat: process.env.FORK === "true" ? isHoleskyFork ? HOLESKY_DEPLOYER - : MAINNET_DEPLOYER + : isSonicFork + ? SONIC_DEPLOYER + : MAINNET_DEPLOYER : 0, mainnet: MAINNET_DEPLOYER, arbitrumOne: MAINNET_DEPLOYER, @@ -229,21 +235,25 @@ module.exports = { ? isHoleskyFork ? HOLESKY_DEPLOYER : isBaseFork - ? BASE_GOVERNOR - : MAINNET_GOVERNOR + ? BASE_GOVERNOR + : isSonicFork + ? SONIC_DEPLOYER + : MAINNET_GOVERNOR : 1, hardhat: process.env.FORK === "true" ? isHoleskyFork ? HOLESKY_DEPLOYER : isBaseFork - ? BASE_GOVERNOR - : MAINNET_GOVERNOR + ? BASE_GOVERNOR + : isSonicFork + ? SONIC_DEPLOYER + : MAINNET_GOVERNOR : 1, mainnet: MAINNET_GOVERNOR, holesky: HOLESKY_DEPLOYER, // on Holesky the deployer is also the governor base: BASE_GOVERNOR, - sonic: MAINNET_GOVERNOR, + sonic: MAINNET_DEPLOYER, }, /* Local node environment currently has no access to Decentralized governance * address, since the contract is in another repo. Once we merge the ousd-governance diff --git a/contracts/package.json b/contracts/package.json index acf4b8c0b1..a829f5505f 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -54,12 +54,9 @@ "devDependencies": { "@aws-sdk/client-kms": "^3.598.0", "@aws-sdk/client-s3": "^3.600.0", - "@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.9", - "@nomicfoundation/hardhat-verify": "^2.0.0", - "@nomiclabs/hardhat-ethers": "^2.0.2", + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-solhint": "^2.0.0", "@nomiclabs/hardhat-waffle": "^2.0.6", @@ -87,12 +84,12 @@ "eslint-plugin-no-only-tests": "^3.1.0", "ethereum-waffle": "^4.0.10", "ethers": "^5.4.6", - "hardhat": "^2.14.1", + "hardhat": "^2.22.17", "hardhat-contract-sizer": "^2.9.0", "hardhat-deploy": "^0.11.30", "hardhat-deploy-ethers": "^0.3.0-beta.13", "hardhat-gas-reporter": "^1.0.9", - "hardhat-tracer": "^2.3.2", + "hardhat-tracer": "^3.1.0", "husky": "^7.0.2", "lodash": "^4.17.21", "mocha": "^10.2.0", diff --git a/contracts/test/helpers.js b/contracts/test/helpers.js index f0ebd61011..492982d34d 100644 --- a/contracts/test/helpers.js +++ b/contracts/test/helpers.js @@ -480,6 +480,11 @@ const getAssetAddresses = async (deployments) => { SSVNetwork: addresses.mainnet.SSVNetwork, beaconChainDepositContract: addresses.mainnet.beaconChainDepositContract, }; + } else if (isSonicOrFork) { + return { + WETH: addresses.sonic.WETH, + WS: addresses.sonic.WS + } } else if (isHoleskyOrFork) { return { WETH: addresses.holesky.WETH, diff --git a/contracts/utils/addresses.js b/contracts/utils/addresses.js index 5424ea9fef..d05f870b94 100644 --- a/contracts/utils/addresses.js +++ b/contracts/utils/addresses.js @@ -7,6 +7,7 @@ addresses.ETH = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; addresses.mainnet = {}; addresses.holesky = {}; +addresses.sonic = {}; addresses.mainnet.ORIGINTEAM = "0x449e0b5564e0d141b3bc3829e74ffa0ea8c08ad5"; @@ -357,4 +358,7 @@ addresses.holesky.validatorRegistrator = // Address of the Holesky defender relayer addresses.holesky.Guardian = "0x3C6B0c7835a2E2E0A45889F64DcE4ee14c1D5CB4"; +addresses.sonic.WS = "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38"; +addresses.sonic.WETH = "0x309C92261178fA0CF748A855e90Ae73FDb79EBc7"; + module.exports = addresses; diff --git a/contracts/utils/deploy.js b/contracts/utils/deploy.js index d2cba63269..69ac376197 100644 --- a/contracts/utils/deploy.js +++ b/contracts/utils/deploy.js @@ -23,6 +23,8 @@ const { isArbitrumOne, isBase, isBaseFork, + isSonic, + isSonicFork, isCI, isTest, } = require("../test/helpers.js"); @@ -80,6 +82,7 @@ const deployWithConfirmation = async ( gasLimit, useFeeData ) => { + let feeData; // check that upgrade doesn't corrupt the storage slots if (!isTest && !skipUpgradeSafety) { await assertUpgradeIsSafe( @@ -88,11 +91,18 @@ const deployWithConfirmation = async ( ); } + if (isSonic) { + useFeeData = false; + } + const { deploy } = deployments; const { deployerAddr } = await getNamedAccounts(); if (!args) args = null; if (!contract) contract = contractName; - const feeData = await hre.ethers.provider.getFeeData(); + if (useFeeData) { + feeData = await hre.ethers.provider.getFeeData(); + } + const result = await withConfirmation( deploy(contractName, { from: deployerAddr, @@ -110,7 +120,7 @@ const deployWithConfirmation = async ( ); // if upgrade happened on the mainnet save the new storage slot layout to the repo - if (isMainnet || isArbitrumOne || isBase) { + if (isMainnet || isArbitrumOne || isBase || isSonic) { await storeStorageLayoutForContract(hre, contractName); } @@ -123,7 +133,6 @@ const withConfirmation = async ( logContractAbi = false ) => { const result = await deployOrTransactionPromise; - if ( process.env.PROVIDER_URL?.includes("rpc.tenderly.co") || (isTest && !isForkTest) @@ -155,7 +164,7 @@ const withConfirmation = async ( }; const _verifyProxyInitializedWithCorrectGovernor = (transactionData) => { - if (isBaseFork) { + if (isBaseFork || isSonicFork) { // Skip proxy check on base for now return; } diff --git a/contracts/yarn.lock b/contracts/yarn.lock index 455aa07158..2db01df25e 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -827,42 +827,6 @@ "@openzeppelin/contracts-upgradeable-4.7.3" "npm:@openzeppelin/contracts-upgradeable@v4.7.3" "@openzeppelin/contracts-v0.7" "npm:@openzeppelin/contracts@v3.4.2" -"@chainsafe/as-sha256@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" - integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== - -"@chainsafe/persistent-merkle-tree@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" - integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/persistent-merkle-tree@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" - integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/ssz@^0.10.0": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" - integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.5.0" - -"@chainsafe/ssz@^0.9.2": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" - integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.4.2" - case "^1.6.3" - "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -1268,7 +1232,7 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.0", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.0", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -1584,163 +1548,84 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomicfoundation/ethereumjs-block@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" - integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - -"@nomicfoundation/ethereumjs-blockchain@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" - integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-ethash" "3.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - abstract-level "^1.0.3" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - level "^8.0.0" - lru-cache "^5.1.1" - memory-level "^1.0.0" - -"@nomicfoundation/ethereumjs-common@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" - integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== - dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.1" - crc-32 "^1.2.0" - -"@nomicfoundation/ethereumjs-ethash@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" - integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - abstract-level "^1.0.3" - bigint-crypto-utils "^3.0.23" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-evm@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" - integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== +"@nomicfoundation/edr-darwin-arm64@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.6.5.tgz#37a31565d7ef42bed9028ac44aed82144de30bd1" + integrity sha512-A9zCCbbNxBpLgjS1kEJSpqxIvGGAX4cYbpDYCU2f3jVqOwaZ/NU761y1SvuCRVpOwhoCXqByN9b7HPpHi0L4hw== + +"@nomicfoundation/edr-darwin-x64@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.6.5.tgz#3252f6e86397af460b7a480bfe1b889464d75b89" + integrity sha512-x3zBY/v3R0modR5CzlL6qMfFMdgwd6oHrWpTkuuXnPFOX8SU31qq87/230f4szM+ukGK8Hi+mNq7Ro2VF4Fj+w== + +"@nomicfoundation/edr-linux-arm64-gnu@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.6.5.tgz#e7dc2934920b6cfabeb5ee7a5e26c8fb0d4964ac" + integrity sha512-HGpB8f1h8ogqPHTyUpyPRKZxUk2lu061g97dOQ/W4CxevI0s/qiw5DB3U3smLvSnBHKOzYS1jkxlMeGN01ky7A== + +"@nomicfoundation/edr-linux-arm64-musl@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.6.5.tgz#00459cd53e9fb7bd5b7e32128b508a6e89079d89" + integrity sha512-ESvJM5Y9XC03fZg9KaQg3Hl+mbx7dsSkTIAndoJS7X2SyakpL9KZpOSYrDk135o8s9P9lYJdPOyiq+Sh+XoCbQ== + +"@nomicfoundation/edr-linux-x64-gnu@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.6.5.tgz#5c9e4e2655caba48e0196977cba395bbde6fe97d" + integrity sha512-HCM1usyAR1Ew6RYf5AkMYGvHBy64cPA5NMbaeY72r0mpKaH3txiMyydcHibByOGdQ8iFLWpyUdpl1egotw+Tgg== + +"@nomicfoundation/edr-linux-x64-musl@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.6.5.tgz#9c220751b66452dc43a365f380e1e236a0a8c5a9" + integrity sha512-nB2uFRyczhAvWUH7NjCsIO6rHnQrof3xcCe6Mpmnzfl2PYcGyxN7iO4ZMmRcQS7R1Y670VH6+8ZBiRn8k43m7A== + +"@nomicfoundation/edr-win32-x64-msvc@0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.6.5.tgz#90d3ac2a6a8a687522bda5ff2e92dd97e68126ea" + integrity sha512-B9QD/4DSSCFtWicO8A3BrsnitO1FPv7axB62wq5Q+qeJ50yJlTmyeGY3cw62gWItdvy2mh3fRM6L1LpnHiB77A== + +"@nomicfoundation/edr@^0.6.5": + version "0.6.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.6.5.tgz#b3b1ebcdd0148cfe67cca128e7ebe8092e200359" + integrity sha512-tAqMslLP+/2b2sZP4qe9AuGxG3OkQ5gGgHE4isUuq6dUVjwCRPFhAOhpdFl+OjY5P3yEv3hmq9HjUGRa2VNjng== + dependencies: + "@nomicfoundation/edr-darwin-arm64" "0.6.5" + "@nomicfoundation/edr-darwin-x64" "0.6.5" + "@nomicfoundation/edr-linux-arm64-gnu" "0.6.5" + "@nomicfoundation/edr-linux-arm64-musl" "0.6.5" + "@nomicfoundation/edr-linux-x64-gnu" "0.6.5" + "@nomicfoundation/edr-linux-x64-musl" "0.6.5" + "@nomicfoundation/edr-win32-x64-msvc" "0.6.5" + +"@nomicfoundation/ethereumjs-common@4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz#9901f513af2d4802da87c66d6f255b510bef5acb" + integrity sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg== dependencies: - "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" + "@nomicfoundation/ethereumjs-util" "9.0.4" -"@nomicfoundation/ethereumjs-rlp@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" - integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== - -"@nomicfoundation/ethereumjs-statemanager@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" - integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - js-sdsl "^4.1.4" - -"@nomicfoundation/ethereumjs-trie@6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" - integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== - dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@types/readable-stream" "^2.3.13" - ethereum-cryptography "0.1.3" - readable-stream "^3.6.0" +"@nomicfoundation/ethereumjs-rlp@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz#66c95256fc3c909f6fb18f6a586475fc9762fa30" + integrity sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw== -"@nomicfoundation/ethereumjs-tx@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" - integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== +"@nomicfoundation/ethereumjs-tx@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz#b0ceb58c98cc34367d40a30d255d6315b2f456da" + integrity sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw== dependencies: - "@chainsafe/ssz" "^0.9.2" - "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-util@9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" - integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== +"@nomicfoundation/ethereumjs-util@9.0.4": + version "9.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz#84c5274e82018b154244c877b76bc049a4ed7b38" + integrity sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q== dependencies: - "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.4" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-vm@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" - integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" - -"@nomicfoundation/hardhat-chai-matchers@^2.0.0": - version "2.0.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.8.tgz#9c7cfc4ad0f0a5e9cf16aba8ab668c02f6e273aa" - integrity sha512-Z5PiCXH4xhNLASROlSUOADfhfpfhYO6D7Hn9xp8PddmHey0jq704cr6kfU8TRrQ4PUZbpfsZadPj+pCfZdjPIg== - dependencies: - "@types/chai-as-promised" "^7.1.3" - chai-as-promised "^7.1.1" - deep-eql "^4.0.1" - ordinal "^1.0.3" - -"@nomicfoundation/hardhat-ethers@^3.0.0": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.8.tgz#af078f566373abeb77e11cbe69fe3dd47f8bfc27" - integrity sha512-zhOZ4hdRORls31DTOqg+GmEZM0ujly8GGIuRY7t7szEk2zW/arY1qDug/py8AEktT00v5K+b6RvbVog+va51IA== - dependencies: - debug "^4.1.1" - lodash.isequal "^4.5.0" - -"@nomicfoundation/hardhat-ignition-ethers@^0.15.0": - version "0.15.9" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.9.tgz#706801c2e8c70b39c77377439bdb240c20eee76c" - integrity sha512-9PwwgLv3z2ec3B26mK0IjiFezHFFBcBcs1qKaRu8SanARE4b7RvrfiLIy8ZXE7HaxgPt32kSsQzehhzAwAIj1Q== - "@nomicfoundation/hardhat-network-helpers@^1.0.9": version "1.0.9" resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz#767449e8a2acda79306ac84626117583d95d25aa" @@ -1748,20 +1633,10 @@ dependencies: ethereumjs-util "^7.1.4" -"@nomicfoundation/hardhat-verify@^2.0.0": - version "2.0.12" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.12.tgz#480819a245a2db0b127e473c62079f7b4f16daa8" - integrity sha512-Lg3Nu7DCXASQRVI/YysjuAX2z8jwOCbS0w5tz2HalWGSTZThqA0v9N0v0psHbKNqzPJa8bNOeapIVSziyJTnAg== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@ethersproject/address" "^5.0.2" - cbor "^8.1.0" - debug "^4.1.1" - lodash.clonedeep "^4.5.0" - picocolors "^1.1.0" - semver "^6.3.0" - table "^6.8.0" - undici "^5.14.0" +"@nomicfoundation/hardhat-toolbox@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-5.0.0.tgz#165b47f8a3d2bf668cc5d453ce7f496a1156948d" + integrity sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ== "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" @@ -1829,7 +1704,7 @@ "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" -"@nomiclabs/hardhat-ethers@^2.0.2": +"@nomiclabs/hardhat-ethers@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== @@ -3000,20 +2875,6 @@ "@types/node" "*" "@types/responselike" "^1.0.0" -"@types/chai-as-promised@^7.1.3": - version "7.1.8" - resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" - integrity sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw== - dependencies: - "@types/chai" "*" - -"@types/chai@*": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.0.1.tgz#2c3705555cf11f5f59c836a84c44afcfe4e5689d" - integrity sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA== - dependencies: - "@types/deep-eql" "*" - "@types/chai@^4.2.0": version "4.3.20" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" @@ -3026,11 +2887,6 @@ dependencies: "@types/node" "*" -"@types/deep-eql@*": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" - integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== - "@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -3164,14 +3020,6 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/readable-stream@^2.3.13": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" - integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== - dependencies: - "@types/node" "*" - safe-buffer "~5.1.1" - "@types/resolve@1.20.2": version "1.20.2" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" @@ -3254,31 +3102,11 @@ abbrev@1.0.x: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - abortcontroller-polyfill@^1.7.5: version "1.7.5" resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== -abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" - integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== - dependencies: - buffer "^6.0.3" - catering "^2.1.0" - is-buffer "^2.0.5" - level-supports "^4.0.0" - level-transcoder "^1.0.1" - module-error "^1.0.1" - queue-microtask "^1.2.3" - abstract-leveldown@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" @@ -3435,6 +3263,13 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== +ansi-align@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== + dependencies: + string-width "^4.1.0" + ansi-colors@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" @@ -3759,11 +3594,6 @@ bech32@1.1.4: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -bigint-crypto-utils@^3.0.23: - version "3.2.2" - resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz#e30a49ec38357c6981cd3da5aaa6480b1f752ee4" - integrity sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw== - bignumber.js@^9.0.0: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" @@ -3842,6 +3672,20 @@ bowser@^2.11.0: resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== +boxen@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" + integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.2" + type-fest "^0.20.2" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -3869,16 +3713,6 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-level@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" - integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.1" - module-error "^1.0.2" - run-parallel-limit "^1.1.0" - browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -4132,22 +3966,17 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: +camelcase@^6.0.0, camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -case@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" - integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== - caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -catering@^2.0.0, catering@^2.1.0, catering@^2.1.1: +catering@^2.0.0, catering@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== @@ -4159,13 +3988,6 @@ cbor@^8.0.0, cbor@^8.1.0: dependencies: nofilter "^3.1.0" -chai-as-promised@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041" - integrity sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw== - dependencies: - check-error "^1.0.2" - chai@^4.3.4: version "4.3.7" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" @@ -4246,7 +4068,7 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" -chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: +chokidar@3.5.3, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -4261,6 +4083,13 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: optionalDependencies: fsevents "~2.3.2" +chokidar@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30" + integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== + dependencies: + readdirp "^4.0.1" + chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -4303,22 +4132,16 @@ class-validator@^0.13.2: libphonenumber-js "^1.9.43" validator "^13.7.0" -classic-level@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" - integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.0" - module-error "^1.0.1" - napi-macros "^2.2.2" - node-gyp-build "^4.3.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -4758,13 +4581,6 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -deep-eql@^4.0.1: - version "4.1.4" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" - integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== - dependencies: - type-detect "^4.0.0" - deep-eql@^4.1.2, deep-eql@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" @@ -5611,7 +5427,7 @@ ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.4.6, ethers@^5.5.3, ethers@^5.6.1, ethers@^5.7.1, ethers@^5.7.2: +ethers@^5.4.6, ethers@^5.5.3, ethers@^5.6.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -5684,11 +5500,6 @@ event-emitter@^0.3.5: d "1" es5-ext "~0.10.14" -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" @@ -5825,6 +5636,11 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +fdir@^6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.2.tgz#ddaa7ce1831b161bc3657bb99cb36e1622702689" + integrity sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ== + figlet@^1.5.2: version "1.7.0" resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.7.0.tgz#46903a04603fd19c3e380358418bb2703587a72e" @@ -5885,7 +5701,7 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@5.0.0: +find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -5893,13 +5709,6 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -6532,65 +6341,61 @@ hardhat-gas-reporter@^1.0.9: eth-gas-reporter "^0.2.25" sha1 "^1.1.1" -hardhat-tracer@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/hardhat-tracer/-/hardhat-tracer-2.4.0.tgz#c650251cc504e68e890edf3675b132bcd7cc2322" - integrity sha512-MFWN0Suu2KsUBDntdKemmuqh8M6DraIfW2yd+erCtTdzZjGfF09PzJ1gW/n3Gu2TFR1pwwMqQeilyspQ8G3KNw== +hardhat-tracer@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hardhat-tracer/-/hardhat-tracer-3.1.0.tgz#460ced6bd6919928fc679a8d5764f2b861283b3b" + integrity sha512-Ip16HQAuzbqbNJUIEVfqmbPmOY90bxZSpwu5Q73cwloy+LUYA04BATUM9Gui5H7zcgsgZ1IVy7pSYn6ZMjLmag== dependencies: chalk "^4.1.2" + debug "^4.3.4" ethers "^5.6.1" + semver "^7.6.2" -hardhat@^2.14.1: - version "2.15.0" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.15.0.tgz#0cacb2b44c4c4651aa8ab649fef12804848b0267" - integrity sha512-cC9tM/N10YaES04zPOp7yR13iX3YibqaNmi0//Ep40Nt9ELIJx3kFpQmucur0PAIfXYpGnw5RuXHNLkxpnVHEw== +hardhat@^2.22.17: + version "2.22.17" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.17.tgz#96036bbe6bad8eb6a6b65c54dc5fbc1324541612" + integrity sha512-tDlI475ccz4d/dajnADUTRc1OJ3H8fpP9sWhXhBPpYsQOg8JHq5xrDimo53UhWPl7KJmAeDCm1bFG74xvpGRpg== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@nomicfoundation/ethereumjs-vm" "7.0.1" + "@nomicfoundation/edr" "^0.6.5" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-tx" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" "@nomicfoundation/solidity-analyzer" "^0.1.0" "@sentry/node" "^5.18.1" "@types/bn.js" "^5.1.0" "@types/lru-cache" "^5.1.0" - abort-controller "^3.0.0" adm-zip "^0.4.16" aggregate-error "^3.0.0" ansi-escapes "^4.3.0" - chalk "^2.4.2" - chokidar "^3.4.0" + boxen "^5.1.2" + chokidar "^4.0.0" ci-info "^2.0.0" debug "^4.1.1" enquirer "^2.3.0" env-paths "^2.2.0" ethereum-cryptography "^1.0.3" ethereumjs-abi "^0.6.8" - find-up "^2.1.0" + find-up "^5.0.0" fp-ts "1.19.3" fs-extra "^7.0.1" - glob "7.2.0" immutable "^4.0.0-rc.12" io-ts "1.10.4" + json-stream-stringify "^3.1.4" keccak "^3.0.2" lodash "^4.17.11" mnemonist "^0.38.0" mocha "^10.0.0" p-map "^4.0.0" - qs "^6.7.0" + picocolors "^1.1.0" raw-body "^2.4.1" resolve "1.17.0" semver "^6.3.0" - solc "0.7.3" + solc "0.8.26" source-map-support "^0.5.13" stacktrace-parser "^0.1.10" + tinyglobby "^0.2.6" tsort "0.0.1" undici "^5.14.0" uuid "^8.3.2" @@ -7236,11 +7041,6 @@ js-cookie@^2.2.1: resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== -js-sdsl@^4.1.4: - version "4.4.1" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.1.tgz#9e3c7b566d8d9a7e1fe8fc26d00b5ab0f8918ab3" - integrity sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA== - js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" @@ -7336,6 +7136,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stream-stringify@^3.1.4: + version "3.1.6" + resolved "https://registry.yarnpkg.com/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz#ebe32193876fb99d4ec9f612389a8d8e2b5d54d4" + integrity sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog== + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -7507,11 +7312,6 @@ level-supports@^2.0.1: resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-2.1.0.tgz#9af908d853597ecd592293b2fad124375be79c5f" integrity sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA== -level-supports@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" - integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== - level-supports@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" @@ -7519,14 +7319,6 @@ level-supports@~1.0.0: dependencies: xtend "^4.0.2" -level-transcoder@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" - integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== - dependencies: - buffer "^6.0.3" - module-error "^1.0.1" - level-ws@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" @@ -7536,14 +7328,6 @@ level-ws@^2.0.0: readable-stream "^3.1.0" xtend "^4.0.1" -level@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" - integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== - dependencies: - browser-level "^1.0.1" - classic-level "^1.2.0" - leveldown@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-6.1.0.tgz#7ab1297706f70c657d1a72b31b40323aa612b9ee" @@ -7597,14 +7381,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -7625,16 +7401,6 @@ lodash.camelcase@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== - -lodash.isequal@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -7771,15 +7537,6 @@ memdown@^5.0.0: ltgt "~2.2.0" safe-buffer "~5.2.0" -memory-level@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" - integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== - dependencies: - abstract-level "^1.0.0" - functional-red-black-tree "^1.0.1" - module-error "^1.0.1" - memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -8060,11 +7817,6 @@ mock-fs@^4.1.0: resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== -module-error@^1.0.1, module-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" - integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== - moment@^2.29.3: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" @@ -8154,11 +7906,6 @@ nanoid@3.3.3: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== -napi-macros@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" - integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== - napi-macros@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" @@ -8405,11 +8152,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -ordinal@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" - integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== - os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -8430,13 +8172,6 @@ p-cancelable@^3.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -8451,13 +8186,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -8479,11 +8207,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -8632,6 +8355,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab" + integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== + pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -8798,7 +8526,7 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -qs@^6.11.0, qs@^6.4.0, qs@^6.7.0, qs@^6.9.4: +qs@^6.11.0, qs@^6.4.0, qs@^6.9.4: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== @@ -8881,6 +8609,11 @@ readable-stream@^3.1.0, readable-stream@^3.4.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readdirp@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.2.tgz#388fccb8b75665da3abffe2d8f8ed59fe74c230a" + integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== + readdirp@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" @@ -9169,13 +8902,6 @@ run-async@^2.2.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== -run-parallel-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" - integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== - dependencies: - queue-microtask "^1.2.2" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -9307,6 +9033,11 @@ semver@^7.5.1: dependencies: lru-cache "^6.0.0" +semver@^7.6.2: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -9491,25 +9222,23 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -solc@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== +solc@0.8.15: + version "0.8.15" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.15.tgz#d274dca4d5a8b7d3c9295d4cbdc9291ee1c52152" + integrity sha512-Riv0GNHNk/SddN/JyEuFKwbcWcEeho15iyupTSHw5Np6WuXA5D8kEHbyzDHi6sqmvLzu2l+8b1YmL8Ytple+8w== dependencies: command-exists "^1.2.8" - commander "3.0.2" + commander "^8.1.0" follow-redirects "^1.12.1" - fs-extra "^0.30.0" js-sha3 "0.8.0" memorystream "^0.3.1" - require-from-string "^2.0.0" semver "^5.5.0" tmp "0.0.33" -solc@0.8.15: - version "0.8.15" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.15.tgz#d274dca4d5a8b7d3c9295d4cbdc9291ee1c52152" - integrity sha512-Riv0GNHNk/SddN/JyEuFKwbcWcEeho15iyupTSHw5Np6WuXA5D8kEHbyzDHi6sqmvLzu2l+8b1YmL8Ytple+8w== +solc@0.8.26: + version "0.8.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.26.tgz#afc78078953f6ab3e727c338a2fefcd80dd5b01a" + integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== dependencies: command-exists "^1.2.8" commander "^8.1.0" @@ -9769,7 +9498,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -10018,6 +9747,14 @@ timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== +tinyglobby@^0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.10.tgz#e712cf2dc9b95a1f5c5bbd159720e15833977a0f" + integrity sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew== + dependencies: + fdir "^6.4.2" + picomatch "^4.0.2" + tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -11000,6 +10737,13 @@ wide-align@1.1.3: dependencies: string-width "^1.0.2 || 2" +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" From df13315105e2d793b6c59ad183a93403b6841d2d Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Tue, 24 Dec 2024 11:16:49 +0100 Subject: [PATCH 4/9] remove ethers 6 --- contracts/package.json | 1 - contracts/yarn.lock | 8 -------- 2 files changed, 9 deletions(-) diff --git a/contracts/package.json b/contracts/package.json index a829f5505f..c06443dfcd 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -70,7 +70,6 @@ "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", - "@typechain/ethers-v6": "^0.5.0", "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", "@types/mocha": ">=9.1.0", diff --git a/contracts/yarn.lock b/contracts/yarn.lock index 2db01df25e..067c7ee5be 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -2824,14 +2824,6 @@ lodash "^4.17.15" ts-essentials "^7.0.1" -"@typechain/ethers-v6@^0.5.0": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz#42fe214a19a8b687086c93189b301e2b878797ea" - integrity sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA== - dependencies: - lodash "^4.17.15" - ts-essentials "^7.0.1" - "@typechain/hardhat@^9.0.0": version "9.1.0" resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.1.0.tgz#6985015f01dfb37ef2ca8a29c742d05890351ddc" From 000a0b2de40d093af3dafc3e8f491d7cb98d86ad Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Tue, 24 Dec 2024 11:18:09 +0100 Subject: [PATCH 5/9] fix some issues --- contracts/hardhat.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index 616ffc4232..0bd04ef2a6 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -195,6 +195,8 @@ module.exports = { process.env.DEPLOYER_PK || privateKeys[0], process.env.GOVERNOR_PK || privateKeys[0], ], + live: true, + saveDeployments: true, } }, mocha: { @@ -253,7 +255,7 @@ module.exports = { mainnet: MAINNET_GOVERNOR, holesky: HOLESKY_DEPLOYER, // on Holesky the deployer is also the governor base: BASE_GOVERNOR, - sonic: MAINNET_DEPLOYER, + sonic: SONIC_DEPLOYER, }, /* Local node environment currently has no access to Decentralized governance * address, since the contract is in another repo. Once we merge the ousd-governance From 124ab29d88041741c31452547d1c3f0862fa5751 Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Tue, 24 Dec 2024 11:23:45 +0100 Subject: [PATCH 6/9] remove unneeded dependencies --- contracts/deploy/sonic/001_core.js | 2 +- contracts/package.json | 5 -- contracts/yarn.lock | 138 ----------------------------- 3 files changed, 1 insertion(+), 144 deletions(-) diff --git a/contracts/deploy/sonic/001_core.js b/contracts/deploy/sonic/001_core.js index d456ce1e47..73c21c57c7 100644 --- a/contracts/deploy/sonic/001_core.js +++ b/contracts/deploy/sonic/001_core.js @@ -12,7 +12,7 @@ const { isSonicFork } = require("../../test/helpers.js"); const mainExport = async () => { console.log("Running 001_core deployment on Sonic..."); - const { governorAddr } = await getNamedAccounts(); + //const { governorAddr } = await getNamedAccounts(); //const sGovernor = await ethers.provider.getSigner(governorAddr); diff --git a/contracts/package.json b/contracts/package.json index c06443dfcd..0e5b1104ae 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -55,7 +55,6 @@ "@aws-sdk/client-kms": "^3.598.0", "@aws-sdk/client-s3": "^3.600.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.9", - "@nomicfoundation/hardhat-toolbox": "^5.0.0", "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-solhint": "^2.0.0", @@ -70,9 +69,6 @@ "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", - "@typechain/hardhat": "^9.0.0", - "@types/chai": "^4.2.0", - "@types/mocha": ">=9.1.0", "@uniswap/v3-core": "^1.0.0", "@uniswap/v3-periphery": "^1.1.1", "axios": "^1.4.0", @@ -104,7 +100,6 @@ "ssv-keys": "^1.1.0", "ssv-scanner": "github:bloxapp/ssv-scanner", "sync-fetch": "^0.5.2", - "ts-node": ">=8.0.0", "uuid": "^9.0.1", "web3-utils": "^1.5.2" }, diff --git a/contracts/yarn.lock b/contracts/yarn.lock index 067c7ee5be..2b3539ddcb 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -832,13 +832,6 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -1459,29 +1452,11 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" - integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== - "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@metamask/eth-sig-util@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" @@ -1633,11 +1608,6 @@ dependencies: ethereumjs-util "^7.1.4" -"@nomicfoundation/hardhat-toolbox@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-5.0.0.tgz#165b47f8a3d2bf668cc5d453ce7f496a1156948d" - integrity sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ== - "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" @@ -2796,26 +2766,6 @@ dependencies: node-gyp-build "4.3.0" -"@tsconfig/node10@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" - integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" - integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== - "@typechain/ethers-v5@^10.0.0": version "10.2.1" resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz#50241e6957683281ecfa03fb5a6724d8a3ce2391" @@ -2824,13 +2774,6 @@ lodash "^4.17.15" ts-essentials "^7.0.1" -"@typechain/hardhat@^9.0.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.1.0.tgz#6985015f01dfb37ef2ca8a29c742d05890351ddc" - integrity sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA== - dependencies: - fs-extra "^9.1.0" - "@types/abstract-leveldown@*": version "7.2.1" resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-7.2.1.tgz#bb16403c17754b0c4d5772d71d03b924a03d4c80" @@ -2867,11 +2810,6 @@ "@types/node" "*" "@types/responselike" "^1.0.0" -"@types/chai@^4.2.0": - version "4.3.20" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" - integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== - "@types/concat-stream@^1.6.0": version "1.6.1" resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" @@ -2947,11 +2885,6 @@ dependencies: "@types/node" "*" -"@types/mocha@>=9.1.0": - version "10.0.10" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.10.tgz#91f62905e8d23cbd66225312f239454a23bebfa0" - integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q== - "@types/node-fetch@^2.6.1": version "2.6.4" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" @@ -3146,13 +3079,6 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.1.1: - version "8.3.4" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" - integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== - dependencies: - acorn "^8.11.0" - acorn@^6.0.7: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -3163,11 +3089,6 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.11.0, acorn@^8.4.1: - version "8.14.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" - integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== - address@^1.0.1: version "1.2.2" resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" @@ -3341,11 +3262,6 @@ anymatch@~3.1.1, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -3495,11 +3411,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -4437,11 +4348,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - cross-fetch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" @@ -5877,16 +5783,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -7483,11 +7379,6 @@ magic-string@^0.30.3: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - markdown-table@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" @@ -9799,25 +9690,6 @@ ts-essentials@^7.0.1: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== -ts-node@>=8.0.0: - version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" - integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - tslib@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" @@ -10139,11 +10011,6 @@ uuid@^9.0.0, uuid@^9.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -10969,11 +10836,6 @@ yargs@^17.5.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 055792e43d941e189c41edfb5ccb2265805d4d83 Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Fri, 27 Dec 2024 12:27:23 +0100 Subject: [PATCH 7/9] more progress on integrating sonic --- contracts/deploy/deployActions.js | 44 ++++++++++++++++++---------- contracts/deploy/holesky/001_core.js | 2 +- contracts/deploy/mainnet/001_core.js | 2 +- contracts/deploy/sonic/001_core.js | 14 ++++----- contracts/hardhat.config.js | 1 + 5 files changed, 38 insertions(+), 25 deletions(-) diff --git a/contracts/deploy/deployActions.js b/contracts/deploy/deployActions.js index 6cc974c616..2bc83578d8 100644 --- a/contracts/deploy/deployActions.js +++ b/contracts/deploy/deployActions.js @@ -6,7 +6,8 @@ const { getOracleAddresses, isMainnet, isHolesky, - isSonicOrFork + isSonicOrFork, + isSonic, } = require("../test/helpers.js"); const { deployWithConfirmation, withConfirmation } = require("../utils/deploy"); const { @@ -448,8 +449,9 @@ const configureVault = async () => { /** * Configure OETH Vault by adding supported assets and Strategies. + * @param oethDeployType: OETH, simpleOETH, sonicOETH */ -const configureOETHVault = async (isSimpleOETH) => { +const configureOETHVault = async (oethDeployType) => { const assetAddresses = await getAssetAddresses(deployments); const { governorAddr, strategistAddr } = await getNamedAccounts(); // Signers @@ -462,8 +464,18 @@ const configureOETHVault = async (isSimpleOETH) => { ).address ); // Set up supported assets for Vault - const { WETH, RETH, stETH, frxETH } = assetAddresses; - const assets = isSimpleOETH ? [WETH] : [WETH, RETH, stETH, frxETH]; + const { WETH, RETH, stETH, frxETH, WS } = assetAddresses; + let assets; + if (oethDeployType == "OETH") { + assets = [WETH, RETH, stETH, frxETH]; + } else if (oethDeployType == "simpleOETH") { + assets = [WETH]; + } else if (oethDeployType == "sonicOETH") { + assets = [WS]; + } else { + throw new Error(`Unrecognised deploy type: ${oethDeployType}`); + } + for (const asset of assets) { await withConfirmation(cVault.connect(sGovernor).supportAsset(asset, 0)); } @@ -566,7 +578,8 @@ const upgradeOETHHarvester = async () => { const deployOETHHarvester = async (oethDripper) => { const assetAddresses = await getAssetAddresses(deployments); - const { governorAddr } = await getNamedAccounts(); + const { governorAddr, deployerAddr } = await getNamedAccounts(); + const sDeployer = await ethers.provider.getSigner(deployerAddr); const sGovernor = await ethers.provider.getSigner(governorAddr); const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy"); @@ -589,7 +602,7 @@ const deployOETHHarvester = async (oethDripper) => { await withConfirmation( // prettier-ignore - cOETHHarvesterProxy["initialize(address,address,bytes)"]( + cOETHHarvesterProxy.connect(sDeployer)["initialize(address,address,bytes)"]( dOETHHarvester.address, governorAddr, [] @@ -750,8 +763,9 @@ const deployOUSDDripper = async () => { return cDripper; }; -const deployOETHDripper = async () => { - const { governorAddr } = await getNamedAccounts(); +const deployOETHDripper = async ({ skipUpgradeSafety = false } = {}) => { + const { governorAddr, deployerAddr } = await getNamedAccounts(); + const sDeployer = await ethers.provider.getSigner(deployerAddr); const assetAddresses = await getAssetAddresses(deployments); const cVaultProxy = await ethers.getContract("OETHVaultProxy"); @@ -761,13 +775,13 @@ const deployOETHDripper = async () => { const dDripper = await deployWithConfirmation("OETHDripper", [ cVaultProxy.address, assetAddresses.WETH, - ]); + ], false, skipUpgradeSafety); await deployWithConfirmation("OETHDripperProxy"); // Deploy Dripper Proxy const cDripperProxy = await ethers.getContract("OETHDripperProxy"); await withConfirmation( - cDripperProxy["initialize(address,address,bytes)"]( + cDripperProxy.connect(sDeployer)["initialize(address,address,bytes)"]( dDripper.address, governorAddr, [] @@ -1019,7 +1033,7 @@ const deployOracles = async () => { let args = []; if (isMainnet) { oracleContract = "OracleRouter"; - } else if (isHolesky) { + } else if (isHolesky || isSonic) { oracleContract = "OETHFixedOracle"; contractName = "OETHOracleRouter"; args = [addresses.zero]; @@ -1085,7 +1099,7 @@ const deployOracles = async () => { const deployOETHCore = async () => { const { governorAddr, deployerAddr } = await hre.getNamedAccounts(); - const sDeloyer = await ethers.provider.getSigner(deployerAddr); + const sDeployer = await ethers.provider.getSigner(deployerAddr); const assetAddresses = await getAssetAddresses(deployments); log(`Using asset addresses: ${JSON.stringify(assetAddresses, null, 2)}`); @@ -1123,9 +1137,9 @@ const deployOETHCore = async () => { cOETHVaultProxy.address ); - await cOETHProxy.connect(sDeloyer); + await cOETHProxy.connect(sDeployer); await withConfirmation( - cOETHProxy.connect(sDeloyer)["initialize(address,address,bytes)"]( + cOETHProxy.connect(sDeployer)["initialize(address,address,bytes)"]( dOETH.address, governorAddr, [] @@ -1134,7 +1148,7 @@ const deployOETHCore = async () => { log("Initialized OETHProxy"); await withConfirmation( - cOETHVaultProxy.connect(sDeloyer)["initialize(address,address,bytes)"]( + cOETHVaultProxy.connect(sDeployer)["initialize(address,address,bytes)"]( dOETHVault.address, governorAddr, [] diff --git a/contracts/deploy/holesky/001_core.js b/contracts/deploy/holesky/001_core.js index 308c1f8838..c40207f750 100644 --- a/contracts/deploy/holesky/001_core.js +++ b/contracts/deploy/holesky/001_core.js @@ -23,7 +23,7 @@ const mainExport = async () => { const cOETHDripper = await deployOETHDripper(); const cOETHHarvester = await deployOETHHarvester(cOETHDripper); - await configureOETHVault(true); + await configureOETHVault("simpleOETH"); const cVault = await ethers.getContractAt( "IVault", diff --git a/contracts/deploy/mainnet/001_core.js b/contracts/deploy/mainnet/001_core.js index 61b7451e4d..0caa321eb1 100644 --- a/contracts/deploy/mainnet/001_core.js +++ b/contracts/deploy/mainnet/001_core.js @@ -47,7 +47,7 @@ const main = async () => { oethDripper ); await configureVault(); - await configureOETHVault(false); + await configureOETHVault("OETH"); await configureStrategies(harvesterProxy, oethHarvesterProxy); await deployFlipper(); await deployBuyback(); diff --git a/contracts/deploy/sonic/001_core.js b/contracts/deploy/sonic/001_core.js index 73c21c57c7..e82dd9bb8c 100644 --- a/contracts/deploy/sonic/001_core.js +++ b/contracts/deploy/sonic/001_core.js @@ -1,9 +1,9 @@ const { deployOracles, deployOETHCore, - // deployOETHDripper, - // deployOETHHarvester, - // configureOETHVault, + deployOETHDripper, + deployOETHHarvester, + configureOETHVault, } = require("../deployActions"); //const { withConfirmation } = require("../../utils/deploy"); @@ -21,14 +21,12 @@ const mainExport = async () => { await hardhatSetBalance(deployerAddr, "10000000000"); } - console.log("Deploying Oracles"); await deployOracles(); - console.log("Deploying Core"); await deployOETHCore(); - //const cOETHDripper = await deployOETHDripper(); - // const cOETHHarvester = await deployOETHHarvester(cOETHDripper); - // await configureOETHVault(true); + const cOETHDripper = await deployOETHDripper({ skipUpgradeSafety: true }); + const cOETHHarvester = await deployOETHHarvester(cOETHDripper); + await configureOETHVault("sonicOETH"); // const cVault = await ethers.getContractAt( // "IVault", diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index 0bd04ef2a6..0332afff5f 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -195,6 +195,7 @@ module.exports = { process.env.DEPLOYER_PK || privateKeys[0], process.env.GOVERNOR_PK || privateKeys[0], ], + chainId: 146, live: true, saveDeployments: true, } From 0c1e17294a3a55931084e99e5799a79abbee2e36 Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Mon, 30 Dec 2024 11:28:19 +0100 Subject: [PATCH 8/9] various config for sonic --- contracts/deploy/deployActions.js | 32 +++++++++++++--------------- contracts/deploy/holesky/001_core.js | 4 ++-- contracts/deploy/sonic/001_core.js | 4 ++-- contracts/hardhat.config.js | 4 +++- contracts/package.json | 6 +++--- contracts/yarn.lock | 12 +++++------ 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/contracts/deploy/deployActions.js b/contracts/deploy/deployActions.js index 2bc83578d8..dba6a9c330 100644 --- a/contracts/deploy/deployActions.js +++ b/contracts/deploy/deployActions.js @@ -7,7 +7,7 @@ const { isMainnet, isHolesky, isSonicOrFork, - isSonic, + isTest, } = require("../test/helpers.js"); const { deployWithConfirmation, withConfirmation } = require("../utils/deploy"); const { @@ -1020,6 +1020,16 @@ const deployNativeStakingSSVStrategy = async () => { return cStrategy; }; +/** + * Deploy Fixed rate Oracle. + */ +const deployFixedRateOracle = async () => { + const { deployerAddr } = await getNamedAccounts(); + await deployWithConfirmation("OETHOracleRouter", [addresses.zero], "OETHFixedOracle"); + await ethers.getContract("OETHOracleRouter"); + log("Deployed OETHOracleRouter"); +} + /** * Deploy the OracleRouter and initialise it with Chainlink sources. */ @@ -1033,21 +1043,11 @@ const deployOracles = async () => { let args = []; if (isMainnet) { oracleContract = "OracleRouter"; - } else if (isHolesky || isSonic) { - oracleContract = "OETHFixedOracle"; - contractName = "OETHOracleRouter"; - args = [addresses.zero]; } await deployWithConfirmation(contractName, args, oracleContract); - const oracleRouter = await ethers.getContract("OracleRouter"); + const oracleRouter = await ethers.getContract(contractName); log("Deployed OracleRouter"); - if (isHolesky || isSonicOrFork) { - // no need to configure any feeds since they are hardcoded to a fixed feed - // TODO: further deployments will require more intelligent separation of different - // chains / environment oracle deployments - return; - } const assetAddresses = await getAssetAddresses(deployments); await deployWithConfirmation("AuraWETHPriceFeed", [ @@ -1096,7 +1096,7 @@ const deployOracles = async () => { } log("Initialized AuraWETHPriceFeed"); }; - + const deployOETHCore = async () => { const { governorAddr, deployerAddr } = await hre.getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); @@ -1127,11 +1127,8 @@ const deployOETHCore = async () => { const cOETHProxy = await ethers.getContract("OETHProxy"); const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy"); const cOETH = await ethers.getContractAt("OETH", cOETHProxy.address); - const cOracleRouter = await ethers.getContract("OracleRouter"); - const cOETHOracleRouter = isMainnet - ? await ethers.getContract("OETHOracleRouter") - : cOracleRouter; + let cOETHOracleRouter = await ethers.getContract(isTest ? "OracleRouter" : "OETHOracleRouter"); const cOETHVault = await ethers.getContractAt( "IVault", cOETHVaultProxy.address @@ -1615,6 +1612,7 @@ const deployBaseAerodromeAMOStrategyImplementation = async () => { module.exports = { deployOracles, + deployFixedRateOracle, deployCore, deployOETHCore, deployOUSDCore, diff --git a/contracts/deploy/holesky/001_core.js b/contracts/deploy/holesky/001_core.js index c40207f750..fed76124d1 100644 --- a/contracts/deploy/holesky/001_core.js +++ b/contracts/deploy/holesky/001_core.js @@ -1,5 +1,5 @@ const { - deployOracles, + deployFixedRateOracle, deployOETHCore, deployNativeStakingSSVStrategy, deployOETHDripper, @@ -15,7 +15,7 @@ const mainExport = async () => { const sGovernor = await ethers.provider.getSigner(governorAddr); console.log("Deploying Oracles"); - await deployOracles(); + await deployFixedRateOracle(); console.log("Deploying Core"); await deployOETHCore(); console.log("Deploying Native Staking"); diff --git a/contracts/deploy/sonic/001_core.js b/contracts/deploy/sonic/001_core.js index e82dd9bb8c..bfbdb52c1a 100644 --- a/contracts/deploy/sonic/001_core.js +++ b/contracts/deploy/sonic/001_core.js @@ -1,5 +1,5 @@ const { - deployOracles, + deployFixedRateOracle, deployOETHCore, deployOETHDripper, deployOETHHarvester, @@ -21,7 +21,7 @@ const mainExport = async () => { await hardhatSetBalance(deployerAddr, "10000000000"); } - await deployOracles(); + await deployFixedRateOracle(); await deployOETHCore(); const cOETHDripper = await deployOETHDripper({ skipUpgradeSafety: true }); diff --git a/contracts/hardhat.config.js b/contracts/hardhat.config.js index 0332afff5f..9bd47630f8 100644 --- a/contracts/hardhat.config.js +++ b/contracts/hardhat.config.js @@ -93,7 +93,7 @@ if (process.env.HARDHAT_CACHE_DIR) { } const { provider, chainId } = getHardhatNetworkProperties(); -module.exports = { +const options = { solidity: { version: "0.8.7", settings: { @@ -106,6 +106,7 @@ module.exports = { nameTags: { "0xba12222222228d8ba445958a75a0704d566bf2c8": "Balancer Vault", "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b": "Uniswap Universal Router", + tasks: ["node"], }, }, networks: { @@ -392,3 +393,4 @@ module.exports = { }, paths, }; +module.exports = options; \ No newline at end of file diff --git a/contracts/package.json b/contracts/package.json index 0e5b1104ae..2733a06ca8 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -54,7 +54,7 @@ "devDependencies": { "@aws-sdk/client-kms": "^3.598.0", "@aws-sdk/client-s3": "^3.600.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.9", + "@nomicfoundation/hardhat-network-helpers": "1.0.12", "@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-solhint": "^2.0.0", @@ -79,12 +79,12 @@ "eslint-plugin-no-only-tests": "^3.1.0", "ethereum-waffle": "^4.0.10", "ethers": "^5.4.6", - "hardhat": "^2.22.17", + "hardhat": "2.22.17", "hardhat-contract-sizer": "^2.9.0", "hardhat-deploy": "^0.11.30", "hardhat-deploy-ethers": "^0.3.0-beta.13", "hardhat-gas-reporter": "^1.0.9", - "hardhat-tracer": "^3.1.0", + "hardhat-tracer": "3.1.0", "husky": "^7.0.2", "lodash": "^4.17.21", "mocha": "^10.2.0", diff --git a/contracts/yarn.lock b/contracts/yarn.lock index 2b3539ddcb..308e9c0eec 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -1601,10 +1601,10 @@ "@nomicfoundation/ethereumjs-rlp" "5.0.4" ethereum-cryptography "0.1.3" -"@nomicfoundation/hardhat-network-helpers@^1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz#767449e8a2acda79306ac84626117583d95d25aa" - integrity sha512-OXWCv0cHpwLUO2u7bFxBna6dQtCC2Gg/aN/KtJLO7gmuuA28vgmVKYFRCDUqrbjujzgfwQ2aKyZ9Y3vSmDqS7Q== +"@nomicfoundation/hardhat-network-helpers@1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.12.tgz#2c0abec0c50b75f9d0d71776e49e3b5ef746d289" + integrity sha512-xTNQNI/9xkHvjmCJnJOTyqDSl8uq1rKb2WOVmixQxFtRd7Oa3ecO8zM0cyC2YmOK+jHB9WPZ+F/ijkHg1CoORA== dependencies: ethereumjs-util "^7.1.4" @@ -6229,7 +6229,7 @@ hardhat-gas-reporter@^1.0.9: eth-gas-reporter "^0.2.25" sha1 "^1.1.1" -hardhat-tracer@^3.1.0: +hardhat-tracer@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/hardhat-tracer/-/hardhat-tracer-3.1.0.tgz#460ced6bd6919928fc679a8d5764f2b861283b3b" integrity sha512-Ip16HQAuzbqbNJUIEVfqmbPmOY90bxZSpwu5Q73cwloy+LUYA04BATUM9Gui5H7zcgsgZ1IVy7pSYn6ZMjLmag== @@ -6239,7 +6239,7 @@ hardhat-tracer@^3.1.0: ethers "^5.6.1" semver "^7.6.2" -hardhat@^2.22.17: +hardhat@2.22.17: version "2.22.17" resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.17.tgz#96036bbe6bad8eb6a6b65c54dc5fbc1324541612" integrity sha512-tDlI475ccz4d/dajnADUTRc1OJ3H8fpP9sWhXhBPpYsQOg8JHq5xrDimo53UhWPl7KJmAeDCm1bFG74xvpGRpg== From 4e3fee303377c345db5ac20f0338b48fac620b73 Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Mon, 30 Dec 2024 11:29:00 +0100 Subject: [PATCH 9/9] fix reborn tests --- .../contracts/mocks/MockRebornMinter.sol | 11 ++++ contracts/test/_fixture.js | 12 +++- contracts/test/hacks/reborn.js | 56 ++++++++++++------- 3 files changed, 56 insertions(+), 23 deletions(-) diff --git a/contracts/contracts/mocks/MockRebornMinter.sol b/contracts/contracts/mocks/MockRebornMinter.sol index c78d54ea43..200ec50390 100644 --- a/contracts/contracts/mocks/MockRebornMinter.sol +++ b/contracts/contracts/mocks/MockRebornMinter.sol @@ -11,6 +11,8 @@ contract Sanctum { address public vault; address public reborner; bool public shouldAttack = false; + // should selfdestruct in the constructor + bool public shouldDestruct = false; uint256 public targetMethod; address public ousdContract; @@ -51,6 +53,11 @@ contract Sanctum { shouldAttack = _shouldAttack; } + // should call selfdestruct in the constructor + function setShouldDesctruct(bool _shouldDestruct) public { + shouldDestruct = _shouldDestruct; + } + function setTargetMethod(uint256 target) public { targetMethod = target; } @@ -80,6 +87,10 @@ contract Reborner { mint(); } } + + if (sanctum.shouldDestruct()) { + bye(); + } } function mint() public { diff --git a/contracts/test/_fixture.js b/contracts/test/_fixture.js index 51a81a387d..75ce1a5917 100644 --- a/contracts/test/_fixture.js +++ b/contracts/test/_fixture.js @@ -2433,19 +2433,25 @@ async function rebornFixture() { const initCode = (await ethers.getContractFactory("Reborner")).bytecode; const deployCode = `${initCode}${encodedCallbackAddress}`; - await sanctum.deploy(12345, deployCode); const rebornAddress = await sanctum.computeAddress(12345, deployCode); const reborner = await ethers.getContractAt("Reborner", rebornAddress); - const rebornAttack = async (shouldAttack = true, targetMethod = null) => { + // deploy the reborn contract and call a method + const deployAndCall = async ({ + shouldAttack = true, + targetMethod = null, + shouldDestruct = false + }) => { await sanctum.setShouldAttack(shouldAttack); + await sanctum.setShouldDesctruct(shouldDestruct); if (targetMethod) await sanctum.setTargetMethod(targetMethod); await sanctum.setOUSDAddress(fixture.ousd.address); await sanctum.deploy(12345, deployCode); }; + fixture.rebornAddress = rebornAddress; fixture.reborner = reborner; - fixture.rebornAttack = rebornAttack; + fixture.deployAndCall = deployAndCall; return fixture; } diff --git a/contracts/test/hacks/reborn.js b/contracts/test/hacks/reborn.js index 3e8f51283f..6f7d74d255 100644 --- a/contracts/test/hacks/reborn.js +++ b/contracts/test/hacks/reborn.js @@ -15,48 +15,64 @@ describe("Reborn Attack Protection", function () { fixture = await loadFixture(); }); it("Should correctly do accounting when reborn calls mint as different types of addresses", async function () { - const { dai, ousd, matt, reborner, rebornAttack } = fixture; - await dai.connect(matt).transfer(reborner.address, daiUnits("4")); + const { dai, ousd, matt, rebornAddress, reborner, deployAndCall } = fixture; + await dai.connect(matt).transfer(rebornAddress, daiUnits("4")); + // call mint and self destruct (since account.code.length = 0) in constructor this is done + // as an EOA from OUSD.sol's point of view + await deployAndCall({ shouldAttack:true, shouldDestruct:true }); + // just deploy reborner contract + await deployAndCall({ shouldAttack:false }); + // call mint and expect to be migrated to a contract address await reborner.mint(); - await reborner.bye(); - await rebornAttack(true); - await expect(reborner).to.have.a.balanceOf("2", ousd); + await expect(await ousd.balanceOf(rebornAddress)).to.equal(ousdUnits("2")); expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("2")); }); it("Should correctly do accounting when reborn calls burn as different types of addresses", async function () { - const { dai, ousd, matt, reborner, rebornAttack } = fixture; + const { dai, ousd, matt, reborner, rebornAddress, deployAndCall } = fixture; await dai.connect(matt).transfer(reborner.address, daiUnits("4")); - await reborner.mint(); - await reborner.bye(); - await rebornAttack(true, 1); - await expect(reborner).to.have.a.balanceOf("0", ousd); - expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("0")); + // call mint and self destruct (since account.code.length = 0) in constructor this is done + // as an EOA from OUSD.sol's point of view + await deployAndCall({ shouldAttack:true, shouldDestruct:true }); + await deployAndCall({ shouldAttack:true, shouldDestruct:true }); + + await deployAndCall({ shouldAttack:false}); + // call redeem and expect to be migrated to a contract address + await reborner.redeem(); + await expect(await ousd.balanceOf(rebornAddress)).to.equal(ousdUnits("1")); + expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("1")); }); it("Should correctly do accounting when reborn calls transfer as different types of addresses", async function () { - const { dai, ousd, matt, reborner, rebornAttack } = fixture; + const { dai, ousd, matt, reborner, rebornAddress, deployAndCall } = fixture; await dai.connect(matt).transfer(reborner.address, daiUnits("4")); + // call mint and self destruct (since account.code.length = 0) in constructor this is done + // as an EOA from OUSD.sol's point of view + await deployAndCall({ shouldAttack:true, shouldDestruct:true }); + expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("0")); + expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("0")); + + await deployAndCall({ shouldAttack:false}); + // call transfer and expect to be migrated to a contract address + await reborner.transfer(); + await expect(await ousd.balanceOf(rebornAddress)).to.equal(ousdUnits("0")); + expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("0")); await reborner.mint(); - await reborner.bye(); + await expect(await ousd.balanceOf(rebornAddress)).to.equal(ousdUnits("1")); expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("1")); - await rebornAttack(true, 2); - await expect(reborner).to.have.a.balanceOf("0", ousd); - expect(await ousd.nonRebasingSupply()).to.equal(ousdUnits("0")); }); it("Should have correct balance even after recreating", async function () { - const { dai, matt, reborner, rebornAttack, ousd } = fixture; + const { dai, matt, reborner, deployAndCall, ousd } = fixture; // Mint one OUSD and self-destruct await dai.connect(matt).transfer(reborner.address, daiUnits("4")); - await reborner.mint(); + await deployAndCall({ shouldAttack:true, shouldDestruct:true }); await expect(reborner).to.have.a.balanceOf("1", ousd); - await reborner.bye(); // Recreate the contract at the same address but expect // to not have any change in balance (outside constructor) - await rebornAttack(false); + await deployAndCall({ shouldAttack:false }); await expect(reborner).to.have.a.balanceOf("1", ousd); await reborner.mint(); await expect(reborner).to.have.a.balanceOf("2", ousd);