Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ members = [
"contracts/bridge",
"contracts/crafting",
"contracts/mystery_box",
"contracts/content_license",
"contracts/daily_rewards",
"contracts/streak_counter",
"contracts/energy",
Expand Down
13 changes: 13 additions & 0 deletions contracts/content_license/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "content-license"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
soroban-sdk = "21.7.7"

[dev-dependencies]
soroban-sdk = { version = "21.7.7", features = ["testutils"] }
15 changes: 15 additions & 0 deletions contracts/content_license/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Content License Registry Contract

A modular Soroban smart contract for the Quest economy that implements puzzle content licensing across Stages 1 and 2:

1. **Versioned License Terms Registry (Stage 1 - #397):**
- Creators register on-chain terms (`FreeToPlay`, `PaidPerPlay`, `RemixAllowed`).
- Immutable historical versioning: each update increments version while preserving previous terms.
- Terms specify fee token, fee amount, validity duration, revocation policy, and refund rules.

2. **License Purchase & Policy-Based Revocation (Stage 2 - #398):**
- Players purchase licenses under current puzzle terms, automatically paying the creator.
- Licenses are bound to the specific terms version bought.
- Revocation follows published terms only (`RevocationNotAllowed` if terms disallow).
- Automated refunds upon revocation when terms require.
- Expiry checks for time-limited licenses.
Loading
Loading