Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add etherscan verification info #147

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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