From 5a0f9d243cacd1919e60a581f0ef7a5bc60d3ead Mon Sep 17 00:00:00 2001 From: Ignacio Palacios Date: Thu, 8 Jun 2023 14:45:55 +0200 Subject: [PATCH] add account nonce api to glutton (#2714) --- cumulus/Cargo.lock | 1 + .../parachains/runtimes/glutton/glutton-kusama/Cargo.toml | 2 ++ .../parachains/runtimes/glutton/glutton-kusama/src/lib.rs | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/cumulus/Cargo.lock b/cumulus/Cargo.lock index 1316e32fb3..9028242c02 100644 --- a/cumulus/Cargo.lock +++ b/cumulus/Cargo.lock @@ -4734,6 +4734,7 @@ dependencies = [ "frame-support", "frame-system", "frame-system-benchmarking", + "frame-system-rpc-runtime-api", "frame-try-runtime", "pallet-glutton", "pallet-sudo", diff --git a/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml index bc502c116f..d2a270bca1 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml +++ b/cumulus/parachains/runtimes/glutton/glutton-kusama/Cargo.toml @@ -13,6 +13,7 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", optional frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, default-features = false, branch = "master" } frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "master" } pallet-glutton = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "master" } @@ -59,6 +60,7 @@ std = [ "frame-executive/std", "frame-support/std", "frame-system/std", + "frame-system-rpc-runtime-api/std", "pallet-glutton/std", "pallet-sudo/std", "sp-api/std", diff --git a/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs index 388715f09c..fba081f2d6 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-kusama/src/lib.rs @@ -352,6 +352,12 @@ impl_runtime_apis! { } } + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Index { + System::account_nonce(account) + } + } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> (