Skip to content

Commit

Permalink
Remove erroring block on eth
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jul 25, 2024
1 parent 91eef10 commit 59cb149
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,17 @@ export function fetchMultipleProductStatistics$<
const vaultContract = new ethers.Contract(contractCall.vaultAddress, BeefyVaultV6AbiInterface, provider);
const underlyingContract = new ethers.Contract(contractCall.underlyingAddress, ERC20AbiInterface, provider);

const isErroringContractCall =
options.ctx.chain === "ethereum" &&
contractCall.vaultAddress.toLocaleLowerCase() === "0x5da90ba82bed0ab701e6762d2bf44e08634d9776" &&
contractCall.blockNumber === 19384744;

const rawPromise = Promise.all([
vaultContract.callStatic.getPricePerFullShare({ blockTag }) as Promise<[ethers.BigNumber]>,
vaultContract.callStatic.totalSupply({ blockTag }) as Promise<[ethers.BigNumber]>,
vaultContract.callStatic.balance({ blockTag }) as Promise<[ethers.BigNumber]>,
isErroringContractCall
? Promise.resolve([ethers.BigNumber.from(0)])
: (vaultContract.callStatic.balance({ blockTag }) as Promise<[ethers.BigNumber]>),
underlyingContract.callStatic.totalSupply({ blockTag }) as Promise<[ethers.BigNumber]>,
]);

Expand Down
6 changes: 0 additions & 6 deletions src/utils/addressbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ function getAddressBookTokensConfig(chain: Chain) {
if (addrBookChain in addressbook.addressBook) {
// @ts-ignore
return addressbook.addressBook[addrBookChain].tokens;
} else if (chain === "mode") {
return {
WNATIVE: { address: "0x4200000000000000000000000000000000000006" },
};
} else if (chain === "scroll") {
return {
WNATIVE: { address: "0x5300000000000000000000000000000000000004" },
Expand All @@ -42,8 +38,6 @@ export function getChainNetworkId(chain: Chain): number {
return 534352;
} else if (chain === "rollux") {
return 570;
} else if (chain === "mode") {
return 34443;
}
throw new Error(`Unknown chain ${chain}`);
}
Expand Down

0 comments on commit 59cb149

Please sign in to comment.