-
Notifications
You must be signed in to change notification settings - Fork 31
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
Map struct encoding #129
Map struct encoding #129
Conversation
As mentioned, this is still a work in progress; I had difficulty identifying the right changes to make in the IR for the mStruct to pass the on-chain It could use a couple more tests as well. |
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.
Some notes to clarify things for you (and reminders to me)
- moves Cip68 support to developer side (use enum::Variant{data: mStruct}) - combines earlier commits into one
de03111
to
d441dee
Compare
- undo attempt to export test/utils.js - moved pre-push-hook install out of "post-install" (was happening at downstream client-install time) ... added to before-tests to make it more likely to happen magically - removed .only modifiers on test cases
Closing this particular PR because this work has been merged as part of #130 instead |
just as hoped, thanks! |
STILL a WIP (see add'l comment below). Merge after #127, which comes after #128.
Helios up until v0.17.0.93 allowed definition of a string-mapped struct (aka mStruct) in this form
This was encoded as a
ConstrData(0, MapData)
, and it worked fine when a script's Datum was itself defined as an mStruct such as thismyStructDef
, and not an enum with a variant havingfield1: mStruct
. Using that definition inside an enum variant would produce a second layer of ConstrData.This change establishes:
This represents a behavioral change versus version 0.16 (which expects a ConstrData in all cases when decoding an mStruct). Developers using such a struct as their Datum can continue getting CIP-68-compliant encoding by changing to an enum: