Skip to content

Commit ee6dcf6

Browse files
authored
chore(contact-manager) Fix Fetch fees script (#2544)
1 parent 29a60eb commit ee6dcf6

File tree

1 file changed

+5
-3
lines changed
  • contract_manager/src/contracts

1 file changed

+5
-3
lines changed

contract_manager/src/contracts/evm.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,11 +639,13 @@ export class EvmPriceFeedContract extends PriceFeedContract {
639639
let web3: Web3;
640640
let amount = BigInt(0);
641641
try {
642-
web3 = this.chain.getViemDefaultWeb3();
642+
web3 = this.chain.getWeb3();
643643
amount = BigInt(await web3.eth.getBalance(this.address));
644644
} catch (error) {
645-
// Fallback to regular web3 if viem default web3 fails
646-
web3 = this.chain.getWeb3();
645+
console.error(
646+
"Error getting balance with given RPC, moving to viem default RPC",
647+
);
648+
web3 = this.chain.getViemDefaultWeb3();
647649
amount = BigInt(await web3.eth.getBalance(this.address));
648650
}
649651
return {

0 commit comments

Comments
 (0)