Repository navigation
Conversation
…nteractive#397) - Add reusable Soroban smart contract in contracts/content_license - Implement LicenseType enum supporting FreeToPlay, PaidPerPlay, and RemixAllowed - Implement LicenseTerms struct tracking creator, puzzle ID, version, fees, and URI - Implement creator-only register_terms function enforcing immutable historical versions - Store terms persistently by (puzzle_id, version) to prevent in-place edits - Expose read functions for get_current_terms and get_terms_by_version - Emit Soroban events on term publication: (license, puzzle_id) -> (creator, version) - Support secure admin transfer via transfer_admin - Add comprehensive unit test suite in src/test.rs - Add detailed README.md documentation and workspace entry in Cargo.toml Closes MindFlowInteractive#397
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.
Summary of Changes
This pull request implements the Content License Registry module for the Quest Contract ecosystem as requested in #397.
Key Features & Architecture
contracts/content_licenseFreeToPlay,PaidPerPlay(with customizable per-play token fee), andRemixAllowed.(Symbol("TERMS"), puzzle_id, version). Published versions cannot be altered or overwritten in place; updating terms increments the version number.get_current_terms(puzzle_id)for active rules, andget_terms_by_version(puzzle_id, version)for full historical auditability.topic: (license, puzzle_id), data: (creator, new_version).transfer_admin.contracts/content_license/src/test.rscovering initial publication, version increments, immutability of historical versions, unauthorized update rejection, non-existent puzzle handling, and admin transfers.README.mddetailing data models, storage schema, error codes, and integration examples.Verification
cargo check --package content_licensepassed with 0 errors.Cargo.tomlworkspace members.Closes #397