Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Add `system_chain_type()` RPC method to `LegacyRpcMethods`

## [0.44.0] - 2025-08-28

This small release primarily fixes a few issues, but also adds the code for a prelease of `subxt-historic`, a new crate (at the moment) for working with historic blocks and state. Future releases will aim to stabilize this crate to the level of other `subxt` crates or otherwise merge the logic into `subxt` itself.
Expand Down
5 changes: 5 additions & 0 deletions rpcs/src/methods/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ impl<T: RpcConfig> LegacyRpcMethods<T> {
self.client.request("system_version", rpc_params![]).await
}

/// Fetch system chain type
pub async fn system_chain_type(&self) -> Result<String, Error> {
self.client.request("system_chainType", rpc_params![]).await
}

/// Fetch system properties
pub async fn system_properties(&self) -> Result<SystemProperties, Error> {
self.client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ async fn system_version() {
let _ = rpc.system_version().await.unwrap();
}

#[subxt_test]
async fn system_chain_type() {
let ctx = test_context().await;
let rpc = ctx.legacy_rpc_methods().await;

let chain_type = rpc.system_chain_type().await.unwrap();
assert_eq!(chain_type, "Development");
}

#[subxt_test]
async fn system_properties() {
let ctx = test_context().await;
Expand Down
Loading