Skip to content

Commit 5246eb9

Browse files
committed
Add config for rpc on contextfree
1 parent 30f650f commit 5246eb9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

rpc/src/lib.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ use std::sync::Arc;
5555
// #[cfg(feature = "automata")]
5656
// pub mod transfer;
5757

58+
#[cfg(feature = "contextfree")]
59+
pub mod daoportal;
60+
5861
#[cfg(feature = "finitestate")]
5962
pub mod daoportal;
6063

@@ -170,15 +173,22 @@ where
170173
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
171174
C::Api: sp_consensus_babe::BabeApi<Block>,
172175
C::Api: BlockBuilder<Block>,
176+
C::Api: DAOPortalRuntimeApi<Block>,
173177
P: TransactionPool<Block = Block> + 'static,
174178
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
175179
B::State: sc_client_api::StateBackend<sp_runtime::traits::HashFor<Block>>,
176180
SC: sp_consensus::SelectChain<Block> + 'static,
177181
{
178-
Ok(create_full_base::<C, P, BE, B, SC>(
179-
deps,
180-
subscription_task_executor,
181-
))
182+
use daoportal::DAOPortalServer;
183+
184+
let _client = deps.client.clone();
185+
let mut io = create_full_base::<C, P, BE, B, SC>(deps, subscription_task_executor);
186+
187+
io.extend_with(DAOPortalServer::to_delegate(daoportal::DAOPortalApi::new(
188+
_client.clone(),
189+
)));
190+
191+
Ok(io)
182192
}
183193

184194
#[cfg(feature = "automata")]

0 commit comments

Comments
 (0)