Skip to content

Commit

Permalink
fix: verify script
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 22, 2024
1 parent eb75499 commit 92cc7eb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.github
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ PROD_PRIVATE_KEY="00000000000000000000000000000000000000000000000000000000000000
DEV_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000"
LOCAL_PRIVATE_KEY="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
OWNER_ADDRESS="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
ETHERSCAN_API_KEY=""
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ Now browse to <http://localhost:1234/>.

## How to setup code from template

## Verify source code

put Etherscan apikey in `.env` file.

Then run:

```sh
yarn hardhat verify --network $NETWORK "$CONTRACT_ADDRESS" "$NAME" "$SYMBOL" "$OWNER_ADDRESS" "$INITIAL_SUPPLY" $DECIMALS
```

Network can be either:

- goerli
- ethereum

## License

ERC20 template is licensed under the MIT license.
Expand Down
4 changes: 4 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const {
DEV_PRIVATE_KEY,
PROD_PRIVATE_KEY,
LOCAL_PRIVATE_KEY,
ETHERSCAN_API_KEY,
} = process.env;

const config: HardhatUserConfig = {
Expand All @@ -27,6 +28,9 @@ const config: HardhatUserConfig = {
accounts: [`0x${LOCAL_PRIVATE_KEY}`],
},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
gasReporter: {
currency: "USD",
gasPriceApi:
Expand Down

0 comments on commit 92cc7eb

Please sign in to comment.