-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add test cases and fix inlineDatum fetching for the Cardano CLI Backend #303
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #303 +/- ##
==========================================
+ Coverage 83.17% 83.42% +0.24%
==========================================
Files 28 28
Lines 3412 3415 +3
Branches 835 836 +1
==========================================
+ Hits 2838 2849 +11
+ Misses 424 416 -8
Partials 150 150 ☔ View full report in Codecov by Sentry. |
This is now a bit weird. We can have both 1 (int) and RawPlutusData(data=1) representing smart contract integer data. I guess the original idea of RawPlutusData was to wrap CBorTags somehow semantically... So one way to fix this would be to have RawPlutusData.from_dict return the raw data if the resulting type is not CBorTag. But then x.to_dict() might fail. I think I would prefer to have a semantic type like RawPlutusData wrapping everything that is supposed to be onchain data, so that it always supports to_cbor, to_dict, to_json etc. Alternatively there could be to_json(x: Datum) functions. Currently it is just not really clear how to convert between the different representations of onchain data the cleanest possible way. |
This change is also necessary to allow parsing the following transaction from cbor:
|
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, thanks!
No description provided.