diff --git a/.env-example b/.env-example index c19d3cd..bb58b6b 100644 --- a/.env-example +++ b/.env-example @@ -1,10 +1,8 @@ MAINNET_PROVIDER_URL=https://eth-mainnet.g.alchemy.com/v2/000 SEPOLIA_PROVIDER_URL=https://sepolia.infura.io/v3/000 OP_PROVIDER_URL=https://opt-mainnet.g.alchemy.com/v2/000 -OP_SEPOLIA_PROVIDER_URL= DEPLOYER_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 DEPLOYER_ADDRESS=0x0000000 -ETHERSCAN_API_KEY=000 CB_PRIVATE_KEY=0x0000000 CB_ADDRESS=0x0000000 CB_PROVIDER_URL=https://goerli.base.org @@ -17,3 +15,9 @@ ARBITRUM_PROVIDER_URL=https://arb-mainnet.g.alchemy.com/v2/000 ZKSYNC_ERA_PROVIDER_URL=https://zksync-mainnet.g.alchemy.com/v2/000 ZKSYNC_SEPOLIA_PROVIDER_URL=https://zksync-sepolia.g.alchemy.com/v2/000 + +LINEA_PROVIDER_URL=https://linea-mainnet.infura.io/v3/000 +LINEA_SEPOLIA_PROVIDER_URL=https://linea-sepolia.infura.io/v3/000 + +ETHERSCAN_API_KEY=000 +OP_SEPOLIA_ETHERSCAN_API_KEY=000 diff --git a/hardhat.config.ts b/hardhat.config.ts index fb096b4..b51f383 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -45,7 +45,10 @@ let config: HardhatUserConfig = { enabled: true }, etherscan: { - apiKey: process.env.ETHERSCAN_API_KEY as string, + apiKey: { + "eth-mainnet": process.env.ETHERSCAN_API_KEY as string, + "optimism-sepolia": process.env.OP_SEPOLIA_ETHERSCAN_API_KEY as string + }, customChains: [ { network: "eth-mainnet", @@ -63,14 +66,6 @@ let config: HardhatUserConfig = { browserURL: "https://sepolia.etherscan.io/" } }, - { - network: "linea_mainnet", - chainId: 59144, - urls: { - apiURL: "https://api.lineascan.build/api", - browserURL: "https://lineascan.build/" - } - }, { network: "baseGoerli", chainId: 84531, @@ -80,19 +75,11 @@ let config: HardhatUserConfig = { } }, { - network: "linea-goerli", - chainId: 59140, - urls: { - apiURL: "https://api.lineascan.build/api", - browserURL: "https://goerli.lineascan.build/" - } - }, - { - network: "optimism-goerli", - chainId: 420, + network: "optimism-sepolia", + chainId: 0xaa37dc, urls: { - apiURL: "https://api-goerli-optimism.etherscan.io/api", - browserURL: "https://goerli-optimism.etherscan.io/" + apiURL: "https://api-sepolia-optimistic.etherscan.io/api", + browserURL: "https://sepolia-optimism.etherscan.io/" } }, { @@ -126,6 +113,14 @@ let config: HardhatUserConfig = { apiURL: "https://block-explorer-api.sepolia.zksync.dev/api", browserURL: "https://sepolia.explorer.zksync.io/" } + }, + { + network: "linea", + chainId: 59144, + urls: { + apiURL: "https://api.lineascan.build/api", + browserURL: "https://lineascan.build/" + } } ] }, @@ -154,6 +149,9 @@ let config: HardhatUserConfig = { }, { version: "0.8.19" + }, + { + version: "0.8.20" } ] } @@ -185,16 +183,6 @@ if (process.env.DEPLOYER_PRIVATE_KEY && process.env.DEPLOYER_ADDRESS) { from: process.env.DEPLOYER_ADDRESS as string }; } - if (process.env.OP_GOERLI_PROVIDER_URL) { - config.networks["optimism-goerli"] = { - url: process.env.OP_GOERLI_PROVIDER_URL as string, - accounts: [process.env.DEPLOYER_PRIVATE_KEY as string], - chainId: 420, - from: process.env.DEPLOYER_ADDRESS as string - // gasPrice: 6168663, - // gasPrice: 9068663 - }; - } if (process.env.OP_SEPOLIA_PROVIDER_URL) { config.networks["optimism-sepolia"] = { url: process.env.OP_SEPOLIA_PROVIDER_URL as string, @@ -227,9 +215,7 @@ if (process.env.DEPLOYER_PRIVATE_KEY && process.env.DEPLOYER_ADDRESS) { } if (process.env.ZKSYNC_ERA_PROVIDER_URL) { if (!process.env.MAINNET_PROVIDER_URL) { - console.error( - "MAINNET_PROVIDER_URL is required for zksync network" - ); + console.error("MAINNET_PROVIDER_URL is required for zksync network"); throw "MAINNET_PROVIDER_URL is required for zksync network"; } config.networks["zksync"] = { @@ -265,27 +251,25 @@ if (process.env.DEPLOYER_PRIVATE_KEY && process.env.DEPLOYER_ADDRESS) { // gasPrice: 9068663 }; } + if (process.env.LINEA_PROVIDER_URL) { + config.networks["linea"] = { + url: process.env.LINEA_PROVIDER_URL as string, + accounts: [process.env.DEPLOYER_PRIVATE_KEY as string], + chainId: 59144, + from: process.env.DEPLOYER_ADDRESS as string + }; + } + if (process.env.LINEA_SEPOLIA_PROVIDER_URL) { + config.networks["linea-sepolia"] = { + url: process.env.LINEA_SEPOLIA_PROVIDER_URL as string, + accounts: [process.env.DEPLOYER_PRIVATE_KEY as string], + chainId: 59141, + from: process.env.DEPLOYER_ADDRESS as string + }; + } } } -if ( - process.env.DEPLOYER_PRIVATE_KEY && - process.env.INFURA_KEY && - config.networks -) { - config.networks["linea-goerli"] = { - chainId: 59140, - gasPrice: 582000007, - url: `https://linea-goerli.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, - accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] - }; - config.networks["linea"] = { - chainId: 59144, - url: `https://linea-mainnet.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, - accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] - }; -} - if ( process.env.CB_PROVIDER_URL && process.env.CB_PRIVATE_KEY && diff --git a/package.json b/package.json index e234ccb..e645884 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^3.0.0", "@nomiclabs/hardhat-etherscan": "^3.0.0", - "@openzeppelin/hardhat-upgrades": "^2.0.1", + "@openzeppelin/hardhat-upgrades": "^3.1.1", "@typechain/hardhat": "^8.0.3", "@types/mocha": ">=9.1.0", "chai": "^4.3.7", diff --git a/scripts/prepareCallddataForVerifierWithdrawFees.ts b/scripts/prepareCallddataForVerifierWithdrawFees.ts index bbed610..63b6a7f 100644 --- a/scripts/prepareCallddataForVerifierWithdrawFees.ts +++ b/scripts/prepareCallddataForVerifierWithdrawFees.ts @@ -8,7 +8,11 @@ import { assertEnvironment(); export async function main() { - const ethAmount = "16.091447181969673068"; + if(!process.env.GITCOIN_VERIFIER_WITHDRAW_ETH_AMOUNT) { + console.error("GITCOIN_VERIFIER_WITHDRAW_ETH_AMOUNT is required"); + throw "GITCOIN_VERIFIER_WITHDRAW_ETH_AMOUNT is required"; + } + const ethAmount = process.env.GITCOIN_VERIFIER_WITHDRAW_ETH_AMOUNT || "undefined"; const ethAmountInWei = ethers.parseEther(ethAmount); await confirmContinue({ diff --git a/scripts/transferOwnership.ts b/scripts/transferOwnership.ts index 2a4d085..3144283 100644 --- a/scripts/transferOwnership.ts +++ b/scripts/transferOwnership.ts @@ -21,6 +21,7 @@ export async function main() { contract: "Transferring Ownership of All Contracts to Multisig", network: hre.network.name, chainId: hre.network.config.chainId, + newOwner: process.env.PASSPORT_MULTISIG_ADDRESS, }); const GitcoinResolver = await ethers.getContractFactory("GitcoinResolver"); diff --git a/yarn.lock b/yarn.lock index d51ef09..f2783be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -142,7 +142,7 @@ multiformats "9.9.0" pako "^2.1.0" -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== @@ -1145,10 +1145,21 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== -"@openzeppelin/defender-base-client@^1.47.0": - version "1.47.0" - resolved "https://registry.npmjs.org/@openzeppelin/defender-base-client/-/defender-base-client-1.47.0.tgz" - integrity sha512-y9dDm+gX0MHHEn17W7f7oO3X083JAVMk3YcuXHavSE7kjiCLoFOaZ23joYqoHeaccL10nGt7KOOzZ0sh9iJHTQ== +"@openzeppelin/defender-admin-client@^1.52.0": + version "1.54.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-admin-client/-/defender-admin-client-1.54.6.tgz#935374ff54f087048c127e4852f8aefe5b2ac894" + integrity sha512-P4lxJDySrekWNuPa7FeyW/UmuxnuIXIAGYr5gZnmnMHRsYNaw+XfgkiCDfoGtjEyJbXYxXttYF6iAZhWQPdf1g== + dependencies: + "@openzeppelin/defender-base-client" "1.54.6" + axios "^1.4.0" + ethers "^5.7.2" + lodash "^4.17.19" + node-fetch "^2.6.0" + +"@openzeppelin/defender-base-client@1.54.6", "@openzeppelin/defender-base-client@^1.52.0": + version "1.54.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-base-client/-/defender-base-client-1.54.6.tgz#b65a90dba49375ac1439d638832382344067a0b9" + integrity sha512-PTef+rMxkM5VQ7sLwLKSjp2DBakYQd661ZJiSRywx+q/nIpm3B/HYGcz5wPZCA5O/QcEP6TatXXDoeMwimbcnw== dependencies: amazon-cognito-identity-js "^6.0.1" async-retry "^1.3.3" @@ -1156,31 +1167,50 @@ lodash "^4.17.19" node-fetch "^2.6.0" -"@openzeppelin/hardhat-upgrades@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-2.0.1.tgz" - integrity sha512-8yreWaXKyQ+A6w9D1URCCojt2o10DEox2kZkVIpacpF1inauAvc0sLKLJnqPmbYqrid7m6sRZmH9QByJH2H2nQ== +"@openzeppelin/defender-sdk-base-client@^1.10.0", "@openzeppelin/defender-sdk-base-client@^1.13.4": + version "1.13.4" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-1.13.4.tgz#51b25d46bb766e7a107b9a87ca623fae3ad5a8c3" + integrity sha512-fZjDxdL5WBt6kjKN8j6WlfIsggZKv37W1KoRkT0XwYv7Jslmr22i2qUs8ZreAzATD3ESYQs7YlO7ge0ElqdOKg== dependencies: - "@openzeppelin/defender-base-client" "^1.47.0" - "@openzeppelin/platform-deploy-client" "^0.9.0" - "@openzeppelin/upgrades-core" "^1.27.0" + amazon-cognito-identity-js "^6.3.6" + async-retry "^1.3.3" + +"@openzeppelin/defender-sdk-deploy-client@^1.10.0": + version "1.13.4" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-1.13.4.tgz#f5f6997774d7ea8c5ea9be5d4b0ead041270f671" + integrity sha512-1SbdImpjCYmjpDgK7Bff4vak29r/aECabVuQi5TB+7TdbOuRdVxDHu7vFhEpt3yrcPKW1joaNiUNDEc/noUsNQ== + dependencies: + "@openzeppelin/defender-sdk-base-client" "^1.13.4" + axios "^1.6.8" + lodash "^4.17.21" + +"@openzeppelin/defender-sdk-network-client@^1.10.0": + version "1.13.4" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-network-client/-/defender-sdk-network-client-1.13.4.tgz#98ba517bb32810d0f76b5f64a83f42ad4ca182bb" + integrity sha512-m76WQzqFET4jtFgA74V6Ui4czRoTvBy7leS+BbsIxoKX+NGODhs78y5zq7jSxsLu3c2iY69rujRkzj0Z+sCiiQ== + dependencies: + "@openzeppelin/defender-sdk-base-client" "^1.13.4" + axios "^1.6.8" + lodash "^4.17.21" + +"@openzeppelin/hardhat-upgrades@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-3.1.1.tgz#3dcb47233355d06ec6080463ed06c15187a6fd25" + integrity sha512-CejZfBX6ROh+bZfsImoaWDftNgrZz4CffpPzEDTCRpN980ShJlA2+zsb/bFM5Z3ucy+6BfJx4W/dn9BTkn7AOA== + dependencies: + "@openzeppelin/defender-admin-client" "^1.52.0" + "@openzeppelin/defender-base-client" "^1.52.0" + "@openzeppelin/defender-sdk-base-client" "^1.10.0" + "@openzeppelin/defender-sdk-deploy-client" "^1.10.0" + "@openzeppelin/defender-sdk-network-client" "^1.10.0" + "@openzeppelin/upgrades-core" "^1.32.0" chalk "^4.1.0" debug "^4.1.1" + ethereumjs-util "^7.1.5" proper-lockfile "^4.1.1" - undici "^5.14.0" - -"@openzeppelin/platform-deploy-client@^0.9.0": - version "0.9.0" - resolved "https://registry.npmjs.org/@openzeppelin/platform-deploy-client/-/platform-deploy-client-0.9.0.tgz" - integrity sha512-VepsNJu5B5xhrKMg//hROFljlxlNhlkcgLSKl8rqapKiRFN/dxXtSVmmpNmySrCFnbbV/6twfhuhYGAZiG7oAw== - dependencies: - "@ethersproject/abi" "^5.6.3" - "@openzeppelin/defender-base-client" "^1.47.0" - axios "^1.4.0" - lodash "^4.17.19" - node-fetch "^2.6.0" + undici "^6.11.1" -"@openzeppelin/upgrades-core@^1.27.0", "@openzeppelin/upgrades-core@^1.27.3": +"@openzeppelin/upgrades-core@^1.27.3": version "1.27.3" resolved "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.27.3.tgz" integrity sha512-IqlSMUkno1XKF4L46aUqZ4BqHxj4dF0BRGrFcKeG2Q0vrsKoazhY67JG9bO+wMYG4zxl6jgmG0bd5ef9HLcLmw== @@ -1208,6 +1238,20 @@ proper-lockfile "^4.1.1" solidity-ast "^0.4.51" +"@openzeppelin/upgrades-core@^1.32.0": + version "1.34.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.34.1.tgz#660301692e706c7e701395467267128cc43c1de9" + integrity sha512-LV3hHm60htmP3HJjn2VoGqXNPn1RLFSSInRyXNbm15Z2oWKGxOfAWSC4+okRckum0yVB5g3k4/SEyqjsJRB07A== + dependencies: + cbor "^9.0.0" + chalk "^4.1.0" + compare-versions "^6.0.0" + debug "^4.1.1" + ethereumjs-util "^7.0.3" + minimist "^1.2.7" + proper-lockfile "^4.1.1" + solidity-ast "^0.4.51" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -1643,6 +1687,17 @@ amazon-cognito-identity-js@^6.0.1: isomorphic-unfetch "^3.0.0" js-cookie "^2.2.1" +amazon-cognito-identity-js@^6.3.6: + version "6.3.12" + resolved "https://registry.yarnpkg.com/amazon-cognito-identity-js/-/amazon-cognito-identity-js-6.3.12.tgz#af73df033094ad4c679c19cf6122b90058021619" + integrity sha512-s7NKDZgx336cp+oDeUtB2ZzT8jWJp/v2LWuYl+LQtMEODe22RF1IJ4nRiDATp+rp1pTffCZcm44Quw4jx2bqNg== + dependencies: + "@aws-crypto/sha256-js" "1.2.2" + buffer "4.9.2" + fast-base64-decode "^1.0.0" + isomorphic-unfetch "^3.0.0" + js-cookie "^2.2.1" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" @@ -1909,7 +1964,7 @@ axios@^1.4.0: form-data "^4.0.0" proxy-from-env "^1.1.0" -axios@^1.6.2: +axios@^1.6.2, axios@^1.6.8: version "1.7.2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== @@ -6658,6 +6713,11 @@ undici@^5.14.0: dependencies: busboy "^1.6.0" +undici@^6.11.1: + version "6.19.2" + resolved "https://registry.yarnpkg.com/undici/-/undici-6.19.2.tgz#231bc5de78d0dafb6260cf454b294576c2f3cd31" + integrity sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA== + unfetch@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz"