Skip to content

Commit

Permalink
subxt: update to version 0.33
Browse files Browse the repository at this point in the history
  • Loading branch information
karolk91 committed Dec 28, 2023
1 parent 53504f5 commit 2953d39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ include = ["src/**/*", "LICENSE", "README.md"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3" }
futures = "0.3"
subxt = { version = "0.32.1", features = ["substrate-compat"] }
subxt = { version = "0.33", features = ["substrate-compat"] }

[dev-dependencies]
clap = { version = "4", features = ["derive"] }
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ use core::ops::Add;
use futures::{TryStream, TryStreamExt};
use std::{boxed::Box, fmt};
use subxt::{
backend::{legacy::LegacyRpcMethods, rpc::RpcClient},
error::MetadataError,
ext::{scale_decode, sp_core::H256},
storage::{address::StaticStorageMapKey, address::Yes, Address},
Error, OnlineClient, PolkadotConfig as DefaultConfig, error::MetadataError, backend::{legacy::{LegacyRpcMethods}, rpc::RpcClient}
Error, OnlineClient, PolkadotConfig as DefaultConfig,
};

/// 50% of what is stored in configuration::activeConfig::maxPovSize at the relay chain.
Expand Down Expand Up @@ -92,9 +94,7 @@ pub async fn subscribe_stats_with_client(
let constant_name = "BlockWeights";
let constant = pallet
.constant_by_name(constant_name)
.ok_or_else(|| {
MetadataError::ConstantNameNotFound(constant_name.to_owned())
})?;
.ok_or_else(|| MetadataError::ConstantNameNotFound(constant_name.to_owned()))?;
codec::Decode::decode(&mut &constant.value()[..])?
};

Expand Down

0 comments on commit 2953d39

Please sign in to comment.