Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mantasfam committed Aug 16, 2023
1 parent 3f4de1f commit de15045
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/factory/providers/ethereum/maker-dao/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ async function getJoins(block, chain, provider, web3) {
'0x65fae35e00000000000000000000000000000000000000000000000000000000';

// get list of auths
let offset = 100000;
const stored_log = await basicUtil.readFromCache(
'makerdao_log.json',
chain,
provider,
);
let offset = 10000;
let stored_log;
try {
stored_log = await basicUtil.readFromCache(
'makerdao_log.json',
chain,
provider,
);
} catch {}

let i = Math.max(MakerMCDConstants.STARTBLOCK, Number(stored_log.block) || 0);
const logs = stored_log.data || [];
let i = Math.max(
MakerMCDConstants.STARTBLOCK,
Number(stored_log?.block) || 0,
);
const logs = stored_log?.data || [];

for (;;) {
if (i > block) {
Expand Down

0 comments on commit de15045

Please sign in to comment.