-
Notifications
You must be signed in to change notification settings - Fork 9
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 does not work with functions with large structs #23
Comments
I will check if we could remove the |
Try https://github.com/streamingfast/substreams-ethereum/tree/fix/tuple-with-lot-of-elements by adding this at the end of your
|
It's a breaking change, so I need to wait the pros/cons of merging this. I don't think |
Unfortunately, this won't work because |
Oh what a bummer! I should have added a unit test, I would have seen that, damn it. Yeah the other solution would be to send them to their own struct indeed. If you have the bandwidth, yeah you can continue it, I'm ok merging such work. If you don't have the time, at least push a branch somewhere and link it here, someone could start from that. Will be a good breaking change however, so maybe will put that under an option. |
I re-think of that today and maybe we could remove generating |
Any update regarding same. Facing this issue. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Solidity functions with a large struct as a function parameter currently get compiled by Abigen into Rust structs with a long tuple as the field types. However, Rust implements Debug and PartialEq for tuples up to 12 items (see here). Since Debug and PartialEq is derived for the function struct, the implementation will throw an error in the comiler.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Example ABI from Rarible contract:
Results in:
Which leads to:
What is the expected behavior?
I think the solution would be one of:
The text was updated successfully, but these errors were encountered: