mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Broker: sale price runtime api (#3485)
Defines a runtime api for `pallet-broker` for getting the current price of a core if there is an ongoing sale. Closes: #3413 --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -64,7 +64,7 @@ use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
traits::Block as BlockT,
|
||||
transaction_validity::{TransactionSource, TransactionValidity},
|
||||
ApplyExtrinsicResult, MultiAddress, Perbill,
|
||||
ApplyExtrinsicResult, DispatchError, MultiAddress, Perbill,
|
||||
};
|
||||
use sp_std::prelude::*;
|
||||
#[cfg(feature = "std")]
|
||||
@@ -584,6 +584,12 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_broker::runtime_api::BrokerApi<Block, Balance> for Runtime {
|
||||
fn sale_price() -> Result<Balance, DispatchError> {
|
||||
Broker::current_price()
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
|
||||
Reference in New Issue
Block a user