mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 20:05:50 +00:00
Merge pull request #3360 from XRPLF/consistent_tx_examples
Add mainnet AMMCreate and OracleSet transaction examples
This commit is contained in:
@@ -19,21 +19,32 @@ Creates both an [AMM entry][] and a [special AccountRoot entry](../../ledger-dat
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Account" : "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
"Account": "r3qNwezAqKp2FRFteiFjhC4V1at4KePFx7",
|
||||||
"Amount" : {
|
"Amount": {
|
||||||
"currency" : "TST",
|
"currency": "SKY",
|
||||||
"issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd",
|
"issuer": "rSKYachd4cqUgztsTr83mEKTAcNZG4Ez2",
|
||||||
"value" : "25"
|
"value": "80"
|
||||||
},
|
},
|
||||||
"Amount2" : "250000000",
|
"Amount2": "20000000",
|
||||||
"Fee" : "2000000",
|
"Fee": "200000",
|
||||||
"Flags" : 2147483648,
|
"Flags": 2147483648,
|
||||||
"Sequence" : 6,
|
"LastLedgerSequence": 99502897,
|
||||||
"TradingFee" : 500,
|
"Memos": [
|
||||||
"TransactionType" : "AMMCreate"
|
{
|
||||||
|
"Memo": {
|
||||||
|
"MemoData": "414D4D2063726561746520696E69746961746564207669612058506D61726B65742E636F6D"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Sequence": 94041760,
|
||||||
|
"SourceTag": 20221212,
|
||||||
|
"TradingFee": 1000,
|
||||||
|
"TransactionType": "AMMCreate",
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% tx-example txid="E4CC45E28421618FFEB1920B8FE152EAAB70489BD9AD52FEF24D58389C011C5E" /%}
|
||||||
|
|
||||||
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
|
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
|
||||||
|
|
||||||
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
||||||
|
|||||||
@@ -16,27 +16,79 @@ Create or update a [price oracle](../../../../concepts/decentralized-storage/pri
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"TransactionType": "OracleSet",
|
"Account": "roosteri9aGNFRXZrJNYQKVBfxHiE5abg",
|
||||||
"Account": "rNZ9m6AP9K7z3EVg6GhPMx36V4QmZKeWds",
|
|
||||||
"OracleDocumentID": 34,
|
|
||||||
"Provider": "70726F7669646572",
|
|
||||||
"LastUpdateTime": 1724871860,
|
|
||||||
"AssetClass": "63757272656E6379",
|
"AssetClass": "63757272656E6379",
|
||||||
|
"Fee": "12",
|
||||||
|
"LastUpdateTime": 1760397040,
|
||||||
|
"OracleDocumentID": 3,
|
||||||
"PriceDataSeries": [
|
"PriceDataSeries": [
|
||||||
{
|
{
|
||||||
"PriceData": {
|
"PriceData": {
|
||||||
|
"AssetPrice": "267e",
|
||||||
"BaseAsset": "XRP",
|
"BaseAsset": "XRP",
|
||||||
"QuoteAsset": "USD",
|
"QuoteAsset": "SAR",
|
||||||
"AssetPrice": 740,
|
|
||||||
"Scale": 3
|
"Scale": 3
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"PriceData": {
|
||||||
|
"AssetPrice": "214a",
|
||||||
|
"BaseAsset": "XRP",
|
||||||
|
"QuoteAsset": "THB",
|
||||||
|
"Scale": 2
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
{
|
||||||
|
"PriceData": {
|
||||||
|
"AssetPrice": "1abc8",
|
||||||
|
"BaseAsset": "XRP",
|
||||||
|
"QuoteAsset": "TRY",
|
||||||
|
"Scale": 3
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"PriceData": {
|
||||||
|
"AssetPrice": "13b19",
|
||||||
|
"BaseAsset": "XRP",
|
||||||
|
"QuoteAsset": "TWD",
|
||||||
|
"Scale": 3
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"PriceData": {
|
||||||
|
"AssetPrice": "686e090",
|
||||||
|
"BaseAsset": "XRP",
|
||||||
|
"QuoteAsset": "UAH",
|
||||||
|
"Scale": 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"PriceData": {
|
||||||
|
"AssetPrice": "a34",
|
||||||
|
"BaseAsset": "XRP",
|
||||||
|
"QuoteAsset": "USD",
|
||||||
|
"Scale": 3
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"PriceData": {
|
||||||
|
"AssetPrice": "11d9",
|
||||||
|
"BaseAsset": "XRP",
|
||||||
|
"QuoteAsset": "ZAR",
|
||||||
|
"Scale": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Provider": "7468726565787270",
|
||||||
|
"Sequence": 95076881,
|
||||||
|
"TransactionType": "OracleSet",
|
||||||
|
"URI": "68747470733A2F2F6174746573746174696F6E2E74687265657872702E6465762F63757272656E63793A39393530323934303A39353037363838313A33"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% tx-example txid="11449FDBDF40345F08B2E1537EA9590369B5A662CDEB3DB71F9A2CC04E1012C1" /%}
|
||||||
|
|
||||||
## OracleSet Fields
|
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
|
||||||
|
|
||||||
| Field | JSON Type | Internal Type | Required? | Description |
|
| Field | JSON Type | Internal Type | Required? | Description |
|
||||||
|--------------------|-----------|---------------|-----------|-------------|
|
|--------------------|-----------|---------------|-----------|-------------|
|
||||||
|
|||||||
Reference in New Issue
Block a user