Skip to content

Commit

Permalink
Add Noble support (#759)
Browse files Browse the repository at this point in the history
* Add Noble support

* Add Noble testnet support
  • Loading branch information
bruce-riley authored Dec 18, 2024
1 parent 07f2c8b commit 2a49af9
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/base/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const chainIdAndChainEntries = [
[ 4006, "Seda" ],
[ 4007, "Dymension" ],
[ 4008, "Provenance" ],
[ 4009, "Noble" ],
[10002, "Sepolia" ],
[10003, "ArbitrumSepolia"],
[10004, "BaseSepolia" ],
Expand Down
1 change: 1 addition & 0 deletions core/base/src/constants/finality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const finalityThresholds = [
["Stargaze", 0],
["Dymension", 0],
["Provenance",0],
["Noble", 0],
// Testnets
["Sepolia", 72],
["ArbitrumSepolia", 4096],
Expand Down
2 changes: 2 additions & 0 deletions core/base/src/constants/nativeChainIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -102,6 +103,7 @@ const chainNetworkNativeChainIdEntries = [
["Neutron", "pion-1"],
["Celestia", "mocha-4"],
["Seda", "seda-1-testnet"],
["Noble", "grand-1"],
["Blast", 168587773n], // Sepolia testnet
["Mantle", 5003n], // Sepolia testnet
["Scroll", 534351n],
Expand Down
3 changes: 2 additions & 1 deletion core/base/src/constants/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const platformAndChainsEntries = [[
"Stargaze",
"Celestia",
"Seda",
"Provenance"
"Provenance",
"Noble"
]], [
"Btc", [
"Btc"
Expand Down
2 changes: 2 additions & 0 deletions core/base/src/constants/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/"],
Expand Down Expand Up @@ -94,6 +95,7 @@ const rpcConfig = [[
["Worldchain", "https://worldchain-sepolia.g.alchemy.com/public"],
["Ink", "https://rpc-qnd-sepolia.inkonchain.com"],
["MonadDevnet", ""], // TODO: No public rpc is currently available, override with a custom rpc for now.
["Noble", "https://noble-testnet-rpc.polkachu.com/"],
]], [
"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 @@ -260,6 +260,11 @@ export function chainToIcon(chain: Chain): string {
PREFIX +
"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjMkE3REUxIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNjUuMjMzIDIuNTQ1YTE5LjI5OCAxOS4yOTggMCAwIDAtMTkuMTU2IDBsLTIwNS41IDExOC43MzRBMTkuMDIgMTkuMDIgMCAwIDAgMzEgMTM3Ljc1OHYyMzcuNDdhMTkuMDE3IDE5LjAxNyAwIDAgMCA5LjU3OCAxNi40NzlsODMuMjQyIDQ4LjE3VjE5OS4xNjhhMTkuMjkxIDE5LjI5MSAwIDAgMSA5LjAxNC0xNi4wNTdsNTYuMzQtMzQuOTMgNTYuMzQtMzQuNTA4YTE5LjAyMiAxOS4wMjIgMCAwIDEgMjAgMGw1Ni4zNCAzNC41MDggNTYuMzQgMzQu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yMkM0NTYuOTQ0IDM5MC4wNDQgNDY0Ljk4MSAzNjQuODEgNDY1IDMzOC41MjdWMTg0LjUxOUM0NjQuOTgxIDE3MS4zMSA0NTkuODE3IDE1OC44ODcgNDUwLjQ3IDE0OS41MzFaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNl8yMDIpIi8+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzZfMjAyIiB4MT0iMTIwLjQ0MSIgeTE9IjQ2Mi41NjIiIHgyPSI0NjMuMTA5IiB5Mj0iOTUuNDYzNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMC4wNSIgc3RvcC1jb2xvcj0id2hpdGUiLz48c3RvcCBvZmZzZXQ9IjAuMzgiIHN0b3AtY29sb3I9IiNBN0IzRkYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM3NEE0RkYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4="
);
} else if (chain === "MonadDevnet") {
return (
PREFIX +
Expand Down
11 changes: 11 additions & 0 deletions core/icons/src/images/chains/Noble.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions platforms/cosmwasm/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const cosmwasmAddressPrefix = [
["Neutron", "neutron"],
["Seda", "seda"],
["Provenance", "pb"],
["Noble", "noble"],
] as const satisfies RoArray<readonly [CosmwasmChains, string]>;

export const chainToAddressPrefix = constMap(cosmwasmAddressPrefix);
Expand All @@ -66,6 +67,7 @@ const cosmwasmNativeDenom = [
["Stargaze", "ustars"],
["Neutron", "untrn"],
["Provenance", "nhash"],
["Noble", "uusdc"],
],
],
[
Expand Down Expand Up @@ -214,6 +216,7 @@ const avgPrices = [
["Evmos", "25000000000"],
["Dymension", "5000000000"],
["Provenance", "2100"],
["Noble", "0.1"],
],
],
] as const satisfies RoArray<readonly [Network, RoArray<readonly [CosmwasmChains, string]>]>;
Expand Down

0 comments on commit 2a49af9

Please sign in to comment.