mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Get account nonce via state_call (#1002)
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user