Skip to content

QoL batch 3#1916

Open
nazreen wants to merge 11 commits intomainfrom
qol-3
Open

QoL batch 3#1916
nazreen wants to merge 11 commits intomainfrom
qol-3

Conversation

@nazreen
Copy link
Contributor

@nazreen nazreen commented Jan 23, 2026

Solana OFT debug script: state that value 0 for confirmations means 'use default'

Closes DEVREL-1238

When running:

npx hardhat lz:oft:solana:debug --eid <eid> --dst-eids <dst-eids>  

Before:

           confirmations: 0                                        

After:

           confirmations: 0 (Use Pathway Defaults)

Solana OFT - updateMetadata script supports Token-2022 Metadata Update

Closes DEVREL-1239

Problem

  • lz:oft:solana:update-metadata only supported Metaplex metadata, not Token-2022.

Solution

  • Auto-detect metadata type: SPL Token → Metaplex; Token-2022 → probe Metaplex first, else Token Extensions.
  • Add 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

pnpm hardhat lz:oft:solana:update-metadata --eid 40168 --mint <MINT> --name "New Name"

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

🧪 E2E Test Status

E2E tests are non-blocking and validate real blockchain interactions. Failures may occur due to network issues, RPC rate limits, or external service downtime.

Test Runs (Newest First):

  • Run #6749 - Passed - 2026-03-05 17:37 (UTC)
  • Run #6713 - Passed - 2026-02-10 16:40 (UTC)
  • Run #6709 - Passed - 2026-02-10 02:40 (UTC)
  • Run #6673 - Passed - 2026-02-03 17:18 (UTC)
  • Run #6661 - Passed - 2026-01-29 16:57 (UTC)
  • Run #6628 - Passed - 2026-01-23 22:05 (UTC)

@nazreen nazreen requested review from fabianhug and lzJxhn January 29, 2026 17:09
@nazreen nazreen marked this pull request as ready for review January 29, 2026 17:09
@cursor
Copy link

cursor bot commented Jan 29, 2026

PR Summary

Medium Risk
Adds new transaction-building and rent-transfer behavior for Token-2022 metadata updates, which could fail or mis-estimate rent/authority in edge cases. Other changes are low risk output/UX tweaks.

Overview
Improves the Solana OFT Hardhat tooling UX.

lz:oft:solana:update-metadata now auto-detects whether a mint uses Metaplex metadata or Token-2022 Token Extensions and updates accordingly, including new authority validation and rent top-up logic when Token Extensions metadata needs more space (with Squads/multisig support via base58-encoded v0 tx output).

The lz:oft:solana:debug output now annotates confirmations: 0 as use pathway defaults, and getOftStoreAddress no longer emits a warning when the deployment file is absent (returning null silently) while still warning on malformed deployment data.

Written by Cursor Bugbot for commit 448ea6c. This will update automatically on new commits. Configure here.

@nazreen
Copy link
Contributor Author

nazreen commented Feb 3, 2026

bump @lzJxhn

Copy link

@cursor cursor bot left a 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 2 potential issues.

Copy link
Contributor

@St0rmBr3w St0rmBr3w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug.ts and index.ts changes look good. The "Use Pathway Defaults" label for 0 confirmations is a nice touch, and silencing the warning when the deployment file doesn't exist yet makes the create flow much cleaner. Changesets are appropriate.

On updateMetadata: the auto-detection logic (SPL Token -> Metaplex, Token-2022 -> probe for Metaplex PDA first, fall back to Token Extensions) is solid. The early hasFieldUpdates check prevents the rent-only footgun that bugbot flagged, and keypair resolution goes through getSolanaKeypair() as expected.

Looks good to merge.

Copy link
Contributor

@St0rmBr3w St0rmBr3w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nazreen nazreen added this pull request to the merge queue Mar 5, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2026
@nazreen nazreen added this pull request to the merge queue Mar 5, 2026
@nazreen nazreen removed this pull request from the merge queue due to a manual request Mar 5, 2026
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.

4 participants