From 624dbaf28d13b0eeca55077f48f9589de6aadd41 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Thu, 09 Jun 2022 07:51:23 +0000 Subject: [PATCH] fix: RMRK rpc --- --- a/client/rpc/src/lib.rs +++ b/client/rpc/src/lib.rs @@ -326,6 +326,20 @@ } } +pub struct Rmrk { + client: Arc, + _marker: std::marker::PhantomData

, +} + +impl Rmrk { + pub fn new(client: Arc) -> Self { + Self { + client, + _marker: Default::default(), + } + } +} + macro_rules! pass_method { ( $method_name:ident( @@ -474,7 +488,7 @@ BaseInfo, PartType, Theme, - > for Unique + > for Rmrk where C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, C::Api: RmrkRuntimeApi< --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -169,7 +169,10 @@ Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub, EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, }; - use uc_rpc::{UniqueApiServer, Unique}; + use uc_rpc::{ + UniqueApiServer, Unique, + RmrkApiServer, Rmrk, + }; // use pallet_contracts_rpc::{Contracts, ContractsApi}; use pallet_transaction_payment_rpc::{TransactionPaymentRpc, TransactionPaymentApiServer}; use substrate_frame_rpc_system::{SystemRpc, SystemApiServer}; @@ -223,7 +226,7 @@ )?; io.merge(Unique::new(client.clone()).into_rpc())?; - // TODO RMRK + io.merge(Rmrk::new(client.clone()).into_rpc())?; if let Some(filter_pool) = filter_pool { io.merge( -- gitstuff