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

Add Monad Devnet support #726

Merged
merged 2 commits into from
Oct 24, 2024
Merged
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
1 change: 1 addition & 0 deletions core/base/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const chainIdAndChainEntries = [
[10005, "OptimismSepolia"],
[10006, "Holesky" ],
[10007, "PolygonSepolia" ],
[10008, "MonadDevnet" ],
] as const satisfies MapLevel<number, string>;

export const [chainIds, chains] = zip(chainIdAndChainEntries);
Expand Down
1 change: 1 addition & 0 deletions core/base/src/constants/contracts/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const coreBridgeContracts = [[
["Worldchain", "0xe5E02cD12B6FcA153b0d7fF4bF55730AE7B3C93A"],
["Xlayer", "0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"],
["Linea", "0x79A1027a6A159502049F10906D333EC57E95F083"],
["MonadDevnet", "0x376428e7f26D5867e69201b275553C45B09EE090"],
]], [
"Devnet", [
["Solana", "Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"],
Expand Down
9 changes: 5 additions & 4 deletions core/base/src/constants/finality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ const finalityThresholds = [
["Terra2", 0],
["Xpla", 0],
["Injective", 0],
["Berachain", 0],
["Snaxchain", 0],
["Unichain", 0],
["Worldchain",0],
["Berachain", 1],
["Snaxchain", 512],
["Unichain", 512],
["Worldchain",512],
["Cosmoshub", 0],
["Evmos", 0],
["Kujira", 0],
Expand All @@ -76,6 +76,7 @@ const finalityThresholds = [
["BaseSepolia", 512],
["OptimismSepolia", 512],
["PolygonSepolia", 32],
["MonadDevnet", 1],
] as const satisfies MapLevel<Chain, number>;

/**
Expand Down
1 change: 1 addition & 0 deletions core/base/src/constants/nativeChainIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const chainNetworkNativeChainIdEntries = [
["Worldchain", 4801n],
["Xlayer", 195n],
["Linea", 59141n], // Sepolia
["MonadDevnet", 41454n],
],
],
[
Expand Down
1 change: 1 addition & 0 deletions core/base/src/constants/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const platformAndChainsEntries = [[
"Snaxchain",
"Unichain",
"Worldchain",
"MonadDevnet",
]], [
"Solana", [
"Solana",
Expand Down
1 change: 1 addition & 0 deletions core/base/src/constants/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const rpcConfig = [[
["Snaxchain", "https://testnet.snaxchain.io"],
["Unichain", "https://sepolia.unichain.org"],
["Worldchain", "https://worldchain-sepolia.g.alchemy.com/public"],
["MonadDevnet", ""], // TODO: No public rpc is currently available, override with a custom rpc for now.
]], [
"Devnet", [
["Ethereum", "http://eth-devnet:8545"],
Expand Down
5 changes: 5 additions & 0 deletions core/icons/src/constants/chainIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ export function chainToIcon(chain: Chain): string {
PREFIX +
"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjMkE3REUxIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNjUuMjMzIDIuNTQ1YTE5LjI5OCAxOS4yOTggMCAwIDAtMTkuMTU2IDBsLTIwNS41IDExOC43MzRBMTkuMDIgMTkuMDIgMCAwIDAgMzEgMTM3Ljc1OHYyMzcuNDdhMTkuMDE3IDE5LjAxNyAwIDAgMCA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ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTUuOTk5OSAwQzExLjM3OTUgMCAwIDExLjM3OTIgMCAxNS45OTk5QzAgMjAuNjIwNiAxMS4zNzk1IDMyIDE1Ljk5OTkgMzJDMjAuNjIwMyAzMiAzMiAyMC42MjA0IDMyIDE1Ljk5OTlDMzIgMTEuMzc5NCAyMC42MjA1IDAgMTUuOTk5OSAwWk0xMy41MDY2IDI1LjE0OTJDMTEuNTU4MiAyNC42MTgzIDYuMzE5ODEgMTUuNDU1IDYuODUwODMgMTMuNTA2NkM3LjM4MTg1IDExLjU1ODEgMTYuNTQ1IDYuMzE5NzkgMTguNDkzMyA2Ljg1MDhDMjAuNDQxOCA3LjM4MTczIDI1LjY4MDIgMTYuNTQ0OSAyNS4xNDkyIDE4LjQ5MzRDMjQuNjE4MiAyMC40NDE4IDE1LjQ1NSAyNS42ODAyIDEzLjUwNjYgMjUuMTQ5MloiIGZpbGw9IiM4MzZFRjkiLz48L3N2Zz4="
);
} else {
// This case is never reached
const _: never = chain;
Expand Down
3 changes: 3 additions & 0 deletions core/icons/src/images/chains/MonadDevnet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading