Skip to content

Commit 517ec3e

Browse files
authored
Arbitrum fixes and improvements (#896)
* dapp: add arbitrum support to verify-contract * seth: support arbitrum rinkeby chain * seth: fix etherscan-source for arbitrum mainet * seth: add etherscan-source support for arbitrum rinkeby
1 parent 198a707 commit 517ec3e

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

src/dapp/libexec/dapp/dapp-verify-contract

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,16 @@ case "$chain" in
4545
export ETHERSCAN_API_URL=https://api.ftmscan.com/api
4646
export ETHERSCAN_URL=https://ftmscan.com/address
4747
;;
48+
arbitrum-mainnet)
49+
export ETHERSCAN_API_URL=https://api.arbiscan.io/api
50+
export ETHERSCAN_URL=https://arbiscan.io/address
51+
;;
52+
arbitrum-rinkeby)
53+
export ETHERSCAN_API_URL=https://api-testnet.arbiscan.io/api
54+
export ETHERSCAN_URL=https://testnet.arbiscan.io/address
55+
;;
4856
*)
49-
echo >&2 "Verification only works on mainnet, ropsten, kovan, rinkeby, goerli, polygon, and fantom."
57+
echo >&2 "Verification only works on mainnet, ropsten, kovan, rinkeby, goerli, polygon, fantom, and arbitrum."
5058
exit 1
5159
esac
5260

src/seth/libexec/seth/seth-chain

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ case $genesis in
2020
0x02adc9b449ff5f2467b8c674ece7ff9b21319d76c4ad62a67a70d552655927e5)
2121
echo optimism-kovan;;
2222
0x7ee576b35482195fc49205cec9af72ce14f003b9ae69f6ba0faef4514be8b442)
23-
echo arbitrum-mainnet;;
23+
# arbitrum mainnet and arbitrum rinkeby have the same genesis block
24+
# use the next block to discriminate between the two
25+
case $(seth block 1 hash 2>/dev/null || echo null) in
26+
0xe0594250efac73640aeff78ec40aaaaa87f91edb54e5af926ee71a32ef32da34)
27+
echo arbitrum-mainnet;;
28+
0x5b754d2c394d7e8852f5ef8ef97314cb4b566b027e5b943bee2b0b2d53fdc43e)
29+
echo arbitrum-rinkeby;;
30+
*)
31+
echo unknown;;
32+
esac;;
2433
0x0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303)
2534
echo morden;;
2635
0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177)

src/seth/libexec/seth/seth-etherscan-source

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ case "$chain" in
3636
URL="${ETHERSCAN_API_URL:-https://api-kovan-optimistic.etherscan.io/}"
3737
;;
3838
arbitrum-mainnet)
39-
URL="${ETHERSCAN_API_URL:-https://api.arbiscan.io/api}"
39+
URL="${ETHERSCAN_API_URL:-https://api.arbiscan.io}"
40+
;;
41+
arbitrum-rinkeby)
42+
URL="${ETHERSCAN_API_URL:-https://api-testnet.arbiscan.io}"
4043
;;
4144
bsctest)
4245
URL="${ETHERSCAN_API_URL:-https://api-testnet.bscscan.com}"

0 commit comments

Comments
 (0)