CIP-102 implementation (builds on #297 & #490)#491
Open
SamDelaney wants to merge 32 commits into
Open
Conversation
…to bugfix/extended-cip8
…estring Bugfix/bytestring
…al/pycardano into feat/cip67-cip68
Feat/cip67 cip68
- Switched to TypedDicts for metadata classes - Added PlutusData wrapper class and tests
…dano into feat/cip67-cip68
Feat/cip67 cip68
…to feat/cip67-cip68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add CIP-102 (Royalty Datum Metadata) support
This PR is dependent on the work done in #490 - specifically, CIP-102 makes use of CIP-67 asset names. It can either be reviewed & merged independently as an combined PR for CIPs 67, 68 & 102, or it can be merged after #490 / #297 is merged.
CIP102RoyaltyTokenName: SubclassesCIP67TokenName(label500) to represent royalty token asset names. Supports an optional integer postfix for version-2 multi-recipient policies (e.g.(500)Royalty,(500)Royalty1,(500)Royalty2)RoyaltyRecipient: Plutus constructor 121 encoding a single recipient's address (raw Plutus address bytes), fee denominator (floor(10 / pct * 10)), and optional min/max fee bounds (each encoded asoptional_big_intusing constructors 121/122)RoyaltyInfo: Top-level datum (Plutus constructor 121) wrapping a list ofRoyaltyRecipients, a version field, and an extensibleextrafield — serializes directly to inline datum CBORRoyaltyRecipientSomeMinFee/RoyaltyRecipientNoMinFee: Internal PlutusSome/Nonetypes for optional integer fields; follows the sameoptional_big_intCDDL shape as the spec