diff --git a/.github/workflows/deploy_and_release.yml b/.github/workflows/deploy_and_release.yml index 74c7b76..c3b3f10 100644 --- a/.github/workflows/deploy_and_release.yml +++ b/.github/workflows/deploy_and_release.yml @@ -40,6 +40,7 @@ jobs: BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} get-network: runs-on: ubuntu-latest needs: [lint-and-test] @@ -78,9 +79,12 @@ jobs: PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT_BACKUP: ${{ secrets.PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT_BACKUP }} PRIVATE_KEY_FOR_V1_WALLET_CONTRACT_DEPLOYMENT: ${{ secrets.PRIVATE_KEY_FOR_V1_WALLET_CONTRACT_DEPLOYMENT }} PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT: ${{ secrets.PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT }} + QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} QUICKNODE_ARBITRUM_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_SEPOLIA_API_KEY }} + QUICKNODE_ARBITRUM_ONE_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_ONE_API_KEY }} QUICKNODE_OPTIMISM_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_SEPOLIA_API_KEY }} + QUICKNODE_OPTIMISM_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_API_KEY }} QUICKNODE_ZKSYNC_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_ZKSYNC_SEPOLIA_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} @@ -93,6 +97,7 @@ jobs: BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v6 with: @@ -124,7 +129,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' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' )}} + 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' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) }} environment: mainnet steps: - uses: actions/checkout@v2 @@ -143,6 +148,12 @@ jobs: PRIVATE_KEY_FOR_V1_WALLET_CONTRACT_DEPLOYMENT: ${{ secrets.PRIVATE_KEY_FOR_V1_WALLET_CONTRACT_DEPLOYMENT }} PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT: ${{ secrets.PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT }} QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} + QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} + QUICKNODE_ARBITRUM_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_SEPOLIA_API_KEY }} + QUICKNODE_ARBITRUM_ONE_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_ONE_API_KEY }} + QUICKNODE_OPTIMISM_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_SEPOLIA_API_KEY }} + QUICKNODE_OPTIMISM_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_API_KEY }} + QUICKNODE_ZKSYNC_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_ZKSYNC_SEPOLIA_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} @@ -150,12 +161,11 @@ jobs: ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }} ZKSYNC_EXPLORER_API_KEY: ${{ secrets.ZKSYNC_EXPLORER_API_KEY }} + BASESCAN_API_KEY: ${{ secrets.BASESCAN_API_KEY }} BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} - CORE_DAO_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_EXPLORER_API_KEY }} - QUICKNODE_ARBITRUM_ONE_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_ONE_API_KEY }} - QUICKNODE_OPTIMISM_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_API_KEY }} - BASESCAN_API_KEY: ${{ secrets.BASESCAN_API_KEY }} + CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v6 with: diff --git a/.github/workflows/deploy_batcher_contract.yml b/.github/workflows/deploy_batcher_contract.yml index 4b33a73..0c24e3a 100644 --- a/.github/workflows/deploy_batcher_contract.yml +++ b/.github/workflows/deploy_batcher_contract.yml @@ -40,6 +40,7 @@ jobs: BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} get-network: runs-on: ubuntu-latest needs: [lint-and-test] @@ -97,6 +98,7 @@ jobs: BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v7 with: @@ -108,7 +110,7 @@ jobs: deploy-batcher-contract-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' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' )}} + 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' ) || (needs.get-network.outputs.network == 'zketh' ) || (needs.get-network.outputs.network == 'baseeth' ) || (needs.get-network.outputs.network == 'bera' ) || (needs.get-network.outputs.network == 'avaxc' ) || (needs.get-network.outputs.network == 'coredao' ) || (needs.get-network.outputs.network == 'oas' ) }} environment: mainnet steps: - uses: actions/checkout@v4 @@ -126,7 +128,10 @@ jobs: PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT_BACKUP: ${{ secrets.PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT_BACKUP }} PRIVATE_KEY_FOR_V1_WALLET_CONTRACT_DEPLOYMENT: ${{ secrets.PRIVATE_KEY_FOR_V1_WALLET_CONTRACT_DEPLOYMENT }} PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT: ${{ secrets.PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT }} - QUICKNODE_ETH_MAINNET_API_KEY: ${{ secrets.QUICKNODE_ETH_MAINNET_API_KEY }} + QUICKNODE_ETH_HOLESKY_API_KEY: ${{ secrets.QUICKNODE_ETH_HOLESKY_API_KEY }} + QUICKNODE_ARBITRUM_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_SEPOLIA_API_KEY }} + QUICKNODE_OPTIMISM_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_SEPOLIA_API_KEY }} + QUICKNODE_ZKSYNC_SEPOLIA_API_KEY: ${{ secrets.QUICKNODE_ZKSYNC_SEPOLIA_API_KEY }} ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }} POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }} @@ -134,10 +139,11 @@ jobs: ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }} OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }} ZKSYNC_EXPLORER_API_KEY: ${{ secrets.ZKSYNC_EXPLORER_API_KEY }} - BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} - QUICKNODE_ARBITRUM_ONE_API_KEY: ${{ secrets.QUICKNODE_ARBITRUM_ONE_API_KEY }} - QUICKNODE_OPTIMISM_API_KEY: ${{ secrets.QUICKNODE_OPTIMISM_API_KEY }} BASESCAN_API_KEY: ${{ secrets.BASESCAN_API_KEY }} + BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} + OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} + CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} - name: Update release notes uses: actions/github-script@v7 with: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 74b2ae9..0aa3875 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -48,4 +48,5 @@ jobs: BARTIO_BERA_EXPLORER_API_KEY: ${{ secrets.BARTIO_BERA_EXPLORER_API_KEY }} OAS_EXPLORER_API_KEY: ${{ secrets.OAS_EXPLORER_API_KEY }} CORE_DAO_TESTNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_TESTNET_EXPLORER_API_KEY }} + CORE_DAO_MAINNET_EXPLORER_API_KEY: ${{ secrets.CORE_DAO_MAINNET_EXPLORER_API_KEY }} - run: npm run lint diff --git a/hardhat.config.ts b/hardhat.config.ts index 3bc3e16..763262a 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -32,7 +32,8 @@ const { BASESCAN_API_KEY, BARTIO_BERA_EXPLORER_API_KEY, OAS_EXPLORER_API_KEY, - CORE_DAO_TESTNET_EXPLORER_API_KEY + CORE_DAO_TESTNET_EXPLORER_API_KEY, + CORE_DAO_MAINNET_EXPLORER_API_KEY } = process.env; const config: HardhatUserConfig = { @@ -144,6 +145,14 @@ const config: HardhatUserConfig = { `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` ] }, + oas: { + url: `https://rpc.mainnet.oasys.games`, + accounts: [ + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` + ] + }, tcoredao: { url: `https://rpc.test.btcs.network`, accounts: [ @@ -152,6 +161,14 @@ const config: HardhatUserConfig = { `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` ] }, + coredao: { + url: `https://rpc.coredao.org`, + accounts: [ + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`, + `${PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT}` + ] + }, tavaxc: { url: 'https://api.avax-test.network/ext/C/rpc', accounts: [`${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`] @@ -192,8 +209,10 @@ const config: HardhatUserConfig = { bartioBera: `${BARTIO_BERA_EXPLORER_API_KEY}`, //OAS oasTestnet: `${OAS_EXPLORER_API_KEY}`, + oasMainnet: `${OAS_EXPLORER_API_KEY}`, //Core Dao coredaoTestnet: `${CORE_DAO_TESTNET_EXPLORER_API_KEY}`, + coredaoMainnet: `${CORE_DAO_MAINNET_EXPLORER_API_KEY}`, //avaxc // there is free api key for avaxc, so make use of 2 req/sec avaxc: 'sampleapikey', @@ -257,6 +276,14 @@ const config: HardhatUserConfig = { browserURL: 'https://explorer.testnet.oasys.games' } }, + { + network: 'oasMainnet', + chainId: 248, + urls: { + apiURL: 'https://explorer.oasys.games/api', + browserURL: 'https://explorer.oasys.games/' + } + }, { network: 'coredaoTestnet', chainId: 1115, @@ -265,6 +292,14 @@ const config: HardhatUserConfig = { browserURL: 'https://scan.test.btcs.network' } }, + { + network: 'coredaoMainnet', + chainId: 1116, + urls: { + apiURL: 'https://openapi.coredao.org/api', + browserURL: 'https://scan.coredao.org/' + } + }, { network: 'polygonAmoy', chainId: 80002, diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 0993eba..f9738dd 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -114,8 +114,18 @@ async function main() { case 80084: // coredao case 1115: + case 1116: + eip1559GasParams.gasLimit = 3000000; + eip1559GasParams.maxFeePerGas = BigNumber.from('30000000000'); + eip1559GasParams.maxPriorityFeePerGas = BigNumber.from('30000000000'); + walletImplementationContractName = 'WalletSimple'; + forwarderContractName = 'ForwarderV4'; + forwarderFactoryContractName = 'ForwarderFactoryV4'; + contractPath = `contracts/${walletImplementationContractName}.sol:${walletImplementationContractName}`; + break; // oas case 9372: + case 248: eip1559GasParams.gasLimit = 3000000; walletImplementationContractName = 'WalletSimple'; forwarderContractName = 'ForwarderV4';