mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 21:21:11 +00:00
Move srml RPC extensions to separate crates (#3791)
* Move srml-system RPC out. * Fix tests for system-rpc module. * Contracts RPC moved. * Fix rpc test. * Clean up. * Update lockfile. * Bump runtime version. * Update srml/contracts/rpc/runtime-api/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Bump impl version.
This commit is contained in:
committed by
Gavin Wood
parent
642c8504c4
commit
dc92631180
@@ -31,6 +31,7 @@ babe = { package = "srml-babe", path = "../../srml/babe", default-features = fal
|
||||
balances = { package = "srml-balances", path = "../../srml/balances", default-features = false }
|
||||
collective = { package = "srml-collective", path = "../../srml/collective", default-features = false }
|
||||
contracts = { package = "srml-contracts", path = "../../srml/contracts", default-features = false }
|
||||
contracts-rpc-runtime-api = { package = "srml-contracts-rpc-runtime-api", path = "../../srml/contracts/rpc/runtime-api/", default-features = false }
|
||||
democracy = { package = "srml-democracy", path = "../../srml/democracy", default-features = false }
|
||||
elections = { package = "srml-elections", path = "../../srml/elections", default-features = false }
|
||||
executive = { package = "srml-executive", path = "../../srml/executive", default-features = false }
|
||||
@@ -47,6 +48,7 @@ srml-staking-reward-curve = { path = "../../srml/staking/reward-curve"}
|
||||
sudo = { package = "srml-sudo", path = "../../srml/sudo", default-features = false }
|
||||
support = { package = "srml-support", path = "../../srml/support", default-features = false }
|
||||
system = { package = "srml-system", path = "../../srml/system", default-features = false }
|
||||
system-rpc-runtime-api = { package = "srml-system-rpc-runtime-api", path = "../../srml/system/rpc/runtime-api/", default-features = false }
|
||||
timestamp = { package = "srml-timestamp", path = "../../srml/timestamp", default-features = false }
|
||||
treasury = { package = "srml-treasury", path = "../../srml/treasury", default-features = false }
|
||||
utility = { package = "srml-utility", path = "../../srml/utility", default-features = false }
|
||||
@@ -67,6 +69,7 @@ std = [
|
||||
"codec/std",
|
||||
"collective/std",
|
||||
"contracts/std",
|
||||
"contracts-rpc-runtime-api/std",
|
||||
"democracy/std",
|
||||
"elections/std",
|
||||
"executive/std",
|
||||
@@ -93,6 +96,7 @@ std = [
|
||||
"sudo/std",
|
||||
"support/std",
|
||||
"system/std",
|
||||
"system-rpc-runtime-api/std",
|
||||
"timestamp/std",
|
||||
"treasury/std",
|
||||
"utility/std",
|
||||
|
||||
@@ -27,7 +27,7 @@ use support::{
|
||||
use primitives::u32_trait::{_1, _2, _3, _4};
|
||||
use node_primitives::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, Hash, Index,
|
||||
Moment, Signature, ContractExecResult,
|
||||
Moment, Signature,
|
||||
};
|
||||
use babe_primitives::{AuthorityId as BabeId, AuthoritySignature as BabeSignature};
|
||||
use grandpa::fg_primitives;
|
||||
@@ -84,7 +84,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to equal spec_version. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 175,
|
||||
spec_version: 176,
|
||||
impl_version: 176,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
@@ -660,20 +660,22 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl node_primitives::AccountNonceApi<Block> for Runtime {
|
||||
impl system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Index {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl node_primitives::ContractsApi<Block> for Runtime {
|
||||
impl contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance> for Runtime {
|
||||
fn call(
|
||||
origin: AccountId,
|
||||
dest: AccountId,
|
||||
value: Balance,
|
||||
gas_limit: u64,
|
||||
input_data: Vec<u8>,
|
||||
) -> ContractExecResult {
|
||||
) -> contracts_rpc_runtime_api::ContractExecResult {
|
||||
use contracts_rpc_runtime_api::ContractExecResult;
|
||||
|
||||
let exec_result = Contracts::bare_call(
|
||||
origin,
|
||||
dest.into(),
|
||||
|
||||
Reference in New Issue
Block a user