mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 12:49:23 +00:00
Correct Serai header on genesis
Includes a couple misc fixes for the RPC as well.
This commit is contained in:
@@ -7,7 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/substrate/client/s
|
||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||
keywords = ["serai"]
|
||||
edition = "2021"
|
||||
rust-version = "1.85"
|
||||
rust-version = "1.89"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
@@ -153,8 +153,7 @@ impl Serai {
|
||||
|
||||
/// Fetch a block from the Serai blockchain by its number.
|
||||
pub async fn block_by_number(&self, block: u64) -> Result<Block, RpcError> {
|
||||
Self::block_internal(self.call("blockchain/block", &format!(r#"{{ "block": "{block}" }}"#)))
|
||||
.await
|
||||
Self::block_internal(self.call("blockchain/block", &format!(r#"{{ "block": {block} }}"#))).await
|
||||
}
|
||||
|
||||
/// Scope this RPC client to the state as of a specific block.
|
||||
|
||||
@@ -100,7 +100,7 @@ impl<'a> ValidatorSets<'a> {
|
||||
.0
|
||||
.call::<Option<_>>(
|
||||
"validator-sets/session",
|
||||
&format!(r#" "network": {} "#, rpc_network(network)?),
|
||||
&format!(r#", "network": {} "#, rpc_network(network)?),
|
||||
)
|
||||
.await?
|
||||
.map(Session),
|
||||
@@ -114,7 +114,7 @@ impl<'a> ValidatorSets<'a> {
|
||||
.0
|
||||
.call::<Option<_>>(
|
||||
"validator-sets/current_stake",
|
||||
&format!(r#" "network": {} "#, rpc_network(network)?),
|
||||
&format!(r#", "network": {} "#, rpc_network(network)?),
|
||||
)
|
||||
.await?
|
||||
.map(Amount),
|
||||
@@ -128,7 +128,7 @@ impl<'a> ValidatorSets<'a> {
|
||||
.call::<Option<String>>(
|
||||
"validator-sets/keys",
|
||||
&format!(
|
||||
r#" "set": {{ "network": {}, "session": {} }} "#,
|
||||
r#", "set": {{ "network": {}, "session": {} }} "#,
|
||||
rpc_network(set.network)?,
|
||||
set.session.0
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user