Open MajorLift opened 4 months ago
The reason this type isn't defined is because those methods of that object are defined dynamically based on the abi. Presumably the ethers contract class doesn't type the response based on the input. Its probably expected.
Edit (majorlift): We should ensure that any
is not returned and propagated to the rest of the code base. We currently don't know whether any
is being returned or propagated.
Probably should at least add a comment explaining why the balances method exists and how we know that it is there and can be called so it isn't confusing in the future.
In the following,
contract.balances
andresult
are implicitly typed asany
, because theContract
class doesn't have abalances
method.All tests for
getBalancesInSingleCall
only check fortoBeDefined()
orstrictEquals({})
, with the exception of the following:'should track and use the currently selected chain ID and provider when getting balances in a single call'
The fact that this test passes at runtime suggests that either this bug is only an issue at the type level, or there is a fallback method being called instead.