Oracle
Last updated
Last updated
Parallel oracle implement with orml-oracle
, serval approved members can feed prices to on-chain oracle, and then aggregated on-chain.
Tip: follow the link for more info about orml-oracle.
This pallet provides the price from Oracle Module by implementing thePriceFeeder
trait. In case of emergency, the price can be set directly by Oracle Collective.
Mapping from currency id to it's emergency price
Key Name
Type
Description
currency_id
CurrencyId
The currency's Id
Tip: Follow the link to know more about 'CurrencyId'.
Set emergency price
Name
Substrate Config
Runtime Type
Description
origin
T::Origin
RawOrigin
The account signed this transaction
currency_id
-
CurrencyId
The currency id price to be set
price
-
PriceWithDecimal
The price with decimal to be set
RETURN: Returns Ok() when set_price succeeds, otherwise return a substrate error type.
Tip: Follow the link to know more about 'PriceWithDecimal'.
Reset emergency price
Name
Substrate Config
Runtime Type
Description
origin
T::Origin
RawOrigin
The account signed this transaction
currency_id
-
CurrencyId
The currency id price to be set
RETURN: Returns Ok() when reset_price succeeds, otherwise return a substrate error type.
Set emergency price. [currency_id, price_detail]
SetPrice(CurrencyId, PriceWithDecimal)
Reset emergency price. [currency_id]
ResetPrice(CurrencyId)