Skip to content

fix: correct MPT issuance ID computation and amm info hint in init templates#41

Open
shichengripple001 wants to merge 1 commit into
mainfrom
fix/example-scripts-mpt-amm
Open

fix: correct MPT issuance ID computation and amm info hint in init templates#41
shichengripple001 wants to merge 1 commit into
mainfrom
fix/example-scripts-mpt-amm

Conversation

@shichengripple001

Copy link
Copy Markdown
Contributor

Summary

  • MPT issuance ID: Both EXAMPLE_MPT_SCRIPT and EXAMPLE_MPT_LOCAL were using LedgerIndex (256-bit) as the MPTokenIssuanceID, but ripple-binary-codec expects Hash192 (192-bit = sequence 4 bytes + accountID 20 bytes). This caused Invalid Hash length 32 when trying to sign the MPTokenAuthorize transaction.
  • AMM info hint: The printed query hint used an invalid syntax (xrpl-up amm info XRP USD.<address> --local). Fixed to use --asset/--asset2 flags and --node local.

Test plan

  • Ran xrpl-up run scripts/example-mpt.ts locally — MPT issuance, opt-in, transfer, and balance check all succeed
  • Ran xrpl-up amm info --asset XRP --asset2 USD/<address> --node local — returns pool info correctly

🤖 Generated with Claude Code

…mplates

- Use sequence + accountID (192-bit) instead of LedgerIndex (256-bit) for
  MPTokenIssuanceID — the binary codec expects Hash192, not Hash256
- Fix amm info hint to use --asset/--asset2 flags and --node instead of
  the invalid positional + --local syntax

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shichengripple001 shichengripple001 force-pushed the fix/example-scripts-mpt-amm branch from 0907e56 to 339a5a9 Compare May 18, 2026 11:01
@shichengripple001 shichengripple001 requested a review from a team May 18, 2026 11:29
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.

1 participant