pull/2/head
lza_menace 2 years ago
parent 64546b233c
commit 3aafd18791

@ -106,8 +106,7 @@ class Scrape extends Collection {
while (lastScrapedBlock >= latestEthBlock) { while (lastScrapedBlock >= latestEthBlock) {
latestEthBlock = await this.provider.getBlockNumber(); latestEthBlock = await this.provider.getBlockNumber();
const timestamp = await this.getBlockTimestamp(latestEthBlock); console.log(`[ ${(new Date()).toISOString()} ][ ${this.contractName} ] [ waiting ]\n`)
console.log(`[ ${timestamp.toISOString()} ][ ${this.contractName} ] [ waiting ]\n`)
await sleep(120); await sleep(120);
} }
} }
@ -116,8 +115,7 @@ class Scrape extends Collection {
// query historical logs // query historical logs
async filterTransfers(startBlock) { async filterTransfers(startBlock) {
let transfers; let transfers;
const timestamp = await this.getBlockTimestamp(startBlock); console.log(`[ ${(new Date()).toISOString()} ][ ${this.contractName} ][ scraping ] blocks ${startBlock} - ${startBlock + CHUNK_SIZE}\n`);
console.log(`[ ${timestamp.toISOString()} ][ ${this.contractName} ][ scraping ] blocks ${startBlock} - ${startBlock + CHUNK_SIZE}\n`);
if (this.erc1155) { if (this.erc1155) {
transfers = this.contract.filters.TransferSingle(null, null); transfers = this.contract.filters.TransferSingle(null, null);
} else { } else {

Loading…
Cancel
Save