Skip to content

Commit

Permalink
chore(eth-multisig-v4): add oas, coredao config to deploy contract in…
Browse files Browse the repository at this point in the history
… prod

Ticket: WIN-4036
  • Loading branch information
parasgarg-bitgo committed Dec 16, 2024
1 parent 39513fb commit 57e631d
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 11 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/deploy_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -143,19 +148,24 @@ 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 }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
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:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/deploy_batcher_contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -126,18 +128,22 @@ 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 }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
37 changes: 36 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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: [
Expand All @@ -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}`]
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
10 changes: 10 additions & 0 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 57e631d

Please sign in to comment.