offchain-gas-oracle: add balances for debugging cost

This commit is contained in:
Karl Kempe 2022-09-15 02:23:08 +00:00
parent 60436ae59f
commit f3072f2402
1 changed files with 9 additions and 1 deletions

View File

@ -52,7 +52,15 @@ async function main() {
const txs = await Promise.all(
oracles.map((oracle) => oracle.updatePrices(updates).then((tx: ethers.ContractTransaction) => tx.wait()))
);
console.log("retrieveCount", retrieveCount, "txs.length", txs.length);
const balances = await Promise.all(
oracles.map(async (oracle) => {
const address = await oracle.signer.getAddress();
const balance = await oracle.provider.getBalance(address);
return ethers.utils.formatUnits(balance);
})
);
console.log("retrieveCount", retrieveCount, "txs.length", txs.length, "balances", balances);
updatesTracker.clear();
}