Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/selfish-flowers-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
1 change: 1 addition & 0 deletions chains/arbitrum-nova.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://nova.arbitrum.io/rpc"
}
],
"skipProviderCheck": true,
"symbol": "ETH",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/aurora-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"rpcUrl": "https://testnet.aurora.dev/"
}
],
"skipProviderCheck": true,
"symbol": "ETH",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/aurora.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"rpcUrl": "https://mainnet.aurora.dev/"
}
],
"skipProviderCheck": true,
"symbol": "ETH",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/boba-bnb.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://replica.bnb.boba.network/"
}
],
"skipProviderCheck": true,
"symbol": "BOBA",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/boba-ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://lightning-replica.boba.network/"
}
],
"skipProviderCheck": true,
"symbol": "BOBA",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/bsquared-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://b2-testnet.alt.technology"
}
],
"skipProviderCheck": true,
"symbol": "BTC",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/bsquared.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"rpcUrl": "https://b2-mainnet.alt.technology"
}
],
"skipProviderCheck": true,
"symbol": "BTC",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/canto-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://canto-testnet.plexnode.wtf/"
}
],
"skipProviderCheck": true,
"symbol": "CANTO",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/canto.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"rpcUrl": "https://canto.gravitychain.io/"
}
],
"skipProviderCheck": true,
"symbol": "CANTO",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/cronos-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://evm-t3.cronos.org"
}
],
"skipProviderCheck": true,
"symbol": "CRO",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/godwoken-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://v1.testnet.godwoken.io/rpc"
}
],
"skipProviderCheck": true,
"symbol": "pCKB",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/godwoken.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://v1.mainnet.godwoken.io/rpc"
}
],
"skipProviderCheck": true,
"symbol": "pCKB",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/meld-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://testnet-rpc.meld.com/"
}
],
"skipProviderCheck": true,
"symbol": "MELD",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/meld.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://rpc-1.meld.com/"
}
],
"skipProviderCheck": true,
"symbol": "MELD",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/meter-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://rpctest.meter.io/"
}
],
"skipProviderCheck": true,
"symbol": "MTR",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/meter.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"homepageUrl": "https://blockpi.io"
}
],
"skipProviderCheck": true,
"symbol": "MTR",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/milkomeda-c1-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://rpc-devnet-cardano-evm.c1.milkomeda.com"
}
],
"skipProviderCheck": true,
"symbol": "ADA",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/milkomeda-c1.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://rpc-mainnet-cardano-evm.c1.milkomeda.com"
}
],
"skipProviderCheck": true,
"symbol": "ADA",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/neon-evm-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://devnet.neonevm.org"
}
],
"skipProviderCheck": true,
"symbol": "NEON",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/neon-evm.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"rpcUrl": "https://neon-mainnet.everstake.one"
}
],
"skipProviderCheck": true,
"symbol": "NEON",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/rsk-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://public-node.testnet.rsk.co"
}
],
"skipProviderCheck": true,
"symbol": "RBTC",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/rsk.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"rpcUrl": "https://public-node.rsk.co"
}
],
"skipProviderCheck": true,
"symbol": "RBTC",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/sx-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://rpc.toronto.sx.technology"
}
],
"skipProviderCheck": true,
"symbol": "SX",
"testnet": true
}
1 change: 1 addition & 0 deletions chains/sx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rpcUrl": "https://rpc.sx.technology"
}
],
"skipProviderCheck": true,
"symbol": "SX",
"testnet": false
}
1 change: 1 addition & 0 deletions chains/zksync.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"rpcUrl": "https://mainnet.era.zksync.io"
}
],
"skipProviderCheck": true,
"symbol": "ETH",
"testnet": false
}
21 changes: 0 additions & 21 deletions scripts/ping-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ async function main(): Promise<PromiseSettledResult<void>[]> {
const client = createPublicClient({ transport: http(defaultProvider.rpcUrl!) });

await validateChain(client, chain);
const latestRes = await go(() => validateLatestBlock(client, chain), {
retries: 3,
delay: { type: 'static', delayMs: 60_000 },
});
if (!latestRes.success) {
throw latestRes.error;
}
});

return await Promise.allSettled(promises);
Expand All @@ -44,20 +37,6 @@ async function validateChain(client: PublicClient, chain: Chain): Promise<void>
}
}

async function validateLatestBlock(client: PublicClient, chain: Chain): Promise<void> {
const blockRes = await go(() => client.getBlock({ blockTag: 'latest' }), { retries: 1 });
if (!blockRes.success) {
throw new Error(`Unable to fetch latest block for ${chain.alias}`);
}
const block = blockRes.data;
const blockTimestamp = block.timestamp;
const deltaTime = Number(BigInt(Math.floor(Date.now() / 1000)) - blockTimestamp);
const cutoff = 60 * 5; // Arbitrary cutoff of 5 minutes
if (Math.abs(deltaTime) > cutoff) {
throw new Error(`${chain.alias} latest block timestamp is ${deltaTime} seconds behind the system clock`);
}
}

async function notifySlack(errors: Error[]): Promise<Error[]> {
if (errors.length > 0 && slackChannel) {
const text = errors.reduce((acc, error) => `${acc}\n${error.message}`, '');
Expand Down
Loading