Skip to content

Commit 59b2369

Browse files
committed
Add Unichain mainnet support
1 parent ad5d6f4 commit 59b2369

File tree

10 files changed

+457
-318
lines changed

10 files changed

+457
-318
lines changed

common/src/consts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const INITIAL_DEPLOYMENT_BLOCK_BY_NETWORK_AND_CHAIN: NetworkChainBlockMap
5050
Sei: '238594',
5151
Wormchain: '4510119', // https://bigdipper.live/wormhole/transactions/4D861F1BE86325D227FA006CA2745BBC6748AF5B5E0811DE536D02792928472A },
5252
Snaxchain: '306315',
53+
Unichain: '8115676', // https://unichain.blockscout.com/tx/0x4d65e33abc388c2d92c71ea01374af935a6615d0e555a7abbdef6c44e04613ba
5354
Worldchain: '5805110', // https://worldscan.org/tx/0x568eb14596296bda3022527cf0e915bfec073613b27c495e695fb9e08652f6fc
5455
},
5556
['Testnet']: {
@@ -88,7 +89,6 @@ export const INITIAL_DEPLOYMENT_BLOCK_BY_NETWORK_AND_CHAIN: NetworkChainBlockMap
8889
Unichain: '254961', // Block of contract creation
8990
Worldchain: '4487948', // Block of contract creation
9091
Monad: '520060', // Block of contract creation
91-
MonadDevnet: '3670467', // Block of contract creation
9292
Ink: '1907965', // Block of contract creation
9393
HyperEVM: '13743181', // Block of contract creation
9494
},

common/src/explorer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ export const explorerBlock = (network: Network, chainId: ChainId, block: string)
7272
? `https://beratrail.io/block/${block}`
7373
: chainId === chainToChainId('Snaxchain')
7474
? `https://snaxchain.io/${block}`
75+
: chainId === chainToChainId('Unichain')
76+
? `https://unichain.blockscout.com/block/${block}`
7577
: chainId === chainToChainId('Wormchain')
7678
? `https://bigdipper.live/wormhole/blocks/${block}`
7779
: chainId === chainToChainId('Worldchain')
@@ -142,8 +144,6 @@ export const explorerBlock = (network: Network, chainId: ChainId, block: string)
142144
? `https://worldchain-sepolia.explorer.alchemy.com/block/${block}`
143145
: chainId === chainToChainId('Monad')
144146
? `${process.env.MONAD_EXPLORER_URL}/block/${block}`
145-
: chainId === chainToChainId('MonadDevnet')
146-
? `${process.env.MONAD_DEVNET_EXPLORER_URL}/block/${block}`
147147
: chainId === chainToChainId('Ink')
148148
? `https://explorer-sepolia.inkonchain.com/block/${block}`
149149
: chainId === chainToChainId('HyperEVM')
@@ -215,6 +215,8 @@ export const explorerTx = (network: Network, chainId: ChainId, tx: string) =>
215215
? `https://bartio.beratrail.io/tx/${tx}`
216216
: chainId === chainToChainId('Snaxchain')
217217
? `https://snaxchain.io/tx/${tx}`
218+
: chainId === chainToChainId('Unichain')
219+
? `https://unichain.blockscout.com/tx/${tx}`
218220
: chainId === chainToChainId('Wormchain')
219221
? `https://bigdipper.live/wormhole/transactions/${tx}`
220222
: chainId === chainToChainId('Worldchain')
@@ -285,8 +287,6 @@ export const explorerTx = (network: Network, chainId: ChainId, tx: string) =>
285287
? `https://worldchain-sepolia.explorer.alchemy.com/tx/${tx}`
286288
: chainId === chainToChainId('Monad')
287289
? `${process.env.MONAD_EXPLORER_URL}/tx/${tx}`
288-
: chainId === chainToChainId('MonadDevnet')
289-
? `${process.env.MONAD_DEVNET_EXPLORER_URL}/tx/${tx}`
290290
: chainId === chainToChainId('Ink')
291291
? `https://explorer-sepolia.inkonchain.com/tx/${tx}`
292292
: chainId === chainToChainId('HyperEVM')

dashboard/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@types/node": "^18.6.4",
1818
"@types/react": "^18.0.15",
1919
"@types/react-dom": "^18.0.6",
20-
"@wormhole-foundation/sdk-icons": "^1.4.4",
20+
"@wormhole-foundation/sdk-icons": "^1.6.0",
2121
"buffer": "^6.0.3",
2222
"numeral": "^2.0.6",
2323
"react": "^18.2.0",

