mirror of
https://github.com/cerc-io/watcher-ts
synced 2024-11-19 20:36:19 +00:00
Fix hex conversion and rename to cerc-io packages (#178)
* Fix ethersjs hexlify number by removing leading zeros * Rename to cerc-io packages in codegen templates
This commit is contained in:
parent
f3230e3822
commit
996f68a390
@ -6,7 +6,7 @@ import 'reflect-metadata';
|
||||
import debug from 'debug';
|
||||
import { Between } from 'typeorm';
|
||||
|
||||
import { Database as GraphDatabase, prepareEntityState } from '@vulcanize/graph-node';
|
||||
import { Database as GraphDatabase, prepareEntityState } from '@cerc-io/graph-node';
|
||||
|
||||
import { Indexer } from './indexer';
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
import debug from 'debug';
|
||||
|
||||
import { getConfig } from '@vulcanize/util';
|
||||
import { getConfig } from '@cerc-io/util';
|
||||
|
||||
import { Database } from '../../database';
|
||||
|
||||
|
@ -45,7 +45,7 @@ const cacheBlockSizesAsync = async (provider: providers.JsonRpcProvider, blockNu
|
||||
// Start prefetching blocks after latest height in blockSizeMap.
|
||||
for (let i = startBlockHeight; i <= endBlockHeight; i++) {
|
||||
console.time(`time:misc#cacheBlockSizesAsync-eth_getBlockByNumber-${i}`);
|
||||
const { size, hash } = await provider.send('eth_getBlockByNumber', [utils.hexlify(i), false]);
|
||||
const { size, hash } = await provider.send('eth_getBlockByNumber', [utils.hexStripZeros(utils.hexlify(i)), false]);
|
||||
console.timeEnd(`time:misc#cacheBlockSizesAsync-eth_getBlockByNumber-${i}`);
|
||||
blockSizeMap.set(hash, { size, blockNumber: i });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user