From c3c3df5c1600b6c533eab18330b5964b02fe7731 Mon Sep 17 00:00:00 2001 From: Bruce Riley Date: Thu, 10 Oct 2024 07:39:06 -0500 Subject: [PATCH] Unichain testnet support --- core/base/src/constants/chains.ts | 1 + core/base/src/constants/contracts/core.ts | 1 + .../src/constants/contracts/tokenBridge.ts | 1 + core/base/src/constants/finality.ts | 1 + core/base/src/constants/nativeChainIds.ts | 1 + core/base/src/constants/platforms.ts | 1 + core/icons/src/images/chains/Unichain.svg | 48 +++++++++++++++++++ 7 files changed, 54 insertions(+) create mode 100755 core/icons/src/images/chains/Unichain.svg diff --git a/core/base/src/constants/chains.ts b/core/base/src/constants/chains.ts index b37822e0c..08ceb99df 100644 --- a/core/base/src/constants/chains.ts +++ b/core/base/src/constants/chains.ts @@ -48,6 +48,7 @@ const chainIdAndChainEntries = [ [ 39, "Berachain" ], [ 40, "Seievm" ], [ 43, "Snaxchain" ], + [ 44, "Unichain" ], [ 3104, "Wormchain" ], [ 4000, "Cosmoshub" ], [ 4001, "Evmos" ], diff --git a/core/base/src/constants/contracts/core.ts b/core/base/src/constants/contracts/core.ts index 1c9e4ace4..342ea47ef 100644 --- a/core/base/src/constants/contracts/core.ts +++ b/core/base/src/constants/contracts/core.ts @@ -85,6 +85,7 @@ export const coreBridgeContracts = [[ ["Blast", "0x473e002D7add6fB67a4964F13bFd61280Ca46886"], ["Berachain", "0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"], ["Snaxchain", "0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"], + ["Unichain", "0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd"], ["Xlayer", "0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"], ["Linea", "0x79A1027a6A159502049F10906D333EC57E95F083"], ]], [ diff --git a/core/base/src/constants/contracts/tokenBridge.ts b/core/base/src/constants/contracts/tokenBridge.ts index 8bce358d0..bff76ace0 100644 --- a/core/base/src/constants/contracts/tokenBridge.ts +++ b/core/base/src/constants/contracts/tokenBridge.ts @@ -77,6 +77,7 @@ export const tokenBridgeContracts = [[ ["Xlayer", "0xdA91a06299BBF302091B053c6B9EF86Eff0f930D"], ["Berachain", "0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"], ["Snaxchain", "0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"], + ["Unichain", "0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"], ["Linea", "0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"], ]], [ "Devnet", [ diff --git a/core/base/src/constants/finality.ts b/core/base/src/constants/finality.ts index 64af98221..694655a5d 100644 --- a/core/base/src/constants/finality.ts +++ b/core/base/src/constants/finality.ts @@ -60,6 +60,7 @@ const finalityThresholds = [ ["Injective", 0], ["Berachain", 0], ["Snaxchain", 0], + ["Unichain", 0], ["Cosmoshub", 0], ["Evmos", 0], ["Kujira", 0], diff --git a/core/base/src/constants/nativeChainIds.ts b/core/base/src/constants/nativeChainIds.ts index 882540d44..94c3a7d8b 100644 --- a/core/base/src/constants/nativeChainIds.ts +++ b/core/base/src/constants/nativeChainIds.ts @@ -106,6 +106,7 @@ const chainNetworkNativeChainIdEntries = [ ["Scroll", 534351n], ["Berachain", 80084n], // Testnet v2 ["Snaxchain", 13001n], + ["Unichain", 1301n], ["Xlayer", 195n], ["Linea", 59141n], // Sepolia ], diff --git a/core/base/src/constants/platforms.ts b/core/base/src/constants/platforms.ts index 1862a6ed2..9d841b587 100644 --- a/core/base/src/constants/platforms.ts +++ b/core/base/src/constants/platforms.ts @@ -37,6 +37,7 @@ const platformAndChainsEntries = [[ "Berachain", "Seievm", "Snaxchain", + "Unichain", ]], [ "Solana", [ "Solana", diff --git a/core/icons/src/images/chains/Unichain.svg b/core/icons/src/images/chains/Unichain.svg new file mode 100755 index 000000000..fa31aeaa1 --- /dev/null +++ b/core/icons/src/images/chains/Unichain.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + +