Merge branch 'master' into wallet-connect-v2

This commit is contained in:
AlienTornadosaurusHex 2023-07-04 14:03:27 +00:00
commit cb81bb1a25
2 changed files with 3 additions and 2 deletions

@ -1,3 +1,4 @@
export const blockSyncInterval = 10000
export const enabledChains = ['1', '10', '56', '100', '137', '42161']
export const chainsWithEncryptedNotes = ['1', '5', '56', '100', '137']
export default {

@ -2,7 +2,7 @@ import fs from 'fs'
import zlib from 'zlib'
import Web3 from 'web3'
import networkConfig from '../../networkConfig'
import networkConfig, { blockSyncInterval } from '../../networkConfig'
export function download({ name, directory }) {
const path = `${directory}${name}.gz`.toLowerCase()
@ -53,7 +53,7 @@ export async function getPastEvents({ type, fromBlock, netId, events, contractAt
const blockDifference = Math.ceil(blockNumberBuffer - fromBlock)
// eth_logs and eth_filter are restricted > 10,000 block queries
const blockRange = 10000
const blockRange = blockSyncInterval ? blockSyncInterval : 10_000
let chunksCount = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange)
const chunkSize = Math.ceil(blockDifference / chunksCount)