Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: ${{ matrix.node }}
- id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ export ETHERSCAN_API_KEY=<Your Key>
yarn verify:etherscan --network $NETWORK
```

Single contracts can be verified as well, but the constructor arguments must be explicitly given to the command.
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:

```sh
npx hardhat verify --network $NETWORK 0xC92E8bdf79f0507f65a392b0ab4667716BFE0110 0xBA12222222228d8Ba445958a75a0704d566BF2C8
```

The first address is the vault relayer address, the second is the deployment input (usually, the Balancer vault).

#### Tenderly

For verifying all deployed contracts:
Expand Down
24 changes: 24 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "hardhat-deploy";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "@tenderly/hardhat-tenderly";
import "@nomicfoundation/hardhat-verify";

import dotenv from "dotenv";
import type { HttpNetworkUserConfig } from "hardhat/types";
Expand Down Expand Up @@ -104,6 +105,10 @@ export default {
...sharedNetworkConfig,
url: "https://xdai.poanetwork.dev",
},
lens: {
...sharedNetworkConfig,
url: "https://rpc.lens.xyz",
},
},
namedAccounts: {
// Note: accounts defined by a number refer to the the accounts as configured
Expand All @@ -120,6 +125,25 @@ export default {
hardhat: 2,
},
},
etherscan: {
apiKey: {
lens: "unneeded",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂️

},
customChains: [
{
network: "lens",
chainId: 232,
urls: {
apiURL:
"https://api-explorer-verify.lens.matterhosted.dev/contract_verification",
browserURL: "https://explorer.lens.xyz/",
},
},
],
},
sourcify: {
enabled: true,
},
gasReporter: {
enabled: REPORT_GAS ? true : false,
currency: "USD",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@0x/contract-artifacts-v2": "npm:@0x/contract-artifacts@^2.2.2",
"@gnosis.pm/safe-contracts": "^1.3.0",
"@gnosis.pm/util-contracts": "=3.1.0-solc-7",
"@nomicfoundation/hardhat-verify": "^2.0.1",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "=3.4.0-solc-0.7",
Expand Down
Loading
Loading