mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Implement native support for Price Oracles. A Price Oracle is used to bring real-world data, such as market prices, onto the blockchain, enabling dApps to access and utilize information that resides outside the blockchain. Add Price Oracle functionality: - OracleSet: create or update the Oracle object - OracleDelete: delete the Oracle object To support this functionality add: - New RPC method, `get_aggregate_price`, to calculate aggregate price for a token pair of the specified oracles - `ltOracle` object The `ltOracle` object maintains: - Oracle Owner's account - Oracle's metadata - Up to ten token pairs with the scaled price - The last update time the token pairs were updated Add Oracle unit-tests
This commit is contained in:
committed by
GitHub
parent
d7d15a922a
commit
e718378bdb
@@ -138,6 +138,15 @@ InnerObjectFormats::InnerObjectFormats()
|
||||
{
|
||||
{sfAccount, soeREQUIRED},
|
||||
});
|
||||
|
||||
add(sfPriceData.jsonName.c_str(),
|
||||
sfPriceData.getCode(),
|
||||
{
|
||||
{sfBaseAsset, soeREQUIRED},
|
||||
{sfQuoteAsset, soeREQUIRED},
|
||||
{sfAssetPrice, soeOPTIONAL},
|
||||
{sfScale, soeDEFAULT},
|
||||
});
|
||||
}
|
||||
|
||||
InnerObjectFormats const&
|
||||
|
||||
Reference in New Issue
Block a user