-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix decode function with array types #14
Conversation
@pgebal thanks for the review! |
4deaf0d
to
17e7903
Compare
chore: update mix.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. I'll test it tomorrow and release a new version if everything is ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it still crashes when decoding example from the issue #12
function_selector =
ABI.FunctionSelector.parse_specification_item(%{
"type" => "function",
"name" => "baz",
"inputs" => [
%{"name" => "value1", "type" => "uint32[]"},
%{"name" => "value1", "type" => "uint32[]"}
],
"outputs" => []
})
data = ABI.TypeEncoder.encode([[1, 2, 3, 4], [4, 5, 6]], function_selector)
ABI.TypeDecode.decode(data, function_selector) it works but method_id in FunctionSelector shout be set I could turn off a check of method_id if this is preferred |
fix to #12