Skip to content

fix: Regenerate ledger objects and sfields from rippled - #327

Open
mvadari wants to merge 1 commit into
mainfrom
mvadari/regenerate-ledger-objects
Open

mvadari wants to merge 1 commit into
mainfrom
mvadari/regenerate-ledger-objects

Conversation

@mvadari

@mvadari mvadari commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

Reruns generate-ledger-objects.sh and generate-sfields.sh against current rippled. This adds the TransactionProposal ledger entry, LoanBroker.domain_id(), and MPToken.recovery_key(), and updates the Vault.share_mpt_id() doc comment from the dev portal.

Context of Change

ripple/se/supported added ProposalID, RecoveryKey, SigningFor, and ProposedTransaction at the wire codes that xrplf/smart-contracts uses for ContractHash, ContractCode, ContractAccount, and Function. The sfield merge keeps the escrow fields, so those four contract constants are removed. Nothing in this repo uses them.

RecoveryKey was needed for the regenerated mptoken.rs to compile. The new TransactionProposal types are added to the objects re-export list.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Test Plan

  • ./scripts/generate-ledger-objects.sh --check passes
  • ./scripts/fmt.sh and ./scripts/clippy.sh pass
  • ./scripts/build-and-test.sh: 593 tests pass, 0 fail

🤖 Generated with Claude Code

Adds the TransactionProposal entry, LoanBroker.DomainID, and
MPToken.RecoveryKey. ripple/se/supported now uses the wire codes of
ContractHash, ContractCode, ContractAccount, and Function, so the merge
keeps the escrow fields (ProposalID, RecoveryKey, SigningFor,
ProposedTransaction) and drops the contract ones.
@mvadari
mvadari requested review from sappenin and a balanced review from Copilot and removed request for sappenin October 14, 2026 19:01

@ripple-code-reviewer ripple-code-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a mechanical regeneration of ledger objects and sfields from rippled's current schema. The sfield renames (ContractHash→ProposalID, ContractCode→RecoveryKey, ContractAccount→SigningFor, Function→ProposedTransaction) preserve the same wire codes and value types, the new TransactionProposal object follows the existing generated-object pattern consistently, and the LoanBroker/MPToken additions and Vault doc comment update are straightforward and self-consistent. No correctness, security, or wiring issues found in the added code.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The regenerated bindings are consistent with existing generation patterns and include appropriate exports and tests.

0 open findings

What changed in this PR

Regenerates XRPL ledger-object bindings and SFields from current rippled definitions.

Changes:

  • Adds typed TransactionProposal accessors and exports.
  • Adds LoanBroker::domain_id() and MPToken::recovery_key().
  • Replaces four conflicting contract SFields with authoritative definitions.
File Description
xrpl-common-stdlib/​src/​sfield.rs Updates conflicting SField definitions.
xrpl-common-stdlib/​src/​objects/​mod.rs Exports transaction proposal APIs.
xrpl-common-stdlib/​src/​objects/​generated/​vault.rs Updates share issuance documentation.
xrpl-common-stdlib/​src/​objects/​generated/​transaction_proposal.rs Adds typed transaction proposal bindings and tests.
xrpl-common-stdlib/​src/​objects/​generated/​mptoken.rs Adds recovery-key accessors and coverage.
xrpl-common-stdlib/​src/​objects/​generated/​mod.rs Registers and re-exports the new generated module.
xrpl-common-stdlib/​src/​objects/​generated/​loan_broker.rs Adds domain-ID accessors and coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

2 participants