mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
TicketBatch: start tx, ledger, result code updates
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
---
|
||||
html: ticket.html
|
||||
funnel: Build
|
||||
doc_type: References
|
||||
supercategory: rippled API
|
||||
category: Ledger Data Formats
|
||||
subcategory: Ledger Object Types
|
||||
blurb: A Ticket tracks an account sequence number that has been set aside for future use.
|
||||
parent: ledger-object-types.html
|
||||
---
|
||||
# Ticket
|
||||
|
||||
[[Source]](https://github.com/ripple/rippled/blob/76a6956138c4ecd156c5c408f136ed3d6ab7d0c1/src/ripple/protocol/impl/LedgerFormats.cpp#L155-L164)
|
||||
|
||||
_(Requires the [TicketBatch amendment][] :not_enabled:)_
|
||||
|
||||
The `Ticket` object type represents a [Ticket](tickets.html), which tracks an account [sequence number][Sequence Number] that has been set aside for future use. You can create new tickets with a [TicketCreate transaction][].
|
||||
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
```json
|
||||
{
|
||||
TODO
|
||||
}
|
||||
```
|
||||
|
||||
## {{currentpage.name}} Fields
|
||||
|
||||
A `Ticket` object has the following fields:
|
||||
|
||||
| Name | JSON Type | Internal Type | Description |
|
||||
|:--------------------|:----------|:--------------|:---------------------------|
|
||||
| `LedgerEntryType` | String | UInt16 | The value `0x0054`, mapped to the string `Ticket`, indicates that this object is a {{currentpage.name}} object. |
|
||||
| `Account` | String | AccountID | The [account](accounts.html) that owns this Ticket. |
|
||||
| `Flags` | Number | UInt32 | A bit-map of Boolean flags enabled for this signer list. For more information, see [SignerList Flags](#signerlist-flags). |
|
||||
| `OwnerNode` | String | UInt64 | A hint indicating which page of the owner directory links to this object, in case the directory consists of multiple pages. **Note:** The object does not contain a direct link to the owner directory containing it, since that value can be derived from the `Account`. |
|
||||
| `PreviousTxnID` | String | Hash256 | The identifying hash of the [transaction](transaction-basics.html) that most recently modified this object. |
|
||||
| `PreviousTxnLgrSeq` | Number | UInt32 | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. |
|
||||
| `TicketSequence` | Number | UInt32 | The [Sequence Number][] this Ticket sets aside. |
|
||||
|
||||
## {{currentpage.name}} ID Format
|
||||
|
||||
The ID of a Ticket object is the SHA-512Half of the following values, concatenated in order:
|
||||
|
||||
* The Ticket space key (`0x0054`)
|
||||
* The AccountID of the owner of the Ticket
|
||||
* The `TicketSequence` number of the Ticket
|
||||
@@ -22,6 +22,7 @@ These codes indicate that the transaction failed and was not included in a ledge
|
||||
| `tefMASTER_DISABLED` | The transaction was signed with the account's master key, but the account has the `lsfDisableMaster` field set. |
|
||||
| `tefMAX_LEDGER` | The transaction included a [`LastLedgerSequence`](reliable-transaction-submission.html#lastledgersequence) parameter, but the current ledger's sequence number is already higher than the specified value. |
|
||||
| `tefNO_AUTH_REQUIRED` | The [TrustSet transaction][] tried to mark a trust line as authorized, but the `lsfRequireAuth` flag is not enabled for the corresponding account, so authorization is not necessary. |
|
||||
| `tefNO_TICKET` | The transaction attempted to use a [Ticket](tickets.html), but the specified `TicketSequence` number does not exist in the ledger, and cannot be created in the future because it is earlier than the sender's current sequence number. |
|
||||
| `tefNOT_MULTI_SIGNING` | The transaction was [multi-signed](multi-signing.html), but the sending account has no SignerList defined. |
|
||||
| `tefPAST_SEQ` | The sequence number of the transaction is lower than the current sequence number of the account sending the transaction. |
|
||||
| `tefTOO_BIG` | The transaction would affect too many objects in the ledger. For example, this was an [AccountDelete transaction][] but the account to be deleted owns over 1000 objects in the ledger. |
|
||||
|
||||
@@ -29,6 +29,7 @@ These codes indicate that the transaction was malformed, and cannot succeed acco
|
||||
| `temDST_IS_SRC` | The transaction improperly specified a destination address as the `Account` sending the transaction. This includes trust lines (where the destination address is the `issuer` field of `LimitAmount`) and payment channels (where the destination address is the `Destination` field). |
|
||||
| `temDST_NEEDED` | The transaction improperly omitted a destination. This could be the `Destination` field of a [Payment transaction][], or the `issuer` sub-field of the `LimitAmount` field fo a `TrustSet` transaction. |
|
||||
| `temINVALID` | The transaction is otherwise invalid. For example, the transaction ID may not be the right format, the signature may not be formed properly, or something else went wrong in understanding the transaction. |
|
||||
| `temINVALID_COUNT` | The transaction includes a `TicketCount` field, but the number of Tickets specified is invalid. |
|
||||
| `temINVALID_FLAG` | The transaction includes a [Flag](transaction-common-fields.html#flags-field) that does not exist, or includes a contradictory combination of flags. |
|
||||
| `temMALFORMED` | Unspecified problem with the format of the transaction. |
|
||||
| `temREDUNDANT` | The transaction would do nothing; for example, it is sending a payment directly to the sending account, or creating an offer to buy and sell the same currency from the same issuer. |
|
||||
|
||||
@@ -15,6 +15,7 @@ These codes indicate that the transaction failed, but it could apply successfull
|
||||
| `terNO_RIPPLE` | Used internally only. This code should never be returned. |
|
||||
| `terOWNERS` | The transaction requires that account sending it has a nonzero "owners count", so the transaction cannot succeed. For example, an account cannot enable the [`lsfRequireAuth`](accountset.html#accountset-flags) flag if it has any trust lines or available offers. |
|
||||
| `terPRE_SEQ` | The `Sequence` number of the current transaction is higher than the current sequence number of the account sending the transaction. |
|
||||
| `terPRE_TICKET` | The transaction attempted to use a [Ticket](tickets.html), but the specified `TicketSequence` number does not exist in the ledger. However, the Ticket could still be created by another transaction. |
|
||||
| `terRETRY` | Unspecified retriable error. |
|
||||
| `terQUEUED` | The transaction met the load-scaled [transaction cost](transaction-cost.html) but did not meet the open ledger requirement, so the transaction has been queued for a future ledger. |
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
html: ticketcreate.html
|
||||
funnel: Build
|
||||
doc_type: References
|
||||
supercategory: rippled API
|
||||
category: Transaction Formats
|
||||
subcategory: Transaction Types
|
||||
blurb: Set aside one or more sequence numbers as Tickets.
|
||||
parent: transaction-types.html
|
||||
---
|
||||
# TicketCreate
|
||||
|
||||
[[Source]](https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/CreateTicket.cpp "Source")
|
||||
|
||||
_(Requires the [TicketBatch amendment][] :not_enabled:)_
|
||||
|
||||
A TicketCreate transaction sets aside one or more [sequence numbers][Sequence Number] as [Tickets](tickets.html).
|
||||
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"TransactionType": "TicketCreate",
|
||||
TODO
|
||||
}
|
||||
```
|
||||
|
||||
{% include '_snippets/tx-fields-intro.md' %}
|
||||
<!--{# fix md highlighting_ #}-->
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-----------------|:-----------------|:------------------|:-------------------|
|
||||
| `TicketCount` | Number | UInt32 | How many Tickets to create. This must be a positive number, and cannot cause the account to own more than 250 Tickets after executing this transaction. |
|
||||
|
||||
**Tip:** This transaction increases the sending account's [sequence number][Sequence Number] by the number of tickets created (`TicketCount`). This is the only transaction that increases an account's sequence number by more than 1.
|
||||
|
||||
## Error Cases
|
||||
|
||||
In addition to errors that can occur for all transactions, {{currentpage.name}} transactions can result in the following [transaction result codes](transaction-results.html):
|
||||
|
||||
| Error Code | Description |
|
||||
|:-----------|:------------|
|
||||
| `temINVALID_COUNT` | The `TicketCount` field is invalid. It must be an integer from 1 to 250. |
|
||||
| `tecDIR_FULL` | This transaction would cause the account to own more than the limit of 250 Tickets at a time, or more than the maximum number of ledger objects in general. |
|
||||
| `tecINSUFFICIENT_RESERVE` | The sending account does not have enough XRP to meet the [owner reserve](reserves.html) of all the requested Tickets. |
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -5201,6 +5201,11 @@ pages:
|
||||
targets:
|
||||
- ja
|
||||
|
||||
- md: references/rippled-api/ledger-data-formats/ledger-object-types/ticket.md
|
||||
targets:
|
||||
- en
|
||||
- ja
|
||||
|
||||
- md: references/rippled-api/transaction-formats/transaction-formats.md
|
||||
html: transaction-formats.html
|
||||
funnel: Build
|
||||
|
||||
Reference in New Issue
Block a user