feat: handle serialization for objects with __dict__ magic method#619
feat: handle serialization for objects with __dict__ magic method#619AgustinRamiroDiaz wants to merge 1 commit intomainfrom
__dict__ magic method#619Conversation
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #619 +/- ##
=======================================
Coverage 18.61% 18.61%
=======================================
Files 123 123
Lines 9618 9618
Branches 299 299
=======================================
Hits 1790 1790
Misses 7744 7744
Partials 84 84 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
|
|
I don't know global plans regarding merging new genvm (#599), but as soon as it is done calldata encoding (from python code) will happen there and this change will do nothing |
|
I understand the reasoning, but I think more research/design is needed, and I am also not sure about the best approach now...
second would be the least evil right now |
|
Closing until further definition is made |
|
FYI: for now I am replacing checks for exact types with checks for related genvm issue: genlayerlabs/genvm#103 |



What
handle serialization for objects with
__dict__magic method, by simply calling the__dict__method on the objectWhy
To allow for more flexible Intelligent Contracts, like using @DataClass es
Testing done
Tested using this IC
Checks
User facing release notes
Now your Intelligent Contracts can return Python objects that implement
__dict__magic methods