Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Scroll to mainnet #3615

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 17 additions & 0 deletions ethereum/.env.scroll.mainnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Scroll mainnet env
# Rename to .env to use with truffle migrations

# Wormhole Core Migrations
INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"]
INIT_CHAIN_ID=34
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
INIT_EVM_CHAIN_ID=534352

# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=34
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
# WETH: https://scrollscan.com/address/0x5300000000000000000000000000000000000004
BRIDGE_INIT_WETH=0x5300000000000000000000000000000000000004
BRIDGE_INIT_FINALITY=1
9 changes: 9 additions & 0 deletions ethereum/truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,15 @@ module.exports = {
},
network_id: 84532,
},
scroll: {
provider: () => {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://rpc.scroll.io"
);
},
network_id: 534352,
},
scroll_testnet: {
provider: () => {
return new HDWalletProvider(
Expand Down
5 changes: 0 additions & 5 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,11 +683,6 @@ func runNode(cmd *cobra.Command, args []string) {
logger.Fatal("Both --baseContract and --baseRPC must be set together or both unset")
}

// Scroll should not be allowed in mainnet until its finality policy is understood and implemented in the watcher.
if *scrollRPC != "" && !*testnetMode && !*unsafeDevMode {
logger.Fatal("scroll is currently only supported in devnet and testnet")
}

if (*scrollRPC == "") != (*scrollContract == "") {
logger.Fatal("Both --scrollContract and --scrollRPC must be set together or both unset")
}
Expand Down
2 changes: 2 additions & 0 deletions node/hack/repair_eth/repair_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var etherscanAPIMap = map[vaa.ChainID]string{
vaa.ChainIDArbitrum: "https://api.arbiscan.io",
vaa.ChainIDOptimism: "https://api-optimistic.etherscan.io",
vaa.ChainIDBase: "https://api.basescan.org",
vaa.ChainIDScroll: "https://api.scrollscan.com/",
}

var coreContractMap = map[vaa.ChainID]string{
Expand All @@ -64,6 +65,7 @@ var coreContractMap = map[vaa.ChainID]string{
vaa.ChainIDArbitrum: strings.ToLower("0xa5f208e072434bC67592E4C49C1B991BA79BCA46"),
vaa.ChainIDOptimism: strings.ToLower("0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"),
vaa.ChainIDBase: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDScroll: strings.ToLower("0x0000000000000000000000000000000000000000"), // Fill in the core bridge address
}

var (
Expand Down
1 change: 1 addition & 0 deletions node/pkg/governor/mainnet_chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func chainList() []chainConfigEntry {
{emitterChainID: vaa.ChainIDOptimism, dailyLimit: 5_000_000, bigTransactionSize: 500_000},
{emitterChainID: vaa.ChainIDXpla, dailyLimit: 500_000, bigTransactionSize: 50_000},
{emitterChainID: vaa.ChainIDBase, dailyLimit: 2_000_000, bigTransactionSize: 200_000},
{emitterChainID: vaa.ChainIDScroll, dailyLimit: 500_000, bigTransactionSize: 50_000},
{emitterChainID: vaa.ChainIDSei, dailyLimit: 5_000_000, bigTransactionSize: 500_000},
{emitterChainID: vaa.ChainIDWormchain, dailyLimit: 500_000, bigTransactionSize: 50_000},
}
Expand Down
2 changes: 1 addition & 1 deletion node/pkg/governor/mainnet_tokens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestTokenListChainTokensPresent(t *testing.T) {
}
}

if e != vaa.ChainIDXpla && e != vaa.ChainIDAptos && e != vaa.ChainIDArbitrum && e != vaa.ChainIDWormchain {
if e != vaa.ChainIDWormchain && e != vaa.ChainIDScroll {
assert.Equal(t, found, true)
}
})
Expand Down
1 change: 1 addition & 0 deletions sdk/js/src/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ const MAINNET = {
nft_bridge: undefined,
},
scroll: {
// Fill these in!
core: undefined,
token_bridge: undefined,
nft_bridge: undefined,
Expand Down
2 changes: 2 additions & 0 deletions sdk/mainnet_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ var knownTokenbridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDArbitrum: "0000000000000000000000000b2402144Bb366A632D14B83F244D2e0e21bD39c",
vaa.ChainIDOptimism: "0000000000000000000000001D68124e65faFC907325e3EDbF8c4d84499DAa8b",
vaa.ChainIDBase: "0000000000000000000000008d2de8d2f73F1F4cAB472AC9A881C9b123C79627",
vaa.ChainIDScroll: "0000000000000000000000000000000000000000000000000000000000000000", // Fill in the token bridge address
vaa.ChainIDXpla: "8f9cf727175353b17a5f574270e370776123d90fd74956ae4277962b4fdee24c",
vaa.ChainIDInjective: "00000000000000000000000045dbea4617971d93188eda21530bc6503d153313",
vaa.ChainIDSui: "ccceeb29348f71bdd22ffef43a2a19c1f5b5e17c5cca5411529120182672ade5",
Expand All @@ -143,6 +144,7 @@ var knownNFTBridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDArbitrum: "0000000000000000000000003dD14D553cFD986EAC8e3bddF629d82073e188c8",
vaa.ChainIDOptimism: "000000000000000000000000fE8cD454b4A1CA468B57D79c0cc77Ef5B6f64585",
vaa.ChainIDBase: "000000000000000000000000DA3adC6621B2677BEf9aD26598e6939CF0D92f88",
vaa.ChainIDScroll: "0000000000000000000000000000000000000000000000000000000000000000", // Fill in the NFT bridge address
vaa.ChainIDAptos: "0000000000000000000000000000000000000000000000000000000000000005",
}

Expand Down
Loading