mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-28 15:45:50 +00:00
tx meta: example nop tx
This commit is contained in:
@@ -15,6 +15,8 @@ To understand the outcome of a transaction as described in these instructions, y
|
||||
- For looking up the outcomes of transactions you've recently submitted, the server you submitted through should be sufficient, as long as it maintains sync with the network during tha time.
|
||||
- For outcomes of older transactions, you may want to use a [full-history server](ledger-history.html#full-history).
|
||||
|
||||
**Tip:** There are other ways of querying for data on transactions from the XRP Ledger, including the [Data API](data-api.html) and other exported databases, but those interfaces are non-authoritative. This document describes how to look up data using the `rippled` API directly, for the most direct and authoritative results possible.
|
||||
|
||||
|
||||
## 1. Get Transaction Status
|
||||
|
||||
@@ -51,6 +53,64 @@ The result code is only a summary of the transaction's outcome. To understand in
|
||||
|
||||
## 2. Interpret Metadata
|
||||
|
||||
Transaction metadata describes _exactly_ how the transaction was applied to the ledger, including the following fields:
|
||||
|
||||
{% include '_snippets/tx-metadata-field-table.md' %} <!--_ -->
|
||||
|
||||
Aside from the result code, most of the interesting information is in the `AffectedNodes` array. Much of what to look for in this array depends on the type of transaction, but at a minimum, every normal transaction (that is, not a [pseudo-transaction](pseudo-transaction-types.html)) modifies the sender's [AccountRoot object](accountroot.html), to destroy the XRP [transaction cost](transaction-cost.html) and increase the [account's Sequence number](basic-data-types.html#account-sequence).
|
||||
|
||||
For example, the _only_ changes made by this [no-op transaction](cancel-or-skip-a-transaction.html) are to update the sender's `Sequence`, `Balance`, and [`AccountTxnID`](transaction-common-fields.html#accounttxnid):
|
||||
|
||||
```json
|
||||
{
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "12",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 46447424,
|
||||
"Sequence": 376,
|
||||
"SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
|
||||
"TransactionType": "AccountSet",
|
||||
"TxnSignature": "30450221009B2910D34527F4EA1A02C375D5C38CF768386ACDE0D17CDB04C564EC819D6A2C022064F419272003AA151BB32424F42FC3DBE060C8835031A4B79B69B0275247D5F4",
|
||||
"date": 608257201,
|
||||
"hash": "017DED8F5E20F0335C6F56E3D5EE7EF5F7E83FB81D2904072E665EEA69402567",
|
||||
"inLedger": 46447423,
|
||||
"ledger_index": 46447423,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"AccountTxnID": "017DED8F5E20F0335C6F56E3D5EE7EF5F7E83FB81D2904072E665EEA69402567",
|
||||
"Balance": "396015164",
|
||||
"Domain": "6D64756F31332E636F6D",
|
||||
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
|
||||
"Flags": 8519680,
|
||||
"MessageKey": "0000000000000000000000070000000300",
|
||||
"OwnerCount": 9,
|
||||
"Sequence": 377,
|
||||
"TransferRate": 4294967295
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
|
||||
"PreviousFields": {
|
||||
"AccountTxnID": "E710CADE7FE9C26C51E8630138322D80926BE91E46D69BF2F36E6E4598D6D0CF",
|
||||
"Balance": "396015176",
|
||||
"Sequence": 376
|
||||
},
|
||||
"PreviousTxnID": "E710CADE7FE9C26C51E8630138322D80926BE91E46D69BF2F36E6E4598D6D0CF",
|
||||
"PreviousTxnLgrSeq": 46447387
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 13,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
```
|
||||
|
||||
**Tip:** If the transaction sends or receives XRP, those changes are combined with the transaction cost, resulting in a single change to the sending account's `Balance` field in the net amount. For example, if you sent 1 XRP (1,000,000 drops) and destroyed 10 drops for the transaction cost, the metadata shows only one change to your `Balance`, decreasing it by 1,000,010 XRP.)
|
||||
|
||||
***TODO***
|
||||
|
||||
|
||||
Reference in New Issue
Block a user