Skip to content

Commit

Permalink
apply blockchainData
Browse files Browse the repository at this point in the history
  • Loading branch information
JSHan94 committed Dec 5, 2023
1 parent 40e1032 commit f99420d
Show file tree
Hide file tree
Showing 19 changed files with 382 additions and 216 deletions.
30 changes: 15 additions & 15 deletions bots/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions bots/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { LCDClient } from '@initia/initia.js';
interface ConfigInterface {
EXECUTOR_PORT: number;
BATCH_PORT: number;
L1_LCD_URI: string;
L1_RPC_URI: string;
L2_LCD_URI: string;
L2_RPC_URI: string;
L1_LCD_URI: string[];
L1_RPC_URI: string[];
L2_LCD_URI: string[];
L2_RPC_URI: string[];
EXECUTOR_URI: string; // only for test
BRIDGE_ID: number;
OUTPUT_SUBMITTER_MNEMONIC: string;
Expand All @@ -27,7 +27,7 @@ const defaultConfig = {
L1_RPC_URI: 'https://stone-rpc.initia.tech',
L2_LCD_URI: 'https://minitia-rest.initia.tech',
L2_RPC_URI: 'https://minitia-rpc.initia.tech',
EXECUTOR_URI: 'https://minitia-executor.initia.tech',
EXECUTOR_URI: 'https://minitia-executor.initia.tech',
BRIDGE_ID: '',
OUTPUT_SUBMITTER_MNEMONIC: '',
EXECUTOR_ADDR: '',
Expand All @@ -42,10 +42,10 @@ export class Config implements ConfigInterface {

EXECUTOR_PORT: number;
BATCH_PORT: number;
L1_LCD_URI: string;
L1_RPC_URI: string;
L2_LCD_URI: string;
L2_RPC_URI: string;
L1_LCD_URI: string[];
L1_RPC_URI: string[];
L2_LCD_URI: string[];
L2_RPC_URI: string[];
EXECUTOR_URI: string;
BRIDGE_ID: number;
OUTPUT_SUBMITTER_MNEMONIC: string;
Expand Down Expand Up @@ -78,10 +78,10 @@ export class Config implements ConfigInterface {

this.EXECUTOR_PORT = parseInt(EXECUTOR_PORT);
this.BATCH_PORT = parseInt(BATCH_PORT);
this.L1_LCD_URI = L1_LCD_URI;
this.L1_RPC_URI = L1_RPC_URI;
this.L2_LCD_URI = L2_LCD_URI;
this.L2_RPC_URI = L2_RPC_URI;
this.L1_LCD_URI = L1_LCD_URI.split(',');
this.L1_RPC_URI = L1_RPC_URI.split(',');
this.L2_LCD_URI = L2_LCD_URI.split(',');
this.L2_RPC_URI = L2_RPC_URI.split(',');
this.EXECUTOR_URI = EXECUTOR_URI;
this.BRIDGE_ID = parseInt(BRIDGE_ID);
this.OUTPUT_SUBMITTER_MNEMONIC = OUTPUT_SUBMITTER_MNEMONIC;
Expand Down
4 changes: 3 additions & 1 deletion bots/src/lib/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const config = getConfig();
export async function getLastOutputInfo(
bridgeId: number
): Promise<OutputInfo | null> {
const [outputInfos, pagination] = await config.l1lcd.ophost.outputInfos(bridgeId);
const [outputInfos, pagination] = await config.l1lcd.ophost.outputInfos(
bridgeId
);
if (outputInfos.length === 0) return null;
return await config.l1lcd.ophost.outputInfo(bridgeId, pagination.total);
}
Expand Down
Loading

0 comments on commit f99420d

Please sign in to comment.