Skip to content

Conversation

@elizabethengelman
Copy link
Collaborator

@elizabethengelman elizabethengelman commented Sep 5, 2025

What

A small change to include the ledger sequence number, and the ledger status of the fetched tx.

❯ stellar tx fetch result --hash a5527a54978bc1ebfc9bfa56f7c11149060eea009c39baff8af98fc7f60bc688 --network local --output json-formatted

Transaction Status: SUCCESS
Transaction Ledger: 91
{
  "fee_charged": "41727",
  "result": {
    "tx_success": [
      {
        "op_inner": {
          "invoke_host_function": {
            "success": "df071a249d03fc2f22313f75c734a254bbea03124cea77001704db0670b2fc02"
          }
        }
      }
    ]
  },
  "ext": "v0"
}

This is only included when the output if json-formatted, or on the fee table.

Dependent on: stellar/rs-stellar-rpc-client#48

Why

While I was looking into fetching events, I realized that the ledger information is not included on the tx and thought that this would be helpful information.

We could alternatively embed this in the json with a custom type, but I wanted to make sure that the returned json could be decoded into an easy-to-access type (xdr::TransactionEnvelope, xdr::TransactionResult or xdr::TransactionMeta) so that scripts could use this if needed.

Known limitations

Cargo deny failure should be fixed when the associated rpc client PR is merged, and released.

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Sep 5, 2025
@elizabethengelman elizabethengelman self-assigned this Sep 8, 2025
@elizabethengelman elizabethengelman changed the title Feat/add tx ledger Add ledger seq number to stellar tx fetch output Sep 10, 2025
@elizabethengelman elizabethengelman moved this from Backlog (Not Ready) to Needs Review in DevX Sep 11, 2025
@elizabethengelman elizabethengelman merged commit d43fc1b into main Sep 15, 2025
31 checks passed
@elizabethengelman elizabethengelman deleted the feat/add-tx-ledger branch September 15, 2025 21:41
@github-project-automation github-project-automation bot moved this from Needs Review to Done in DevX Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants