File tree Expand file tree Collapse file tree 5 files changed +306
-1
lines changed Expand file tree Collapse file tree 5 files changed +306
-1
lines changed Original file line number Diff line number Diff line change 1919 node-version : ${{ matrix.node }}
2020 - id : yarn-cache
2121 run : echo "::set-output name=dir::$(yarn cache dir)"
22- - uses : actions/cache@v2
22+ - uses : actions/cache@v4
2323 with :
2424 path : ${{ steps.yarn-cache.outputs.dir }}
2525 key : ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Original file line number Diff line number Diff line change @@ -87,6 +87,15 @@ export ETHERSCAN_API_KEY=<Your Key>
8787yarn verify:etherscan --network $NETWORK
8888```
8989
90+ Single contracts can be verified as well, but the constructor arguments must be explicitly given to the command.
91+ A common example is the vault relayer contract, which is not automatically verified with the command above since it is only deployed indirectly during initialization. This contract can be manually verified with:
92+
93+ ``` sh
94+ npx hardhat verify --network $NETWORK 0xC92E8bdf79f0507f65a392b0ab4667716BFE0110 0xBA12222222228d8Ba445958a75a0704d566BF2C8
95+ ```
96+
97+ The first address is the vault relayer address, the second is the deployment input (usually, the Balancer vault).
98+
9099#### Tenderly
91100
92101For verifying all deployed contracts:
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import "hardhat-deploy";
33import "hardhat-gas-reporter" ;
44import "solidity-coverage" ;
55import "@tenderly/hardhat-tenderly" ;
6+ import "@nomicfoundation/hardhat-verify" ;
67
78import dotenv from "dotenv" ;
89import type { HttpNetworkUserConfig } from "hardhat/types" ;
@@ -104,6 +105,10 @@ export default {
104105 ...sharedNetworkConfig ,
105106 url : "https://xdai.poanetwork.dev" ,
106107 } ,
108+ lens : {
109+ ...sharedNetworkConfig ,
110+ url : "https://rpc.lens.xyz" ,
111+ } ,
107112 } ,
108113 namedAccounts : {
109114 // Note: accounts defined by a number refer to the the accounts as configured
@@ -120,6 +125,25 @@ export default {
120125 hardhat : 2 ,
121126 } ,
122127 } ,
128+ etherscan : {
129+ apiKey : {
130+ lens : "unneeded" ,
131+ } ,
132+ customChains : [
133+ {
134+ network : "lens" ,
135+ chainId : 232 ,
136+ urls : {
137+ apiURL :
138+ "https://api-explorer-verify.lens.matterhosted.dev/contract_verification" ,
139+ browserURL : "https://explorer.lens.xyz/" ,
140+ } ,
141+ } ,
142+ ] ,
143+ } ,
144+ sourcify : {
145+ enabled : true ,
146+ } ,
123147 gasReporter : {
124148 enabled : REPORT_GAS ? true : false ,
125149 currency : "USD" ,
Original file line number Diff line number Diff line change 3232 "@0x/contract-artifacts-v2" : " npm:@0x/contract-artifacts@^2.2.2" ,
3333 "@gnosis.pm/safe-contracts" : " ^1.3.0" ,
3434 "@gnosis.pm/util-contracts" : " =3.1.0-solc-7" ,
35+ "@nomicfoundation/hardhat-verify" : " ^2.0.1" ,
3536 "@nomiclabs/hardhat-ethers" : " ^2.0.2" ,
3637 "@nomiclabs/hardhat-waffle" : " ^2.0.1" ,
3738 "@openzeppelin/contracts" : " =3.4.0-solc-0.7" ,
You can’t perform that action at this time.
0 commit comments