Skip to content

Commit

Permalink
Add Unichain mainnet support
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Feb 11, 2025
1 parent ad5d6f4 commit 59b2369
Show file tree
Hide file tree
Showing 10 changed files with 457 additions and 318 deletions.
2 changes: 1 addition & 1 deletion common/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const INITIAL_DEPLOYMENT_BLOCK_BY_NETWORK_AND_CHAIN: NetworkChainBlockMap
Sei: '238594',
Wormchain: '4510119', // https://bigdipper.live/wormhole/transactions/4D861F1BE86325D227FA006CA2745BBC6748AF5B5E0811DE536D02792928472A },
Snaxchain: '306315',
Unichain: '8115676', // https://unichain.blockscout.com/tx/0x4d65e33abc388c2d92c71ea01374af935a6615d0e555a7abbdef6c44e04613ba
Worldchain: '5805110', // https://worldscan.org/tx/0x568eb14596296bda3022527cf0e915bfec073613b27c495e695fb9e08652f6fc
},
['Testnet']: {
Expand Down Expand Up @@ -88,7 +89,6 @@ export const INITIAL_DEPLOYMENT_BLOCK_BY_NETWORK_AND_CHAIN: NetworkChainBlockMap
Unichain: '254961', // Block of contract creation
Worldchain: '4487948', // Block of contract creation
Monad: '520060', // Block of contract creation
MonadDevnet: '3670467', // Block of contract creation
Ink: '1907965', // Block of contract creation
HyperEVM: '13743181', // Block of contract creation
},
Expand Down
8 changes: 4 additions & 4 deletions common/src/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export const explorerBlock = (network: Network, chainId: ChainId, block: string)
? `https://beratrail.io/block/${block}`
: chainId === chainToChainId('Snaxchain')
? `https://snaxchain.io/${block}`
: chainId === chainToChainId('Unichain')
? `https://unichain.blockscout.com/block/${block}`
: chainId === chainToChainId('Wormchain')
? `https://bigdipper.live/wormhole/blocks/${block}`
: chainId === chainToChainId('Worldchain')
Expand Down Expand Up @@ -142,8 +144,6 @@ export const explorerBlock = (network: Network, chainId: ChainId, block: string)
? `https://worldchain-sepolia.explorer.alchemy.com/block/${block}`
: chainId === chainToChainId('Monad')
? `${process.env.MONAD_EXPLORER_URL}/block/${block}`
: chainId === chainToChainId('MonadDevnet')
? `${process.env.MONAD_DEVNET_EXPLORER_URL}/block/${block}`
: chainId === chainToChainId('Ink')
? `https://explorer-sepolia.inkonchain.com/block/${block}`
: chainId === chainToChainId('HyperEVM')
Expand Down Expand Up @@ -215,6 +215,8 @@ export const explorerTx = (network: Network, chainId: ChainId, tx: string) =>
? `https://bartio.beratrail.io/tx/${tx}`
: chainId === chainToChainId('Snaxchain')
? `https://snaxchain.io/tx/${tx}`
: chainId === chainToChainId('Unichain')
? `https://unichain.blockscout.com/tx/${tx}`
: chainId === chainToChainId('Wormchain')
? `https://bigdipper.live/wormhole/transactions/${tx}`
: chainId === chainToChainId('Worldchain')
Expand Down Expand Up @@ -285,8 +287,6 @@ export const explorerTx = (network: Network, chainId: ChainId, tx: string) =>
? `https://worldchain-sepolia.explorer.alchemy.com/tx/${tx}`
: chainId === chainToChainId('Monad')
? `${process.env.MONAD_EXPLORER_URL}/tx/${tx}`
: chainId === chainToChainId('MonadDevnet')
? `${process.env.MONAD_DEVNET_EXPLORER_URL}/tx/${tx}`
: chainId === chainToChainId('Ink')
? `https://explorer-sepolia.inkonchain.com/tx/${tx}`
: chainId === chainToChainId('HyperEVM')
Expand Down
2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/node": "^18.6.4",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@wormhole-foundation/sdk-icons": "^1.4.4",
"@wormhole-foundation/sdk-icons": "^1.6.0",
"buffer": "^6.0.3",
"numeral": "^2.0.6",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@injectivelabs/sdk-ts": "^1.0.368",
"@mysten/sui.js": "^0.50.1",
"@terra-money/terra.js": "^3.1.3",
"@wormhole-foundation/sdk": "^1.4.4",
"@wormhole-foundation/sdk": "^1.6.0",
"@xpla/xpla.js": "^0.2.3",
"aptos": "1.5.0",
"dotenv": "^16.0.3",
Expand Down
741 changes: 441 additions & 300 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
},
"dependencies": {
"@google-cloud/functions-framework": "^3.4.0",
"@wormhole-foundation/sdk-base": "^1.4.4",
"@wormhole-foundation/sdk-definitions": "^1.4.4",
"@wormhole-foundation/sdk-evm": "^1.4.4",
"@wormhole-foundation/sdk-evm-core": "^1.4.4",
"@wormhole-foundation/sdk-icons": "^1.4.4",
"@wormhole-foundation/sdk-solana": "^1.4.4",
"@wormhole-foundation/sdk-solana-core": "^1.4.4",
"@wormhole-foundation/sdk-base": "^1.6.0",
"@wormhole-foundation/sdk-definitions": "^1.6.0",
"@wormhole-foundation/sdk-evm": "^1.6.0",
"@wormhole-foundation/sdk-evm-core": "^1.6.0",
"@wormhole-foundation/sdk-icons": "^1.6.0",
"@wormhole-foundation/sdk-solana": "^1.6.0",
"@wormhole-foundation/sdk-solana-core": "^1.6.0",
"axios": "^1.5.0"
}
}
2 changes: 1 addition & 1 deletion watcher/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const RPCS_BY_CHAIN: { [key in Network]: { [key in Chain]?: string } } =
Wormchain: process.env.WORMCHAIN_RPC || 'https://wormchain-rpc.quickapi.com',
Xlayer: process.env.XLAYER_RPC || 'https://rpc.ankr.com/xlayer',
Snaxchain: process.env.SNAXCHAIN_RPC || 'https://snaxchain.io',
Unichain: process.env.UNICHAIN_RPC, // TODO: There is no Unichain public endpoint yet.
Worldchain: process.env.WORLDCHAIN_RPC || 'https://worldchain-mainnet.g.alchemy.com/public',
},
['Testnet']: {
Expand Down Expand Up @@ -107,7 +108,6 @@ export const RPCS_BY_CHAIN: { [key in Network]: { [key in Chain]?: string } } =
Unichain: process.env.UNICHAIN_RPC || 'https://sepolia.unichain.org',
Worldchain: process.env.WORLDCHAIN_RPC || 'https://worldchain-sepolia.g.alchemy.com/public',
Monad: process.env.MONAD_RPC, // TODO: There is no Monad public endpoint.
MonadDevnet: process.env.MONAD_DEVNET_RPC, // TODO: There is no Monad Devnet public endpoint.
Ink: process.env.INK_RPC || 'https://rpc-qnd-sepolia.inkonchain.com',
HyperEVM: process.env.HYPER_EVM_RPC || 'https://api.hyperliquid-testnet.xyz/evm',
},
Expand Down
2 changes: 1 addition & 1 deletion watcher/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const supportedChains: Chain[] =
'Unichain',
'Worldchain',
'Monad',
'MonadDevnet',
'Ink',
'HyperEVM',
]
Expand Down Expand Up @@ -93,6 +92,7 @@ const supportedChains: Chain[] =
'Blast',
'Xlayer',
'Snaxchain',
'Unichain',
'Worldchain',
'Wormchain',
];
Expand Down
1 change: 0 additions & 1 deletion watcher/src/watchers/EVMWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class EVMWatcher extends Watcher {
chain === 'Unichain' ||
chain === 'Worldchain' ||
chain === 'Monad' ||
chain === 'MonadDevnet' ||
chain === 'Ink' ||
chain === 'HyperEVM' ||
chain === 'Seievm' ||
Expand Down
1 change: 0 additions & 1 deletion watcher/src/watchers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export function makeFinalizedWatcher(network: Network, chainName: Chain): Watche
chainName === 'Unichain' ||
chainName === 'Worldchain' ||
chainName === 'Monad' ||
chainName === 'MonadDevnet' ||
chainName === 'Ink' ||
chainName === 'HyperEVM' ||
chainName === 'Base'
Expand Down

0 comments on commit 59b2369

Please sign in to comment.