Skip to content

Commit

Permalink
watcher: update injective
Browse files Browse the repository at this point in the history
  • Loading branch information
panoel committed Mar 5, 2024
1 parent 228154e commit b7d3afd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion watcher/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const RPCS_BY_CHAIN: { [key in Environment]: { [key in ChainName]?: strin
terra2: process.env.TERRA2_RPC || 'https://phoenix-lcd.terra.dev',
// terra: 'https://columbus-fcd.terra.dev',
terra: process.env.TERRA_RPC || 'https://terra-classic-fcd.publicnode.com',
injective: process.env.INJECTIVE_RPC || 'https://api.injective.network',
injective: process.env.INJECTIVE_RPC || 'https://sentry.exchange.grpc-web.injective.network',
solana: process.env.SOLANA_RPC || 'https://api.mainnet-beta.solana.com',
sui: process.env.SUI_RPC || 'https://rpc.mainnet.sui.io',
base: process.env.BASE_RPC || 'https://developer-access-mainnet.base.org',
Expand Down
14 changes: 7 additions & 7 deletions watcher/src/watchers/__tests__/CosmwasmWatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test('getMessagesForBlocks(terra2)', async () => {
const watcher = new CosmwasmWatcher('mainnet', 'terra2');
const vaasByBlock = await watcher.getMessagesForBlocks(5635710, 5635712);
const entries = Object.entries(vaasByBlock);
console.log(entries);
// console.log(entries); // Leave this in for future debugging
expect(entries.length).toEqual(3);
expect(entries.filter(([block, vaas]) => vaas.length === 0).length).toEqual(3);
expect(entries.filter(([block, vaas]) => vaas.length === 1).length).toEqual(0);
Expand Down Expand Up @@ -128,17 +128,17 @@ test('getFinalizedBlockNumber(injective)', async () => {

test('getMessagesForBlocks(injective)', async () => {
const watcher = new InjectiveExplorerWatcher('mainnet');
const vaasByBlock = await watcher.getMessagesForBlocks(56405501, 56405502);
// const vaasByBlock = await watcher.getMessagesForBlocks(4209642, 4209643); // Testnet
const vaasByBlock = await watcher.getMessagesForBlocks(61720293, 61720294);
const entries = Object.entries(vaasByBlock);
// console.log(entries); // Leave this in for future debugging
expect(entries.length).toEqual(2);
expect(entries.filter(([block, vaas]) => vaas.length === 0).length).toEqual(1);
expect(entries.filter(([block, vaas]) => vaas.length === 1).length).toEqual(1);
expect(entries.filter(([block, vaas]) => vaas.length === 2).length).toEqual(0);
expect(vaasByBlock['56405501/2024-01-04T14:40:21.262Z']).toBeDefined();
expect(vaasByBlock['56405501/2024-01-04T14:40:21.262Z'].length).toEqual(1);
expect(vaasByBlock['56405501/2024-01-04T14:40:21.262Z'][0]).toEqual(
'0x1ae70e98a0597ae9a1a5e1d9c48ede546e622b668c027d09e4147004a5b2c9e3:19/00000000000000000000000045dbea4617971d93188eda21530bc6503d153313/3737'
expect(vaasByBlock['61720293/2024-02-26T21:06:12.205Z']).toBeDefined();
expect(vaasByBlock['61720293/2024-02-26T21:06:12.205Z'].length).toEqual(1);
expect(vaasByBlock['61720293/2024-02-26T21:06:12.205Z'][0]).toEqual(
'0x2481ac7979d6ad78ef75906b66a7ce4c7580561740a5f8742fdb0a9dffa75171:19/00000000000000000000000045dbea4617971d93188eda21530bc6503d153313/7164'
);
});

Expand Down

0 comments on commit b7d3afd

Please sign in to comment.