database/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@injectivelabs/sdk-ts": "^1.0.368",
1616
"@mysten/sui.js": "^0.50.1",
1717
"@terra-money/terra.js": "^3.1.3",
18-
"@wormhole-foundation/sdk": "^1.4.4",
18+
"@wormhole-foundation/sdk": "^1.6.0",
1919
"@xpla/xpla.js": "^0.2.3",
2020
"aptos": "1.5.0",
2121
"dotenv": "^16.0.3",

package-lock.json

+441-300
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
},
2626
"dependencies": {
2727
"@google-cloud/functions-framework": "^3.4.0",
28-
"@wormhole-foundation/sdk-base": "^1.4.4",
29-
"@wormhole-foundation/sdk-definitions": "^1.4.4",
30-
"@wormhole-foundation/sdk-evm": "^1.4.4",
31-
"@wormhole-foundation/sdk-evm-core": "^1.4.4",
32-
"@wormhole-foundation/sdk-icons": "^1.4.4",
33-
"@wormhole-foundation/sdk-solana": "^1.4.4",
34-
"@wormhole-foundation/sdk-solana-core": "^1.4.4",
28+
"@wormhole-foundation/sdk-base": "^1.6.0",
29+
"@wormhole-foundation/sdk-definitions": "^1.6.0",
30+
"@wormhole-foundation/sdk-evm": "^1.6.0",
31+
"@wormhole-foundation/sdk-evm-core": "^1.6.0",
32+
"@wormhole-foundation/sdk-icons": "^1.6.0",
33+
"@wormhole-foundation/sdk-solana": "^1.6.0",
34+
"@wormhole-foundation/sdk-solana-core": "^1.6.0",
3535
"axios": "^1.5.0"
3636
}
3737
}

watcher/src/consts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const RPCS_BY_CHAIN: { [key in Network]: { [key in Chain]?: string } } =
6363
Wormchain: process.env.WORMCHAIN_RPC || 'https://wormchain-rpc.quickapi.com',
6464
Xlayer: process.env.XLAYER_RPC || 'https://rpc.ankr.com/xlayer',
6565
Snaxchain: process.env.SNAXCHAIN_RPC || 'https://snaxchain.io',
66+
Unichain: process.env.UNICHAIN_RPC, // TODO: There is no Unichain public endpoint yet.
6667
Worldchain: process.env.WORLDCHAIN_RPC || 'https://worldchain-mainnet.g.alchemy.com/public',
6768
},
6869
['Testnet']: {
@@ -107,7 +108,6 @@ export const RPCS_BY_CHAIN: { [key in Network]: { [key in Chain]?: string } } =
107108
Unichain: process.env.UNICHAIN_RPC || 'https://sepolia.unichain.org',
108109
Worldchain: process.env.WORLDCHAIN_RPC || 'https://worldchain-sepolia.g.alchemy.com/public',
109110
Monad: process.env.MONAD_RPC, // TODO: There is no Monad public endpoint.
110-
MonadDevnet: process.env.MONAD_DEVNET_RPC, // TODO: There is no Monad Devnet public endpoint.
111111
Ink: process.env.INK_RPC || 'https://rpc-qnd-sepolia.inkonchain.com',
112112
HyperEVM: process.env.HYPER_EVM_RPC || 'https://api.hyperliquid-testnet.xyz/evm',
113113
},

watcher/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ const supportedChains: Chain[] =
5858
'Unichain',
5959
'Worldchain',
6060
'Monad',
61-
'MonadDevnet',
6261
'Ink',
6362
'HyperEVM',
6463
]
@@ -93,6 +92,7 @@ const supportedChains: Chain[] =
9392
'Blast',
9493
'Xlayer',
9594
'Snaxchain',
95+
'Unichain',
9696
'Worldchain',
9797
'Wormchain',
9898
];

watcher/src/watchers/EVMWatcher.ts

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export class EVMWatcher extends Watcher {
5151
chain === 'Unichain' ||
5252
chain === 'Worldchain' ||
5353
chain === 'Monad' ||
54-
chain === 'MonadDevnet' ||
5554
chain === 'Ink' ||
5655
chain === 'HyperEVM' ||
5756
chain === 'Seievm' ||

watcher/src/watchers/utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export function makeFinalizedWatcher(network: Network, chainName: Chain): Watche
4646
chainName === 'Unichain' ||
4747
chainName === 'Worldchain' ||
4848
chainName === 'Monad' ||
49-
chainName === 'MonadDevnet' ||
5049
chainName === 'Ink' ||
5150
chainName === 'HyperEVM' ||
5251
chainName === 'Base'

0 commit comments

Comments
 (0)