Closed ghost closed 4 years ago
What I ended up doing is add the array inside an array, indeed the second parameter is an array of arguments.
@steffenix can you show your working solution? I'm having same issue.
Are you sure you are using the library properly? The parameters should be an array
@steffenix I'm assuming I'm not, because it is not working.
Here is example code:
params = Enum.map(assets, fn asset ->
[asset.address, "balanceOf(address)"]
end)
abi =
ABI.encode("aggregate((address,bytes)[])", params)
Params are an array.
I receive the same error as you did above, since the first param coming into do_encode_type
does not match any function clause.
Can't help with more code but I would look at the address format check the examples they need to be decoded
I am trying to use the ABI with the https://github.com/makerdao/multicall contract.
aggregate(Call[] memory calls)
So I am using the encode function with
aggregate((address,bytes)[])
I am getting the following error:
I have also tried to do:
The issue is the binary isn't passing the Kernel.is_tupple condition.
The second parameter passed to the function is: