From 0f188340d26a23ebd9b0c9f7d51209603cea4c4e Mon Sep 17 00:00:00 2001 From: Bruce Riley Date: Tue, 17 Dec 2024 10:35:13 -0600 Subject: [PATCH] Add Noble support --- core/base/src/constants/chains.ts | 1 + core/base/src/constants/finality.ts | 1 + core/base/src/constants/nativeChainIds.ts | 1 + core/base/src/constants/platforms.ts | 3 ++- core/base/src/constants/rpc.ts | 1 + core/icons/src/constants/chainIcons.ts | 5 +++++ core/icons/src/images/chains/Noble.svg | 11 +++++++++++ platforms/cosmwasm/src/constants.ts | 3 +++ 8 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 core/icons/src/images/chains/Noble.svg diff --git a/core/base/src/constants/chains.ts b/core/base/src/constants/chains.ts index 6cb8ce014..07b5e13ca 100644 --- a/core/base/src/constants/chains.ts +++ b/core/base/src/constants/chains.ts @@ -61,6 +61,7 @@ const chainIdAndChainEntries = [ [ 4006, "Seda" ], [ 4007, "Dymension" ], [ 4008, "Provenance" ], + [ 4009, "Noble" ], [10002, "Sepolia" ], [10003, "ArbitrumSepolia"], [10004, "BaseSepolia" ], diff --git a/core/base/src/constants/finality.ts b/core/base/src/constants/finality.ts index b7963a67a..7d67e5e9d 100644 --- a/core/base/src/constants/finality.ts +++ b/core/base/src/constants/finality.ts @@ -71,6 +71,7 @@ const finalityThresholds = [ ["Stargaze", 0], ["Dymension", 0], ["Provenance",0], + ["Noble", 0], // Testnets ["Sepolia", 72], ["ArbitrumSepolia", 4096], diff --git a/core/base/src/constants/nativeChainIds.ts b/core/base/src/constants/nativeChainIds.ts index dabb83b03..1cd900304 100644 --- a/core/base/src/constants/nativeChainIds.ts +++ b/core/base/src/constants/nativeChainIds.ts @@ -48,6 +48,7 @@ const chainNetworkNativeChainIdEntries = [ ["Celestia", "celestia"], ["Dymension", "dymension_1100-1"], ["Provenance","pio-mainnet-1"], + ["Noble", "noble-1"], ["Xlayer", 196n], ["Mantle", 5000n], ["Scroll", 534352n], diff --git a/core/base/src/constants/platforms.ts b/core/base/src/constants/platforms.ts index 919b7598b..a3d589a1a 100644 --- a/core/base/src/constants/platforms.ts +++ b/core/base/src/constants/platforms.ts @@ -62,7 +62,8 @@ const platformAndChainsEntries = [[ "Stargaze", "Celestia", "Seda", - "Provenance" + "Provenance", + "Noble" ]], [ "Btc", [ "Btc" diff --git a/core/base/src/constants/rpc.ts b/core/base/src/constants/rpc.ts index 30aa6bcc1..4ca2c3a82 100644 --- a/core/base/src/constants/rpc.ts +++ b/core/base/src/constants/rpc.ts @@ -38,6 +38,7 @@ const rpcConfig = [[ ["Neutron", "https://neutron-rpc.polkachu.com/"], ["Blast", "https://rpc.blast.io"], ["Provenance","https://rpc.provenance.io/"], + ["Noble", "https://noble-rpc.polkachu.com/"], ["Linea", "https://rpc.linea.build"], ["Scroll", "https://rpc.ankr.com/scroll"], ["Xlayer", "https://xlayerrpc.okx.com/"], diff --git a/core/icons/src/constants/chainIcons.ts b/core/icons/src/constants/chainIcons.ts index fe7acbae6..eb10ae0cd 100644 --- a/core/icons/src/constants/chainIcons.ts +++ b/core/icons/src/constants/chainIcons.ts @@ -260,6 +260,11 @@ export function chainToIcon(chain: Chain): string { PREFIX + "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjMkE3REUxIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNjUuMjMzIDIuNTQ1YTE5LjI5OCAxOS4yOTggMCAwIDAtMTkuMTU2IDBsLTIwNS41IDExOC43MzRBMTkuMDIgMTkuMDIgMCAwIDAgMzEgMTM3Ljc1OHYyMzcuNDdhMTkuMDE3IDE5LjAxNyAwIDAgMCA5LjU3OCAxNi40NzlsODMuMjQyIDQ4LjE3VjE5OS4xNjhhMTkuMjkxIDE5LjI5MSAwIDAgMSA5LjAxNC0xNi4wNTdsNTYuMzQtMzQuOTMgNTYuMzQtMzQuNT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ljc3OUM0MDUuNDc0IDQ0OC45OTYgNDI2LjU4NCA0MzIuOTkxIDQ0MS43NzQgNDExLjUyMkM0NTYuOTQ0IDM5MC4wNDQgNDY0Ljk4MSAzNjQuODEgNDY1IDMzOC41MjdWMTg0LjUxOUM0NjQuOTgxIDE3MS4zMSA0NTkuODE3IDE1OC44ODcgNDUwLjQ3IDE0OS41MzFaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNl8yMDIpIi8+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzZfMjAyIiB4MT0iMTIwLjQ0MSIgeTE9IjQ2Mi41NjIiIHgyPSI0NjMuMTA5IiB5Mj0iOTUuNDYzNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMC4wNSIgc3RvcC1jb2xvcj0id2hpdGUiLz48c3RvcCBvZmZzZXQ9IjAuMzgiIHN0b3AtY29sb3I9IiNBN0IzRkYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM3NEE0RkYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=" + ); } else if (chain === "MonadDevnet") { return ( PREFIX + diff --git a/core/icons/src/images/chains/Noble.svg b/core/icons/src/images/chains/Noble.svg new file mode 100755 index 000000000..6dd700eed --- /dev/null +++ b/core/icons/src/images/chains/Noble.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/platforms/cosmwasm/src/constants.ts b/platforms/cosmwasm/src/constants.ts index f3f40b388..294cfaf02 100644 --- a/platforms/cosmwasm/src/constants.ts +++ b/platforms/cosmwasm/src/constants.ts @@ -42,6 +42,7 @@ const cosmwasmAddressPrefix = [ ["Neutron", "neutron"], ["Seda", "seda"], ["Provenance", "pb"], + ["Noble", "noble"], ] as const satisfies RoArray; export const chainToAddressPrefix = constMap(cosmwasmAddressPrefix); @@ -66,6 +67,7 @@ const cosmwasmNativeDenom = [ ["Stargaze", "ustars"], ["Neutron", "untrn"], ["Provenance", "nhash"], + ["Noble", "uusdc"], ], ], [ @@ -214,6 +216,7 @@ const avgPrices = [ ["Evmos", "25000000000"], ["Dymension", "5000000000"], ["Provenance", "2100"], + ["Noble", "0.1"], ], ], ] as const satisfies RoArray]>;