diff --git a/.github/workflows/deploy_and_release.yml b/.github/workflows/deploy_and_release.yml index 1c4b4e9..04a2822 100644 --- a/.github/workflows/deploy_and_release.yml +++ b/.github/workflows/deploy_and_release.yml @@ -24,6 +24,8 @@ jobs: ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} + ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} + OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }} get-network: runs-on: ubuntu-latest needs: [lint-and-test] @@ -38,13 +40,13 @@ jobs: result-encoding: string script: | const tag = process.env.GITHUB_REF_NAME; - const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc)$/; + const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth)$/; const network = tag.match(regex); return network ? network[1] : "hteth"; deploy-to-test: runs-on: ubuntu-latest needs: [lint-and-test, get-network] - if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) }} + if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) || (needs.get-network.outputs.network == 'tarbeth' ) || (needs.get-network.outputs.network == 'topeth' ) }} environment: testnet steps: - uses: actions/checkout@v2 @@ -64,6 +66,8 @@ jobs: ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} + ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} + OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }} - name: Update release notes uses: actions/github-script@v6 with: @@ -95,7 +99,7 @@ jobs: deploy-to-prod: runs-on: ubuntu-latest needs: [lint-and-test, get-network] - if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) }} + if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) }} environment: mainnet steps: - uses: actions/checkout@v2 @@ -115,6 +119,8 @@ jobs: ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} + ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} + OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }} - name: Update release notes uses: actions/github-script@v6 with: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 556a00f..adacd31 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -32,4 +32,6 @@ jobs: ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} + ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} + OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }} - run: npm run lint diff --git a/hardhat.config.ts b/hardhat.config.ts index ad75ef8..e45ed1a 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -14,10 +14,14 @@ const { TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT, QUICKNODE_ETH_MAINNET_API_KEY, QUICKNODE_ETH_HOLESKY_API_KEY, + QUICKNODE_ARBITRUM_SEPOLIA_API_KEY, + QUICKNODE_OPTIMISM_SEPOLIA_API_KEY, ETHERSCAN_API_KEY, ALCHEMY_POLYGON_API_KEY, POLYGONSCAN_API_KEY, - BSCSCAN_API_KEY + BSCSCAN_API_KEY, + ARBISCAN_API_KEY, + OPTIMISTIC_ETHERSCAN_API_KEY } = process.env; const config: HardhatUserConfig = { @@ -66,6 +70,14 @@ const config: HardhatUserConfig = { tbsc: { url: `https://data-seed-prebsc-1-s1.binance.org:8545/`, accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] + }, + tarbeth: { + url: `${QUICKNODE_ARBITRUM_SEPOLIA_API_KEY}`, + accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] + }, + topeth: { + url: `${QUICKNODE_OPTIMISM_SEPOLIA_API_KEY}`, + accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`] } }, gasReporter: { @@ -77,12 +89,45 @@ const config: HardhatUserConfig = { //ethereum mainnet: `${ETHERSCAN_API_KEY}`, goerli: `${ETHERSCAN_API_KEY}`, + holesky: `${ETHERSCAN_API_KEY}`, //polygon polygon: `${POLYGONSCAN_API_KEY}`, polygonMumbai: `${POLYGONSCAN_API_KEY}`, bscTestnet: `${BSCSCAN_API_KEY}`, - bsc: `${BSCSCAN_API_KEY}` - } + bsc: `${BSCSCAN_API_KEY}`, + // arbitrum + arbitrumOne: `${ARBISCAN_API_KEY}`, + arbitrumSepolia: `${ARBISCAN_API_KEY}`, + // optimism + optimisticEthereum: `${OPTIMISTIC_ETHERSCAN_API_KEY}`, + optimisticSepolia: `${OPTIMISTIC_ETHERSCAN_API_KEY}` + }, + customChains: [ + { + network: 'holesky', + chainId: 17000, + urls: { + apiURL: 'https://api-holesky.etherscan.io/api', + browserURL: 'https://holesky.etherscan.io' + } + }, + { + network: 'arbitrumSepolia', + chainId: 421614, + urls: { + apiURL: 'https://api-sepolia.arbiscan.io/api', + browserURL: 'https://sepolia.arbiscan.io' + } + }, + { + network: 'optimisticSepolia', + chainId: 11155420, + urls: { + apiURL: 'https://api-sepolia-optimistic.etherscan.io/api', + browserURL: 'https://sepolia-optimism.etherscan.io' + } + } + ] }, mocha: { timeout: 100000 diff --git a/scripts/deploy.ts b/scripts/deploy.ts index db7e660..4f37420 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -20,7 +20,7 @@ async function main() { //eth case 1: //hteth - case 5: + case 17000: walletImplementationContractName = 'WalletSimple'; break; //matic @@ -36,6 +36,18 @@ async function main() { walletImplementationContractName = 'RecoveryWalletSimple'; walletFactoryContractName = 'RecoveryWalletFactory'; break; + // arbeth + case 42161: + // tarbeth + case 421614: + walletImplementationContractName = 'ArbethWalletSimple'; + break; + // opeth + case 10: + // topeth + case 11155420: + walletImplementationContractName = 'OpethWalletSimple'; + break; } console.log( @@ -83,7 +95,11 @@ async function main() { await forwarderFactory.deployTransaction.wait(10); console.log('Done waiting, verifying'); - await verifyContract('WalletSimple', walletSimple.address, []); + await verifyContract( + walletImplementationContractName, + walletSimple.address, + [] + ); await verifyContract('WalletFactory', walletFactory.address, [ walletSimple.address ]);