Skip to content

feat(creator-keys): allow creators to lower max supply - #1118

Open
nasirudeenbadirudeen87-cloud wants to merge 5 commits into
accesslayerorg:mainfrom
nasirudeenbadirudeen87-cloud:fix/issue-1099
Open

nasirudeenbadirudeen87-cloud wants to merge 5 commits into
accesslayerorg:mainfrom
nasirudeenbadirudeen87-cloud:fix/issue-1099

Conversation

@nasirudeenbadirudeen87-cloud

@nasirudeenbadirudeen87-cloud nasirudeenbadirudeen87-cloud commented Oct 18, 2026 •

Copy link
Copy Markdown

Summary

  • Add creator-authorized set_max_supply to set an initial cap or reduce an existing cap without dropping below current supply.
  • Reject cap increases with CapCannotIncrease and emit MaxSupplyUpdated for reductions.
  • Add integration cases and document the API, event, and storage behavior.
  • The cap-blocking path uses Soroban’s stable numeric SupplyCapExceeded error; callers can retrieve current and maximum supply through get_supply_info.

Closes #1099.

Testing

  • cargo fmt --all -- --check — passed.
  • cargo clippy --workspace --all-targets -- -D warnings — not run.
  • cargo test --workspace — not run.

Checklist

  • Linked issue
  • Added integration coverage for cap reduction and failure paths
  • Updated event, error, and storage documentation
  • Clippy and workspace tests run

@nasirudeenbadirudeen87-cloud

Copy link
Copy Markdown
Author

@accesslayerorg I updated this branch from main and resolved the merge conflicts. Please review and merge when ready.

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@nasirudeenbadirudeen87-cloud 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

@nasirudeenbadirudeen87-cloud

Copy link
Copy Markdown
Author

Hi @Chucks1093 👋 Friendly reminder that this PR for #1099 is ready for review — there are no merge conflicts and no outstanding change requests. Could you take a look and merge it when you get a chance? Happy to make any changes you'd like. Thank you!

Note: the failing CI check (verify) is also failing on the base branch, so it's unrelated to this change.

@zeemscript

Copy link
Copy Markdown
Contributor

@Chucks1093 Fixed the failing event regression test: the Soroban test host clears the event buffer on the subsequent read, so the test now captures the update event immediately after set_max_supply. The targeted test passes locally. Fresh GitHub verify check is queued; please review once it completes.

@Chucks1093

Copy link
Copy Markdown
Member

✅ PR Ready for Review

Due to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging.

This PR has passed all automated checks:

  • ✅ Security scan — no malicious code detected
  • ✅ No merge conflicts
  • ✅ CI checks passed

Next step: Please share this PR link in our Telegram group so a maintainer can review and merge it: https://t.me/c/accesslayerorg/8514

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.

Add max supply cap contract to limit total key issuance

3 participants