Update to latest substrate (#504)

* Update cargo files

* First round of build fixes

* update lock file
This commit is contained in:
Kian Paimani
2019-10-28 14:28:13 +01:00
committed by Gavin Wood
parent ca8aa4c4cd
commit 8fb635b5e5
21 changed files with 1038 additions and 984 deletions
+7 -5
View File
@@ -5,11 +5,13 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "kiz-rpc-for-fee-stuff" }
jsonrpc-core = "13.2.0"
polkadot-primitives = { path = "../primitives" }
sr-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
transaction_pool = { package = "substrate-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
srml-system-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sr-primitives = { git = "https://github.com/paritytech/substrate", branch = "kiz-rpc-for-fee-stuff" }
substrate-rpc = { git = "https://github.com/paritytech/substrate", branch = "kiz-rpc-for-fee-stuff" }
transaction_pool = { package = "substrate-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "kiz-rpc-for-fee-stuff" }
srml-system-rpc = { git = "https://github.com/paritytech/substrate", branch = "kiz-rpc-for-fee-stuff" }
srml-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "kiz-rpc-for-fee-stuff" }
polkadot-runtime = { path = "../runtime" }
+7 -1
View File
@@ -20,9 +20,10 @@
use std::sync::Arc;
use polkadot_primitives::{Block, AccountId, Nonce};
use polkadot_primitives::{Block, AccountId, Nonce, Balance};
use sr_primitives::traits::ProvideRuntimeApi;
use transaction_pool::txpool::{ChainApi, Pool};
use polkadot_runtime::UncheckedExtrinsic;
/// A type representing all RPC extensions.
pub type RpcExtension = jsonrpc_core::IoHandler<substrate_rpc::Metadata>;
@@ -33,13 +34,18 @@ pub fn create<C, P>(client: Arc<C>, pool: Arc<Pool<P>>) -> RpcExtension where
C: client::blockchain::HeaderBackend<Block>,
C: Send + Sync + 'static,
C::Api: srml_system_rpc::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: srml_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance, UncheckedExtrinsic>,
P: ChainApi + Sync + Send + 'static,
{
use srml_system_rpc::{System, SystemApi};
use srml_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(
SystemApi::to_delegate(System::new(client.clone(), pool))
);
io.extend_with(
TransactionPaymentApi::to_delegate(TransactionPayment::new(client))
);
io
}