Skip to content

Commit

Permalink
chore: add contract verification notes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xApotheosis committed Sep 18, 2024
1 parent c42d666 commit d0e3270
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
RPC_URL="https://mainnet.infura.io/v3/some-key"
PRIVATE_KEY="super-secret-key"
ETHERSCAN_API_KEY="etherscan-api-key"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Test: `npx hardhat test`

### Mainnet

First configure the .env file with valid RPC_URL and PRIVATE_KEY values.
First configure the .env file with valid `RPC_URL`, `PRIVATE_KEY` and `ETHERSCAN_API_KEY` values.

Visualize the deployment plan: `npx hardhat ignition visualize ignition/modules/StakingRewards.ts --network mainnet`

Deploy the contract: `npx hardhat ignition deploy ignition/modules/StakingRewards.ts --network mainnet`
Deploy and verify the contract: `npx hardhat ignition deploy ignition/modules/StakingRewards.ts --network mainnet --verify`

### Local

Expand Down
12 changes: 12 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ const config: HardhatUserConfig = {
},
],
},
// Etherscan configuration for mainnet deployment verification
// Optional so we can still test locally without setting up etherscan
...(process.env.ETHERSCAN_API_KEY
? {
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
}
: {}),
sourcify: {
enabled: true,
},
};

export default config;

0 comments on commit d0e3270

Please sign in to comment.