Skip to content

chore(contact-manager) Fix Fetch fees script #2544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions contract_manager/src/contracts/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,13 @@ export class EvmPriceFeedContract extends PriceFeedContract {
let web3: Web3;
let amount = BigInt(0);
try {
web3 = this.chain.getViemDefaultWeb3();
web3 = this.chain.getWeb3();
amount = BigInt(await web3.eth.getBalance(this.address));
} catch (error) {
// Fallback to regular web3 if viem default web3 fails
web3 = this.chain.getWeb3();
console.error(
"Error getting balance with given RPC, moving to viem default RPC",
);
web3 = this.chain.getViemDefaultWeb3();
amount = BigInt(await web3.eth.getBalance(this.address));
}
return {
Expand Down