You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a contract has a function that takes an argument like uint[6], the binding generated for that function just takes a single uint argument for the entire array and encodes it where the array would go.
Currently I can get around this by just adding in all the arguments I need in the Elm binding, and encoding them all sequentially.
By the way, I tried using AbiEncode.list (List.map AbiEncode.uint listOfUintArgs), and that failed to encode correctly. Not sure if that's a bug or I just don't understand what AbiEncode.list is supposed to be used for.
If a contract has a function that takes an argument like
uint[6]
, the binding generated for that function just takes a singleuint
argument for the entire array and encodes it where the array would go.Currently I can get around this by just adding in all the arguments I need in the Elm binding, and encoding them all sequentially.
Here's some example code...
Solidity function:
ABI entry for that function:
Generated Elm binding:
Obviously that won't take all the info I need to pass, so I then change that to:
which seems to work without issue--not too surprising, because a fixed-length array of static values is just encoded sequentially: https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#argument-encoding
The text was updated successfully, but these errors were encountered: