From d46d6364b2206f582174f0ce0f4ac4899ec07c94 Mon Sep 17 00:00:00 2001 From: hernandp Date: Tue, 17 Dec 2024 15:39:12 -0300 Subject: [PATCH] linea: Added constants and env file --- .env.linea.mainnet | 23 +++++++++++++++++++++++ clients/js/src/consts/networks.ts | 6 +++--- sdk/js/src/utils/consts.ts | 4 ++-- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 .env.linea.mainnet diff --git a/.env.linea.mainnet b/.env.linea.mainnet new file mode 100644 index 0000000000..c3416d8e0e --- /dev/null +++ b/.env.linea.mainnet @@ -0,0 +1,23 @@ +# Linea mainnet env +# Rename to .env + +# Common config for forge deployment +RPC_URL=https://rpc.linea.build +FORGE_ARGS="--slow" + +# Wormhole Core Migrations +INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"] +INIT_CHAIN_ID=38 +INIT_GOV_CHAIN_ID=0x1 +INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 +INIT_EVM_CHAIN_ID=59144 + +# Bridge Migrations +BRIDGE_INIT_CHAIN_ID=38 +BRIDGE_INIT_GOV_CHAIN_ID=0x1 +BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004 + +# https://github.com/Consensys/linea-token-list/blob/main/json/linea-mainnet-token-shortlist.json#L826 +BRIDGE_INIT_WETH=0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f +BRIDGE_INIT_FINALITY=1 + diff --git a/clients/js/src/consts/networks.ts b/clients/js/src/consts/networks.ts index b857998373..03596deac3 100644 --- a/clients/js/src/consts/networks.ts +++ b/clients/js/src/consts/networks.ts @@ -188,9 +188,9 @@ const Mainnet = { chain_id: undefined, }, Linea: { - rpc: undefined, - key: undefined, - chain_id: undefined, + rpc: "https://rpc.linea.build", + key: getEnvVar("ETH_KEY"), + chain_id: 59144, }, Berachain: { rpc: undefined, diff --git a/sdk/js/src/utils/consts.ts b/sdk/js/src/utils/consts.ts index cd09a8c430..26d5b6c198 100644 --- a/sdk/js/src/utils/consts.ts +++ b/sdk/js/src/utils/consts.ts @@ -331,8 +331,8 @@ const MAINNET = { nft_bridge: undefined, }, linea: { - core: undefined, - token_bridge: undefined, + core: "0x0C56aebD76E6D9e4a1Ec5e94F4162B4CBbf77b32", + token_bridge: "0x167E0752de62cb76EFc0Fbb165Bd342c6e2Bb251", nft_bridge: undefined, }, berachain: {