mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-03 05:17:24 +00:00
fetch system chain, name and version (#385)
* fetch system chain, name and version * add fetch system tests * fix fetch system test * fix cargo fmt * fix cargo clippy
This commit is contained in:
+15
@@ -391,6 +391,21 @@ impl<T: Config> Rpc<T> {
|
||||
Ok(self.client.request("system_properties", &[]).await?)
|
||||
}
|
||||
|
||||
/// Fetch system chain
|
||||
pub async fn system_chain(&self) -> Result<String, Error> {
|
||||
Ok(self.client.request("system_chain", &[]).await?)
|
||||
}
|
||||
|
||||
/// Fetch system name
|
||||
pub async fn system_name(&self) -> Result<String, Error> {
|
||||
Ok(self.client.request("system_name", &[]).await?)
|
||||
}
|
||||
|
||||
/// Fetch system version
|
||||
pub async fn system_version(&self) -> Result<String, Error> {
|
||||
Ok(self.client.request("system_version", &[]).await?)
|
||||
}
|
||||
|
||||
/// Get a header
|
||||
pub async fn header(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user