37a5412f-fb6a-455f-9b9c-3aa8227c255a make share-token metadata immutable#440
Closed
carrion256 wants to merge 1 commit into
Closed
37a5412f-fb6a-455f-9b9c-3aa8227c255a make share-token metadata immutable#440carrion256 wants to merge 1 commit into
carrion256 wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Collaborator
Author
|
Superseded by consolidated share-token cluster PR #429. |
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.
Fixed Findings
37a5412f-fb6a-455f-9b9c-3aa8227c255a— Share-token metadata can be changed after deployment without timelock or event.Root Cause
The share-token constructor initialized SEP-41 metadata correctly, but the public admin-gated
set_metadata(caller, name, symbol, decimals)entrypoint could rewrite name, symbol, and decimals after deployment viaBase::set_metadata.Fix
set_metadataABI surface for compatibility, but make post-deployment calls fail after admin authorization withShareTokenError::MetadataImmutable.set-metadataoperator recipe/help entry because metadata is now constructor-bound and immutable.Verification
RED before fix:
GREEN after fix:
Post-commit hook:
This change is
Superseded
This A-050-only PR has been folded into the consolidated share-token cluster PR #429.
0aad51e37a5412f-fb6a-455f-9b9c-3aa8227c255aClosing to keep share-token remediation in PR #429.