-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
abiGen crashes when on tuples #17152
Comments
I run into this issue today and it was for several reasons. For people debuggin make sure you:
instead of:
otherwise an exception will be raised. This is done to prevent bad auto generated names in the abigen binding class.
You can see specifically (what I realised an hour later...) what's the exact problem by reading the generated ABI:
|
Same issue, because not support |
The merge of #18406 should fix this issue. Please re-open it in case it doesn't work |
@gballet for the abigen, we still need some modifications to make it work. I'll open another PR to fix it. |
@rjl493456442 ok, reopening then. Let me know. |
I just tried using #18406 to use abigen with contracts using ABIV2 and it did not work. @rjl493456442 are you still working on the missing modifications? |
@fabioberger Please try this PR #18491. Feel sorry for the confusion, this PR only supports encode/decode tuple arguments, but #18491 supports tuple style golang binding generation. And any feedback is appreciated for #18491 if there is any issue. |
When creating wrappers using abiGen, it crashes when you have nested struct's in your code. This occurs when abiGen tries to unmarshal json and the supported types don't match a tuple Leading to a runtime crash.
Expected behaviour
abiGen should not crash on tuples, or it should ignore them since in solidity no public function can take tuples as parameters or return them as output.
Actual behaviour
abiGen crashes on perfectly valid abi from the solc compiler
Steps to reproduce the behaviour
run
abigen --sol Nested.sol --pkg main --out nested.go
On this file Nested.sol:
Backtrace
The text was updated successfully, but these errors were encountered: