-
Notifications
You must be signed in to change notification settings - Fork 260
QoL batch 3 #1916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
QoL batch 3 #1916
Conversation
PR SummaryMedium Risk Overview Tweaks Written by Cursor Bugbot for commit fc50ddf. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
|
|
||
| if (instructions.length === 0) { | ||
| throw new Error('At least one of --name, --symbol, or --uri must be provided') | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation check bypassed when rent transfer added first
Medium Severity
The instructions.length === 0 validation check in updateTokenExtensionsMetadata is performed after the rent transfer instruction may have already been added to the instructions array. Due to the 100-byte buffer in estimatedNewSize, additionalLamports is often positive even when no metadata fields are provided. This causes the validation to pass when it should fail, resulting in a transaction that only transfers lamports without updating any metadata fields. The user would see a successful transaction but no metadata would be changed.
Solana OFT debug script: state that value
0for confirmations means 'use default'Closes DEVREL-1238
When running:
Before:
After:
Solana OFT - updateMetadata script supports Token-2022 Metadata Update
Closes DEVREL-1239
Problem
lz:oft:solana:update-metadataonly supported Metaplex metadata, not Token-2022.Solution
updateTokenExtensionsMetadata()with authority validation and rent handling for multisig.Changes
updateMetadata.ts: Auto-detect and support Token-2022 metadata with authority checks and rent top-up.Example Run