Skip to content

Commit 1b16d04

Browse files
authored
feat (watcher): add linea mainnet (#4464)
* feat (watcher): add linea mainnet * chore: lint * add linea mainnet tokenbridge address * add linea to governor mainnet chains
1 parent a5b6105 commit 1b16d04

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

ethereum/env/.env.linea.mainnet

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Common config for forge deployment
2+
RPC_URL=https://rpc.linea.build
3+
FORGE_ARGS="--slow"
4+
5+
# Wormhole Core Migrations
6+
INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"]
7+
INIT_CHAIN_ID=38
8+
INIT_GOV_CHAIN_ID=0x1
9+
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
10+
INIT_EVM_CHAIN_ID=59144
11+
12+
# Bridge Migrations
13+
BRIDGE_INIT_CHAIN_ID=38
14+
BRIDGE_INIT_GOV_CHAIN_ID=0x1
15+
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
16+
17+
# https://github.com/Consensys/linea-token-list/blob/main/json/linea-mainnet-token-shortlist.json#L826
18+
BRIDGE_INIT_WETH=0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f
19+
BRIDGE_INIT_FINALITY=1

node/pkg/governor/mainnet_chains.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ func ChainList() []ChainConfigEntry {
3939
{EmitterChainID: vaa.ChainIDInk, DailyLimit: 500_000, BigTransactionSize: 50_000},
4040
{EmitterChainID: vaa.ChainIDMezo, DailyLimit: 500_000, BigTransactionSize: 50_000},
4141
{EmitterChainID: vaa.ChainIDXRPLEVM, DailyLimit: 500_000, BigTransactionSize: 50_000},
42+
{EmitterChainID: vaa.ChainIDLinea, DailyLimit: 500_000, BigTransactionSize: 50_000},
4243
}
4344
}

node/pkg/governor/mainnet_tokens_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ func TestGovernedChainHasGovernedAssets(t *testing.T) {
4646
vaa.ChainIDMezo: true,
4747
// TODO: Remove this once we have governed tokens for XRPLEVM.
4848
vaa.ChainIDXRPLEVM: true,
49+
// TODO: Remove this once we have governed tokens for Linea.
50+
vaa.ChainIDLinea: true,
4951
}
5052
if len(ignoredChains) > 0 {
5153
ignoredOutput := []string{}

node/pkg/watchers/evm/chain_config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ var (
8787

8888
vaa.ChainIDMantle: {Finalized: true, Safe: true, EvmChainID: 5000, PublicRPC: "https://mantle-rpc.publicnode.com", ContractAddr: "0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"},
8989
vaa.ChainIDXLayer: {Finalized: true, Safe: true, EvmChainID: 196, PublicRPC: "https://xlayerrpc.okx.com", ContractAddr: "0x194B123c5E96B9b2E49763619985790Dc241CAC0"},
90-
// vaa.ChainIDLinea: Not in Mainnet yet.
90+
// As of 9/06/2024 Linea supports polling for finalized but not safe.
91+
vaa.ChainIDLinea: {Finalized: true, Safe: false, EvmChainID: 59144, PublicRPC: "https://rpc.linea.build", ContractAddr: "0x0C56aebD76E6D9e4a1Ec5e94F4162B4CBbf77b32"},
9192
vaa.ChainIDBerachain: {Finalized: true, Safe: true, EvmChainID: 80094, PublicRPC: "https://berachain-rpc.publicnode.com", ContractAddr: "0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"},
9293
vaa.ChainIDSeiEVM: {Finalized: true, Safe: true, EvmChainID: 1329, PublicRPC: "https://evm-rpc.sei-apis.com", ContractAddr: "0xCa1D5a146B03f6303baF59e5AD5615ae0b9d146D"},
9394
// vaa.ChainIDEclipse: Not supported in the guardian.

node/pkg/watchers/evm/custom_consistency_level.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,14 @@ type CCLMap map[vaa.ChainID]string
6969

7070
var (
7171
// cclMainnetMap specifies the custom consistency level contracts for each mainnet chain.
72-
cclMainnetMap = CCLMap{}
72+
cclMainnetMap = CCLMap{
73+
vaa.ChainIDLinea: "0x6A4B4A882F5F0a447078b4Fd0b4B571A82371ec2",
74+
}
7375

7476
// cclTestnetMap specifies the custom consistency level contracts for each testnet chain.
75-
cclTestnetMap = CCLMap{}
77+
cclTestnetMap = CCLMap{
78+
vaa.ChainIDLinea: "0x6A4B4A882F5F0a447078b4Fd0b4B571A82371ec2",
79+
}
7680

7781
// cclDevnetMap specifies the custom consistency level contracts for each devnet chain.
7882
cclDevnetMap = CCLMap{

sdk/mainnet_consts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ var knownTokenbridgeEmitters = map[vaa.ChainID]string{
123123
vaa.ChainIDInk: "0000000000000000000000003Ff72741fd67D6AD0668d93B41a09248F4700560",
124124
vaa.ChainIDMezo: "000000000000000000000000F97B81E513f53c7a6B57Bd0b103a6c295b3096C5",
125125
vaa.ChainIDXRPLEVM: "00000000000000000000000047F5195163270345fb4d7B9319Eda8C64C75E278",
126+
vaa.ChainIDLinea: "000000000000000000000000167E0752de62cb76EFc0Fbb165Bd342c6e2Bb251",
126127
}
127128

128129
// KnownNFTBridgeEmitters is a list of well-known mainnet emitters for the NFT bridge.

0 commit comments

Comments
 (0)