mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Support both polkadot and kusama runtimes (#704)
* Allow both polkadot and kusama runtimes * Allow both polkadot and kusama runtimes * Make `collator` build * Removed kusama runtime * Introduced common runtime * Updated for latest substrate * Updated CI targets * Updated CI version check * Removed unused dependency * Pulled latests substrate * Pulled latest substrate * Fixed version * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * NEW_HEADS_IDENTIFIER moved to primitives * Updated CI check script * Fixed script * Set epoch duration for polkadot * ci: check_runtime for both runtimes Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: gabriel klawitter <gabreal@users.noreply.github.com>
This commit is contained in:
committed by
Gavin Wood
parent
9a9bbd1c2d
commit
a00d74d825
@@ -23,19 +23,19 @@ use std::sync::Arc;
|
||||
use polkadot_primitives::{Block, AccountId, Nonce, Balance};
|
||||
use sp_runtime::traits::ProvideRuntimeApi;
|
||||
use txpool_api::TransactionPool;
|
||||
use polkadot_runtime::UncheckedExtrinsic;
|
||||
|
||||
/// A type representing all RPC extensions.
|
||||
pub type RpcExtension = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
|
||||
|
||||
/// Instantiate all RPC extensions.
|
||||
pub fn create_full<C, P>(client: Arc<C>, pool: Arc<P>) -> RpcExtension where
|
||||
pub fn create_full<C, P, UE>(client: Arc<C>, pool: Arc<P>) -> RpcExtension where
|
||||
C: ProvideRuntimeApi,
|
||||
C: client::blockchain::HeaderBackend<Block>,
|
||||
C: Send + Sync + 'static,
|
||||
C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance, UncheckedExtrinsic>,
|
||||
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance, UE>,
|
||||
P: TransactionPool + Sync + Send + 'static,
|
||||
UE: codec::Codec + Send + Sync + 'static,
|
||||
{
|
||||
use frame_rpc_system::{FullSystem, SystemApi};
|
||||
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
|
||||
@@ -51,7 +51,7 @@ pub fn create_full<C, P>(client: Arc<C>, pool: Arc<P>) -> RpcExtension where
|
||||
}
|
||||
|
||||
/// Instantiate all RPC extensions for light node.
|
||||
pub fn create_light<C, P, F>(
|
||||
pub fn create_light<C, P, F, UE>(
|
||||
client: Arc<C>,
|
||||
remote_blockchain: Arc<dyn client::light::blockchain::RemoteBlockchain<Block>>,
|
||||
fetcher: Arc<F>,
|
||||
@@ -62,9 +62,10 @@ pub fn create_light<C, P, F>(
|
||||
C: client::blockchain::HeaderBackend<Block>,
|
||||
C: Send + Sync + 'static,
|
||||
C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance, UncheckedExtrinsic>,
|
||||
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance, UE>,
|
||||
P: TransactionPool + Sync + Send + 'static,
|
||||
F: client::light::fetcher::Fetcher<Block> + 'static,
|
||||
UE: codec::Codec + Send + Sync + 'static,
|
||||
{
|
||||
use frame_rpc_system::{LightSystem, SystemApi};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user