Get account nonce via state_call (#1002)

This commit is contained in:
James Wilson
2023-06-07 16:15:22 +01:00
committed by GitHub
parent 1ad9a20ce2
commit e711dc1582
3 changed files with 11 additions and 18 deletions
-11
View File
@@ -34,7 +34,6 @@
use std::sync::Arc;
use codec::{Decode, Encode};
use serde::Serialize;
use crate::{error::Error, utils::PhantomDataSendSync, Config, Metadata};
@@ -179,16 +178,6 @@ impl<T: Config> Rpc<T> {
self.client.request("system_version", rpc_params![]).await
}
/// Fetch the current nonce for the given account ID.
pub async fn system_account_next_index<AccountId: Serialize>(
&self,
account: &AccountId,
) -> Result<T::Index, Error> {
self.client
.request("system_accountNextIndex", rpc_params![account])
.await
}
/// Get a header
pub async fn header(&self, hash: Option<T::Hash>) -> Result<Option<T::Header>, Error> {
let params = rpc_params![hash];