Skip to content

Commit b7d3afd

Browse files
committed
watcher: update injective
1 parent 228154e commit b7d3afd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

watcher/src/consts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const RPCS_BY_CHAIN: { [key in Environment]: { [key in ChainName]?: strin
4747
terra2: process.env.TERRA2_RPC || 'https://phoenix-lcd.terra.dev',
4848
// terra: 'https://columbus-fcd.terra.dev',
4949
terra: process.env.TERRA_RPC || 'https://terra-classic-fcd.publicnode.com',
50-
injective: process.env.INJECTIVE_RPC || 'https://api.injective.network',
50+
injective: process.env.INJECTIVE_RPC || 'https://sentry.exchange.grpc-web.injective.network',
5151
solana: process.env.SOLANA_RPC || 'https://api.mainnet-beta.solana.com',
5252
sui: process.env.SUI_RPC || 'https://rpc.mainnet.sui.io',
5353
base: process.env.BASE_RPC || 'https://developer-access-mainnet.base.org',

watcher/src/watchers/__tests__/CosmwasmWatcher.test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test('getMessagesForBlocks(terra2)', async () => {
3434
const watcher = new CosmwasmWatcher('mainnet', 'terra2');
3535
const vaasByBlock = await watcher.getMessagesForBlocks(5635710, 5635712);
3636
const entries = Object.entries(vaasByBlock);
37-
console.log(entries);
37+
// console.log(entries); // Leave this in for future debugging
3838
expect(entries.length).toEqual(3);
3939
expect(entries.filter(([block, vaas]) => vaas.length === 0).length).toEqual(3);
4040
expect(entries.filter(([block, vaas]) => vaas.length === 1).length).toEqual(0);
@@ -128,17 +128,17 @@ test('getFinalizedBlockNumber(injective)', async () => {
128128

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

0 commit comments

Comments
 (0)