From 447d2df000b9baad93dbb6253400ee59a59f84cf Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 9 Oct 2025 18:23:26 +0200 Subject: [PATCH 1/3] megaeth --- src/lib/config.ts | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/lib/config.ts b/src/lib/config.ts index 29b4436..64740ce 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -32,7 +32,8 @@ export const POLYMER_ORACLE = { sepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", baseSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", arbitrumSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", - optimismSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00" + optimismSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00", + megaethSepolia: "0x00d5b500ECa100F7cdeDC800eC631Aca00BaAC00" } as const; export const MAINNET = PUBLIC_DEPLOY_AS_MAINNET === "true"; @@ -161,6 +162,12 @@ export const coinList = MAINNET name: "weth", chain: "optimismSepolia", decimals: 18 + }, + { + address: `0x4eB2Bd7beE16F38B1F4a0A5796Fffd028b6040e9`, + name: "weth", + chain: "megaethSepolia", + decimals: 18 } ] as const); @@ -182,6 +189,10 @@ export function getIndexOf(token: Token) { export type coin = (typeof coinList)[number]["address"]; +export const megaethSepolia = { + id: 6342 +} + export const wormholeChainIds = { sepolia: 10002, arbitrumSepolia: 10003, @@ -195,7 +206,8 @@ export const polymerChainIds = { sepolia: sepolia.id, arbitrumSepolia: arbitrumSepolia.id, baseSepolia: baseSepolia.id, - optimismSepolia: optimismSepolia.id + optimismSepolia: optimismSepolia.id, + megaethSepolia: megaethSepolia.id } as const; export type Verifier = "wormhole" | "polymer"; @@ -206,7 +218,8 @@ export const chainMap = { arbitrum, sepolia, optimismSepolia, - baseSepolia + baseSepolia, + megaethSepolia } as const; export const chains = Object.keys(chainMap) as (keyof typeof chainMap)[]; export type chain = (typeof chains)[number]; @@ -324,6 +337,12 @@ export const clients = { http("https://optimism-sepolia-rpc.publicnode.com"), ...optimismSepolia.rpcUrls.default.http.map((v) => http(v)) ]) + }), + megaethSepolia: createPublicClient({ + // chain: megaethSepolia, + transport: fallback([ + http("https://carrot.megaeth.com/rpc") + ]) }) } as const; From 29786186440a8102f683f63c08ccdbb45a0770cc Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 9 Oct 2025 18:30:32 +0200 Subject: [PATCH 2/3] Fix megaeth definition --- src/lib/config.ts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/lib/config.ts b/src/lib/config.ts index 64740ce..eb20fdc 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -190,8 +190,21 @@ export function getIndexOf(token: Token) { export type coin = (typeof coinList)[number]["address"]; export const megaethSepolia = { - id: 6342 -} + id: 6342, + name: 'MegaETH Sepolia', + blockTime: 10, + nativeCurrency: { + name: 'MegaETH Testnet Ether', + symbol: 'ETH', + decimals: 18, + }, + rpcUrls: { + default: { + http: ['https://carrot.megaeth.com/rpc'], + }, + }, + testnet: true, +}; export const wormholeChainIds = { sepolia: 10002, @@ -339,10 +352,8 @@ export const clients = { ]) }), megaethSepolia: createPublicClient({ - // chain: megaethSepolia, - transport: fallback([ - http("https://carrot.megaeth.com/rpc") - ]) + // chain: megaethSepolia, + transport: fallback([http("https://carrot.megaeth.com/rpc")]) }) } as const; From f71cab6476c9625fbcc8fa9d74227dfe93f69fd5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 9 Oct 2025 18:31:16 +0200 Subject: [PATCH 3/3] Set megaeth in node --- src/lib/config.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/config.ts b/src/lib/config.ts index eb20fdc..147e99f 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -191,19 +191,19 @@ export type coin = (typeof coinList)[number]["address"]; export const megaethSepolia = { id: 6342, - name: 'MegaETH Sepolia', - blockTime: 10, - nativeCurrency: { - name: 'MegaETH Testnet Ether', - symbol: 'ETH', - decimals: 18, - }, - rpcUrls: { - default: { - http: ['https://carrot.megaeth.com/rpc'], - }, - }, - testnet: true, + name: "MegaETH Sepolia", + blockTime: 10, + nativeCurrency: { + name: "MegaETH Testnet Ether", + symbol: "ETH", + decimals: 18 + }, + rpcUrls: { + default: { + http: ["https://carrot.megaeth.com/rpc"] + } + }, + testnet: true }; export const wormholeChainIds = { @@ -352,7 +352,7 @@ export const clients = { ]) }), megaethSepolia: createPublicClient({ - // chain: megaethSepolia, + chain: megaethSepolia, transport: fallback([http("https://carrot.megaeth.com/rpc")]) }) } as const;