Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ pub use sc_rpc_api::DenyUnsafe;
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use zenlink_protocol_rpc::{ZenlinkProtocol, ZenlinkProtocolApi};
use zenlink_protocol_runtime_api::ZenlinkProtocolApi as ZenlinkProtocolRuntimeApi;

/// Full client dependencies.
pub struct FullDeps<C, P> {
Expand Down Expand Up @@ -72,6 +74,7 @@ where
C::Api: FeeRuntimeApi<Block, AccountId>,
C::Api: SalpRuntimeApi<Block, ParaId, AccountId>,
C::Api: LiquidityMiningRuntimeApi<Block, AccountId, PoolId>,
C::Api: ZenlinkProtocolRuntimeApi<Block, AccountId>,
P: TransactionPool + 'static,
{
let FullDeps { client, .. } = deps;
Expand All @@ -88,5 +91,7 @@ where
client.clone(),
)));

io.extend_with(ZenlinkProtocolApi::to_delegate(ZenlinkProtocol::new(client.clone())));

io
}
3 changes: 3 additions & 0 deletions node/service/src/collator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use sp_keystore::SyncCryptoStorePtr;
use sp_runtime::traits::BlakeTwo256;
use sp_trie::PrefixedMemoryDB;
use substrate_prometheus_endpoint::Registry;
use zenlink_protocol_runtime_api::ZenlinkProtocolApi as ZenlinkProtocolRuntimeApi;

use crate::RuntimeApiCollection;

Expand Down Expand Up @@ -192,6 +193,7 @@ where
RuntimeApi::RuntimeApi: FeeRuntimeApi<Block, AccountId>,
RuntimeApi::RuntimeApi: SalpRuntimeApi<Block, BifrostParaId, AccountId>,
RuntimeApi::RuntimeApi: LiquidityMiningRuntimeApi<Block, AccountId, PoolId>,
RuntimeApi::RuntimeApi: ZenlinkProtocolRuntimeApi<Block, AccountId>,
Executor: NativeExecutionDispatch + 'static,
BIC: FnOnce(
Arc<TFullClient<Block, RuntimeApi, Executor>>,
Expand Down Expand Up @@ -352,6 +354,7 @@ where
RuntimeApi::RuntimeApi: FeeRuntimeApi<Block, AccountId>,
RuntimeApi::RuntimeApi: SalpRuntimeApi<Block, BifrostParaId, AccountId>,
RuntimeApi::RuntimeApi: LiquidityMiningRuntimeApi<Block, AccountId, PoolId>,
RuntimeApi::RuntimeApi: ZenlinkProtocolRuntimeApi<Block, AccountId>,
Executor: NativeExecutionDispatch + 'static,
{
start_node_impl(
Expand Down