Solution: LP-0013 — Token Program Improvements: Authorities#63
Closed
edenbd1 wants to merge 2 commits into
Closed
Conversation
✅ Validation passedA reviewer will assess against the prize criteria. Automated check. See solution template and TERMS. |
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.
Solution: LP-0013 — Token program authorities
Submitted by: edenbd1
Summary
This solution adds a rotatable mint authority model to the LEZ Token program, implemented as four additive instruction variants on top of the existing token surface. Built around
lez-approval— a new agnostic single-admin approval crate fulfilling RFP-001.Repository
lp-0013-token-authoritiesd59379eWhat's implemented
lez-approvalcrate — RFP-001 agnostic approval library (Authority,ApprovalError,gate/rotate/revoke)NewFungibleDefinitionWithAuthority— create token with mint authorityMintWithAuthority— authority-gated minting withUnauthorized/Renouncedpanic errorsRotateAuthority— atomic authority rotationRevokeAuthority— permanent terminal revocationartifacts/token.idl.json)demo.sh— end-to-end lifecycle demo against standalone LEZ sequencerdocs/LP-0013-AUTHORITY.md)Design highlights
FungibleWithAuthorityvariant ofTokenDefinition— existingFungibledefinitions and all original instructions untouchedAuthority::renounced()is a permanent sentinel (None) that cannot be reversed — provably enforced by the RISC0 guestlez-approvaldepends only onnssa_core::account::AccountId, usable by any LEZ programPending: Narrated video walkthrough and CU cycle cost measurement.
See
solutions/LP-0013.mdfor full details.Terms & Conditions
By submitting this solution, I confirm that I have read and agree to the Terms & Conditions.