Skip to content

Commit

Permalink
feat(vara): add TransactionPaymentCallApi (#3393)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukint-vs authored Oct 9, 2023
1 parent 71168c5 commit 77d537f
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion runtime/vara/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ use pallet_grandpa::{
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_session::historical::{self as pallet_session_historical};
pub use pallet_timestamp::Call as TimestampCall;
pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier};
pub use pallet_transaction_payment::{
CurrencyAdapter, FeeDetails, Multiplier, RuntimeDispatchInfo,
};
use runtime_common::constants::BANK_ADDRESS;
pub use runtime_common::{
constants::{
Expand Down Expand Up @@ -1356,6 +1358,23 @@ impl_runtime_apis_plus_common! {

}

impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
for Runtime
{
fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
fn query_weight_to_fee(weight: Weight) -> Balance {
TransactionPayment::weight_to_fee(weight)
}
fn query_length_to_fee(length: u32) -> Balance {
TransactionPayment::length_to_fee(length)
}
}

impl pallet_nomination_pools_runtime_api::NominationPoolsApi<
Block,
AccountId,
Expand Down

0 comments on commit 77d537f

Please sign in to comment.