Skip to content

Commit

Permalink
Add unichain testnet support
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Oct 10, 2024
1 parent d88c8cc commit 0cc0359
Show file tree
Hide file tree
Showing 10 changed files with 307 additions and 303 deletions.
1 change: 1 addition & 0 deletions common/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const INITIAL_DEPLOYMENT_BLOCK_BY_NETWORK_AND_CHAIN: NetworkChainBlockMap
PolygonSepolia: '2379275',
Berachain: '1473347',
Snaxchain: '482557',
Unichain: '254961', // Block of contract creation
},
['Devnet']: {},
};
Expand Down
4 changes: 4 additions & 0 deletions common/src/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ export const explorerBlock = (network: Network, chainId: ChainId, block: string)
? `https://bartio.beratrail.io/block/${block}`
: chainId === chainToChainId('Snaxchain')
? `https://explorer-snaxchain-s50q0kjngn.t.conduit.xyz/${block}`
: chainId === chainToChainId('Unichain')
? `https://unichain-sepolia.blockscout.com/block/${block}`
: // : chainId === chainToChainId('Wormscan') <-- not supported on testnet dashboard
'';

Expand Down Expand Up @@ -259,6 +261,8 @@ export const explorerTx = (network: Network, chainId: ChainId, tx: string) =>
? `https://bartio.beratrail.io/tx/${tx}`
: chainId === chainToChainId('Snaxchain')
? `https://explorer-snaxchain-s50q0kjngn.t.conduit.xyz/tx/${tx}`
: chainId === chainToChainId('Unichain')
? `https://unichain-sepolia.blockscout.com/tx/${tx}`
: // chainId === chainToChainId('Wormscan') <-- not supported on testnet dashboard
'';

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": "^0.9.1",
"@wormhole-foundation/sdk-icons": "^0.10.10",
"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": "^0.10.6",
"@wormhole-foundation/sdk": "^0.10.10",
"@xpla/xpla.js": "^0.2.3",
"aptos": "1.5.0",
"dotenv": "^16.0.3",
Expand Down
584 changes: 289 additions & 295 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
},
"dependencies": {
"@google-cloud/functions-framework": "^3.4.0",
"@wormhole-foundation/sdk-base": "^0.10.6",
"@wormhole-foundation/sdk-definitions": "^0.10.6",
"@wormhole-foundation/sdk-evm": "^0.10.6",
"@wormhole-foundation/sdk-evm-core": "^0.10.6",
"@wormhole-foundation/sdk-solana": "^0.10.6",
"@wormhole-foundation/sdk-solana-core": "^0.10.6",
"@wormhole-foundation/sdk-base": "^0.10.10",
"@wormhole-foundation/sdk-definitions": "^0.10.10",
"@wormhole-foundation/sdk-evm": "^0.10.10",
"@wormhole-foundation/sdk-evm-core": "^0.10.10",
"@wormhole-foundation/sdk-icons": "^0.10.10",
"@wormhole-foundation/sdk-solana": "^0.10.10",
"@wormhole-foundation/sdk-solana-core": "^0.10.10",
"axios": "^1.5.0"
}
}
1 change: 1 addition & 0 deletions watcher/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const RPCS_BY_CHAIN: { [key in Network]: { [key in Chain]?: string } } =
PolygonSepolia: process.env.POLYGON_SEPOLIA_RPC || 'https://rpc-amoy.polygon.technology',
Berachain: process.env.BERACHAIN_RPC || 'https://bartio.rpc.berachain.com',
Snaxchain: process.env.SNAXCHAIN_RPC || 'https://rpc-snaxchain-s50q0kjngn.t.conduit.xyz',
Unichain: process.env.UNICHAIN_RPC || 'https://sepolia.unichain.org',
},
['Devnet']: {},
};
Expand Down
1 change: 1 addition & 0 deletions watcher/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const supportedChains: Chain[] =
'PolygonSepolia',
'Berachain',
'Snaxchain',
'Unichain',
]
: [
// This is the list of chains supported in MAINNET.
Expand Down
1 change: 1 addition & 0 deletions watcher/src/watchers/EVMWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class EVMWatcher extends Watcher {
chain === 'Klaytn' ||
chain === 'Scroll' ||
chain === 'Snaxchain' ||
chain === 'Unichain' ||
chain === 'Xlayer'
) {
this.maximumBatchSize = 10;
Expand Down
1 change: 1 addition & 0 deletions watcher/src/watchers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function makeFinalizedWatcher(network: Network, chainName: Chain): Watche
chainName === 'Xlayer' ||
chainName === 'Berachain' ||
chainName === 'Snaxchain' ||
chainName === 'Unichain' ||
chainName === 'Base'
) {
return new EVMWatcher(network, chainName);
Expand Down

0 comments on commit 0cc0359

Please sign in to comment.