diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-12-05 12:04:08 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-12-05 12:04:08 +0800 |
commit | 00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe (patch) | |
tree | e2e1c5394deac225bf493b3fe51da9f3074f1691 /packages/pipeline/src/scripts/pull_missing_events.ts | |
parent | 549f5e4655f246062dd6451065ec01eb789dbd8f (diff) | |
download | dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.tar dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.tar.gz dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.tar.bz2 dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.tar.lz dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.tar.xz dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.tar.zst dexon-sol-tools-00f86ca0f7871639d2b0be496f6f8c5e0d8d7ffe.zip |
Address PR feedback
Diffstat (limited to 'packages/pipeline/src/scripts/pull_missing_events.ts')
-rw-r--r-- | packages/pipeline/src/scripts/pull_missing_events.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/pipeline/src/scripts/pull_missing_events.ts b/packages/pipeline/src/scripts/pull_missing_events.ts index c7e07c540..80abbb8b0 100644 --- a/packages/pipeline/src/scripts/pull_missing_events.ts +++ b/packages/pipeline/src/scripts/pull_missing_events.ts @@ -8,9 +8,8 @@ import { ExchangeEventsSource } from '../data_sources/contract-wrappers/exchange import { ExchangeCancelEvent, ExchangeCancelUpToEvent, ExchangeEvent, ExchangeFillEvent } from '../entities'; import * as ormConfig from '../ormconfig'; import { parseExchangeCancelEvents, parseExchangeCancelUpToEvents, parseExchangeFillEvents } from '../parsers/events'; -import { handleError } from '../utils'; +import { EXCHANGE_START_BLOCK, handleError, INFURA_ROOT_URL } from '../utils'; -const EXCHANGE_START_BLOCK = 6271590; // Block number when the Exchange contract was deployed to mainnet. const START_BLOCK_OFFSET = 100; // Number of blocks before the last known block to consider when updating fill events. const BATCH_SAVE_SIZE = 1000; // Number of events to save at once. @@ -19,7 +18,7 @@ let connection: Connection; (async () => { connection = await createConnection(ormConfig as ConnectionOptions); const provider = web3Factory.getRpcProvider({ - rpcUrl: 'https://mainnet.infura.io', + rpcUrl: INFURA_ROOT_URL, }); const eventsSource = new ExchangeEventsSource(provider, 1); await getFillEventsAsync(eventsSource); |