Skip to content

Add content license registry and item durability contracts - #417

Merged
Mkalbani merged 10 commits into
MindFlowInteractive:mainfrom
ykargeee-bit:feature/content-license-and-item-durability
Nov 22, 2026
Merged

Mkalbani merged 10 commits into
MindFlowInteractive:mainfrom
ykargeee-bit:feature/content-license-and-item-durability

Conversation

@ykargeee-bit

Copy link
Copy Markdown
Contributor

Summary

Adds two new Soroban contracts under contracts/ and registers them in the workspace.

content_license (#397, #398)

  • Versioned, immutable licence terms registered only by a puzzle's creator; old versions stay queryable and new versions are appended.
  • Purchase pays the creator named in the exact terms version bought and records holder, version and expiry.
  • Revocation is allowed only when the purchased terms permit it, with refunds when required; licences bound to older terms cannot be revoked under newer ones.
  • Unit tests cover registration ownership, immutability, purchases, expiry, refunds and revocation rules.

item_durability (#400, #401)

  • Foundational item registration and usage with durability tracking; reaching zero marks the item broken and blocks further use.
  • Repair charges tokens proportional to missing durability, caps at max durability, routes payment to the configured sink and is blocked for broken items.
  • Salvage returns configured materials to the owner and destroys the record, so an item cannot be salvaged or repaired twice.
  • Unit tests cover durability consumption, repair costs, owner checks, break behaviour and salvage.

Closes #397
Closes #398
Closes #400
Closes #401

@drips-wave

drips-wave Bot commented Nov 22, 2026

Copy link
Copy Markdown

@ykargeee-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Mkalbani
Mkalbani merged commit c0b7e1e into MindFlowInteractive:main Nov 22, 2026
2 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Nov 22, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Item Durability: Break and Salvage Item Durability: Repair Content License Purchase and Revocation Content License Registry

2 participants