Skip to content

Commit

Permalink
docs: add docs for verification (bgd-labs#427)
Browse files Browse the repository at this point in the history
* docs: add docs for verification

* fix: revert to shanghai
  • Loading branch information
sakulstra authored Aug 16, 2024
1 parent 0815ac6 commit e83675c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ reports/

# tooling download folder
etherscan

verify.json
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,14 @@ This repository will manage the upload to ipfs automatically once a pr is merged
The proposal requires at least one `payload` and the `encodedHash`.

:tada:

## Troubleshooting Verification

If for whatever reason verification fails, there's a good chance the error is on the foundry side, not in our tooling.
To retry a specific verification you can follow the following steps:

1. copy verify.example.json to verify.json
2. replace the `chain` with the appropriate chainId
3. replace the `hash` with the transaction hash of the deployment transaction (make sure it's the deployment transaction, not the one registering the payload on the payloadscontroller)
4. run `FOUNDRY_PROFILE=<chainAlias> forge build --force`
5. run `FOUNDRY_PROFILE=<chainAlias> npx catapulta-verify -b verify.json`
34 changes: 18 additions & 16 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ solc = '0.8.20'
out = 'out'
bytecode_hash = 'none'
libs = ['lib']
remappings = [
]
remappings = []
ffi = true
fs_permissions = [{ access = "write", path = "./reports" }, { access = "read", path = "./zkout" }]
fs_permissions = [
{ access = "write", path = "./reports" },
{ access = "read", path = "./zkout" },
]
evm_version = 'shanghai'

[profile.zksync]
Expand Down Expand Up @@ -73,18 +75,18 @@ scroll = "${RPC_SCROLL}"
zksync = "${RPC_ZK_SYNC}"

[etherscan]
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chain=1 }
optimism = { key="${ETHERSCAN_API_KEY_OPTIMISM}", chain=10 }
avalanche = { key="${ETHERSCAN_API_KEY_AVALANCHE}", chain=43114 }
polygon = { key="${ETHERSCAN_API_KEY_POLYGON}", chain=137 }
arbitrum = { key="${ETHERSCAN_API_KEY_ARBITRUM}", chain=42161 }
fantom = { key="${ETHERSCAN_API_KEY_FANTOM}", chain=250 }
metis = { key="any", chainId=1088, url='https://andromeda-explorer.metis.io/' }
base = { key="${ETHERSCAN_API_KEY_BASE}", chainId=8453 }
zkevm = { key="${ETHERSCAN_API_KEY_ZKEVM}", chainId=1101 }
gnosis = { key="${ETHERSCAN_API_KEY_GNOSIS}", chainId=100 }
bnb = { key="${ETHERSCAN_API_KEY_BNB}", chainId=56, url='https://api.bscscan.com/api'}
scroll = { key="${ETHERSCAN_API_KEY_SCROLL}", chainId=534352 }
zksync = { key="${ETHERSCAN_API_KEY_ZK_SYNC}", chain = 324 }
mainnet = { key = "${ETHERSCAN_API_KEY_MAINNET}", chain = 1 }
optimism = { key = "${ETHERSCAN_API_KEY_OPTIMISM}", chain = 10 }
avalanche = { key = "${ETHERSCAN_API_KEY_AVALANCHE}", chain = 43114 }
polygon = { key = "${ETHERSCAN_API_KEY_POLYGON}", chain = 137 }
arbitrum = { key = "${ETHERSCAN_API_KEY_ARBITRUM}", chain = 42161 }
fantom = { key = "${ETHERSCAN_API_KEY_FANTOM}", chain = 250 }
metis = { key = "any", chainId = 1088, url = 'https://andromeda-explorer.metis.io/' }
base = { key = "${ETHERSCAN_API_KEY_BASE}", chainId = 8453 }
zkevm = { key = "${ETHERSCAN_API_KEY_ZKEVM}", chainId = 1101 }
gnosis = { key = "${ETHERSCAN_API_KEY_GNOSIS}", chainId = 100 }
bnb = { key = "${ETHERSCAN_API_KEY_BNB}", chainId = 56, url = 'https://api.bscscan.com/api' }
scroll = { key = "${ETHERSCAN_API_KEY_SCROLL}", chainId = 534352 }
zksync = { key = "${ETHERSCAN_API_KEY_ZK_SYNC}", chain = 324 }

# See more config options https://github.com/gakonst/foundry/tree/master/config
8 changes: 8 additions & 0 deletions verify.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"transactions": [
{
"hash": "0x47fc8c1fdbde4ce50c7eba7ac865ad6ce667fa17a4e033d019ba76c47438a5c7"
}
],
"chain": 1088
}

0 comments on commit e83675c

Please sign in to comment.