add ReferenceHolding to MPTokenIssuance and vault_info shares#3345
Open
Patel-Raj11 wants to merge 3 commits into
Open
add ReferenceHolding to MPTokenIssuance and vault_info shares#3345Patel-Raj11 wants to merge 3 commits into
Patel-Raj11 wants to merge 3 commits into
Conversation
Contributor
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/xrpl/test/integration/transactions/singleAssetVault.test.ts`:
- Around line 154-157: Before making ledger_entry requests, assert that
vaultInfoResult.result.vault.ShareMPTID is present and non-empty; if missing
throw or fail the test with a clear message. Update the two places that call
testContext.client.request({ command: 'ledger_entry', mpt_issuance:
vaultInfoResult.result.vault.ShareMPTID }) to first check
vaultInfoResult.result.vault && vaultInfoResult.result.vault.ShareMPTID and
produce an explicit test failure (or throw) naming ShareMPTID and
vaultInfoResult, so the ledger_entry call is only performed when ShareMPTID is
defined.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 30475d1e-569a-4947-a61f-45107c28587f
📒 Files selected for processing (5)
.ci-config/xrpld.cfgpackages/xrpl/HISTORY.mdpackages/xrpl/src/models/ledger/MPTokenIssuance.tspackages/xrpl/src/models/methods/vaultInfo.tspackages/xrpl/test/integration/transactions/singleAssetVault.test.ts
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.
High Level Overview of Change
Adds the
ReferenceHoldingfield to theMPTokenIssuanceledger type and thevault_inforesponse'ssharesobject.Corresponding rippled PR: XRPLF/rippled#7077
Additionally, this PR takes the opportunity to fix discrepancies found in
MPTokenIssuanceandVaultInfoResponse:Sequence,DomainID) toMPTokenIssuanceledger type.AssetScale,MaximumAmount,TransferFee,MPTokenMetadata,LockedAmount) to thevault_inforesponsesharesobject.Flags,ShareMPTID,WithdrawalPolicy, andOwnerNodeinVaultInfoResponse— these are required perVaultledger type but were incorrectly marked optional.Context of Change
When a vault is created, rippled now sets a
ReferenceHoldingfield on the vault's shareMPTokenIssuance. This field points to the vault pseudo-account's holding for the underlying asset (MPToken keylet for MPT-backed vaults, RippleState keylet for IOU-backed vaults, absent for XRP-backed vaults). The client library types need to reflect this.Type of Change
Did you update HISTORY.md?
Test Plan
ReferenceHoldingis defined on IOU and MPT backed vault shares