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
committed by GitHub
parent 816a86423b
commit 69ce6d726f
29 changed files with 222 additions and 5783 deletions
+2 -4
View File
@@ -5,14 +5,12 @@
//! Substrate specific configuration
use super::{Config, DefaultExtrinsicParams, DefaultExtrinsicParamsBuilder, Hasher, Header};
pub use crate::utils::{AccountId32, MultiAddress, MultiSignature};
use alloc::format;
use alloc::vec::Vec;
use codec::{Decode, Encode};
use polkadot_sdk::sp_crypto_hashing;
use serde::{Deserialize, Serialize};
pub use crate::utils::{AccountId32, MultiAddress, MultiSignature};
pub use primitive_types::{H256, U256};
use serde::{Deserialize, Serialize};
/// Default set of commonly used types by Substrate runtimes.
// Note: We only use this at the type level, so it should be impossible to
+2 -4
View File
@@ -181,10 +181,8 @@ impl<T: Config> Events<T> {
/// them, and return only those which should decode to the provided `Ev` type.
/// If an error occurs, all subsequent iterations return `None`.
pub fn find<Ev: StaticEvent>(&self) -> impl Iterator<Item = Result<Ev, Error>> + '_ {
self.iter().filter_map(|ev| {
ev.and_then(|ev| ev.as_event::<Ev>().map_err(Into::into))
.transpose()
})
self.iter()
.filter_map(|ev| ev.and_then(|ev| ev.as_event::<Ev>()).transpose())
}
/// Iterate through the events using metadata to dynamically decode and skip
-1
View File
@@ -11,7 +11,6 @@ use crate::error::{Error, MetadataError};
use crate::metadata::Metadata;
use alloc::borrow::ToOwned;
use alloc::vec::Vec;
use polkadot_sdk::sp_crypto_hashing;
use subxt_metadata::{PalletMetadata, StorageEntryMetadata, StorageHasher};
/// Return the root of a given [`Address`]: hash the pallet name and entry name
+1 -1
View File
@@ -65,8 +65,8 @@ use alloc::borrow::{Cow, ToOwned};
use alloc::vec::Vec;
use codec::{Compact, Encode};
use payload::Payload;
use polkadot_sdk::sp_crypto_hashing::blake2_256;
use signer::Signer as SignerT;
use sp_crypto_hashing::blake2_256;
// Expose these here since we expect them in some calls below.
pub use crate::client::{ClientState, RuntimeVersion};
+2 -2
View File
@@ -163,8 +163,8 @@ impl core::str::FromStr for AccountId32 {
#[cfg(test)]
mod test {
use super::*;
use polkadot_sdk::sp_core::{self, crypto::Ss58Codec};
use polkadot_sdk::sp_keyring::AccountKeyring;
use sp_core::{self, crypto::Ss58Codec};
use sp_keyring::AccountKeyring;
#[test]
fn ss58_is_compatible_with_substrate_impl() {
+1 -1
View File
@@ -57,7 +57,7 @@ impl AccountId20 {
for (i, ch) in hex_address.chars().enumerate() {
// Get the corresponding nibble from the hash
let nibble = hash[i / 2] >> (if i % 2 == 0 { 4 } else { 0 }) & 0xf;
let nibble = (hash[i / 2] >> (if i % 2 == 0 { 4 } else { 0 })) & 0xf;
if nibble >= 8 {
checksum_address.push(ch.to_ascii_uppercase());