pub fn create_full_frost<C, P, BE, A>(
	deps: FullDepsForFrost<C, P, A>,
	subscription_task_executor: SubscriptionTaskExecutor,
) -> jsonrpc_core::IoHandler<sc_rpc::Metadata>
where
	BE: Backend<Block> + 'static,
	BE::State: StateBackend<BlakeTwo256>,
	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,
	C: BlockchainEvents<Block>,
	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,
	C: Send + Sync + 'static,
	C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
	C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
	C::Api: BlockBuilder<Block>,
	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
	P: TransactionPool<Block = Block> + 'static,
	A: ChainApi<Block = Block> + 'static,
{
	use fc_rpc::{
		EthDevSigner, EthSigner
	};
	use pallet_contracts_rpc::{Contracts, ContractsApi};


	let mut io = jsonrpc_core::IoHandler::default();
	let FullDepsForFrost {
		client,
		pool,
		graph,
		deny_unsafe,
		is_authority,
		network,
		filter_pool,
		command_sink,
		backend,
		max_past_logs,
		fee_history_limit,
		fee_history_cache,
		enable_dev_signer,
		overrides,
		block_data_cache,
	} = deps;

	io.extend_with(SystemApi::to_delegate(FullSystem::new(
		client.clone(),
		pool.clone(),
		deny_unsafe,
	)));
	io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(
		client.clone(),
	)));

	// Contracts RPC API extension
	io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));

	let mut signers = Vec::new();
	if enable_dev_signer {
		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
	}
	

	io.extend_with(EthApiServer::to_delegate(EthApi::new(
		client.clone(),
		pool.clone(),
		graph,
		Some(frost_runtime::TransactionConverter),
		network.clone(),
		signers,
		overrides.clone(),
		backend.clone(),
		is_authority,
		block_data_cache.clone(),
		fee_history_limit,
		fee_history_cache,
	)));

	if let Some(filter_pool) = filter_pool {
		io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new(
			client.clone(),
			backend,
			filter_pool.clone(),
			500 as usize, // max stored filters
			max_past_logs,
			block_data_cache.clone(),
		)));
	}

	io.extend_with(NetApiServer::to_delegate(NetApi::new(
		client.clone(),
		network.clone(),
		// Whether to format the `peer_count` response as Hex (default) or not.
		true,
	)));

	io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(client.clone())));

	io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new(
		pool.clone(),
		client.clone(),
		network.clone(),
		SubscriptionManager::<HexEncodedIdProvider>::with_id_provider(
			HexEncodedIdProvider::default(),
			Arc::new(subscription_task_executor),
		),
		overrides,
	)));


	match command_sink {
		Some(command_sink) => {
			io.extend_with(
				// We provide the rpc handler with the sending end of the channel to allow the rpc
				// send EngineCommands to the background block authorship task.
				ManualSealApi::to_delegate(ManualSeal::new(command_sink)),
			);
		}
		_ => {}
	}

	io
}
/// Instantiate all Full RPC extensions.
Instantiate all Full RPC extensions.
Instantiate all Full RPC extensions .
pub fn create_full_frost<C, P, BE, A>(
	deps: FullDepsForFrost<C, P, A>,
	subscription_task_executor: SubscriptionTaskExecutor,
) -> jsonrpc_core::IoHandler<sc_rpc::Metadata>
where
	BE: Backend<Block> + 'static,
	BE::State: StateBackend<BlakeTwo256>,
	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,
	C: BlockchainEvents<Block>,
	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,
	C: Send + Sync + 'static,
	C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
	C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,
	C::Api: BlockBuilder<Block>,
	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
	P: TransactionPool<Block = Block> + 'static,
	A: ChainApi<Block = Block> + 'static,
{
	use fc_rpc::{
		EthDevSigner, EthSigner
	};
	use pallet_contracts_rpc::{Contracts, ContractsApi};
	let mut io = jsonrpc_core::IoHandler::default();
	let FullDepsForFrost {
		client,
		pool,
		graph,
		deny_unsafe,
		is_authority,
		network,
		filter_pool,
		command_sink,
		backend,
		max_past_logs,
		fee_history_limit,
		fee_history_cache,
		enable_dev_signer,
		overrides,
		block_data_cache,
	} = deps;
	io.extend_with(SystemApi::to_delegate(FullSystem::new(
		client.clone(),
		pool.clone(),
		deny_unsafe,
	)));
	io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(
		client.clone(),
	)));
	// Contracts RPC API extension
	io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));
	let mut signers = Vec::new();
	if enable_dev_signer {
		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);
	}
	io.extend_with(EthApiServer::to_delegate(EthApi::new(
		client.clone(),
		pool.clone(),
		graph,
		Some(frost_runtime::TransactionConverter),
		network.clone(),
		signers,
		overrides.clone(),
		backend.clone(),
		is_authority,
		block_data_cache.clone(),
		fee_history_limit,
		fee_history_cache,
	)));
	if let Some(filter_pool) = filter_pool {
		io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new(
			client.clone(),
			backend,
			filter_pool.clone(),
			500 as usize, // max stored filters
			max_past_logs,
			block_data_cache.clone(),
		)));
	}
	io.extend_with(NetApiServer::to_delegate(NetApi::new(
		client.clone(),
		network.clone(),
		// Whether to format the `peer_count` response as Hex (default) or not.
		true,
	)));
	io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(client.clone())));
	io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new(
		pool.clone(),
		client.clone(),
		network.clone(),
		SubscriptionManager::<HexEncodedIdProvider>::with_id_provider(
			HexEncodedIdProvider::default(),
			Arc::new(subscription_task_executor),
		),
		overrides,
	)));
	match command_sink {
		Some(command_sink) => {
			io.extend_with(
				// We provide the rpc handler with the sending end of the channel to allow the rpc
				// send EngineCommands to the background block authorship task.
				ManualSealApi::to_delegate(ManualSeal::new(command_sink)),
			);
		}
		_ => {}
	}
	io
}
pub fn create_full_frost < C , P , BE , A > ( deps : FullDepsForFrost < C , P , A > , subscription_task_executor : SubscriptionTaskExecutor , ) -> jsonrpc_core :: IoHandler < sc_rpc :: Metadata > where BE : Backend < Block > + ' static , BE :: State : StateBackend < BlakeTwo256 > , C : ProvideRuntimeApi < Block > + StorageProvider < Block , BE > + AuxStore , C : BlockchainEvents < Block > , C : HeaderBackend < Block > + HeaderMetadata < Block , Error = BlockChainError > , C : Send + Sync + ' static , C :: Api : frame_rpc_system :: AccountNonceApi < Block , AccountId , Index > , C :: Api : pallet_contracts_rpc :: ContractsRuntimeApi < Block , AccountId , Balance , BlockNumber , Hash > , C :: Api : BlockBuilder < Block > , C :: Api : pallet_transaction_payment_rpc :: TransactionPaymentRuntimeApi < Block , Balance > , C :: Api : fp_rpc :: ConvertTransactionRuntimeApi < Block > , C :: Api : fp_rpc :: EthereumRuntimeRPCApi < Block > , P : TransactionPool < Block = Block > + ' static , A : ChainApi < Block = Block > + ' static , { use fc_rpc :: { EthDevSigner , EthSigner } ; use pallet_contracts_rpc :: { Contracts , ContractsApi } ; let mut io = jsonrpc_core :: IoHandler :: default ( ) ; let FullDepsForFrost { client , pool , graph , deny_unsafe , is_authority , network , filter_pool , command_sink , backend , max_past_logs , fee_history_limit , fee_history_cache , enable_dev_signer , overrides , block_data_cache , } = deps ; io . extend_with ( SystemApi :: to_delegate ( FullSystem :: new ( client . clone ( ) , pool . clone ( ) , deny_unsafe , ) ) ) ; io . extend_with ( TransactionPaymentApi :: to_delegate ( TransactionPayment :: new ( client . clone ( ) , ) ) ) ; // Contracts RPC API extension io . extend_with ( ContractsApi :: to_delegate ( Contracts :: new ( client . clone ( ) ) ) ) ; let mut signers = Vec :: new ( ) ; if enable_dev_signer { signers . push ( Box :: new ( EthDevSigner :: new ( ) ) as Box < dyn EthSigner > ) ; } io . extend_with ( EthApiServer :: to_delegate ( EthApi :: new ( client . clone ( ) , pool . clone ( ) , graph , Some ( frost_runtime :: TransactionConverter ) , network . clone ( ) , signers , overrides . clone ( ) , backend . clone ( ) , is_authority , block_data_cache . clone ( ) , fee_history_limit , fee_history_cache , ) ) ) ; if let Some ( filter_pool ) = filter_pool { io . extend_with ( EthFilterApiServer :: to_delegate ( EthFilterApi :: new ( client . clone ( ) , backend , filter_pool . clone ( ) , 500 as usize , // max stored filters max_past_logs , block_data_cache . clone ( ) , ) ) ) ; } io . extend_with ( NetApiServer :: to_delegate ( NetApi :: new ( client . clone ( ) , network . clone ( ) , // Whether to format the `peer_count` response as Hex (default) or not. true , ) ) ) ; io . extend_with ( Web3ApiServer :: to_delegate ( Web3Api :: new ( client . clone ( ) ) ) ) ; io . extend_with ( EthPubSubApiServer :: to_delegate ( EthPubSubApi :: new ( pool . clone ( ) , client . clone ( ) , network . clone ( ) , SubscriptionManager :: < HexEncodedIdProvider > :: with_id_provider ( HexEncodedIdProvider :: default ( ) , Arc :: new ( subscription_task_executor ) , ) , overrides , ) ) ) ; match command_sink { Some ( command_sink ) => { io . extend_with ( // We provide the rpc handler with the sending end of the channel to allow the rpc // send EngineCommands to the background block authorship task. ManualSealApi :: to_delegate ( ManualSeal :: new ( command_sink ) ) , ) ; } _ => { } } io }
Instantiate all Full RPC extensions.
Instantiate all Full RPC extensions .
deps
FullDepsForFrost<C, P, A>
subscription_task_executor
SubscriptionTaskExecutor