Skip to content

Commit

Permalink
fix: hardhat get chain conf
Browse files Browse the repository at this point in the history
  • Loading branch information
dartdart26 committed Nov 5, 2024
1 parent 208796b commit ce07c94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions contracts/.env.example.deployment
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export ADDRESS_KMS_SIGNER_3="0x2dac5193bE0AB0eD8871399E6Ae61EAe6cc8cAE1"
export ADDRESS_COPROCESSOR_ACCOUNT="0xc9990FEfE0c27D31D0C2aa36196b085c0c4d456c"
export IS_COPROCESSOR="true"
export SEPOLIA_RPC_URL="https://sepolia.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export MAINNET_RPC_URL="https://mainnet.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export ETHERSCAN_API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
4 changes: 4 additions & 0 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ function getChainConfig(chain: keyof typeof chainIds): NetworkUserConfig {
break;
case 'sepolia':
jsonRpcUrl = process.env.SEPOLIA_RPC_URL!;
break;
case 'mainnet':
jsonRpcUrl = process.env.MAINNET_RPC_URL!;
break;
default:
throw new Error(`unsupported chain: ${chain}`);
}
return {
accounts: {
Expand Down

0 comments on commit ce07c94

Please sign in to comment.