mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-30 00:25:49 +00:00
add reviewer suggestions
This commit is contained in:
@@ -13,22 +13,16 @@ _(Requires the [PriceOracle amendment][] {% not-enabled /%})_
|
||||
|
||||
Creates a new `Oracle` ledger entry or updates the fields of an existing one, using the Oracle ID.
|
||||
|
||||
The oracle provider must complete these steps before submitting this transaction:
|
||||
|
||||
1. Create or own the XRPL account in the `Owner` field and have enough XRP to meet the reserve and transaction fee requirements.
|
||||
2. Publish the XRPL account public key, so it can be used for verification by dApps.
|
||||
3. Publish a registry of available price oracles with their unique `OracleDocumentID`.
|
||||
|
||||
|
||||
## Example OracleSet JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"TransactionType": "OracleSet",
|
||||
"Account": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
|
||||
"Account": "rNZ9m6AP9K7z3EVg6GhPMx36V4QmZKeWds",
|
||||
"OracleDocumentID": 34,
|
||||
"Provider": "70726F7669646572",
|
||||
"LastUpdateTime": 743609014,
|
||||
"LastUpdateTime": 1724871860,
|
||||
"AssetClass": "63757272656E6379",
|
||||
"PriceDataSeries": [
|
||||
{
|
||||
@@ -52,13 +46,13 @@ The oracle provider must complete these steps before submitting this transaction
|
||||
| `OracleDocumentID` | Number | UInt32 | Yes | A unique identifier of the price oracle for the `Account`. |
|
||||
| `Provider` | String | Blob | Variable | An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or DIA. This field is a string, up to 256 ASCII hex encoded characters (0x20-0x7E). This field is required when creating a new `Oracle` ledger entry, but is optional for updates. |
|
||||
| `URI` | String | Blob | No | An optional Universal Resource Identifier to reference price data off-chain. This field is limited to 256 bytes. |
|
||||
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, represented in the [ripple epoch time](https://xrpl.org/basic-data-types.html#specifying-time). |
|
||||
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, in [seconds since the Ripple Epoch][]. |
|
||||
| `AssetClass` | String | Blob | Variable | Describes the type of asset, such as "currency", "commodity", or "index". This field is a string, up to 16 ASCII hex encoded characters (0x20-0x7E). This field is required when creating a new `Oracle` ledger entry, but is optional for updates. |
|
||||
| `PriceDataSeries` | Array | Array | Yes | An array of up to 10 `PriceData` objects, each representing the price information for a token pair. More than five `PriceData` objects require two owner reserves. |
|
||||
|
||||
|
||||
### PriceData Fields
|
||||
|
||||
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, in [seconds since the Ripple Epoch][]. |
|
||||
| Field | JSON Type | Internal Type | Required? | Description |
|
||||
|---------------------|-----------|---------------|-----------|-------------|
|
||||
| `BaseAsset` | String | Currency | Yes | The primary asset in a trading pair. Any valid identifier, such as a stock symbol, bond CUSIP, or currency code is allowed. For example, in the BTC/USD pair, BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset. |
|
||||
@@ -73,12 +67,9 @@ The oracle provider must complete these steps before submitting this transaction
|
||||
- Token pairs in the transaction with a missing `AssetPrice` field delete corresponding token pairs in the object.
|
||||
- Token pairs that only appear in the object have `AssetPrice` and `Scale` removed to signify that the price is outdated.
|
||||
|
||||
**Note:** The order of token pairs in the transaction aren't important because each token pair uniquely identifies the location of the `PriceData` object in the `PriceDataSeries`.
|
||||
|
||||
|
||||
## Reserve Requirements
|
||||
|
||||
The owner reserve requirement is 1 for one to five `PriceData` objects, and 2 for six to ten `PriceData` objects.
|
||||
{% admonition type="info" name="Note" %}
|
||||
The order of token pairs in the transaction aren't important because each token pair uniquely identifies the location of the `PriceData` object in the `PriceDataSeries`.
|
||||
{% /admonition %}
|
||||
|
||||
|
||||
## Error Cases
|
||||
|
||||
Reference in New Issue
Block a user