cavanmflynn/ethers-multicall

Can't make Contract with ABI that contains event types

niZmosis opened this issue · 2 comments

When providing the full ABI to the multicall Contract, I get an error "TypeError: Cannot read properties of null (reading 'type')"

Here is where the code brings me to. If I remove all event types and only leave function types, it will work.

Contract.js line 12
for (var _i = 0, callFunctions_1 = callFunctions; _i < callFunctions_1.length; _i++) { var callFunction = callFunctions_1[_i]; var name = callFunction.name; var getCall = makeCallFunction(this, name); if (!this[name]) { defineReadOnly(this, name, getCall); } };

Have you found a solution to this? I'm having the same issue and i'm not finding a way to make, as an example, 10 or more reads from a contract without having terrible ux. Are multicalls the only solution?

Have you found a solution to this? I'm having the same issue and i'm not finding a way to make, as an example, 10 or more reads from a contract without having terrible ux. Are multicalls the only solution?

Nope, just a work around by taking out events from the ABI, haven't had a problem since.