deps: use polkadot-sdk umbrella crate (#1786)

* deps: unify usage of polkadot-sdk crates

* cargo fmt

* fix macro crate

* make tests compile

* fix more nits

* fix doc tests

* fix more nits

* more nits

* core: remove polkadot-sdk/std

* cargo fmt

* remove polkadot-sdk/std by default

* Update metadata/Cargo.toml

* remove more std

* Update Cargo.toml
This commit is contained in:
Niklas Adolfsson
2024-10-11 14:19:11 +02:00
committed by GitHub
parent 5bf1756394
commit 0e86993cd7
31 changed files with 6131 additions and 662 deletions
+2 -4
View File
@@ -104,7 +104,7 @@ instant = { workspace = true }
# Provides some deserialization, types like U256/H256 and hashing impls like twox/blake256:
impl-serde = { workspace = true }
primitive-types = { workspace = true, features = ["codec", "scale-info", "serde"] }
sp-crypto-hashing = { workspace = true }
polkadot-sdk = { workspace = true, features = ["sp-crypto-hashing"] }
# Included if the "jsonrpsee" feature is enabled.
jsonrpsee = { workspace = true, optional = true, features = ["jsonrpsee-types"] }
@@ -136,9 +136,7 @@ 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"] }
sp-core = { workspace = true }
sp-keyring = { workspace = true }
sp-runtime = { workspace = true }
polkadot-sdk = { workspace = true, features = ["sp-core", "sp-keyring", "sp-runtime", "sp-crypto-hashing"] }
assert_matches = { workspace = true }
subxt-signer = { path = "../signer", features = ["unstable-eth"] }
# Tracing subscriber is useful for light-client examples to ensure that
@@ -507,7 +507,7 @@ mod test_utils {
#[cfg(test)]
mod test {
use futures::TryStreamExt;
use sp_core::H256;
use polkadot_sdk::sp_core::H256;
use super::super::follow_stream::test_utils::{
ev_best_block, ev_finalized, ev_initialized, ev_new_block,
+1 -1
View File
@@ -339,10 +339,10 @@ 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::{self, H256};
pub use rpc::RpcClientT;
pub use serde::Serialize;
pub use serde_json::value::RawValue;
pub use sp_core::H256;
pub use std::collections::{HashMap, VecDeque};
pub use subxt_core::{config::DefaultExtrinsicParams, Config};
pub use tokio::sync::{mpsc, Mutex};
+2 -1
View File
@@ -81,9 +81,10 @@
//! # {
//! use subxt::config::PolkadotConfig;
//! use std::str::FromStr;
//! use polkadot_sdk::{sp_core, sp_keyring};
//!
//! //// 1. Use a `subxt_signer` impl:
//! use subxt_signer::{ SecretUri, sr25519 };
//! use subxt_signer::{SecretUri, sr25519};
//!
//! // Get hold of a `Signer` for a test account:
//! let alice = sr25519::dev::alice();
+1
View File
@@ -5,6 +5,7 @@
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
@@ -217,7 +217,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<::sp_runtime::MultiAddress<A, B>>"
/// with = "::subxt::utils::Static<polkadot_sdk::sp_runtime::MultiAddress<A, B>>"
/// )
/// )]
/// mod polkadot {}
+1
View File
@@ -12,6 +12,7 @@ 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 sp_runtime::transaction_validity as sp;
use sp_runtime::transaction_validity::TransactionValidity as T;
use polkadot_sdk::sp_runtime::transaction_validity as sp;
use polkadot_sdk::sp_runtime::transaction_validity::TransactionValidity as T;
let pairs = vec![
(