-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Updated TypeReference object to support nested types to support truly… #2023
Updated TypeReference object to support nested types to support truly… #2023
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2023 +/- ##
============================================
+ Coverage 69.22% 69.31% +0.08%
- Complexity 3117 3143 +26
============================================
Files 493 493
Lines 13090 13230 +140
Branches 1692 1710 +18
============================================
+ Hits 9062 9170 +108
- Misses 3537 3569 +32
Partials 491 491 ☔ View full report in Codecov by Sentry. |
Great work! I've bee trough the changes and this new approach with extension of the TypeReference is easy to follow. Will be helpful if you can add some more test for testing of decoding and encoding of the new struct type reference. Ideally to cover all the existing test cases for DynamicStruct |
This seems like the missing piece for decoding event data without having to delcare in-Java classes apriori. Would be great if something like this was incorporated. |
Can we push this in? |
@calmacfadden do you plan to continue the development on this? |
He has completed his contract at Quant now and therefore this github account is no longer active. I'm unsure if he will pick up this work privately, I would assume not. So can we either merge it as is or find someone else to complete it? We currently don't have any other resource for this |
I ended up implementing a version of this PR in my own work for decoding structs. Should I tack it on to this PR? Or start a new PR with the modifications? |
@Antlion12 please go for it and if it is possible to track it in this PR will be great. |
I tried to push my changes to |
I've created a fork of this in PR 2076. #2076 |
Closing this outdated PR, as new PR created by @Antlion12 - #2076 |
What does this PR do?
This PR adds support for decoding dynamic structs without the need for a class extending DynamicStructs to be added at compile time.
I have extended the TypeReference class to have nested innerType's which means you can represent a Struct using TypeReference.
Where should the reviewer start?
Why is it needed?
There needs to be a way to decode dynamic structs without having to create a corresponding class in the project. This allows for the ability to interact with any contract dynamically based on user inputs.
Checklist