makerdao / multicall.js

Multicall.js: A JavaScript blockchain state management library for dapps
MIT License
421 stars 97 forks source link

Handle the 0x exception #25

Closed johanninos closed 3 years ago

johanninos commented 3 years ago

Hack a decode issue of ethers abi-coder

for example

{
  target: '0xa88aB555AE98Ed87E766c916159451523eDe7618',
  call: ['getReserves()(unit256,unit256)']
}

will get result 0x the whole request will be error cause of one of the call gets Error from ethers abi-coder

just exclude the 0x

try catch to handle the abi-coder error is Another solution

johanninos commented 3 years ago

ehters issue https://github.com/ethers-io/ethers.js/issues/559