Skip to content

Commit

Permalink
Add etherscan verification info (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
bricestacey authored Dec 9, 2022
1 parent fc06499 commit 9953ca8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Goerli
GOERLI_URL=
GOERLI_ADMIN=
GOERLI_OPERATOR=
GOERLI_DEPLOYER=
GOERLI_PAUSER=

# Etherscan
ETHERSCAN_API_KEY=
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,23 @@ Here is an example command to pause a hypothetical contract:
```sh
npx hardhat setPaused --address 0x5FbDB2315678afecb367f032d93F642f64180aa3 --paused true
```

### Etherscan Verification

Contract source can be uploaded and verified to Etherscan. Update `.env` to include your etherscan API key.

For each deployed contract, run the following:

```
npx hardhat verify --network goerli CONTRACT_ADDRESS
```

There are three contracts that require constructor arguments:

- WithdrawControllerFactory
- PoolControllerFactory
- PoolFactory

```
npx hardhat verify --network goerli CONTRACT_ADDRESS arg1 arg2 arg3
```
6 changes: 6 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomiclabs/hardhat-etherscan";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-contract-sizer";
import "./tasks/serviceConfiguration";
Expand Down Expand Up @@ -48,6 +49,11 @@ const config: HardhatUserConfig | ExtendedHardhatUserConfig = {
},
docgen: {
pages: "files"
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_API_KEY
}
};

Expand Down

0 comments on commit 9953ca8

Please sign in to comment.