balancer-sdk
balancer-sdk copied to clipboard
Call exception for getClaimableRewardTokens() on Network.POLYGON
https://github.com/balancer/balancer-sdk/blob/develop/balancer-js/examples/pools/rewards/claim-pools-rewards.ts
Running the given example for Network.MAINNET with a my Infura mainnet RPC returns the expected result 👍
However, changing the SDK config to Polygon results in an exception where I would at least expect an empty array when calling getClaimableRewardTokens(userAddress) 😢
const balancer = new BalancerSDK({
network: Network.POLYGON,
rpcUrl: `https://polygon-mainnet.infura.io/v3/XXX`,
});
const result = await balancer.claimService?.getClaimableRewardTokens("0x549c660ce2B988F588769d6AD87BE801695b2be3");
Result:
Uncaught (in promise) Error: missing revert data in call exception; Transaction reverted without a reason string [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (data="0x", transaction={"to":"0xa1B2b503959aedD81512C37e9dce48164ec6a94d","data":"0x252dba42........
This is the line that throws the exception: https://github.com/balancer/balancer-sdk/blob/ced0b6761d81dffb94851a84853403bead69ee4a/balancer-js/src/modules/claims/ClaimService.ts#L281