add account nonce api to glutton (#2714)

This commit is contained in:
Ignacio Palacios
2023-06-08 14:45:55 +02:00
committed by GitHub
parent f8cc95c6b9
commit 5a0f9d243c
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -4734,6 +4734,7 @@ dependencies = [
"frame-support", "frame-support",
"frame-system", "frame-system",
"frame-system-benchmarking", "frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime", "frame-try-runtime",
"pallet-glutton", "pallet-glutton",
"pallet-sudo", "pallet-sudo",
@@ -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-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-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 = { 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-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" } 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" } pallet-glutton = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "master" }
@@ -59,6 +60,7 @@ std = [
"frame-executive/std", "frame-executive/std",
"frame-support/std", "frame-support/std",
"frame-system/std", "frame-system/std",
"frame-system-rpc-runtime-api/std",
"pallet-glutton/std", "pallet-glutton/std",
"pallet-sudo/std", "pallet-sudo/std",
"sp-api/std", "sp-api/std",
@@ -352,6 +352,12 @@ impl_runtime_apis! {
} }
} }
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(account: AccountId) -> Index {
System::account_nonce(account)
}
}
#[cfg(feature = "runtime-benchmarks")] #[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime { impl frame_benchmarking::Benchmark<Block> for Runtime {
fn benchmark_metadata(extra: bool) -> ( fn benchmark_metadata(extra: bool) -> (