Skip to content
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

PValue must be wrapped in PDataNewtype #692

Open
SeungheonOh opened this issue Jul 1, 2024 · 2 comments
Open

PValue must be wrapped in PDataNewtype #692

SeungheonOh opened this issue Jul 1, 2024 · 2 comments
Labels
api bug Something isn't working low priority

Comments

@SeungheonOh
Copy link
Collaborator

Currently, it's just raw newtype of PBuiltinList which breaks the PTryFrom subtype checking. We should wrap PBuiltinList with PDataNewtype so that we can ensure it is represented as Data all time when used as ledger types

@SeungheonOh SeungheonOh added the bug Something isn't working label Jul 1, 2024
@kozross kozross added the api label Jul 1, 2024
@SeungheonOh
Copy link
Collaborator Author

Since PMap can also be used for non-ledger, non-data encoded type, we might want to take a look at making a new type specifically for ledger types.

@SeungheonOh SeungheonOh changed the title PMap must be wrapped in PDataNewtype PValue must be wrapped in PDataNewtype Jul 3, 2024
@kozross
Copy link
Contributor

kozross commented Jul 7, 2024

PMap is used nowhere but the ledger API. I don't think I object terribly to making it ledger-only, as it'll reduce type creep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api bug Something isn't working low priority
Projects
None yet
Development

No branches or pull requests

2 participants