Skip to content

Instantly share code, notes, and snippets.

async updatecache(lastBlock: number, reserves: Reserve[]) {
let aaveOrigin = lastBlock;
const current = await this.provider.getBlockNumber();
// 3000 block range for RPC limits
const iterations = Math.floor((current - aaveOrigin) / 3000);
const promises = [];