network
, poolId
, and creationHash
. network
to the network your pool is deployed on. This could be mainnet
for Ethereum mainnet, kovan
, rinkeby
, goerli
, or polygon
. At the time of writing, arbiscan does not yet support contract verification. poolId
. If you don't know where to find a poolId
, check out this note about poolId
s. creationHash
is optional for most networks, but currently mandatory for polygon
. (The polygonscan API does not currently support the necessary txlistinternal
query to fetch this hash.)yarn hardhat verify-contract --id 20210418-weighted-pool --name WeightedPool --address 0x6dF50E37A6aEfB9024a7284EF1C9e1E8e7c4F7b8 --network kovan --key NOTSHARINGMYETHERSCANAPIKEYSORRY --args 000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064d79506f6f6c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c333342414c2d3333574554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000041286bb1d3e870f3f750eb7e1c25d7e48c8a1ac7000000000000000000000000dfcea9088c8a88a76ff74892c1457c17dfeef9c1000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b20000
poolId
for your pool. If you don't know where to find a poolId
, check out this note about poolId
s. Once you have your poolId
, you'll need to extract the pool address
, which is the first 42 characters of the id. 0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014
(id)0x5c6ee304399dbdb9c8ef030ab642b10820db8f56
(address)0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8
"
.0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000005543df729c000000000000000000000000000000000000000000000000000000000000072aefe0000000000000000000000000000000000000000000000000000000000278d000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b000000000000000000000000000000000000000000000000000000000000001742616c616e6365722038302042414c2032302057455448000000000000000000000000000000000000000000000000000000000000000000000000000000000e422d383042414c2d323057455448000000000000000000000000000000000000
pkg/deployments
directory, and open the hardhat.config.ts
file:task-id
and contract-name
--id
argument)--name
argument)pool-address
network
mainnet
" as shown in the sample hardhat.config.ts
file.etherscan-api-key
abi-encoded-constructor-arguments
balancer-v2-monorepo
:yarn hardhat verify-contract --id 20210418-weighted-pool --name WeightedPool2Tokens --address 0x5c6ee304399dbdb9c8ef030ab642b10820db8f56 --network mainnet --key NOTSHARINGMYETHERSCANAPIKEYSORRY --args 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000ba100000625a3754423978a60c9317c58a424e3d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000005543df729c000000000000000000000000000000000000000000000000000000000000072aefe0000000000000000000000000000000000000000000000000000000000278d000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b000000000000000000000000000000000000000000000000000000000000001742616c616e6365722038302042414c2032302057455448000000000000000000000000000000000000000000000000000000000000000000000000000000000e422d383042414c2d323057455448000000000000000000000000000000000000