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 optional shape check to data parser #127
Conversation
testing rn |
I'm rn adding the option to leave the lengths of lists/maps/constr-fields indeterminate, so no need to rush looking at it. Also have a hunch it's a bad approach in the first place, will see. |
Note that the regular tests - for the old stuff - still run. Still WIP ofc. |
Note on the last one: only works on lists of primitives thus far EDIT but that's half a testing issue, depending how you look at it. Requires rn all inner containers to be equally sized, can be interpreted as not a bug. |
Works, only thing untested now is the strange SumType Shape thing. And containers of nonprimitives. |
I pulled this branch locally and tested it. I don't have any meaningful or productive feedback at this point, but it's building and all tests are passing! |
The UInt8Array-tests still fail btw, which is almost certainly a testing-issue, not an implementation-issue. |
Come to think of it, it might be simpler to leave the existing parsing as it was before, and add my checks afterwards as a function PlutusData, Shape -> PlutusData. |
Refactor in order. |
Result #132 |
as per #126
The core functionality stays the same, just refactored it since the branching got too big.
Deno tests run through, but I didn't add any of myself yet.