deps: remove polkadot-sdk umbrella crate (#1926)

* deps: get rid of polkadot-sdk umbrella crate

* fix nits

* Update subxt/src/backend/mod.rs

* Update subxt/src/events/events_client.rs

* Update metadata/src/utils/validation.rs

* cargo clippy fix

* fix ui tests
This commit is contained in:
Niklas Adolfsson
2025-02-24 12:38:21 +01:00
parent c96387c47d
commit e1b765c814
29 changed files with 220 additions and 5781 deletions
+5 -3
View File
@@ -31,7 +31,7 @@ native = [
"subxt-lightclient?/native",
"tokio-util",
"tokio?/sync",
"polkadot-sdk/std",
"sp-crypto-hashing/std",
]
# Enable this for web/wasm builds.
@@ -90,7 +90,7 @@ futures = { workspace = true }
hex = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["default", "raw_value"] }
polkadot-sdk = { workspace = true, features = ["sp-crypto-hashing"] }
sp-crypto-hashing = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
frame-metadata = { workspace = true }
@@ -131,7 +131,9 @@ bitvec = { workspace = true }
codec = { workspace = true, features = ["derive", "bit-vec"] }
scale-info = { workspace = true, features = ["bit-vec"] }
tokio = { workspace = true, features = ["macros", "time", "rt-multi-thread", "sync"] }
polkadot-sdk = { workspace = true, features = ["sp-core", "sp-keyring", "sp-runtime", "std"] }
sp-core = { workspace = true, features = ["std"] }
sp-keyring = { workspace = true, features = ["std"] }
sp-runtime = { workspace = true, features = ["std"] }
assert_matches = { workspace = true }
subxt-signer = { path = "../signer", features = ["unstable-eth"] }
# Tracing subscriber is useful for light-client examples to ensure that
+3 -3
View File
@@ -6,7 +6,7 @@
#![allow(missing_docs, unused)]
use polkadot_sdk::sp_core::{sr25519, Pair as _};
use sp_core::{sr25519, Pair as _};
use subxt::config::substrate::MultiAddress;
use subxt::{Config, OnlineClient, PolkadotConfig};
@@ -17,7 +17,7 @@ pub mod polkadot {}
/// and that PolkadotConfig is the runtime configuration.
mod pair_signer {
use super::*;
use polkadot_sdk::sp_runtime::{
use sp_runtime::{
traits::{IdentifyAccount, Verify},
MultiSignature as SpMultiSignature,
};
@@ -26,7 +26,7 @@ mod pair_signer {
tx::Signer,
};
/// A [`Signer`] implementation for [`polkadot_sdk::sp_core::sr25519::Pair`].
/// A [`Signer`] implementation for [`sp_core::sr25519::Pair`].
#[derive(Clone)]
pub struct PairSigner {
account_id: <PolkadotConfig as Config>::AccountId,
+2 -8
View File
@@ -69,10 +69,7 @@ impl<T: Config> LegacyRpcMethods<T> {
) -> Result<Vec<StorageChangeSet<T::Hash>>, Error> {
let keys: Vec<String> = keys.into_iter().map(to_hex).collect();
let params = rpc_params![keys, from, to];
self.client
.request("state_queryStorage", params)
.await
.map_err(Into::into)
self.client.request("state_queryStorage", params).await
}
/// Query storage entries at some block, using the best block if none is given.
@@ -85,10 +82,7 @@ impl<T: Config> LegacyRpcMethods<T> {
) -> Result<Vec<StorageChangeSet<T::Hash>>, Error> {
let keys: Vec<String> = keys.into_iter().map(to_hex).collect();
let params = rpc_params![keys, at];
self.client
.request("state_queryStorageAt", params)
.await
.map_err(Into::into)
self.client.request("state_queryStorageAt", params).await
}
/// Fetch the genesis hash
-1
View File
@@ -336,7 +336,6 @@ mod test {
pub use crate::backend::rpc::{RawRpcFuture, RawRpcSubscription};
pub use crate::{backend::StorageResponse, error::RpcError};
pub use futures::StreamExt;
pub use polkadot_sdk::sp_core;
pub use primitive_types::H256;
pub use rpc::RpcClientT;
pub use serde::Serialize;
-1
View File
@@ -5,7 +5,6 @@
use crate::backend::{Backend, BackendExt, BlockRef};
use crate::{client::OnlineClientT, error::Error, events::Events, Config};
use derive_where::derive_where;
use polkadot_sdk::sp_crypto_hashing;
use std::future::Future;
/// A client for working with events.
+1 -1
View File
@@ -214,7 +214,7 @@ pub mod ext {
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
/// substitute_type(
/// path = "sp_runtime::multiaddress::MultiAddress<A, B>",
/// with = "::subxt::utils::Static<polkadot_sdk::sp_runtime::MultiAddress<A, B>>"
/// with = "::subxt::utils::Static<sp_runtime::MultiAddress<A, B>>"
/// )
/// )]
/// mod polkadot {}
-1
View File
@@ -12,7 +12,6 @@ use crate::{
use codec::Decode;
use derive_where::derive_where;
use futures::StreamExt;
use polkadot_sdk::sp_crypto_hashing;
use std::{future::Future, marker::PhantomData};
use subxt_core::storage::address::{Address, StorageHashers, StorageKey};
use subxt_core::utils::Yes;
+2 -2
View File
@@ -635,8 +635,8 @@ mod test {
#[test]
fn transaction_validity_decoding_is_ok() {
use polkadot_sdk::sp_runtime::transaction_validity as sp;
use polkadot_sdk::sp_runtime::transaction_validity::TransactionValidity as T;
use sp_runtime::transaction_validity as sp;
use sp_runtime::transaction_validity::TransactionValidity as T;
let pairs = vec![
(