PatrickAlphaC / multicall-js

19 stars 2 forks source link

Max code size exceeded error #1

Open samlaf opened 2 years ago

samlaf commented 2 years ago

This js version is actually very different from the brownie version you published. It uses indexed-finance's static multicall, which uses constructor magic instead of actually calling a deployed contract. This however, suffers from the limitation that the returned bytes cannot exceed 24kB. Trying to increase numberOfRounds from 10 to 50 results in

    reason: 'processing response error',
    code: 'SERVER_ERROR',
    body: '{"jsonrpc":"2.0","id":46,"error":{"code":-32000,"message":"max code size exceeded"}}',

See https://github.com/indexed-finance/multicall/issues/6 for more info.

samlaf commented 2 years ago

Perhaps it would be better to use https://github.com/pooltogether/etherplex

I found this which is also very insightful: https://chainstack.com/the-ultimate-guide-to-getting-multiple-token-balances-on-ethereum/ Your description of the different multicall alternatives is thus missing the eip-1767 graphql interface (alternative to json-rpc interface), which seems to be the fastest! image