From 9437d51843627d59b044e523aab956b4776c8594 Mon Sep 17 00:00:00 2001 From: Dev Kalra Date: Wed, 24 Apr 2024 16:37:14 +0530 Subject: [PATCH] feat(contract_manager): add keeper balance to list entry (#1506) * add keeper balance to list entry * don't fix it as not sure --- contract_manager/scripts/list_entropy_contracts.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contract_manager/scripts/list_entropy_contracts.ts b/contract_manager/scripts/list_entropy_contracts.ts index 37a69729..a9d449d8 100644 --- a/contract_manager/scripts/list_entropy_contracts.ts +++ b/contract_manager/scripts/list_entropy_contracts.ts @@ -13,15 +13,22 @@ const parser = yargs(hideBin(process.argv)) }, }); +const KEEPER_ADDRESS = { + mainnet: "0xBcAb779fCa45290288C35F5E231c37F9fA87b130", + testnet: "0xa5A68ed167431Afe739846A22597786ba2da85df", +}; + async function main() { const argv = await parser.argv; const entries = []; + const keeperAddress = KEEPER_ADDRESS[argv.testnet ? "testnet" : "mainnet"]; for (const contract of Object.values(DefaultStore.entropy_contracts)) { if (contract.getChain().isMainnet() === argv.testnet) continue; try { const provider = await contract.getDefaultProvider(); const w3 = new Web3(contract.getChain().getRpcUrl()); const balance = await w3.eth.getBalance(provider); + const keeperBalance = await w3.eth.getBalance(keeperAddress); let version = "unknown"; try { version = await contract.getVersion(); @@ -34,6 +41,7 @@ async function main() { contract: contract.address, provider: providerInfo.uri, balance, + keeperBalance, seq: providerInfo.sequenceNumber, version, });