From 41ad340ff0147bffa675ff15208fa56830a2eaa2 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Sat, 21 Dec 2024 12:23:02 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20Add=20EVM=20on=20Flow=20Test=20and?= =?UTF-8?q?=20Main=20Networks=20Configurations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- contracts/lib/forge-std | 2 +- hardhat.config.ts | 31 ++++++++++++++++++++++++++++ package.json | 4 +++- pnpm-lock.yaml | 45 +++++++++++++++++++++-------------------- 4 files changed, 58 insertions(+), 24 deletions(-) diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std index 5f1b1c6..b93cf4b 160000 --- a/contracts/lib/forge-std +++ b/contracts/lib/forge-std @@ -1 +1 @@ -Subproject commit 5f1b1c6f607c34c76d5cefa33b41337b0d4699b4 +Subproject commit b93cf4bc34ff214c099dc970b153f85ade8c9f66 diff --git a/hardhat.config.ts b/hardhat.config.ts index bc76695..96cf5e5 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -980,6 +980,18 @@ const config: HardhatUserConfig = { accounts, ledgerAccounts, }, + flowTestnet: { + chainId: 545, + url: vars.get("FLOW_TESTNET_URL", "https://testnet.evm.nodes.onflow.org"), + accounts, + ledgerAccounts, + }, + flowMain: { + chainId: 747, + url: vars.get("FLOW_MAINNET_URL", "https://mainnet.evm.nodes.onflow.org"), + accounts, + ledgerAccounts, + }, }, xdeploy: { // Change this name to the name of your main contract @@ -1230,6 +1242,9 @@ const config: HardhatUserConfig = { // For Sonic testnet & mainnet sonic: vars.get("SONIC_API_KEY", ""), sonicTestnet: vars.get("SONIC_API_KEY", ""), + // For EVM on Flow testnet & mainnet + flow: vars.get("FLOW_API_KEY", ""), + flowTestnet: vars.get("FLOW_API_KEY", ""), }, customChains: [ { @@ -2030,6 +2045,22 @@ const config: HardhatUserConfig = { browserURL: "https://testnet.sonicscan.org", }, }, + { + network: "flow", + chainId: 747, + urls: { + apiURL: "https://evm.flowscan.io/api", + browserURL: "https://evm.flowscan.io", + }, + }, + { + network: "flowTestnet", + chainId: 545, + urls: { + apiURL: "https://evm-testnet.flowscan.io/api", + browserURL: "https://evm-testnet.flowscan.io", + }, + }, ], }, // tenderly: { diff --git a/package.json b/package.json index f99af46..7715545 100644 --- a/package.json +++ b/package.json @@ -168,6 +168,8 @@ "deploy:storytestnet": "npx hardhat run --network storyTestnet scripts/deploy.ts", "deploy:sonictestnet": "npx hardhat run --network sonicTestnet scripts/deploy.ts", "deploy:sonicmain": "npx hardhat run --network sonicMain scripts/deploy.ts", + "deploy:flowtestnet": "npx hardhat run --network flowTestnet scripts/deploy.ts", + "deploy:flowmain": "npx hardhat run --network flowMain scripts/deploy.ts", "prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"", "prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"", "solhint:check": "npx solhint \"contracts/**/*.sol\"", @@ -214,7 +216,7 @@ "typechain": "^8.3.2", "typescript": "^5.7.2", "typescript-eslint": "^8.18.1", - "xdeployer": "^3.1.8", + "xdeployer": "^3.1.9", "zksync-ethers": "^6.15.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60dc496..d4e610f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,8 +123,8 @@ importers: specifier: ^8.18.1 version: 8.18.1(eslint@9.17.0)(typescript@5.7.2) xdeployer: - specifier: ^3.1.8 - version: 3.1.8(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) + specifier: ^3.1.9 + version: 3.1.9(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) zksync-ethers: specifier: ^6.15.3 version: 6.15.3(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -628,8 +628,8 @@ packages: '@openzeppelin/defender-sdk-network-client@1.15.2': resolution: {integrity: sha512-9r9pegc1aR7xzP9fmj1zvkk0OXMRJE10JabxxiJzAQQgmNXDeTGI6W5bFgrNJfxzcImNGqddJ3K4weKdLyL21A==} - '@openzeppelin/hardhat-upgrades@3.7.0': - resolution: {integrity: sha512-dTnqqTIZUOyEzL62FIusZPeac9CqTD+x3Q5h+46JBALgS9DubUq/jXMhiE3JKLco3RELZQCh/9GYKBoUA0R2DQ==} + '@openzeppelin/hardhat-upgrades@3.8.0': + resolution: {integrity: sha512-NwRk14ykTVilQqB0Vzd0vOWvUE8gpyn+SSwdzyHECRc5fuSSPDt/cIdadG9Hd6AKMPXfY+CS6G7q0+nDLng2Zw==} hasBin: true peerDependencies: '@nomicfoundation/hardhat-ethers': ^3.0.0 @@ -1407,8 +1407,8 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chokidar@4.0.2: - resolution: {integrity: sha512-/b57FK+bblSU+dfewfFe0rT1YjVDfOmeLQwCAuC+vwvgLkXboATqqmy+Ipux6JrF6L5joe5CBnFOw+gLWH6yKg==} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} chownr@1.1.4: @@ -2779,8 +2779,8 @@ packages: match-all@1.2.6: resolution: {integrity: sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ==} - math-intrinsics@1.0.0: - resolution: {integrity: sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} md5.js@1.3.5: @@ -3471,8 +3471,9 @@ packages: resolve@1.17.0: resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==} - resolve@1.22.9: - resolution: {integrity: sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} hasBin: true responselike@2.0.1: @@ -4320,8 +4321,8 @@ packages: utf-8-validate: optional: true - xdeployer@3.1.8: - resolution: {integrity: sha512-8l1D9dkKpjCBRblSgdI+xm2Pmzd7FmeTSpoF6EFGWZCMNwVCKwNRDrAN4ZfC6o8nxYbRk7yurF9Vcwf0Xcz45w==} + xdeployer@3.1.9: + resolution: {integrity: sha512-gNqVSJ2HJnJR9onpKbiP8KBgXtlvyg8ewdpi/dpLTVi/Mo/PdghjhA/GJ9ZRwuSo5iT3j7mluDX4AVgmBGRAfw==} engines: {node: '>=14.0.0'} peerDependencies: '@nomicfoundation/hardhat-ethers': ^3.0.8 @@ -5227,7 +5228,7 @@ snapshots: - debug - encoding - '@openzeppelin/hardhat-upgrades@3.7.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.0.12(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@openzeppelin/hardhat-upgrades@3.8.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.0.12(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) '@openzeppelin/defender-sdk-base-client': 1.15.2(encoding@0.1.13) @@ -5445,7 +5446,7 @@ snapshots: '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-ignition': 0.15.9(@nomicfoundation/hardhat-verify@2.0.12(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) '@nomicfoundation/hardhat-verify': 2.0.12(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) - '@openzeppelin/hardhat-upgrades': 3.7.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.0.12(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) + '@openzeppelin/hardhat-upgrades': 3.8.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.0.12(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) '@openzeppelin/upgrades-core': 1.41.0 '@tenderly/hardhat-integration': 1.1.1(@types/node@22.10.2)(bufferutil@4.0.8)(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) dotenv: 16.4.7 @@ -6255,7 +6256,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chokidar@4.0.2: + chokidar@4.0.3: dependencies: readdirp: 4.0.2 @@ -6615,7 +6616,7 @@ snapshots: dependencies: bn.js: 4.12.1 brorand: 1.1.0 - hash.js: 1.1.7 + hash.js: 1.1.3 hmac-drbg: 1.0.1 inherits: 2.0.4 minimalistic-assert: 1.0.1 @@ -7201,7 +7202,7 @@ snapshots: gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 - math-intrinsics: 1.0.0 + math-intrinsics: 1.1.0 get-stream@5.2.0: dependencies: @@ -7452,7 +7453,7 @@ snapshots: aggregate-error: 3.1.0 ansi-escapes: 4.3.2 boxen: 5.1.2 - chokidar: 4.0.2 + chokidar: 4.0.3 ci-info: 2.0.0 debug: 4.4.0(supports-color@8.1.1) enquirer: 2.4.1 @@ -7908,7 +7909,7 @@ snapshots: match-all@1.2.6: {} - math-intrinsics@1.0.0: {} + math-intrinsics@1.1.0: {} md5.js@1.3.5: dependencies: @@ -8537,7 +8538,7 @@ snapshots: rechoir@0.6.2: dependencies: - resolve: 1.22.9 + resolve: 1.22.10 recursive-readdir@2.2.3: dependencies: @@ -8594,7 +8595,7 @@ snapshots: dependencies: path-parse: 1.0.7 - resolve@1.22.9: + resolve@1.22.10: dependencies: is-core-module: 2.16.0 path-parse: 1.0.7 @@ -9694,7 +9695,7 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - xdeployer@3.1.8(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)): + xdeployer@3.1.9(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)))(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)): dependencies: '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(hardhat@2.22.17(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2))(typescript@5.7.2)(utf-8-validate@5.0.10)) ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)