Add Transaction Payment Custom RPC (#806)

* Transaction payment RPC.

* Add payment RuntimeApi to fix the build.

* cargo fmt --all
This commit is contained in:
Tomasz Drwięga
2021-03-09 12:46:53 +01:00
committed by Bastian Köcher
parent 51db99ea79
commit 903018db3d
8 changed files with 40 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@ rialto-runtime = { path = "../runtime" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
node-inspect = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master", features = ["wasmtime"] }
sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+4
View File
@@ -224,6 +224,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
}
use pallet_message_lane_rpc::{MessageLaneApi, MessageLaneRpcHandler};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
use sc_finality_grandpa_rpc::{GrandpaApi, GrandpaRpcHandler};
use sc_rpc::DenyUnsafe;
use substrate_frame_rpc_system::{FullSystem, SystemApi};
@@ -246,6 +247,9 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
pool.clone(),
DenyUnsafe::No,
)));
io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(
client.clone(),
)));
io.extend_with(GrandpaApi::to_delegate(GrandpaRpcHandler::new(
shared_authority_set.clone(),
shared_voter_state.clone(),