Skip to content

Commit

Permalink
Add etherscan verification plugin and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jummy123 authored and cryptofish7 committed Jan 20, 2022
1 parent 21fa447 commit 8332c79
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
RINKEBY_PRIVATE_KEY=
ALCHEMY_PROJECT_ID=
ETHERSCAN_API_KEY=
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ The coverage report will then be found in `coverage/`.
To deploy to the [rinkeby network](https://www.rinkeby.io/) you need to set appropriate environment variables. The file [.env.example](.env.example) contains examples of the variables you need to set. For convenience you can copy this file to a file name _.env_ and use a tool like [direnv](https://direnv.net/) to automatically load it.

You could then deploy to rinkeby by using [hardhat-deploy](https://github.com/wighawag/hardhat-deploy) with this command `yarn hardhat deploy --network rinkeby`.

### Verifying contracts

To verify the contracts on rinkeby you will need an etherscan API key, see [.env.example](.env.example). To verify a contract on you will need the deployed contracts address, run
```
yarn hardhat verify --network rinkeby "${contract_address}"
```
4 changes: 4 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-waffle");
require("@openzeppelin/hardhat-upgrades");
require("hardhat-abi-exporter");
Expand Down Expand Up @@ -37,4 +38,7 @@ module.exports = {
deployer: 0,
dev: 1,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"homepage": "https://github.com/traderjoe-xyz/rocker-joe/issues",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.0",
"@openzeppelin/contracts": "^4.4.1",
"@openzeppelin/contracts-upgradeable": "^4.4.1",
Expand Down

0 comments on commit 8332c79

Please sign in to comment.