From f6df6945bcf4425b1e8167f3386f8de284afec49 Mon Sep 17 00:00:00 2001 From: sabin Date: Mon, 2 Jan 2023 13:10:40 +0545 Subject: [PATCH] fix: include contracts in rpc calls --- node/src/rpc.rs | 4 ++++ node/src/service/parachain.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/node/src/rpc.rs b/node/src/rpc.rs index 33bda630..6772f7e1 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -23,6 +23,8 @@ use sp_runtime::traits::BlakeTwo256; use std::collections::BTreeMap; use std::sync::Arc; use substrate_frame_rpc_system::{System, SystemApiServer}; +use pallet_contracts_rpc::{Contracts}; +use pallet_contracts_rpc::ContractsApiServer; use crate::primitives::*; @@ -134,6 +136,7 @@ where + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + fp_rpc::ConvertTransactionRuntimeApi + fp_rpc::EthereumRuntimeRPCApi + + pallet_contracts_rpc::ContractsRuntimeApi + BlockBuilder, P: TransactionPool + Sync + Send + 'static, BE: Backend + 'static, @@ -159,6 +162,7 @@ where io.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; io.merge(TransactionPayment::new(client.clone()).into_rpc())?; + io.merge(Contracts::new(client.clone()).into_rpc())?; io.merge( Eth::new( diff --git a/node/src/service/parachain.rs b/node/src/service/parachain.rs index c2c738b2..42cc2801 100644 --- a/node/src/service/parachain.rs +++ b/node/src/service/parachain.rs @@ -278,6 +278,7 @@ where + sp_block_builder::BlockBuilder + substrate_frame_rpc_system::AccountNonceApi + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + + pallet_contracts_rpc::ContractsRuntimeApi + fp_rpc::EthereumRuntimeRPCApi + fp_rpc::ConvertTransactionRuntimeApi + cumulus_primitives_core::CollectCollationInfo,