diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 121a467032..8d11f2bfea 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -169,23 +169,23 @@ impl RuntimeGenerator { ), ( "sp_core::crypto::AccountId32", - parse_quote!(#crate_path::ext::sp_core::crypto::AccountId32), + parse_quote!(#crate_path::utils::AccountId32), + ), + ( + "sp_runtime::multiaddress::MultiAddress", + parse_quote!(#crate_path::utils::MultiAddress), ), ( "primitive_types::H160", - parse_quote!(#crate_path::ext::sp_core::H160), + parse_quote!(#crate_path::utils::H160), ), ( "primitive_types::H256", - parse_quote!(#crate_path::ext::sp_core::H256), + parse_quote!(#crate_path::utils::H256), ), ( "primitive_types::H512", - parse_quote!(#crate_path::ext::sp_core::H512), - ), - ( - "sp_runtime::multiaddress::MultiAddress", - parse_quote!(#crate_path::ext::sp_runtime::MultiAddress), + parse_quote!(#crate_path::utils::H512), ), ( "frame_support::traits::misc::WrapperKeepOpaque", diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 60238f2d43..31da6f146b 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -14,8 +14,10 @@ description = "Subxt example usage" [dev-dependencies] subxt = { path = "../subxt" } tokio = { version = "1.8", features = ["rt-multi-thread", "macros", "time"] } -sp-keyring = "7.0.0" +sp-keyring = "12.0.0" futures = "0.3.13" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } hex = "0.4.3" tracing-subscriber = "0.3.11" +sp-core = { version = "11.0.0", default-features = false } +sp-runtime = { version = "12.0.0" } diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index 62880c01f7..98a1812dce 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -12,14 +12,16 @@ use sp_keyring::AccountKeyring; use subxt::{ - tx::{ - Era, - PairSigner, - PlainTip, - PolkadotExtrinsicParamsBuilder as Params, + config::{ + polkadot::{ + Era, + PlainTip, + PolkadotExtrinsicParamsBuilder as Params, + }, + PolkadotConfig, }, + tx::PairSigner, OnlineClient, - PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] diff --git a/examples/examples/concurrent_storage_requests.rs b/examples/examples/concurrent_storage_requests.rs index 80ef8dea0b..064d46204d 100644 --- a/examples/examples/concurrent_storage_requests.rs +++ b/examples/examples/concurrent_storage_requests.rs @@ -24,7 +24,7 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { let api = OnlineClient::::new().await?; - let addr = AccountKeyring::Bob.to_account_id(); + let addr = AccountKeyring::Bob.to_account_id().into(); // Construct storage addresses to access: let staking_bonded = polkadot::storage().staking().bonded(&addr); diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index d0caba54b1..b3626faefa 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -8,13 +8,11 @@ use sp_keyring::AccountKeyring; use subxt::{ config::{ + substrate::SubstrateExtrinsicParams, Config, SubstrateConfig, }, - tx::{ - PairSigner, - SubstrateExtrinsicParams, - }, + tx::PairSigner, OnlineClient, }; @@ -34,10 +32,10 @@ impl Config for MyConfig { type Index = u64; type BlockNumber = ::BlockNumber; type Hash = ::Hash; - type Hashing = ::Hashing; + type Hasher = ::Hasher; + type Header = ::Header; type AccountId = ::AccountId; type Address = ::Address; - type Header = ::Header; type Signature = ::Signature; // ExtrinsicParams makes use of the index type, so we need to adjust it // too to align with our modified index type, above: diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index cd7986bbf2..cd1f5efdf6 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -10,15 +10,13 @@ //! polkadot --dev --tmp //! ``` +use sp_core::{ + sr25519, + Pair, +}; use sp_keyring::AccountKeyring; use subxt::{ - ext::{ - sp_core::{ - sr25519, - Pair, - }, - sp_runtime::AccountId32, - }, + utils::AccountId32, OnlineClient, PolkadotConfig, }; diff --git a/examples/examples/multisig.rs b/examples/examples/multisig.rs index abb82b0e8d..7daa281c0a 100644 --- a/examples/examples/multisig.rs +++ b/examples/examples/multisig.rs @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box> { // threshold 1, // other signatories - vec![signer_account_id], + vec![signer_account_id.into()], // maybe timepoint None, // call diff --git a/examples/examples/rpc_call_subscribe_blocks.rs b/examples/examples/rpc_call_subscribe_blocks.rs index 232ef46ae1..7081adf3f1 100644 --- a/examples/examples/rpc_call_subscribe_blocks.rs +++ b/examples/examples/rpc_call_subscribe_blocks.rs @@ -11,11 +11,7 @@ //! ``` use subxt::{ - ext::sp_runtime::{ - generic::Header, - traits::BlakeTwo256, - }, - rpc::Subscription, + config::Header, OnlineClient, PolkadotConfig, }; @@ -28,8 +24,7 @@ async fn main() -> Result<(), Box> { OnlineClient::::from_url("wss://rpc.polkadot.io:443").await?; // For non-finalised blocks use `.subscribe_blocks()` - let mut blocks: Subscription> = - api.rpc().subscribe_finalized_block_headers().await?; + let mut blocks = api.rpc().subscribe_finalized_block_headers().await?; while let Some(Ok(block)) = blocks.next().await { println!( diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 74492aa595..7d24cf87a3 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -16,7 +16,7 @@ description = "Command line utilities for checking metadata compatibility betwee codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } frame-metadata = "15.0.0" scale-info = "2.0.0" -sp-core = "7.0.0" +sp-core-hashing = "6.0.0" [dev-dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 8626893d00..e9a5aeeb8b 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -32,8 +32,8 @@ enum TypeBeingHashed { } /// Hashing function utilized internally. -fn hash(bytes: &[u8]) -> [u8; 32] { - sp_core::hashing::twox_256(bytes) +fn hash(data: &[u8]) -> [u8; 32] { + sp_core_hashing::twox_256(data) } /// XOR two hashes together. If we have two pseudorandom hashes, then this will diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 9467578858..03fcf8d5cf 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -14,7 +14,14 @@ description = "Submit extrinsics (transactions) to a substrate node via RPC" keywords = ["parity", "substrate", "blockchain"] [features] -default = ["jsonrpsee-ws"] +default = ["jsonrpsee-ws", "substrate-compat"] + +# Activate this feature to pull in extra Substrate dependencies which make it +# possible to provide a proper extrinsic Signer implementation (PairSigner). +substrate-compat = [ + "sp-core", + "sp-runtime" +] # Activate this to expose functionality only used for integration testing. # The exposed functionality is subject to breaking changes at any point, @@ -32,7 +39,7 @@ scale-info = "2.0.0" scale-value = "0.6.0" scale-bits = "0.3" scale-decode = "0.4.0" -futures = { version = "0.3.13", default-features = false } +futures = { version = "0.3.13", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } serde = { version = "1.0.124", features = ["derive"] } @@ -40,15 +47,24 @@ serde_json = { version = "1.0.64", features = ["raw_value"] } thiserror = "1.0.24" tracing = "0.1.34" parking_lot = "0.12.0" +frame-metadata = "15.0.0" +derivative = "2.2.0" subxt-macro = { version = "0.25.0", path = "../macro" } subxt-metadata = { version = "0.25.0", path = "../metadata" } -sp-core = { version = "7.0.0", default-features = false } -sp-runtime = "7.0.0" +# Provides some deserialization, types like U256/H256 and hashing impls like twox/blake256: +impl-serde = { version = "0.4.0" } +primitive-types = { version = "0.12.0", default-features = false, features = ["codec", "scale-info", "serde"] } +sp-core-hashing = "6.0.0" -frame-metadata = "15.0.0" -derivative = "2.2.0" +# For ss58 encoding AccountId32 to serialize them properly: +base58 = { version = "0.2.0" } +blake2 = { version = "0.10.4", default-features = false } + +# These are only included is "substrate-compat" is enabled. +sp-core = { version = "11.0.0", default-features = false, optional = true } +sp-runtime = { version = "12.0.0", optional = true } [target.wasm32-unknown-unknown.dependencies] getrandom = { version = "0.2", features = ["js"] } @@ -58,3 +74,7 @@ bitvec = "1" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } scale-info = { version = "2.0.0", features = ["bit-vec"] } tokio = { version = "1.8", features = ["macros", "time", "rt-multi-thread"] } +sp-core = { version = "11.0.0", default-features = false } +sp-runtime = { version = "12.0.0" } +sp-keyring = "12.0.0" +sp-version = "10.0.0" diff --git a/subxt/src/blocks/block_types.rs b/subxt/src/blocks/block_types.rs index 3522991521..9adba3b8ea 100644 --- a/subxt/src/blocks/block_types.rs +++ b/subxt/src/blocks/block_types.rs @@ -7,20 +7,20 @@ use crate::{ OfflineClientT, OnlineClientT, }, + config::{ + Config, + Hasher, + Header, + }, error::{ BlockError, Error, }, events, - rpc::ChainBlockResponse, - Config, + rpc::types::ChainBlockResponse, }; use derivative::Derivative; use futures::lock::Mutex as AsyncMutex; -use sp_runtime::traits::{ - Hash, - Header, -}; use std::sync::Arc; /// A representation of a block. @@ -56,7 +56,7 @@ where /// Return the block number. pub fn number(&self) -> T::BlockNumber { - *self.header().number() + self.header().number() } /// Return the entire block header. @@ -170,7 +170,7 @@ where pub async fn events(&self) -> Result, Error> { let events = get_events(&self.client, self.block_hash, &self.cached_events).await?; - let ext_hash = T::Hashing::hash_of(&self.bytes); + let ext_hash = T::Hasher::hash_of(&self.bytes); Ok(ExtrinsicEvents::new(ext_hash, self.index, events)) } } diff --git a/subxt/src/blocks/blocks_client.rs b/subxt/src/blocks/blocks_client.rs index 9fa82b66cc..cd48db5360 100644 --- a/subxt/src/blocks/blocks_client.rs +++ b/subxt/src/blocks/blocks_client.rs @@ -5,12 +5,15 @@ use super::Block; use crate::{ client::OnlineClientT, + config::{ + Config, + Header, + }, error::{ BlockError, Error, }, utils::PhantomDataSendSync, - Config, }; use derivative::Derivative; use futures::{ @@ -19,7 +22,6 @@ use futures::{ Stream, StreamExt, }; -use sp_runtime::traits::Header; use std::{ future::Future, pin::Pin, @@ -137,7 +139,7 @@ where .rpc() .header(Some(last_finalized_block_hash)) .await? - .map(|h| (*h.number()).into()); + .map(|h| h.number().into()); let sub = client.rpc().subscribe_finalized_block_headers().await?; @@ -203,7 +205,7 @@ where }; // We want all previous details up to, but not including this current block num. - let end_block_num = (*header.number()).into(); + let end_block_num = header.number().into(); // This is one after the last block we returned details for last time. let start_block_num = last_block_num.map(|n| n + 1).unwrap_or(end_block_num); diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 0abb78f3ac..4055787f98 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -6,7 +6,7 @@ use crate::{ blocks::BlocksClient, constants::ConstantsClient, events::EventsClient, - rpc::RuntimeVersion, + rpc::types::RuntimeVersion, storage::StorageClient, tx::TxClient, Config, diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 668ddf65b1..0fea1591a4 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -12,10 +12,12 @@ use crate::{ error::Error, events::EventsClient, rpc::{ + types::{ + RuntimeVersion, + Subscription, + }, Rpc, RpcClientT, - RuntimeVersion, - Subscription, }, storage::StorageClient, tx::TxClient, diff --git a/subxt/src/tx/params.rs b/subxt/src/config/extrinsic_params.rs similarity index 59% rename from subxt/src/tx/params.rs rename to subxt/src/config/extrinsic_params.rs index b2bf9cc629..e9fae6e022 100644 --- a/subxt/src/tx/params.rs +++ b/subxt/src/config/extrinsic_params.rs @@ -2,19 +2,26 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! This module contains a trait which controls the parameters that must +//! be provided in order to successfully construct an extrinsic. A basic +//! implementation of the trait is provided ([`BaseExtrinsicParams`]) which is +//! used by the provided Substrate and Polkadot configuration. + use crate::{ utils::Encoded, Config, }; use codec::{ Compact, + Decode, Encode, }; use core::fmt::Debug; use derivative::Derivative; - -// We require Era as a param below, so make it available from here. -pub use sp_runtime::generic::Era; +use serde::{ + Deserialize, + Serialize, +}; /// This trait allows you to configure the "signed extra" and /// "additional" parameters that are signed and used in transactions. @@ -48,22 +55,6 @@ pub trait ExtrinsicParams: Debug + 'static { fn encode_additional_to(&self, v: &mut Vec); } -/// A struct representing the signed extra and additional parameters required -/// to construct a transaction for the default substrate node. -pub type SubstrateExtrinsicParams = BaseExtrinsicParams; - -/// A builder which leads to [`SubstrateExtrinsicParams`] being constructed. -/// This is what you provide to methods like `sign_and_submit()`. -pub type SubstrateExtrinsicParamsBuilder = BaseExtrinsicParamsBuilder; - -/// A struct representing the signed extra and additional parameters required -/// to construct a transaction for a polkadot node. -pub type PolkadotExtrinsicParams = BaseExtrinsicParams; - -/// A builder which leads to [`PolkadotExtrinsicParams`] being constructed. -/// This is what you provide to methods like `sign_and_submit()`. -pub type PolkadotExtrinsicParamsBuilder = BaseExtrinsicParamsBuilder; - /// An implementation of [`ExtrinsicParams`] that is suitable for constructing /// extrinsics that can be sent to a node with the same signed extra and additional /// parameters as a Polkadot/Substrate node. The way that tip payments are specified @@ -90,8 +81,9 @@ pub struct BaseExtrinsicParams { /// construct a [`BaseExtrinsicParams`] value. This implements [`Default`], which allows /// [`BaseExtrinsicParams`] to be used with convenience methods like `sign_and_submit_default()`. /// -/// Prefer to use [`SubstrateExtrinsicParamsBuilder`] for a version of this tailored towards -/// Substrate, or [`PolkadotExtrinsicParamsBuilder`] for a version tailored to Polkadot. +/// Prefer to use [`super::substrate::SubstrateExtrinsicParamsBuilder`] for a version of this +/// tailored towards Substrate, or [`super::polkadot::PolkadotExtrinsicParamsBuilder`] for a +/// version tailored to Polkadot. #[derive(Derivative)] #[derivative( Debug(bound = "Tip: Debug"), @@ -185,53 +177,94 @@ impl ExtrinsicParams Self { - PlainTip { tip: amount } - } + /// Period and phase are encoded: + /// - The period of validity from the block hash found in the signing material. + /// - The phase in the period that this transaction's lifetime begins (and, importantly, + /// implies which block hash is included in the signature material). If the `period` is + /// greater than 1 << 12, then it will be a factor of the times greater than 1<<12 that + /// `period` is. + /// + /// When used on `FRAME`-based runtimes, `period` cannot exceed `BlockHashCount` parameter + /// of `system` module. + Mortal(Period, Phase), } -impl From for PlainTip { - fn from(n: u128) -> Self { - PlainTip::new(n) - } -} +/// Era period +pub type Period = u64; -/// A tip payment made in the form of a specific asset. -#[derive(Copy, Clone, Debug, Default, Encode)] -pub struct AssetTip { - #[codec(compact)] - tip: u128, - asset: Option, -} +/// Era phase +pub type Phase = u64; -impl AssetTip { - /// Create a new tip of the amount provided. - pub fn new(amount: u128) -> Self { - AssetTip { - tip: amount, - asset: None, - } +// E.g. with period == 4: +// 0 10 20 30 40 +// 0123456789012345678901234567890123456789012 +// |...| +// authored -/ \- expiry +// phase = 1 +// n = Q(current - phase, period) + phase +impl Era { + /// Create a new era based on a period (which should be a power of two between 4 and 65536 + /// inclusive) and a block number on which it should start (or, for long periods, be shortly + /// after the start). + /// + /// If using `Era` in the context of `FRAME` runtime, make sure that `period` + /// does not exceed `BlockHashCount` parameter passed to `system` module, since that + /// prunes old blocks and renders transactions immediately invalid. + pub fn mortal(period: u64, current: u64) -> Self { + let period = period + .checked_next_power_of_two() + .unwrap_or(1 << 16) + .clamp(4, 1 << 16); + let phase = current % period; + let quantize_factor = (period >> 12).max(1); + let quantized_phase = phase / quantize_factor * quantize_factor; + + Self::Mortal(period, quantized_phase) } - /// Designate the tip as being of a particular asset class. - /// If this is not set, then the native currency is used. - pub fn of_asset(mut self, asset: u32) -> Self { - self.asset = Some(asset); - self + /// Create an "immortal" transaction. + pub fn immortal() -> Self { + Self::Immortal } } -impl From for AssetTip { - fn from(n: u128) -> Self { - AssetTip::new(n) +// Both copied from `sp_runtime::generic::Era`; this is the wire interface and so +// it's really the most important bit here. +impl Encode for Era { + fn encode_to(&self, output: &mut T) { + match self { + Self::Immortal => output.push_byte(0), + Self::Mortal(period, phase) => { + let quantize_factor = (*period >> 12).max(1); + let encoded = (period.trailing_zeros() - 1).clamp(1, 15) as u16 + | ((phase / quantize_factor) << 4) as u16; + encoded.encode_to(output); + } + } + } +} +impl Decode for Era { + fn decode(input: &mut I) -> Result { + let first = input.read_byte()?; + if first == 0 { + Ok(Self::Immortal) + } else { + let encoded = first as u64 + ((input.read_byte()? as u64) << 8); + let period = 2 << (encoded % (1 << 4)); + let quantize_factor = (period >> 12).max(1); + let phase = (encoded >> 4) * quantize_factor; + if period >= 4 && phase < period { + Ok(Self::Mortal(period, phase)) + } else { + Err("Invalid period and phase".into()) + } + } } } diff --git a/subxt/src/config.rs b/subxt/src/config/mod.rs similarity index 53% rename from subxt/src/config.rs rename to subxt/src/config/mod.rs index ddd04d763c..b7a2fbada6 100644 --- a/subxt/src/config.rs +++ b/subxt/src/config/mod.rs @@ -8,20 +8,21 @@ //! default Substrate node implementation, and [`PolkadotConfig`] for a //! Polkadot node. +pub mod extrinsic_params; +pub mod polkadot; +pub mod substrate; + use codec::{ Codec, Encode, EncodeLike, }; use core::fmt::Debug; -use sp_runtime::traits::{ - AtLeast32Bit, - Hash, - Header, - MaybeSerializeDeserialize, - Member, - Verify, -}; +use serde::Serialize; + +pub use extrinsic_params::ExtrinsicParams; +pub use polkadot::PolkadotConfig; +pub use substrate::SubstrateConfig; /// Runtime types. // Note: the 'static bound isn't strictly required, but currently deriving TypeInfo @@ -34,7 +35,6 @@ pub trait Config: 'static { + Member + serde::de::DeserializeOwned + Default - + AtLeast32Bit + Copy + scale_info::TypeInfo + Into; @@ -44,14 +44,15 @@ pub trait Config: 'static { + Member + Default + Copy - + core::hash::Hash - + core::str::FromStr + + std::hash::Hash + + std::str::FromStr + Into; /// The output of the `Hashing` function. type Hash: Parameter + Member - + MaybeSerializeDeserialize + + serde::Serialize + + serde::de::DeserializeOwned + Ord + Default + Copy @@ -60,85 +61,97 @@ pub trait Config: 'static { + AsMut<[u8]> + scale_info::TypeInfo; - /// The hashing system (algorithm) being used in the runtime (e.g. Blake2). - type Hashing: Hash; + /// The account ID type. + type AccountId: Clone + Serialize; + + /// The address type. + type Address: Encode + From; - /// The user account identifier type for the runtime. - type AccountId: Parameter + Member + serde::Serialize; + /// The signature type. + type Signature: Encode; - /// The address type. This instead of `::Source`. - type Address: Codec + Clone + PartialEq; + /// The hashing system (algorithm) being used in the runtime (e.g. Blake2). + type Hasher: Hasher; /// The block header. type Header: Parameter - + Header + + Header + + Member + serde::de::DeserializeOwned; - /// Signature type. - type Signature: Verify + Encode + Send + Sync + 'static; - /// This type defines the extrinsic extra and additional parameters. - type ExtrinsicParams: crate::tx::ExtrinsicParams; + type ExtrinsicParams: extrinsic_params::ExtrinsicParams; } -/// Parameter trait copied from `substrate::frame_support` +/// Parameter trait copied from `substrate::frame_support`. pub trait Parameter: Codec + EncodeLike + Clone + Eq + Debug {} impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + Debug {} -/// Default set of commonly used types by Substrate runtimes. -// Note: We only use this at the type level, so it should be impossible to -// create an instance of it. -pub enum SubstrateConfig {} - -impl Config for SubstrateConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = - sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; - type ExtrinsicParams = crate::tx::SubstrateExtrinsicParams; +/// A type that can be used in runtime structures. Copied from `sp_runtime::traits`. +pub trait Member: Send + Sync + Sized + Debug + Eq + PartialEq + Clone + 'static {} +impl Member for T {} + +/// This represents the hasher used by a node to hash things like block headers +/// and extrinsics. +pub trait Hasher { + /// The type given back from the hash operation + type Output; + + /// Hash some bytes to the given output type. + fn hash(s: &[u8]) -> Self::Output; + + /// Hash some SCALE encodable type to the given output type. + fn hash_of(s: &S) -> Self::Output { + let out = s.encode(); + Self::hash(&out) + } } -/// Default set of commonly used types by Polkadot nodes. -pub type PolkadotConfig = WithExtrinsicParams< - SubstrateConfig, - crate::tx::PolkadotExtrinsicParams, ->; +/// This represents the block header type used by a node. +pub trait Header: Sized + Encode { + /// The block number type for this header. + type Number; + /// The hasher used to hash this header. + type Hasher: Hasher; + + /// Return the block number of this header. + fn number(&self) -> Self::Number; + + /// Hash this header. + fn hash(&self) -> ::Output { + Self::Hasher::hash_of(self) + } +} /// Take a type implementing [`Config`] (eg [`SubstrateConfig`]), and some type which describes the -/// additional and extra parameters to pass to an extrinsic (see [`crate::tx::ExtrinsicParams`]), -/// and returns a type implementing [`Config`] with those new `ExtrinsicParams`. +/// additional and extra parameters to pass to an extrinsic (see [`ExtrinsicParams`]), +/// and returns a type implementing [`Config`] with those new [`ExtrinsicParams`]. /// /// # Example /// /// ``` -/// use subxt::config::{ SubstrateConfig, WithExtrinsicParams }; -/// use subxt::tx::PolkadotExtrinsicParams; +/// use subxt::config::{ SubstrateConfig, WithExtrinsicParams, polkadot::PolkadotExtrinsicParams }; /// /// // This is how PolkadotConfig is implemented: /// type PolkadotConfig = WithExtrinsicParams>; /// ``` pub struct WithExtrinsicParams< T: Config, - E: crate::tx::ExtrinsicParams, + E: extrinsic_params::ExtrinsicParams, > { _marker: std::marker::PhantomData<(T, E)>, } -impl> Config +impl> Config for WithExtrinsicParams { type Index = T::Index; type BlockNumber = T::BlockNumber; type Hash = T::Hash; - type Hashing = T::Hashing; type AccountId = T::AccountId; type Address = T::Address; - type Header = T::Header; type Signature = T::Signature; + type Hasher = T::Hasher; + type Header = T::Header; type ExtrinsicParams = E; } diff --git a/subxt/src/config/polkadot.rs b/subxt/src/config/polkadot.rs new file mode 100644 index 0000000000..b9a5e2263a --- /dev/null +++ b/subxt/src/config/polkadot.rs @@ -0,0 +1,49 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! Polkadot specific configuration + +use codec::Encode; + +use super::extrinsic_params::{ + BaseExtrinsicParams, + BaseExtrinsicParamsBuilder, +}; + +/// Default set of commonly used types by Polkadot nodes. +pub type PolkadotConfig = super::WithExtrinsicParams< + super::SubstrateConfig, + PolkadotExtrinsicParams, +>; + +/// A struct representing the signed extra and additional parameters required +/// to construct a transaction for a polkadot node. +pub type PolkadotExtrinsicParams = BaseExtrinsicParams; + +/// A builder which leads to [`PolkadotExtrinsicParams`] being constructed. +/// This is what you provide to methods like `sign_and_submit()`. +pub type PolkadotExtrinsicParamsBuilder = BaseExtrinsicParamsBuilder; + +// Because Era is one of the args to our extrinsic params. +pub use super::extrinsic_params::Era; + +/// A tip payment. +#[derive(Copy, Clone, Debug, Default, Encode)] +pub struct PlainTip { + #[codec(compact)] + tip: u128, +} + +impl PlainTip { + /// Create a new tip of the amount provided. + pub fn new(amount: u128) -> Self { + PlainTip { tip: amount } + } +} + +impl From for PlainTip { + fn from(n: u128) -> Self { + PlainTip::new(n) + } +} diff --git a/subxt/src/config/substrate.rs b/subxt/src/config/substrate.rs new file mode 100644 index 0000000000..e9c559addd --- /dev/null +++ b/subxt/src/config/substrate.rs @@ -0,0 +1,294 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! Substrate specific configuration + +use super::{ + extrinsic_params::{ + BaseExtrinsicParams, + BaseExtrinsicParamsBuilder, + }, + Config, + Hasher, + Header, +}; +use codec::{ + Decode, + Encode, +}; +use serde::{ + Deserialize, + Serialize, +}; + +pub use crate::utils::{ + account_id::AccountId32, + multi_address::MultiAddress, + multi_signature::MultiSignature, +}; +pub use primitive_types::{ + H256, + U256, +}; + +/// Default set of commonly used types by Substrate runtimes. +// Note: We only use this at the type level, so it should be impossible to +// create an instance of it. +pub enum SubstrateConfig {} + +impl Config for SubstrateConfig { + type Index = u32; + type BlockNumber = u32; + type Hash = H256; + type AccountId = AccountId32; + type Address = MultiAddress; + type Signature = MultiSignature; + type Hasher = BlakeTwo256; + type Header = SubstrateHeader; + type ExtrinsicParams = SubstrateExtrinsicParams; +} + +/// A struct representing the signed extra and additional parameters required +/// to construct a transaction for the default substrate node. +pub type SubstrateExtrinsicParams = BaseExtrinsicParams; + +/// A builder which leads to [`SubstrateExtrinsicParams`] being constructed. +/// This is what you provide to methods like `sign_and_submit()`. +pub type SubstrateExtrinsicParamsBuilder = BaseExtrinsicParamsBuilder; + +// Because Era is one of the args to our extrinsic params. +pub use super::extrinsic_params::Era; + +/// A tip payment made in the form of a specific asset. +#[derive(Copy, Clone, Debug, Default, Encode)] +pub struct AssetTip { + #[codec(compact)] + tip: u128, + asset: Option, +} + +impl AssetTip { + /// Create a new tip of the amount provided. + pub fn new(amount: u128) -> Self { + AssetTip { + tip: amount, + asset: None, + } + } + + /// Designate the tip as being of a particular asset class. + /// If this is not set, then the native currency is used. + pub fn of_asset(mut self, asset: u32) -> Self { + self.asset = Some(asset); + self + } +} + +impl From for AssetTip { + fn from(n: u128) -> Self { + AssetTip::new(n) + } +} + +/// A type that can hash values using the blaks2_256 algorithm. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Encode)] +pub struct BlakeTwo256; + +impl Hasher for BlakeTwo256 { + type Output = H256; + fn hash(s: &[u8]) -> Self::Output { + sp_core_hashing::blake2_256(s).into() + } +} + +/// A generic Substrate header type, adapted from `sp_runtime::generic::Header`. +/// The block number and hasher can be configured to adapt this for other nodes. +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SubstrateHeader + TryFrom, H: Hasher> { + /// The parent hash. + pub parent_hash: H::Output, + /// The block number. + #[serde( + serialize_with = "serialize_number", + deserialize_with = "deserialize_number" + )] + #[codec(compact)] + pub number: N, + /// The state trie merkle root + pub state_root: H::Output, + /// The merkle root of the extrinsics. + pub extrinsics_root: H::Output, + /// A chain-specific digest of data useful for light clients or referencing auxiliary data. + pub digest: Digest, +} + +impl + TryFrom + Encode, H: Hasher + Encode> Header + for SubstrateHeader +where + N: Copy + Into + TryFrom + Encode, + H: Hasher + Encode, + SubstrateHeader: Encode, +{ + type Number = N; + type Hasher = H; + fn number(&self) -> Self::Number { + self.number + } +} + +/// Generic header digest. From `sp_runtime::generic::digest`. +#[derive( + Encode, Decode, Debug, PartialEq, Eq, Clone, Serialize, Deserialize, Default, +)] +pub struct Digest { + /// A list of digest items. + pub logs: Vec, +} + +/// Digest item that is able to encode/decode 'system' digest items and +/// provide opaque access to other items. From `sp_runtime::generic::digest`. +#[derive(Debug, PartialEq, Eq, Clone)] +pub enum DigestItem { + /// A pre-runtime digest. + /// + /// These are messages from the consensus engine to the runtime, although + /// the consensus engine can (and should) read them itself to avoid + /// code and state duplication. It is erroneous for a runtime to produce + /// these, but this is not (yet) checked. + /// + /// NOTE: the runtime is not allowed to panic or fail in an `on_initialize` + /// call if an expected `PreRuntime` digest is not present. It is the + /// responsibility of a external block verifier to check this. Runtime API calls + /// will initialize the block without pre-runtime digests, so initialization + /// cannot fail when they are missing. + PreRuntime(ConsensusEngineId, Vec), + + /// A message from the runtime to the consensus engine. This should *never* + /// be generated by the native code of any consensus engine, but this is not + /// checked (yet). + Consensus(ConsensusEngineId, Vec), + + /// Put a Seal on it. This is only used by native code, and is never seen + /// by runtimes. + Seal(ConsensusEngineId, Vec), + + /// Some other thing. Unsupported and experimental. + Other(Vec), + + /// An indication for the light clients that the runtime execution + /// environment is updated. + /// + /// Currently this is triggered when: + /// 1. Runtime code blob is changed or + /// 2. `heap_pages` value is changed. + RuntimeEnvironmentUpdated, +} + +// From sp_runtime::generic, DigestItem enum indexes are encoded using this: +#[repr(u32)] +#[derive(Encode, Decode)] +enum DigestItemType { + Other = 0u32, + Consensus = 4u32, + Seal = 5u32, + PreRuntime = 6u32, + RuntimeEnvironmentUpdated = 8u32, +} +impl Encode for DigestItem { + fn encode(&self) -> Vec { + let mut v = Vec::new(); + + match self { + Self::Consensus(val, data) => { + DigestItemType::Consensus.encode_to(&mut v); + (val, data).encode_to(&mut v); + } + Self::Seal(val, sig) => { + DigestItemType::Seal.encode_to(&mut v); + (val, sig).encode_to(&mut v); + } + Self::PreRuntime(val, data) => { + DigestItemType::PreRuntime.encode_to(&mut v); + (val, data).encode_to(&mut v); + } + Self::Other(val) => { + DigestItemType::Other.encode_to(&mut v); + val.encode_to(&mut v); + } + Self::RuntimeEnvironmentUpdated => { + DigestItemType::RuntimeEnvironmentUpdated.encode_to(&mut v); + } + } + + v + } +} +impl Decode for DigestItem { + fn decode(input: &mut I) -> Result { + let item_type: DigestItemType = Decode::decode(input)?; + match item_type { + DigestItemType::PreRuntime => { + let vals: (ConsensusEngineId, Vec) = Decode::decode(input)?; + Ok(Self::PreRuntime(vals.0, vals.1)) + } + DigestItemType::Consensus => { + let vals: (ConsensusEngineId, Vec) = Decode::decode(input)?; + Ok(Self::Consensus(vals.0, vals.1)) + } + DigestItemType::Seal => { + let vals: (ConsensusEngineId, Vec) = Decode::decode(input)?; + Ok(Self::Seal(vals.0, vals.1)) + } + DigestItemType::Other => Ok(Self::Other(Decode::decode(input)?)), + DigestItemType::RuntimeEnvironmentUpdated => { + Ok(Self::RuntimeEnvironmentUpdated) + } + } + } +} + +/// Consensus engine unique ID. From `sp_runtime::ConsensusEngineId`. +pub type ConsensusEngineId = [u8; 4]; + +impl serde::Serialize for DigestItem { + fn serialize(&self, seq: S) -> Result + where + S: serde::Serializer, + { + self.using_encoded(|bytes| impl_serde::serialize::serialize(bytes, seq)) + } +} + +impl<'a> serde::Deserialize<'a> for DigestItem { + fn deserialize(de: D) -> Result + where + D: serde::Deserializer<'a>, + { + let r = impl_serde::serialize::deserialize(de)?; + Decode::decode(&mut &r[..]) + .map_err(|e| serde::de::Error::custom(format!("Decode error: {}", e))) + } +} + +fn serialize_number + TryFrom>( + val: &T, + s: S, +) -> Result +where + S: serde::Serializer, +{ + let u256: U256 = (*val).into(); + serde::Serialize::serialize(&u256, s) +} + +fn deserialize_number<'a, D, T: Copy + Into + TryFrom>( + d: D, +) -> Result +where + D: serde::Deserializer<'a>, +{ + let u256: U256 = serde::Deserialize::deserialize(d)?; + TryFrom::try_from(u256).map_err(|_| serde::de::Error::custom("Try from failed")) +} diff --git a/subxt/src/error.rs b/subxt/src/error.rs index b2548e43cf..90c1683a15 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -19,8 +19,6 @@ pub use scale_value::scale::{ DecodeError, EncodeError, }; -pub use sp_core::crypto::SecretStringError; -pub use sp_runtime::transaction_validity::TransactionValidityError; /// The underlying error enum, generic over the type held by the `Runtime` /// variant. Prefer to use the [`Error`] and [`Error`] aliases over @@ -39,12 +37,6 @@ pub enum Error { /// Serde serialization error #[error("Serde json error: {0}")] Serialization(#[from] serde_json::error::Error), - /// Secret string error. - #[error("Secret String Error")] - SecretString(SecretStringError), - /// Extrinsic validity error - #[error("Transaction Validity Error: {0:?}")] - Invalid(TransactionValidityError), /// Invalid metadata error #[error("Invalid Metadata: {0}")] InvalidMetadata(#[from] InvalidMetadataError), @@ -74,18 +66,6 @@ pub enum Error { Other(String), } -impl From for Error { - fn from(error: SecretStringError) -> Self { - Error::SecretString(error) - } -} - -impl From for Error { - fn from(error: TransactionValidityError) -> Self { - Error::Invalid(error) - } -} - impl From<&str> for Error { fn from(error: &str) -> Self { Error::Other(error.into()) diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index eb0e336870..c5ea1bab3b 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -6,13 +6,10 @@ use crate::{ client::OnlineClientT, error::Error, events::Events, + rpc::types::StorageKey, Config, }; use derivative::Derivative; -use sp_core::{ - storage::StorageKey, - twox_128, -}; use std::future::Future; /// A client for working with events. @@ -74,8 +71,8 @@ where // The storage key needed to access events. fn system_events_key() -> StorageKey { - let mut storage_key = twox_128(b"System").to_vec(); - storage_key.extend(twox_128(b"Events").to_vec()); + let mut storage_key = sp_core_hashing::twox_128(b"System").to_vec(); + storage_key.extend(sp_core_hashing::twox_128(b"Events").to_vec()); StorageKey(storage_key) } diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index f1c41156b6..b9b46fb85c 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -181,6 +181,4 @@ pub mod ext { pub use frame_metadata; pub use scale_bits; pub use scale_value; - pub use sp_core; - pub use sp_runtime; } diff --git a/subxt/src/rpc/mod.rs b/subxt/src/rpc/mod.rs index db26f67702..8be955b6c5 100644 --- a/subxt/src/rpc/mod.rs +++ b/subxt/src/rpc/mod.rs @@ -59,7 +59,10 @@ mod rpc; mod rpc_client; mod rpc_client_t; -// Expose the `Rpc` struct and any associated types. +// Expose our RPC types here. +pub mod types; + +// Expose the `Rpc` struct. pub use rpc::*; pub use rpc_client_t::{ diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index c12ce885e6..b8d1c1b486 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -41,6 +41,7 @@ use super::{ rpc_params, + types, RpcClient, RpcClientT, Subscription, @@ -56,293 +57,8 @@ use codec::{ Encode, }; use frame_metadata::RuntimeMetadataPrefixed; -use serde::{ - Deserialize, - Serialize, -}; -use sp_core::{ - storage::{ - StorageChangeSet, - StorageData, - StorageKey, - }, - Bytes, - U256, -}; -use sp_runtime::ApplyExtrinsicResult; -use std::{ - collections::HashMap, - sync::Arc, -}; - -/// A number type that can be serialized both as a number or a string that encodes a number in a -/// string. -/// -/// We allow two representations of the block number as input. Either we deserialize to the type -/// that is specified in the block type or we attempt to parse given hex value. -/// -/// The primary motivation for having this type is to avoid overflows when using big integers in -/// JavaScript (which we consider as an important RPC API consumer). -#[derive(Copy, Clone, Serialize, Deserialize, Debug, PartialEq, Eq)] -#[serde(untagged)] -pub enum NumberOrHex { - /// The number represented directly. - Number(u64), - /// Hex representation of the number. - Hex(U256), -} - -/// The response from `chain_getBlock` -#[derive(Debug, Deserialize)] -#[serde(bound = "T: Config")] -pub struct ChainBlockResponse { - /// The block itself. - pub block: ChainBlock, - /// Block justification. - pub justifications: Option, -} - -/// Block details in the [`ChainBlockResponse`]. -#[derive(Debug, Deserialize)] -pub struct ChainBlock { - /// The block header. - pub header: T::Header, - /// The accompanying extrinsics. - pub extrinsics: Vec, -} - -/// Bytes representing an extrinsic in a [`ChainBlock`]. -#[derive(Debug)] -pub struct ChainBlockExtrinsic(pub Vec); - -impl<'a> ::serde::Deserialize<'a> for ChainBlockExtrinsic { - fn deserialize(de: D) -> Result - where - D: ::serde::Deserializer<'a>, - { - let r = sp_core::bytes::deserialize(de)?; - let bytes = Decode::decode(&mut &r[..]) - .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {}", e)))?; - Ok(ChainBlockExtrinsic(bytes)) - } -} - -/// Wrapper for NumberOrHex to allow custom From impls -#[derive(Serialize)] -pub struct BlockNumber(NumberOrHex); - -impl From for BlockNumber { - fn from(x: NumberOrHex) -> Self { - BlockNumber(x) - } -} - -impl Default for NumberOrHex { - fn default() -> Self { - Self::Number(Default::default()) - } -} - -impl NumberOrHex { - /// Converts this number into an U256. - pub fn into_u256(self) -> U256 { - match self { - NumberOrHex::Number(n) => n.into(), - NumberOrHex::Hex(h) => h, - } - } -} - -impl From for NumberOrHex { - fn from(n: u32) -> Self { - NumberOrHex::Number(n.into()) - } -} - -impl From for NumberOrHex { - fn from(n: u64) -> Self { - NumberOrHex::Number(n) - } -} - -impl From for NumberOrHex { - fn from(n: u128) -> Self { - NumberOrHex::Hex(n.into()) - } -} - -impl From for NumberOrHex { - fn from(n: U256) -> Self { - NumberOrHex::Hex(n) - } -} - -/// An error type that signals an out-of-range conversion attempt. -#[derive(Debug, thiserror::Error)] -#[error("Out-of-range conversion attempt")] -pub struct TryFromIntError; - -impl TryFrom for u32 { - type Error = TryFromIntError; - fn try_from(num_or_hex: NumberOrHex) -> Result { - num_or_hex - .into_u256() - .try_into() - .map_err(|_| TryFromIntError) - } -} - -impl TryFrom for u64 { - type Error = TryFromIntError; - fn try_from(num_or_hex: NumberOrHex) -> Result { - num_or_hex - .into_u256() - .try_into() - .map_err(|_| TryFromIntError) - } -} - -impl TryFrom for u128 { - type Error = TryFromIntError; - fn try_from(num_or_hex: NumberOrHex) -> Result { - num_or_hex - .into_u256() - .try_into() - .map_err(|_| TryFromIntError) - } -} - -impl From for U256 { - fn from(num_or_hex: NumberOrHex) -> U256 { - num_or_hex.into_u256() - } -} - -// All unsigned ints can be converted into a BlockNumber: -macro_rules! into_block_number { - ($($t: ty)+) => { - $( - impl From<$t> for BlockNumber { - fn from(x: $t) -> Self { - NumberOrHex::Number(x.into()).into() - } - } - )+ - } -} -into_block_number!(u8 u16 u32 u64); - -/// Arbitrary properties defined in the chain spec as a JSON object. -pub type SystemProperties = serde_json::Map; - -/// Possible transaction status events. -/// -/// # Note -/// -/// This is copied from `sp-transaction-pool` to avoid a dependency on that crate. Therefore it -/// must be kept compatible with that type from the target substrate version. -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub enum SubstrateTxStatus { - /// Transaction is part of the future queue. - Future, - /// Transaction is part of the ready queue. - Ready, - /// The transaction has been broadcast to the given peers. - Broadcast(Vec), - /// Transaction has been included in block with given hash. - InBlock(BlockHash), - /// The block this transaction was included in has been retracted. - Retracted(BlockHash), - /// Maximum number of finality watchers has been reached, - /// old watchers are being removed. - FinalityTimeout(BlockHash), - /// Transaction has been finalized by a finality-gadget, e.g GRANDPA - Finalized(BlockHash), - /// Transaction has been replaced in the pool, by another transaction - /// that provides the same tags. (e.g. same (sender, nonce)). - Usurped(Hash), - /// Transaction has been dropped from the pool because of the limit. - Dropped, - /// Transaction is no longer valid in the current state. - Invalid, -} - -/// This contains the runtime version information necessary to make transactions, as obtained from -/// the RPC call `state_getRuntimeVersion`, -#[derive(Debug, Clone, PartialEq, Eq, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct RuntimeVersion { - /// Version of the runtime specification. A full-node will not attempt to use its native - /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, - /// `spec_version` and `authoring_version` are the same between Wasm and native. - pub spec_version: u32, - - /// All existing dispatches are fully compatible when this number doesn't change. If this - /// number changes, then `spec_version` must change, also. - /// - /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, - /// either through an alteration in its user-level semantics, a parameter - /// added/removed/changed, a dispatchable being removed, a module being removed, or a - /// dispatchable/module changing its index. - /// - /// It need *not* change when a new module is added or when a dispatchable is added. - pub transaction_version: u32, - - /// The other fields present may vary and aren't necessary for `subxt`; they are preserved in - /// this map. - #[serde(flatten)] - pub other: HashMap, -} - -/// ReadProof struct returned by the RPC -/// -/// # Note -/// -/// This is copied from `sc-rpc-api` to avoid a dependency on that crate. Therefore it -/// must be kept compatible with that type from the target substrate version. -#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct ReadProof { - /// Block hash used to generate the proof - pub at: Hash, - /// A proof used to prove that storage entries are included in the storage trie - pub proof: Vec, -} - -/// Statistics of a block returned by the `dev_getBlockStats` RPC. -#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct BlockStats { - /// The length in bytes of the storage proof produced by executing the block. - pub witness_len: u64, - /// The length in bytes of the storage proof after compaction. - pub witness_compact_len: u64, - /// Length of the block in bytes. - /// - /// This information can also be acquired by downloading the whole block. This merely - /// saves some complexity on the client side. - pub block_len: u64, - /// Number of extrinsics in the block. - /// - /// This information can also be acquired by downloading the whole block. This merely - /// saves some complexity on the client side. - pub num_extrinsics: u64, -} - -/// Health struct returned by the RPC -#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct Health { - /// Number of connected peers - pub peers: usize, - /// Is the node syncing - pub is_syncing: bool, - /// Should this node have any peers - /// - /// Might be false for local chains or when running without discovery. - pub should_have_peers: bool, -} +use serde::Serialize; +use std::sync::Arc; /// Client for substrate rpc interfaces pub struct Rpc { @@ -382,7 +98,7 @@ impl Rpc { &self, key: &[u8], hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let params = rpc_params![to_hex(key), hash]; let data = self.client.request("state_getStorage", params).await?; Ok(data) @@ -397,7 +113,7 @@ impl Rpc { count: u32, start_key: Option<&[u8]>, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let start_key = start_key.map(to_hex); let params = rpc_params![to_hex(key), count, start_key, hash]; let data = self.client.request("state_getKeysPaged", params).await?; @@ -410,7 +126,7 @@ impl Rpc { keys: impl IntoIterator, from: T::Hash, to: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, from, to]; self.client @@ -424,7 +140,7 @@ impl Rpc { &self, keys: impl IntoIterator, at: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, at]; self.client @@ -444,7 +160,7 @@ impl Rpc { /// Fetch the metadata pub async fn metadata(&self, at: Option) -> Result { - let bytes: Bytes = self + let bytes: types::Bytes = self .client .request("state_getMetadata", rpc_params![at]) .await?; @@ -454,14 +170,14 @@ impl Rpc { } /// Fetch system properties - pub async fn system_properties(&self) -> Result { + pub async fn system_properties(&self) -> Result { self.client .request("system_properties", rpc_params![]) .await } /// Fetch system health - pub async fn system_health(&self) -> Result { + pub async fn system_health(&self) -> Result { self.client.request("system_health", rpc_params![]).await } @@ -481,9 +197,9 @@ impl Rpc { } /// Fetch the current nonce for the given account ID. - pub async fn system_account_next_index( + pub async fn system_account_next_index( &self, - account: &T::AccountId, + account: &AccountId, ) -> Result { self.client .request("system_accountNextIndex", rpc_params![account]) @@ -503,7 +219,7 @@ impl Rpc { /// Get a block hash, returns hash of latest block by default pub async fn block_hash( &self, - block_number: Option, + block_number: Option, ) -> Result, Error> { let params = rpc_params![block_number]; let block_hash = self.client.request("chain_getBlockHash", params).await?; @@ -523,7 +239,7 @@ impl Rpc { pub async fn block( &self, hash: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { let params = rpc_params![hash]; let block = self.client.request("chain_getBlock", params).await?; Ok(block) @@ -537,7 +253,7 @@ impl Rpc { pub async fn block_stats( &self, block_hash: T::Hash, - ) -> Result, Error> { + ) -> Result, Error> { let params = rpc_params![block_hash]; let stats = self.client.request("dev_getBlockStats", params).await?; Ok(stats) @@ -548,7 +264,7 @@ impl Rpc { &self, keys: impl IntoIterator, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, hash]; let proof = self.client.request("state_getReadProof", params).await?; @@ -559,7 +275,7 @@ impl Rpc { pub async fn runtime_version( &self, at: Option, - ) -> Result { + ) -> Result { let params = rpc_params![at]; let version = self .client @@ -629,7 +345,7 @@ impl Rpc { /// Subscribe to runtime version updates that produce changes in the metadata. pub async fn subscribe_runtime_version( &self, - ) -> Result, Error> { + ) -> Result, Error> { let subscription = self .client .subscribe( @@ -646,7 +362,7 @@ impl Rpc { &self, extrinsic: X, ) -> Result { - let bytes: Bytes = extrinsic.encode().into(); + let bytes: types::Bytes = extrinsic.encode().into(); let params = rpc_params![bytes]; let xt_hash = self .client @@ -659,8 +375,8 @@ impl Rpc { pub async fn watch_extrinsic( &self, extrinsic: X, - ) -> Result>, Error> { - let bytes: Bytes = extrinsic.encode().into(); + ) -> Result>, Error> { + let bytes: types::Bytes = extrinsic.encode().into(); let params = rpc_params![bytes]; let subscription = self .client @@ -678,7 +394,7 @@ impl Rpc { &self, key_type: String, suri: String, - public: Bytes, + public: types::Bytes, ) -> Result<(), Error> { let params = rpc_params![key_type, suri, public]; self.client.request("author_insertKey", params).await?; @@ -686,7 +402,7 @@ impl Rpc { } /// Generate new session keys and returns the corresponding public keys. - pub async fn rotate_keys(&self) -> Result { + pub async fn rotate_keys(&self) -> Result { self.client .request("author_rotateKeys", rpc_params![]) .await @@ -697,7 +413,10 @@ impl Rpc { /// `session_keys` is the SCALE encoded session keys object from the runtime. /// /// Returns `true` iff all private keys could be found. - pub async fn has_session_keys(&self, session_keys: Bytes) -> Result { + pub async fn has_session_keys( + &self, + session_keys: types::Bytes, + ) -> Result { let params = rpc_params![session_keys]; self.client.request("author_hasSessionKeys", params).await } @@ -707,7 +426,7 @@ impl Rpc { /// Returns `true` if a private key could be found. pub async fn has_key( &self, - public_key: Bytes, + public_key: types::Bytes, key_type: String, ) -> Result { let params = rpc_params![public_key, key_type]; @@ -716,73 +435,19 @@ impl Rpc { /// Submits the extrinsic to the dry_run RPC, to test if it would succeed. /// - /// Returns `Ok` with an [`ApplyExtrinsicResult`], which is the result of applying of an extrinsic. + /// Returns a [`types::DryRunResult`], which is the result of performing the dry run. pub async fn dry_run( &self, encoded_signed: &[u8], at: Option, - ) -> Result { + ) -> Result { let params = rpc_params![to_hex(encoded_signed), at]; - let result_bytes: Bytes = self.client.request("system_dryRun", params).await?; - let data: ApplyExtrinsicResult = - codec::Decode::decode(&mut result_bytes.0.as_slice())?; - Ok(data) + let result_bytes: types::Bytes = + self.client.request("system_dryRun", params).await?; + Ok(types::decode_dry_run_result(&mut &*result_bytes.0)?) } } fn to_hex(bytes: impl AsRef<[u8]>) -> String { format!("0x{}", hex::encode(bytes.as_ref())) } - -#[cfg(test)] -mod test { - use super::*; - - /// A util function to assert the result of serialization and deserialization is the same. - pub(crate) fn assert_deser(s: &str, expected: T) - where - T: std::fmt::Debug - + serde::ser::Serialize - + serde::de::DeserializeOwned - + PartialEq, - { - assert_eq!(serde_json::from_str::(s).unwrap(), expected); - assert_eq!(serde_json::to_string(&expected).unwrap(), s); - } - - #[test] - fn test_deser_runtime_version() { - let val: RuntimeVersion = serde_json::from_str( - r#"{ - "specVersion": 123, - "transactionVersion": 456, - "foo": true, - "wibble": [1,2,3] - }"#, - ) - .expect("deserializing failed"); - - let mut m = std::collections::HashMap::new(); - m.insert("foo".to_owned(), serde_json::json!(true)); - m.insert("wibble".to_owned(), serde_json::json!([1, 2, 3])); - - assert_eq!( - val, - RuntimeVersion { - spec_version: 123, - transaction_version: 456, - other: m - } - ); - } - - #[test] - fn should_serialize_and_deserialize() { - assert_deser(r#""0x1234""#, NumberOrHex::Hex(0x1234.into())); - assert_deser(r#""0x0""#, NumberOrHex::Hex(0.into())); - assert_deser(r#"5"#, NumberOrHex::Number(5)); - assert_deser(r#"10000"#, NumberOrHex::Number(10000)); - assert_deser(r#"0"#, NumberOrHex::Number(0)); - assert_deser(r#"1000000000000"#, NumberOrHex::Number(1000000000000)); - } -} diff --git a/subxt/src/rpc/types.rs b/subxt/src/rpc/types.rs new file mode 100644 index 0000000000..989308d718 --- /dev/null +++ b/subxt/src/rpc/types.rs @@ -0,0 +1,558 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! Types sent to/from the Substrate RPC interface. + +use crate::Config; +use codec::{ + Decode, + Encode, +}; +use primitive_types::U256; +use serde::{ + Deserialize, + Serialize, +}; +use std::collections::HashMap; + +// Subscription types are returned from some calls, so expose it with the rest of the returned types. +pub use super::rpc_client::Subscription; + +/// Signal what the result of doing a dry run of an extrinsic is. +pub type DryRunResult = Result<(), DryRunError>; + +/// An error dry running an extrinsic. +#[derive(Clone, PartialEq, Eq, Debug)] +pub enum DryRunError { + /// The extrinsic will not be included in the block + TransactionValidityError, + /// The extrinsic will be included in the block, but the call failed to dispatch. + DispatchError, +} + +/// dryRun returns an ApplyExtrinsicResult, which is basically a +/// `Result, TransactionValidityError>`. We want to convert this to +/// a [`DryRunResult`]. +/// +/// - if `Ok(inner)`, the transaction will be included in the block +/// - if `Ok(Ok(()))`, the transaction will be included and the call will be dispatched +/// successfully +/// - if `Ok(Err(e))`, the transaction will be included but there is some error dispatching +/// the call to the module. +/// +/// The errors get a bit involved and have been known to change over time. At the moment +/// then, we will keep things simple here and just decode the Result portion (ie the initial bytes) +/// and ignore the rest. +pub(crate) fn decode_dry_run_result( + input: &mut I, +) -> Result { + let res = match , ()>>::decode(input)? { + Ok(Ok(())) => Ok(()), + Ok(Err(())) => Err(DryRunError::DispatchError), + Err(()) => Err(DryRunError::TransactionValidityError), + }; + Ok(res) +} + +/// A number type that can be serialized both as a number or a string that encodes a number in a +/// string. +/// +/// We allow two representations of the block number as input. Either we deserialize to the type +/// that is specified in the block type or we attempt to parse given hex value. +/// +/// The primary motivation for having this type is to avoid overflows when using big integers in +/// JavaScript (which we consider as an important RPC API consumer). +#[derive(Copy, Clone, Serialize, Deserialize, Debug, PartialEq, Eq)] +#[serde(untagged)] +pub enum NumberOrHex { + /// The number represented directly. + Number(u64), + /// Hex representation of the number. + Hex(U256), +} + +/// Hex-serialized shim for `Vec`. +#[derive(PartialEq, Eq, Clone, Serialize, Deserialize, Hash, PartialOrd, Ord, Debug)] +pub struct Bytes(#[serde(with = "impl_serde::serialize")] pub Vec); +impl std::ops::Deref for Bytes { + type Target = [u8]; + fn deref(&self) -> &[u8] { + &self.0[..] + } +} +impl From> for Bytes { + fn from(s: Vec) -> Self { + Bytes(s) + } +} + +/// The response from `chain_getBlock` +#[derive(Debug, Deserialize)] +#[serde(bound = "T: Config")] +pub struct ChainBlockResponse { + /// The block itself. + pub block: ChainBlock, + /// Block justification. + pub justifications: Option>, +} + +/// Block details in the [`ChainBlockResponse`]. +#[derive(Debug, Deserialize)] +pub struct ChainBlock { + /// The block header. + pub header: T::Header, + /// The accompanying extrinsics. + pub extrinsics: Vec, +} + +/// An abstraction over justification for a block's validity under a consensus algorithm. +pub type Justification = (ConsensusEngineId, EncodedJustification); +/// Consensus engine unique ID. +pub type ConsensusEngineId = [u8; 4]; +/// The encoded justification specific to a consensus engine. +pub type EncodedJustification = Vec; + +/// Bytes representing an extrinsic in a [`ChainBlock`]. +#[derive(Debug)] +pub struct ChainBlockExtrinsic(pub Vec); + +impl<'a> ::serde::Deserialize<'a> for ChainBlockExtrinsic { + fn deserialize(de: D) -> Result + where + D: ::serde::Deserializer<'a>, + { + let r = impl_serde::serialize::deserialize(de)?; + let bytes = Decode::decode(&mut &r[..]) + .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {}", e)))?; + Ok(ChainBlockExtrinsic(bytes)) + } +} + +/// Wrapper for NumberOrHex to allow custom From impls +#[derive(Serialize)] +pub struct BlockNumber(NumberOrHex); + +impl From for BlockNumber { + fn from(x: NumberOrHex) -> Self { + BlockNumber(x) + } +} + +impl Default for NumberOrHex { + fn default() -> Self { + Self::Number(Default::default()) + } +} + +impl NumberOrHex { + /// Converts this number into an U256. + pub fn into_u256(self) -> U256 { + match self { + NumberOrHex::Number(n) => n.into(), + NumberOrHex::Hex(h) => h, + } + } +} + +impl From for NumberOrHex { + fn from(n: u32) -> Self { + NumberOrHex::Number(n.into()) + } +} + +impl From for NumberOrHex { + fn from(n: u64) -> Self { + NumberOrHex::Number(n) + } +} + +impl From for NumberOrHex { + fn from(n: u128) -> Self { + NumberOrHex::Hex(n.into()) + } +} + +impl From for NumberOrHex { + fn from(n: U256) -> Self { + NumberOrHex::Hex(n) + } +} + +/// An error type that signals an out-of-range conversion attempt. +#[derive(Debug, thiserror::Error)] +#[error("Out-of-range conversion attempt")] +pub struct TryFromIntError; + +impl TryFrom for u32 { + type Error = TryFromIntError; + fn try_from(num_or_hex: NumberOrHex) -> Result { + num_or_hex + .into_u256() + .try_into() + .map_err(|_| TryFromIntError) + } +} + +impl TryFrom for u64 { + type Error = TryFromIntError; + fn try_from(num_or_hex: NumberOrHex) -> Result { + num_or_hex + .into_u256() + .try_into() + .map_err(|_| TryFromIntError) + } +} + +impl TryFrom for u128 { + type Error = TryFromIntError; + fn try_from(num_or_hex: NumberOrHex) -> Result { + num_or_hex + .into_u256() + .try_into() + .map_err(|_| TryFromIntError) + } +} + +impl From for U256 { + fn from(num_or_hex: NumberOrHex) -> U256 { + num_or_hex.into_u256() + } +} + +// All unsigned ints can be converted into a BlockNumber: +macro_rules! into_block_number { + ($($t: ty)+) => { + $( + impl From<$t> for BlockNumber { + fn from(x: $t) -> Self { + NumberOrHex::Number(x.into()).into() + } + } + )+ + } +} +into_block_number!(u8 u16 u32 u64); + +/// Arbitrary properties defined in the chain spec as a JSON object. +pub type SystemProperties = serde_json::Map; + +/// Possible transaction status events. +/// +/// # Note +/// +/// This is copied from `sp-transaction-pool` to avoid a dependency on that crate. Therefore it +/// must be kept compatible with that type from the target substrate version. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub enum SubstrateTxStatus { + /// Transaction is part of the future queue. + Future, + /// Transaction is part of the ready queue. + Ready, + /// The transaction has been broadcast to the given peers. + Broadcast(Vec), + /// Transaction has been included in block with given hash. + InBlock(BlockHash), + /// The block this transaction was included in has been retracted. + Retracted(BlockHash), + /// Maximum number of finality watchers has been reached, + /// old watchers are being removed. + FinalityTimeout(BlockHash), + /// Transaction has been finalized by a finality-gadget, e.g GRANDPA + Finalized(BlockHash), + /// Transaction has been replaced in the pool, by another transaction + /// that provides the same tags. (e.g. same (sender, nonce)). + Usurped(Hash), + /// Transaction has been dropped from the pool because of the limit. + Dropped, + /// Transaction is no longer valid in the current state. + Invalid, +} + +/// This contains the runtime version information necessary to make transactions, as obtained from +/// the RPC call `state_getRuntimeVersion`, +#[derive(Debug, Clone, PartialEq, Eq, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct RuntimeVersion { + /// Version of the runtime specification. A full-node will not attempt to use its native + /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + /// `spec_version` and `authoring_version` are the same between Wasm and native. + pub spec_version: u32, + + /// All existing dispatches are fully compatible when this number doesn't change. If this + /// number changes, then `spec_version` must change, also. + /// + /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, + /// either through an alteration in its user-level semantics, a parameter + /// added/removed/changed, a dispatchable being removed, a module being removed, or a + /// dispatchable/module changing its index. + /// + /// It need *not* change when a new module is added or when a dispatchable is added. + pub transaction_version: u32, + + /// The other fields present may vary and aren't necessary for `subxt`; they are preserved in + /// this map. + #[serde(flatten)] + pub other: HashMap, +} + +/// ReadProof struct returned by the RPC +/// +/// # Note +/// +/// This is copied from `sc-rpc-api` to avoid a dependency on that crate. Therefore it +/// must be kept compatible with that type from the target substrate version. +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ReadProof { + /// Block hash used to generate the proof + pub at: Hash, + /// A proof used to prove that storage entries are included in the storage trie + pub proof: Vec, +} + +/// Statistics of a block returned by the `dev_getBlockStats` RPC. +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct BlockStats { + /// The length in bytes of the storage proof produced by executing the block. + pub witness_len: u64, + /// The length in bytes of the storage proof after compaction. + pub witness_compact_len: u64, + /// Length of the block in bytes. + /// + /// This information can also be acquired by downloading the whole block. This merely + /// saves some complexity on the client side. + pub block_len: u64, + /// Number of extrinsics in the block. + /// + /// This information can also be acquired by downloading the whole block. This merely + /// saves some complexity on the client side. + pub num_extrinsics: u64, +} + +/// Storage key. +#[derive( + Serialize, + Deserialize, + Hash, + PartialOrd, + Ord, + PartialEq, + Eq, + Clone, + Encode, + Decode, + Debug, +)] +pub struct StorageKey(#[serde(with = "impl_serde::serialize")] pub Vec); +impl AsRef<[u8]> for StorageKey { + fn as_ref(&self) -> &[u8] { + &self.0 + } +} + +/// Storage data. +#[derive( + Serialize, + Deserialize, + Hash, + PartialOrd, + Ord, + PartialEq, + Eq, + Clone, + Encode, + Decode, + Debug, +)] +pub struct StorageData(#[serde(with = "impl_serde::serialize")] pub Vec); +impl AsRef<[u8]> for StorageData { + fn as_ref(&self) -> &[u8] { + &self.0 + } +} + +/// Storage change set +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)] +#[serde(rename_all = "camelCase")] +pub struct StorageChangeSet { + /// Block hash + pub block: Hash, + /// A list of changes + pub changes: Vec<(StorageKey, Option)>, +} + +/// Health struct returned by the RPC +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Health { + /// Number of connected peers + pub peers: usize, + /// Is the node syncing + pub is_syncing: bool, + /// Should this node have any peers + /// + /// Might be false for local chains or when running without discovery. + pub should_have_peers: bool, +} + +#[cfg(test)] +mod test { + use super::*; + + /// A util function to assert the result of serialization and deserialization is the same. + pub fn assert_deser(s: &str, expected: T) + where + T: std::fmt::Debug + + serde::ser::Serialize + + serde::de::DeserializeOwned + + PartialEq, + { + assert_eq!(serde_json::from_str::(s).unwrap(), expected); + assert_eq!(serde_json::to_string(&expected).unwrap(), s); + } + + // Check that some A can be serialized and then deserialized into some B. + pub fn assert_ser_deser(a: &A, b: &B) + where + A: serde::Serialize, + B: serde::de::DeserializeOwned + PartialEq + std::fmt::Debug, + { + let json = serde_json::to_string(a).expect("serializing failed"); + let new_b: B = serde_json::from_str(&json).expect("deserializing failed"); + + assert_eq!(b, &new_b); + } + + #[test] + fn runtime_version_is_substrate_compatible() { + use sp_version::RuntimeVersion as SpRuntimeVersion; + + let substrate_runtime_version = SpRuntimeVersion { + spec_version: 123, + transaction_version: 456, + ..Default::default() + }; + + let json = serde_json::to_string(&substrate_runtime_version) + .expect("serializing failed"); + let val: RuntimeVersion = + serde_json::from_str(&json).expect("deserializing failed"); + + // We ignore any other properties. + assert_eq!(val.spec_version, 123); + assert_eq!(val.transaction_version, 456); + } + + #[test] + fn runtime_version_handles_arbitrary_params() { + let val: RuntimeVersion = serde_json::from_str( + r#"{ + "specVersion": 123, + "transactionVersion": 456, + "foo": true, + "wibble": [1,2,3] + }"#, + ) + .expect("deserializing failed"); + + let mut m = std::collections::HashMap::new(); + m.insert("foo".to_owned(), serde_json::json!(true)); + m.insert("wibble".to_owned(), serde_json::json!([1, 2, 3])); + + assert_eq!( + val, + RuntimeVersion { + spec_version: 123, + transaction_version: 456, + other: m + } + ); + } + + #[test] + fn number_or_hex_deserializes_from_either_repr() { + assert_deser(r#""0x1234""#, NumberOrHex::Hex(0x1234.into())); + assert_deser(r#""0x0""#, NumberOrHex::Hex(0.into())); + assert_deser(r#"5"#, NumberOrHex::Number(5)); + assert_deser(r#"10000"#, NumberOrHex::Number(10000)); + assert_deser(r#"0"#, NumberOrHex::Number(0)); + assert_deser(r#"1000000000000"#, NumberOrHex::Number(1000000000000)); + } + + #[test] + fn dry_run_result_is_substrate_compatible() { + use sp_runtime::{ + transaction_validity::{ + InvalidTransaction as SpInvalidTransaction, + TransactionValidityError as SpTransactionValidityError, + }, + ApplyExtrinsicResult as SpApplyExtrinsicResult, + DispatchError as SpDispatchError, + }; + + let pairs = vec![ + // All ok + (SpApplyExtrinsicResult::Ok(Ok(())), Ok(())), + // Some transaction error + ( + SpApplyExtrinsicResult::Err(SpTransactionValidityError::Invalid( + SpInvalidTransaction::BadProof, + )), + Err(DryRunError::TransactionValidityError), + ), + // Some dispatch error + ( + SpApplyExtrinsicResult::Ok(Err(SpDispatchError::BadOrigin)), + Err(DryRunError::DispatchError), + ), + ]; + + for (actual, expected) in pairs { + let encoded = actual.encode(); + assert_eq!(decode_dry_run_result(&mut &*encoded).unwrap(), expected); + } + } + + #[test] + fn justification_is_substrate_compatible() { + use sp_runtime::Justification as SpJustification; + + // As much as anything, this just checks that the Justification type + // is still a tuple as given. + assert_ser_deser::( + &([1, 2, 3, 4], vec![5, 6, 7, 8]), + &([1, 2, 3, 4], vec![5, 6, 7, 8]), + ); + } + + #[test] + fn storage_types_are_substrate_compatible() { + use sp_core::storage::{ + StorageChangeSet as SpStorageChangeSet, + StorageData as SpStorageData, + StorageKey as SpStorageKey, + }; + + assert_ser_deser( + &SpStorageKey(vec![1, 2, 3, 4, 5]), + &StorageKey(vec![1, 2, 3, 4, 5]), + ); + assert_ser_deser( + &SpStorageData(vec![1, 2, 3, 4, 5]), + &StorageData(vec![1, 2, 3, 4, 5]), + ); + assert_ser_deser( + &SpStorageChangeSet { + block: 1u64, + changes: vec![(SpStorageKey(vec![1]), Some(SpStorageData(vec![2])))], + }, + &StorageChangeSet { + block: 1u64, + changes: vec![(StorageKey(vec![1]), Some(StorageData(vec![2])))], + }, + ); + } +} diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index 61b400fad7..072560182e 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -15,8 +15,8 @@ pub use storage_client::{ StorageClient, }; -// Re-export as this is used in the public API: -pub use sp_core::storage::StorageKey; +// Re-export as this is used in the public API in this module: +pub use crate::rpc::types::StorageKey; /// Types representing an address which describes where a storage /// entry lives and how to properly decode it. diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index e6777b567b..068098e592 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -16,15 +16,15 @@ use crate::{ DecodeWithMetadata, Metadata, }, + rpc::types::{ + StorageData, + StorageKey, + }, Config, }; use derivative::Derivative; use frame_metadata::StorageEntryType; use scale_info::form::PortableForm; -use sp_core::storage::{ - StorageData, - StorageKey, -}; use std::{ future::Future, marker::PhantomData, diff --git a/subxt/src/storage/storage_map_key.rs b/subxt/src/storage/storage_map_key.rs index bd5b96ec1e..2f0b585cba 100644 --- a/subxt/src/storage/storage_map_key.rs +++ b/subxt/src/storage/storage_map_key.rs @@ -3,7 +3,6 @@ // see LICENSE for license details. use codec::Encode; -pub use sp_runtime::traits::SignedExtension; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; @@ -37,16 +36,16 @@ impl StorageMapKey { pub(super) fn hash_bytes(input: &[u8], hasher: &StorageHasher, bytes: &mut Vec) { match hasher { StorageHasher::Identity => bytes.extend(input), - StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(input)), + StorageHasher::Blake2_128 => bytes.extend(sp_core_hashing::blake2_128(input)), StorageHasher::Blake2_128Concat => { - bytes.extend(sp_core::blake2_128(input)); + bytes.extend(sp_core_hashing::blake2_128(input)); bytes.extend(input); } - StorageHasher::Blake2_256 => bytes.extend(sp_core::blake2_256(input)), - StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(input)), - StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(input)), + StorageHasher::Blake2_256 => bytes.extend(sp_core_hashing::blake2_256(input)), + StorageHasher::Twox128 => bytes.extend(sp_core_hashing::twox_128(input)), + StorageHasher::Twox256 => bytes.extend(sp_core_hashing::twox_256(input)), StorageHasher::Twox64Concat => { - bytes.extend(sp_core::twox_64(input)); + bytes.extend(sp_core_hashing::twox_64(input)); bytes.extend(input); } } diff --git a/subxt/src/storage/utils.rs b/subxt/src/storage/utils.rs index 811743586d..2e3c678a50 100644 --- a/subxt/src/storage/utils.rs +++ b/subxt/src/storage/utils.rs @@ -18,8 +18,8 @@ pub fn write_storage_address_root_bytes( addr: &Address, out: &mut Vec, ) { - out.extend(sp_core::twox_128(addr.pallet_name().as_bytes())); - out.extend(sp_core::twox_128(addr.entry_name().as_bytes())); + out.extend(sp_core_hashing::twox_128(addr.pallet_name().as_bytes())); + out.extend(sp_core_hashing::twox_128(addr.entry_name().as_bytes())); } /// Outputs the [`storage_address_root_bytes`] as well as any additional bytes that represent diff --git a/subxt/src/tx/mod.rs b/subxt/src/tx/mod.rs index cb0fcd4e51..2c52645e22 100644 --- a/subxt/src/tx/mod.rs +++ b/subxt/src/tx/mod.rs @@ -2,45 +2,25 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! Create signed or unsigned extrinsics. -//! -//! This modules exposes the extrinsic's parameters and the ability to sign an extrinsic. -//! +//! Create and submit extrinsics. //! //! An extrinsic is submitted with an "signed extra" and "additional" parameters, which can be -//! different for each chain. The trait [ExtrinsicParams] determines exactly which -//! additional and signed extra parameters are used when constructing an extrinsic. -//! -//! -//! The structure [BaseExtrinsicParams] is a base implementation of the trait which -//! configures most of the "signed extra" and "additional" parameters as needed for -//! Polkadot and Substrate nodes. Only the shape of the tip payments differs, leading to -//! [SubstrateExtrinsicParams] and [PolkadotExtrinsicParams] structs which pick an -//! appropriate shape for Substrate/Polkadot chains respectively. +//! different for each chain. The trait [`crate::config::ExtrinsicParams`] determines exactly which +//! additional and signed extra parameters are used when constructing an extrinsic, and is a part +//! of the chain configuration (see [`crate::config::Config`]). -mod params; mod signer; mod tx_client; mod tx_payload; mod tx_progress; +// The PairSigner impl currently relies on Substrate bits and pieces, so make it an optional +// feature if we want to avoid needing sp_core and sp_runtime. +#[cfg(feature = "substrate-compat")] +pub use self::signer::PairSigner; + pub use self::{ - params::{ - AssetTip, - BaseExtrinsicParams, - BaseExtrinsicParamsBuilder, - Era, - ExtrinsicParams, - PlainTip, - PolkadotExtrinsicParams, - PolkadotExtrinsicParamsBuilder, - SubstrateExtrinsicParams, - SubstrateExtrinsicParamsBuilder, - }, - signer::{ - PairSigner, - Signer, - }, + signer::Signer, tx_client::{ SubmittableExtrinsic, TxClient, diff --git a/subxt/src/tx/signer.rs b/subxt/src/tx/signer.rs index 5e4f90c418..8a9583ad44 100644 --- a/subxt/src/tx/signer.rs +++ b/subxt/src/tx/signer.rs @@ -6,11 +6,6 @@ //! [substrate](https://github.com/paritytech/substrate) node via RPC. use crate::Config; -use sp_core::Pair; -use sp_runtime::traits::{ - IdentifyAccount, - Verify, -}; /// Signing transactions requires a [`Signer`]. This is responsible for /// providing the "from" account that the transaction is being signed by, @@ -29,55 +24,79 @@ pub trait Signer { fn sign(&self, signer_payload: &[u8]) -> T::Signature; } -/// A [`Signer`] implementation that can be constructed from an [`Pair`]. -#[derive(Clone, Debug)] -pub struct PairSigner { - account_id: T::AccountId, - signer: P, -} +#[cfg(feature = "substrate-compat")] +pub use pair_signer::PairSigner; -impl PairSigner -where - T: Config, - T::Signature: From, - ::Signer: - From + IdentifyAccount, - P: Pair, -{ - /// Creates a new [`Signer`] from a [`Pair`]. - pub fn new(signer: P) -> Self { - let account_id = - ::Signer::from(signer.public()).into_account(); - Self { account_id, signer } - } +// A signer suitable for substrate based chains. This provides compatibility with Substrate +// packages like sp_keyring and such, and so relies on sp_core and sp_runtime to be included. +#[cfg(feature = "substrate-compat")] +mod pair_signer { + use super::Signer; + use crate::Config; + use sp_core::Pair as PairT; + use sp_runtime::{ + traits::{ + IdentifyAccount, + Verify, + }, + AccountId32 as SpAccountId32, + MultiSignature as SpMultiSignature, + }; - /// Returns the [`Pair`] implementation used to construct this. - pub fn signer(&self) -> &P { - &self.signer + /// A [`Signer`] implementation that can be constructed from an [`sp_core::Pair`]. + #[derive(Clone, Debug)] + pub struct PairSigner { + account_id: T::AccountId, + signer: Pair, } - /// Return the account ID. - pub fn account_id(&self) -> &T::AccountId { - &self.account_id - } -} + impl PairSigner + where + T: Config, + Pair: PairT, + // We go via an sp_runtime::MultiSignature. We can probably generalise this + // by implementing some of these traits on our built-in MultiSignature and then + // requiring them on all T::Signatures, to avoid any go-between. + ::Signer: From, + T::AccountId: From, + { + /// Creates a new [`Signer`] from an [`sp_core::Pair`]. + pub fn new(signer: Pair) -> Self { + let account_id = ::Signer::from(signer.public()) + .into_account(); + Self { + account_id: account_id.into(), + signer, + } + } -impl Signer for PairSigner -where - T: Config, - T::AccountId: Into + Clone + 'static, - P: Pair + 'static, - P::Signature: Into + 'static, -{ - fn account_id(&self) -> &T::AccountId { - &self.account_id - } + /// Returns the [`sp_core::Pair`] implementation used to construct this. + pub fn signer(&self) -> &Pair { + &self.signer + } - fn address(&self) -> T::Address { - self.account_id.clone().into() + /// Return the account ID. + pub fn account_id(&self) -> &T::AccountId { + &self.account_id + } } - fn sign(&self, signer_payload: &[u8]) -> T::Signature { - self.signer.sign(signer_payload).into() + impl Signer for PairSigner + where + T: Config, + Pair: PairT, + Pair::Signature: Into, + { + fn account_id(&self) -> &T::AccountId { + &self.account_id + } + + fn address(&self) -> T::Address { + self.account_id.clone().into() + } + + fn sign(&self, signer_payload: &[u8]) -> T::Signature { + self.signer.sign(signer_payload).into() + } } } diff --git a/subxt/src/tx/tx_client.rs b/subxt/src/tx/tx_client.rs index 36d0fbad64..eb84d14eed 100644 --- a/subxt/src/tx/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -8,27 +8,29 @@ use crate::{ OfflineClientT, OnlineClientT, }, + config::{ + Config, + ExtrinsicParams, + Hasher, + }, error::Error, tx::{ - ExtrinsicParams, - Signer, + Signer as SignerT, TxProgress, }, utils::{ Encoded, PhantomDataSendSync, }, - Config, }; use codec::{ Compact, Encode, }; use derivative::Derivative; -use sp_runtime::{ - traits::Hash, - ApplyExtrinsicResult, -}; + +// This is returned from an API below, so expose it here. +pub use crate::rpc::types::DryRunResult; /// A client for working with transactions. #[derive(Derivative)] @@ -121,15 +123,16 @@ impl> TxClient { } /// Creates a raw signed extrinsic without submitting it. - pub fn create_signed_with_nonce( + pub fn create_signed_with_nonce( &self, call: &Call, - signer: &(dyn Signer + Send + Sync), + signer: &Signer, account_nonce: T::Index, other_params: >::OtherParams, ) -> Result, Error> where Call: TxPayload, + Signer: SignerT, { // 1. Validate this call against the current node metadata if the call comes // with a hash allowing us to do so. @@ -166,7 +169,7 @@ impl> TxClient { additional_and_extra_params.encode_extra_to(&mut bytes); additional_and_extra_params.encode_additional_to(&mut bytes); if bytes.len() > 256 { - signer.sign(&sp_core::blake2_256(&bytes)) + signer.sign(T::Hasher::hash_of(&bytes).as_ref()) } else { signer.sign(&bytes) } @@ -214,14 +217,15 @@ where C: OnlineClientT, { /// Creates a raw signed extrinsic, without submitting it. - pub async fn create_signed( + pub async fn create_signed( &self, call: &Call, - signer: &(dyn Signer + Send + Sync), + signer: &Signer, other_params: >::OtherParams, ) -> Result, Error> where Call: TxPayload, + Signer: SignerT, { // Get nonce from the node. let account_nonce = self @@ -238,13 +242,14 @@ where /// /// Returns a [`TxProgress`], which can be used to track the status of the transaction /// and obtain details about it, once it has made it into a block. - pub async fn sign_and_submit_then_watch_default( + pub async fn sign_and_submit_then_watch_default( &self, call: &Call, - signer: &(dyn Signer + Send + Sync), + signer: &Signer, ) -> Result, Error> where Call: TxPayload, + Signer: SignerT, >::OtherParams: Default, { self.sign_and_submit_then_watch(call, signer, Default::default()) @@ -255,14 +260,15 @@ where /// /// Returns a [`TxProgress`], which can be used to track the status of the transaction /// and obtain details about it, once it has made it into a block. - pub async fn sign_and_submit_then_watch( + pub async fn sign_and_submit_then_watch( &self, call: &Call, - signer: &(dyn Signer + Send + Sync), + signer: &Signer, other_params: >::OtherParams, ) -> Result, Error> where Call: TxPayload, + Signer: SignerT, { self.create_signed(call, signer, other_params) .await? @@ -280,13 +286,14 @@ where /// /// Success does not mean the extrinsic has been included in the block, just that it is valid /// and has been included in the transaction pool. - pub async fn sign_and_submit_default( + pub async fn sign_and_submit_default( &self, call: &Call, - signer: &(dyn Signer + Send + Sync), + signer: &Signer, ) -> Result where Call: TxPayload, + Signer: SignerT, >::OtherParams: Default, { self.sign_and_submit(call, signer, Default::default()).await @@ -300,14 +307,15 @@ where /// /// Success does not mean the extrinsic has been included in the block, just that it is valid /// and has been included in the transaction pool. - pub async fn sign_and_submit( + pub async fn sign_and_submit( &self, call: &Call, - signer: &(dyn Signer + Send + Sync), + signer: &Signer, other_params: >::OtherParams, ) -> Result where Call: TxPayload, + Signer: SignerT, { self.create_signed(call, signer, other_params) .await? @@ -366,7 +374,7 @@ where /// and obtain details about it, once it has made it into a block. pub async fn submit_and_watch(&self) -> Result, Error> { // Get a hash of the extrinsic (we'll need this later). - let ext_hash = T::Hashing::hash_of(&self.encoded); + let ext_hash = T::Hasher::hash_of(&self.encoded); // Submit and watch for transaction progress. let sub = self.client.rpc().watch_extrinsic(&self.encoded).await?; @@ -388,11 +396,8 @@ where /// Submits the extrinsic to the dry_run RPC, to test if it would succeed. /// - /// Returns `Ok` with an [`ApplyExtrinsicResult`], which is the result of applying of an extrinsic. - pub async fn dry_run( - &self, - at: Option, - ) -> Result { + /// Returns `Ok` with a [`DryRunResult`], which is the result of attempting to dry run the extrinsic. + pub async fn dry_run(&self, at: Option) -> Result { self.client.rpc().dry_run(self.encoded(), at).await } } diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index 0db6a53d80..c6b0179f1d 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -15,7 +15,7 @@ use crate::{ TransactionError, }, events::EventsClient, - rpc::{ + rpc::types::{ Subscription, SubstrateTxStatus, }, @@ -26,9 +26,6 @@ use futures::{ Stream, StreamExt, }; -use sp_runtime::traits::Hash; - -pub use sp_runtime::traits::SignedExtension; /// This struct represents a subscription to the progress of some transaction. #[derive(Derivative)] @@ -373,7 +370,8 @@ impl> TxInBlock { let extrinsic_idx = block.block.extrinsics .iter() .position(|ext| { - let hash = T::Hashing::hash_of(&ext.0); + use crate::config::Hasher; + let hash = T::Hasher::hash_of(&ext.0); hash == self.ext_hash }) // If we successfully obtain the block hash we think contains our diff --git a/subxt/src/utils/account_id.rs b/subxt/src/utils/account_id.rs new file mode 100644 index 0000000000..34e56cd87e --- /dev/null +++ b/subxt/src/utils/account_id.rs @@ -0,0 +1,203 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! The "default" Substrate/Polkadot AccountId. This is used in codegen, as well as signing related bits. +//! This doesn't contain much functionality itself, but is easy to convert to/from an `sp_core::AccountId32` +//! for instance, to gain functionality without forcing a dependency on Substrate crates here. + +use codec::{ + Decode, + Encode, +}; +use serde::Serialize; + +/// A 32-byte cryptographic identifier. This is a simplified version of Substrate's +/// `sp_core::crypto::AccountId32`. To obtain more functionality, convert this into +/// that type. +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +pub struct AccountId32(pub [u8; 32]); + +impl AsRef<[u8]> for AccountId32 { + fn as_ref(&self) -> &[u8] { + &self.0[..] + } +} + +impl AsRef<[u8; 32]> for AccountId32 { + fn as_ref(&self) -> &[u8; 32] { + &self.0 + } +} + +impl From<[u8; 32]> for AccountId32 { + fn from(x: [u8; 32]) -> Self { + AccountId32(x) + } +} + +impl AccountId32 { + // Return the ss58-check string for this key. Adapted from `sp_core::crypto`. We need this to + // serialize our account appropriately but otherwise don't care. + fn to_ss58check(&self) -> String { + // For serializing to a string to obtain the account nonce, we use the default substrate + // prefix (since we have no way to otherwise pick one). It doesn't really matter, since when + // it's deserialized back in system_accountNextIndex, we ignore this (so long as it's valid). + const SUBSTRATE_SS58_PREFIX: u8 = 42; + // prefix <= 63 just take up one byte at the start: + let mut v = vec![SUBSTRATE_SS58_PREFIX]; + // then push the account ID bytes. + v.extend(self.0); + // then push a 2 byte checksum of what we have so far. + let r = ss58hash(&v); + v.extend(&r[0..2]); + // then encode to base58. + use base58::ToBase58; + v.to_base58() + } + + // This isn't strictly needed, but to give our AccountId32 a little more usefulness, we also + // implement the logic needed to decode an AccountId32 from an SS58 encoded string. This is exposed + // via a `FromStr` impl. + fn from_ss58check(s: &str) -> Result { + const CHECKSUM_LEN: usize = 2; + let body_len = 32; + + use base58::FromBase58; + let data = s.from_base58().map_err(|_| FromSs58Error::BadBase58)?; + if data.len() < 2 { + return Err(FromSs58Error::BadLength) + } + let prefix_len = match data[0] { + 0..=63 => 1, + 64..=127 => 2, + _ => return Err(FromSs58Error::InvalidPrefix), + }; + if data.len() != prefix_len + body_len + CHECKSUM_LEN { + return Err(FromSs58Error::BadLength) + } + let hash = ss58hash(&data[0..body_len + prefix_len]); + let checksum = &hash[0..CHECKSUM_LEN]; + if data[body_len + prefix_len..body_len + prefix_len + CHECKSUM_LEN] != *checksum + { + // Invalid checksum. + return Err(FromSs58Error::InvalidChecksum) + } + + let result = data[prefix_len..body_len + prefix_len] + .try_into() + .map_err(|_| FromSs58Error::BadLength)?; + Ok(AccountId32(result)) + } +} + +/// An error obtained from trying to interpret an SS58 encoded string into an AccountId32 +#[derive(thiserror::Error, Clone, Copy, Eq, PartialEq, Debug)] +#[allow(missing_docs)] +pub enum FromSs58Error { + #[error("Base 58 requirement is violated")] + BadBase58, + #[error("Length is bad")] + BadLength, + #[error("Invalid checksum")] + InvalidChecksum, + #[error("Invalid SS58 prefix byte.")] + InvalidPrefix, +} + +// We do this just to get a checksum to help verify the validity of the address in to_ss58check +fn ss58hash(data: &[u8]) -> Vec { + use blake2::{ + Blake2b512, + Digest, + }; + const PREFIX: &[u8] = b"SS58PRE"; + let mut ctx = Blake2b512::new(); + ctx.update(PREFIX); + ctx.update(data); + ctx.finalize().to_vec() +} + +impl Serialize for AccountId32 { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(&self.to_ss58check()) + } +} + +impl std::fmt::Display for AccountId32 { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(f, "{}", self.to_ss58check()) + } +} + +impl std::str::FromStr for AccountId32 { + type Err = FromSs58Error; + fn from_str(s: &str) -> Result { + AccountId32::from_ss58check(s) + } +} + +// Improve compat with the substrate version if we're using those crates: +#[cfg(feature = "substrate-compat")] +mod substrate_impls { + use super::*; + + impl From for AccountId32 { + fn from(value: sp_runtime::AccountId32) -> Self { + Self(value.into()) + } + } + impl From for AccountId32 { + fn from(value: sp_core::sr25519::Public) -> Self { + let acc: sp_runtime::AccountId32 = value.into(); + acc.into() + } + } + impl From for AccountId32 { + fn from(value: sp_core::ed25519::Public) -> Self { + let acc: sp_runtime::AccountId32 = value.into(); + acc.into() + } + } +} + +#[cfg(test)] +mod test { + use super::*; + + use sp_core::crypto::Ss58Codec; + use sp_keyring::AccountKeyring; + + #[test] + fn ss58_is_compatible_with_substrate_impl() { + let keyrings = vec![ + AccountKeyring::Alice, + AccountKeyring::Bob, + AccountKeyring::Charlie, + ]; + + for keyring in keyrings { + let substrate_account = keyring.to_account_id(); + // Avoid "From" impl hidden behind "substrate-compat" feature so that this test + // can work either way: + let local_account = AccountId32(substrate_account.clone().into()); + + // Both should encode to ss58 the same way: + let substrate_ss58 = substrate_account.to_ss58check(); + assert_eq!(substrate_ss58, local_account.to_ss58check()); + + // Both should decode from ss58 back to the same: + assert_eq!( + sp_core::crypto::AccountId32::from_ss58check(&substrate_ss58).unwrap(), + substrate_account + ); + assert_eq!( + AccountId32::from_ss58check(&substrate_ss58).unwrap(), + local_account + ); + } + } +} diff --git a/subxt/src/utils/mod.rs b/subxt/src/utils/mod.rs index ec6761c1b7..b544eb8b7f 100644 --- a/subxt/src/utils/mod.rs +++ b/subxt/src/utils/mod.rs @@ -4,7 +4,10 @@ //! Miscellaneous utility helpers. +pub mod account_id; pub mod bits; +pub mod multi_address; +pub mod multi_signature; use codec::{ Decode, @@ -13,6 +16,18 @@ use codec::{ }; use derivative::Derivative; +pub use account_id::AccountId32; +pub use multi_address::MultiAddress; +pub use multi_signature::MultiSignature; + +// Used in codegen +#[doc(hidden)] +pub use primitive_types::{ + H160, + H256, + H512, +}; + /// Wraps an already encoded byte vector, prevents being encoded as a raw byte vector as part of /// the transaction payload #[derive(Clone, Debug, Eq, PartialEq)] diff --git a/subxt/src/utils/multi_address.rs b/subxt/src/utils/multi_address.rs new file mode 100644 index 0000000000..c6308a8e92 --- /dev/null +++ b/subxt/src/utils/multi_address.rs @@ -0,0 +1,66 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! The "default" Substrate/Polkadot Address type. This is used in codegen, as well as signing related bits. +//! This doesn't contain much functionality itself, but is easy to convert to/from an `sp_runtime::MultiAddress` +//! for instance, to gain functionality without forcing a dependency on Substrate crates here. + +use codec::{ + Decode, + Encode, +}; + +/// A multi-format address wrapper for on-chain accounts. This is a simplified version of Substrate's +/// `sp_runtime::MultiAddress`. To obtain more functionality, convert this into that type (this conversion +/// functionality is provided via `From` impls if the `substrate-compat` feature is enabled). +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +pub enum MultiAddress { + /// It's an account ID (pubkey). + Id(AccountId), + /// It's an account index. + Index(#[codec(compact)] AccountIndex), + /// It's some arbitrary raw bytes. + Raw(Vec), + /// It's a 32 byte representation. + Address32([u8; 32]), + /// Its a 20 byte representation. + Address20([u8; 20]), +} + +impl From for MultiAddress { + fn from(a: AccountId) -> Self { + Self::Id(a) + } +} + +// Improve compat with the substrate version if we're using those crates: +#[cfg(feature = "substrate-compat")] +mod substrate_impls { + use super::{ + super::AccountId32, + *, + }; + + impl From for MultiAddress { + fn from(value: sp_runtime::AccountId32) -> Self { + let val: AccountId32 = value.into(); + val.into() + } + } + + impl From> for MultiAddress + where + Id: Into, + { + fn from(value: sp_runtime::MultiAddress) -> Self { + match value { + sp_runtime::MultiAddress::Id(v) => Self::Id(v.into()), + sp_runtime::MultiAddress::Index(v) => Self::Index(v), + sp_runtime::MultiAddress::Raw(v) => Self::Raw(v), + sp_runtime::MultiAddress::Address32(v) => Self::Address32(v), + sp_runtime::MultiAddress::Address20(v) => Self::Address20(v), + } + } + } +} diff --git a/subxt/src/utils/multi_signature.rs b/subxt/src/utils/multi_signature.rs new file mode 100644 index 0000000000..482bcc1f6a --- /dev/null +++ b/subxt/src/utils/multi_signature.rs @@ -0,0 +1,61 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +//! The "default" Substrate/Polkadot Signature type. This is used in codegen, as well as signing related bits. +//! This doesn't contain much functionality itself, but is easy to convert to/from an `sp_runtime::MultiSignature` +//! for instance, to gain functionality without forcing a dependency on Substrate crates here. + +use codec::{ + Decode, + Encode, +}; + +/// Signature container that can store known signature types. This is a simplified version of +/// `sp_runtime::MultiSignature`. To obtain more functionality, convert this into that type. +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +pub enum MultiSignature { + /// An Ed25519 signature. + Ed25519([u8; 64]), + /// An Sr25519 signature. + Sr25519([u8; 64]), + /// An ECDSA/SECP256k1 signature (a 512-bit value, plus 8 bits for recovery ID). + Ecdsa([u8; 65]), +} + +// Improve compat with the substrate version if we're using those crates: +#[cfg(feature = "substrate-compat")] +mod substrate_impls { + use super::*; + + impl From for MultiSignature { + fn from(value: sp_runtime::MultiSignature) -> Self { + match value { + sp_runtime::MultiSignature::Ed25519(s) => Self::Ed25519(s.0), + sp_runtime::MultiSignature::Sr25519(s) => Self::Sr25519(s.0), + sp_runtime::MultiSignature::Ecdsa(s) => Self::Ecdsa(s.0), + } + } + } + + impl From for MultiSignature { + fn from(value: sp_core::ed25519::Signature) -> Self { + let sig: sp_runtime::MultiSignature = value.into(); + sig.into() + } + } + + impl From for MultiSignature { + fn from(value: sp_core::sr25519::Signature) -> Self { + let sig: sp_runtime::MultiSignature = value.into(); + sig.into() + } + } + + impl From for MultiSignature { + fn from(value: sp_core::ecdsa::Signature) -> Self { + let sig: sp_runtime::MultiSignature = value.into(); + sig.into() + } + } +} diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 9c76615974..ba378a39d2 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -23,9 +23,9 @@ futures = "0.3.13" hex = "0.4.3" regex = "1.5.0" scale-info = { version = "2.0.0", features = ["bit-vec"] } -sp-core = { version = "7.0.0", default-features = false } -sp-keyring = "7.0.0" -sp-runtime = "7.0.0" +sp-core = { version = "11.0.0", default-features = false } +sp-keyring = "12.0.0" +sp-runtime = "12.0.0" syn = "1.0.0" subxt = { version = "0.25.0", path = "../../subxt" } subxt-codegen = { version = "0.25.0", path = "../../codegen" } diff --git a/testing/integration-tests/src/blocks/mod.rs b/testing/integration-tests/src/blocks/mod.rs index d3449ecc66..71ddc257eb 100644 --- a/testing/integration-tests/src/blocks/mod.rs +++ b/testing/integration-tests/src/blocks/mod.rs @@ -75,8 +75,8 @@ async fn missing_block_headers_will_be_filled_in() -> Result<(), subxt::Error> { while let Some(header) = all_finalized_blocks.next().await { let header = header?; - use sp_runtime::traits::Header; - let block_number: u128 = (*header.number()).into(); + use subxt::config::Header; + let block_number: u128 = header.number().into(); if let Some(last) = last_block_number { assert_eq!(last + 1, block_number); diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 77a5a5f5e2..0214c4901f 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -17,7 +17,10 @@ use sp_core::{ Pair, }; use sp_keyring::AccountKeyring; -use subxt::error::DispatchError; +use subxt::{ + error::DispatchError, + rpc::types::DryRunError, +}; #[tokio::test] async fn insert_key() { @@ -162,8 +165,7 @@ async fn dry_run_passes() { .dry_run(None) .await .expect("dryrunning failed") - .expect("expected dryrunning to be successful") - .unwrap(); + .expect("dry run should be successful"); signed_extrinsic .submit_and_watch() @@ -198,15 +200,9 @@ async fn dry_run_fails() { let dry_run_res = signed_extrinsic .dry_run(None) .await - .expect("dryrunning failed") - .expect("expected dryrun transaction to be valid"); + .expect("dryrunning failed"); - if let Err(sp_runtime::DispatchError::Module(module_error)) = dry_run_res { - assert_eq!(module_error.index, 6); - assert_eq!(module_error.error, [2, 0, 0, 0]); - } else { - panic!("expected a module error when dryrunning"); - } + assert_eq!(dry_run_res, Err(DryRunError::DispatchError)); let res = signed_extrinsic .submit_and_watch() diff --git a/testing/integration-tests/src/codegen/mod.rs b/testing/integration-tests/src/codegen/mod.rs index 3199a68e2b..c8b8142fb0 100644 --- a/testing/integration-tests/src/codegen/mod.rs +++ b/testing/integration-tests/src/codegen/mod.rs @@ -8,7 +8,7 @@ /// Generate by: /// /// - run `polkadot --dev --tmp` node locally -/// - `cargo run --release -p subxt-cli -- codegen | rustfmt > integration-tests/src/codegen/polkadot.rs` +/// - `cargo run -p subxt-cli -- codegen | rustfmt > testing/integration-tests/src/codegen/polkadot.rs` #[rustfmt::skip] #[allow(clippy::all)] mod polkadot; diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 92d0d7570d..732faf74d6 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -462,7 +462,7 @@ pub mod api { )] #[doc = "A new account was created."] pub struct NewAccount { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for NewAccount { const PALLET: &'static str = "System"; @@ -475,7 +475,7 @@ pub mod api { )] #[doc = "An account was reaped."] pub struct KilledAccount { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for KilledAccount { const PALLET: &'static str = "System"; @@ -488,8 +488,8 @@ pub mod api { )] #[doc = "On on-chain remark happened."] pub struct Remarked { - pub sender: ::subxt::ext::sp_core::crypto::AccountId32, - pub hash: ::subxt::ext::sp_core::H256, + pub sender: ::subxt::utils::account_id::AccountId32, + pub hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Remarked { const PALLET: &'static str = "System"; @@ -503,7 +503,7 @@ pub mod api { #[doc = " The full account information for a particular account ID."] pub fn account( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_system::AccountInfo< @@ -632,7 +632,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -656,7 +656,7 @@ pub mod api { pub fn block_hash_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -748,7 +748,7 @@ pub mod api { pub fn parent_hash( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -802,7 +802,7 @@ pub mod api { ::std::vec::Vec< runtime_types::frame_system::EventRecord< runtime_types::polkadot_runtime::RuntimeEvent, - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, >, @@ -855,7 +855,7 @@ pub mod api { #[doc = " no notification will be triggered thus the event might be lost."] pub fn event_topics( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, @@ -1484,7 +1484,7 @@ pub mod api { ], ) } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: Scheduled < [:: core :: primitive :: u8 ; 32usize] , runtime_types :: frame_support :: traits :: preimages :: Bounded < runtime_types :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: Scheduled < [:: core :: primitive :: u8 ; 32usize] , runtime_types :: frame_support :: traits :: preimages :: Bounded < runtime_types :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: account_id :: AccountId32 > > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Agenda", @@ -1500,7 +1500,7 @@ pub mod api { ], ) } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: Scheduled < [:: core :: primitive :: u8 ; 32usize] , runtime_types :: frame_support :: traits :: preimages :: Bounded < runtime_types :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: Scheduled < [:: core :: primitive :: u8 ; 32usize] , runtime_types :: frame_support :: traits :: preimages :: Bounded < runtime_types :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: account_id :: AccountId32 > > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Agenda", @@ -1638,7 +1638,7 @@ pub mod api { Debug, )] pub struct UnnotePreimage { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1646,7 +1646,7 @@ pub mod api { Debug, )] pub struct RequestPreimage { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1654,7 +1654,7 @@ pub mod api { Debug, )] pub struct UnrequestPreimage { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } pub struct TransactionApi; impl TransactionApi { @@ -1686,7 +1686,7 @@ pub mod api { #[doc = "- `len`: The length of the preimage of `hash`."] pub fn unnote_preimage( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Preimage", @@ -1706,7 +1706,7 @@ pub mod api { #[doc = "a user may have paid, and take the control of the preimage out of their hands."] pub fn request_preimage( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Preimage", @@ -1725,7 +1725,7 @@ pub mod api { #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] pub fn unrequest_preimage( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Preimage", @@ -1752,7 +1752,7 @@ pub mod api { )] #[doc = "A preimage has been noted."] pub struct Noted { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Noted { const PALLET: &'static str = "Preimage"; @@ -1765,7 +1765,7 @@ pub mod api { )] #[doc = "A preimage has been requested."] pub struct Requested { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Requested { const PALLET: &'static str = "Preimage"; @@ -1778,7 +1778,7 @@ pub mod api { )] #[doc = "A preimage has ben cleared."] pub struct Cleared { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Cleared { const PALLET: &'static str = "Preimage"; @@ -1792,11 +1792,11 @@ pub mod api { #[doc = " The request status of a given hash."] pub fn status_for( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_preimage::RequestStatus< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -1825,7 +1825,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_preimage::RequestStatus< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -1847,7 +1847,7 @@ pub mod api { } pub fn preimage_for( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< @@ -2688,8 +2688,8 @@ pub mod api { Debug, )] pub struct Transfer { - pub new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub index: ::core::primitive::u32, @@ -2709,8 +2709,8 @@ pub mod api { Debug, )] pub struct ForceTransfer { - pub new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub index: ::core::primitive::u32, @@ -2783,8 +2783,8 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, index: ::core::primitive::u32, @@ -2858,8 +2858,8 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, index: ::core::primitive::u32, @@ -2924,7 +2924,7 @@ pub mod api { )] #[doc = "A account index was assigned."] pub struct IndexAssigned { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for IndexAssigned { @@ -2953,7 +2953,7 @@ pub mod api { #[doc = "A account index has been frozen to its current account ID."] pub struct IndexFrozen { pub index: ::core::primitive::u32, - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for IndexFrozen { const PALLET: &'static str = "Indices"; @@ -2970,7 +2970,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::bool, )>, @@ -2998,7 +2998,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::bool, )>, @@ -3058,8 +3058,8 @@ pub mod api { Debug, )] pub struct Transfer { - pub dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -3071,8 +3071,8 @@ pub mod api { Debug, )] pub struct SetBalance { - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -3086,12 +3086,12 @@ pub mod api { Debug, )] pub struct ForceTransfer { - pub source: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub source: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -3103,8 +3103,8 @@ pub mod api { Debug, )] pub struct TransferKeepAlive { - pub dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -3116,8 +3116,8 @@ pub mod api { Debug, )] pub struct TransferAll { - pub dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub keep_alive: ::core::primitive::bool, @@ -3128,8 +3128,8 @@ pub mod api { Debug, )] pub struct ForceUnreserve { - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub amount: ::core::primitive::u128, @@ -3163,8 +3163,8 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, value: ::core::primitive::u128, @@ -3191,8 +3191,8 @@ pub mod api { #[doc = "The dispatch origin for this call is `root`."] pub fn set_balance( &self, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, new_free: ::core::primitive::u128, @@ -3222,12 +3222,12 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - source: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + source: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, value: ::core::primitive::u128, @@ -3256,8 +3256,8 @@ pub mod api { #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] pub fn transfer_keep_alive( &self, - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, value: ::core::primitive::u128, @@ -3293,8 +3293,8 @@ pub mod api { #[doc = " #"] pub fn transfer_all( &self, - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, keep_alive: ::core::primitive::bool, @@ -3316,8 +3316,8 @@ pub mod api { #[doc = "Can only be called by ROOT."] pub fn force_unreserve( &self, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, amount: ::core::primitive::u128, @@ -3347,7 +3347,7 @@ pub mod api { )] #[doc = "An account was created with some free balance."] pub struct Endowed { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub free_balance: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Endowed { @@ -3362,7 +3362,7 @@ pub mod api { #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] #[doc = "resulting in an outright loss."] pub struct DustLost { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for DustLost { @@ -3376,8 +3376,8 @@ pub mod api { )] #[doc = "Transfer succeeded."] pub struct Transfer { - pub from: ::subxt::ext::sp_core::crypto::AccountId32, - pub to: ::subxt::ext::sp_core::crypto::AccountId32, + pub from: ::subxt::utils::account_id::AccountId32, + pub to: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Transfer { @@ -3391,7 +3391,7 @@ pub mod api { )] #[doc = "A balance was set by root."] pub struct BalanceSet { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub free: ::core::primitive::u128, pub reserved: ::core::primitive::u128, } @@ -3406,7 +3406,7 @@ pub mod api { )] #[doc = "Some balance was reserved (moved from free to reserved)."] pub struct Reserved { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Reserved { @@ -3420,7 +3420,7 @@ pub mod api { )] #[doc = "Some balance was unreserved (moved from reserved to free)."] pub struct Unreserved { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Unreserved { @@ -3435,8 +3435,8 @@ pub mod api { #[doc = "Some balance was moved from the reserve of the first account to the second account."] #[doc = "Final argument indicates the destination balance type."] pub struct ReserveRepatriated { - pub from: ::subxt::ext::sp_core::crypto::AccountId32, - pub to: ::subxt::ext::sp_core::crypto::AccountId32, + pub from: ::subxt::utils::account_id::AccountId32, + pub to: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, pub destination_status: runtime_types::frame_support::traits::tokens::misc::BalanceStatus, @@ -3452,7 +3452,7 @@ pub mod api { )] #[doc = "Some amount was deposited (e.g. for transaction fees)."] pub struct Deposit { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Deposit { @@ -3466,7 +3466,7 @@ pub mod api { )] #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] pub struct Withdraw { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Withdraw { @@ -3480,7 +3480,7 @@ pub mod api { )] #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] pub struct Slashed { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -3539,7 +3539,7 @@ pub mod api { #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] pub fn account( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_balances::AccountData< @@ -3617,7 +3617,7 @@ pub mod api { #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] pub fn locks( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< @@ -3676,7 +3676,7 @@ pub mod api { #[doc = " Named reserves on some account balances."] pub fn reserves( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -3834,7 +3834,7 @@ pub mod api { #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] #[doc = "has been paid by `who`."] pub struct TransactionFeePaid { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub actual_fee: ::core::primitive::u128, pub tip: ::core::primitive::u128, } @@ -3996,8 +3996,8 @@ pub mod api { runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_authorship::UncleEntryItem< ::core::primitive::u32, - ::subxt::ext::sp_core::H256, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::H256, + ::subxt::utils::account_id::AccountId32, >, >, >, @@ -4022,7 +4022,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::subxt::storage::address::Yes, (), @@ -4103,14 +4103,14 @@ pub mod api { Debug, )] pub struct Bond { - pub controller: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub controller: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] pub value: ::core::primitive::u128, pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, } #[derive( @@ -4155,8 +4155,8 @@ pub mod api { )] pub struct Nominate { pub targets: ::std::vec::Vec< - ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, >, @@ -4174,7 +4174,7 @@ pub mod api { )] pub struct SetPayee { pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, } #[derive( @@ -4183,8 +4183,8 @@ pub mod api { Debug, )] pub struct SetController { - pub controller: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub controller: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -4233,7 +4233,7 @@ pub mod api { )] pub struct SetInvulnerables { pub invulnerables: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4241,7 +4241,7 @@ pub mod api { Debug, )] pub struct ForceUnstake { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } #[derive( @@ -4265,7 +4265,7 @@ pub mod api { Debug, )] pub struct PayoutStakers { - pub validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub validator_stash: ::subxt::utils::account_id::AccountId32, pub era: ::core::primitive::u32, } #[derive( @@ -4283,7 +4283,7 @@ pub mod api { Debug, )] pub struct ReapStash { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } #[derive( @@ -4293,8 +4293,8 @@ pub mod api { )] pub struct Kick { pub who: ::std::vec::Vec< - ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, >, @@ -4336,7 +4336,7 @@ pub mod api { Debug, )] pub struct ChillOther { - pub controller: ::subxt::ext::sp_core::crypto::AccountId32, + pub controller: ::subxt::utils::account_id::AccountId32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4344,7 +4344,7 @@ pub mod api { Debug, )] pub struct ForceApplyMinCommission { - pub validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub validator_stash: ::subxt::utils::account_id::AccountId32, } pub struct TransactionApi; impl TransactionApi { @@ -4367,13 +4367,13 @@ pub mod api { #[doc = "# "] pub fn bond( &self, - controller: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + controller: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, value: ::core::primitive::u128, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4524,8 +4524,8 @@ pub mod api { pub fn nominate( &self, targets: ::std::vec::Vec< - ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, >, @@ -4585,7 +4585,7 @@ pub mod api { pub fn set_payee( &self, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4618,8 +4618,8 @@ pub mod api { #[doc = "# "] pub fn set_controller( &self, - controller: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + controller: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -4771,7 +4771,7 @@ pub mod api { pub fn set_invulnerables( &self, invulnerables: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4791,7 +4791,7 @@ pub mod api { #[doc = "The dispatch origin must be Root."] pub fn force_unstake( &self, - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, num_slashing_spans: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4878,7 +4878,7 @@ pub mod api { #[doc = "# "] pub fn payout_stakers( &self, - validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + validator_stash: ::subxt::utils::account_id::AccountId32, era: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4935,7 +4935,7 @@ pub mod api { #[doc = "Refunds the transaction fees upon successful execution."] pub fn reap_stash( &self, - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, num_slashing_spans: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4967,8 +4967,8 @@ pub mod api { pub fn kick( &self, who: ::std::vec::Vec< - ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, >, @@ -5058,7 +5058,7 @@ pub mod api { #[doc = "who do not satisfy these requirements."] pub fn chill_other( &self, - controller: ::subxt::ext::sp_core::crypto::AccountId32, + controller: ::subxt::utils::account_id::AccountId32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Staking", @@ -5077,7 +5077,7 @@ pub mod api { #[doc = "can call this."] pub fn force_apply_min_commission( &self, - validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + validator_stash: ::subxt::utils::account_id::AccountId32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -5121,7 +5121,7 @@ pub mod api { )] #[doc = "The nominator has been rewarded by this amount."] pub struct Rewarded { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Rewarded { @@ -5135,7 +5135,7 @@ pub mod api { )] #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] pub struct Slashed { - pub staker: ::subxt::ext::sp_core::crypto::AccountId32, + pub staker: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -5178,7 +5178,7 @@ pub mod api { #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] #[doc = "it will not be emitted for staking rewards when they are added to stake."] pub struct Bonded { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Bonded { @@ -5192,7 +5192,7 @@ pub mod api { )] #[doc = "An account has unbonded this amount."] pub struct Unbonded { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Unbonded { @@ -5207,7 +5207,7 @@ pub mod api { #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue."] pub struct Withdrawn { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Withdrawn { @@ -5221,8 +5221,8 @@ pub mod api { )] #[doc = "A nominator has been kicked from a validator."] pub struct Kicked { - pub nominator: ::subxt::ext::sp_core::crypto::AccountId32, - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub nominator: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Kicked { const PALLET: &'static str = "Staking"; @@ -5246,7 +5246,7 @@ pub mod api { )] #[doc = "An account has stopped participating as either a validator or nominator."] pub struct Chilled { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Chilled { const PALLET: &'static str = "Staking"; @@ -5260,7 +5260,7 @@ pub mod api { #[doc = "The stakers' rewards are getting paid."] pub struct PayoutStarted { pub era_index: ::core::primitive::u32, - pub validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub validator_stash: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for PayoutStarted { const PALLET: &'static str = "Staking"; @@ -5273,7 +5273,7 @@ pub mod api { )] #[doc = "A validator has set their preferences."] pub struct ValidatorPrefsSet { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } impl ::subxt::events::StaticEvent for ValidatorPrefsSet { @@ -5334,7 +5334,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -5355,10 +5355,10 @@ pub mod api { #[doc = " Map from all locked \"stash\" accounts to the controller account."] pub fn bonded( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::subxt::storage::address::Yes, (), @@ -5384,7 +5384,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, (), (), @@ -5472,7 +5472,7 @@ pub mod api { #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] pub fn ledger( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::StakingLedger, @@ -5522,11 +5522,11 @@ pub mod api { #[doc = " Where the reward payment should be made. Keyed by stash."] pub fn payee( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -5554,7 +5554,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, (), @@ -5576,7 +5576,7 @@ pub mod api { #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] pub fn validators( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::ValidatorPrefs, @@ -5685,7 +5685,7 @@ pub mod api { #[doc = " [`Call::chill_other`] dispatchable by anyone."] pub fn nominators( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Nominations, @@ -5902,11 +5902,11 @@ pub mod api { pub fn eras_stakers( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -5946,7 +5946,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -5980,11 +5980,11 @@ pub mod api { pub fn eras_stakers_clipped( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -6029,7 +6029,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -6057,7 +6057,7 @@ pub mod api { pub fn eras_validator_prefs( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::ValidatorPrefs, @@ -6172,7 +6172,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::EraRewardPoints< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -6201,7 +6201,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::EraRewardPoints< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, (), @@ -6346,7 +6346,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_staking::UnappliedSlash< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -6377,7 +6377,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_staking::UnappliedSlash< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -6429,7 +6429,7 @@ pub mod api { pub fn validator_slash_in_era( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_arithmetic::per_things::Perbill, @@ -6489,7 +6489,7 @@ pub mod api { pub fn nominator_slash_in_era( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, ::subxt::storage::address::Yes, @@ -6541,7 +6541,7 @@ pub mod api { #[doc = " Slashing spans for stash accounts."] pub fn slashing_spans( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::slashing::SlashingSpans, @@ -6592,7 +6592,7 @@ pub mod api { #[doc = " as well as how much reward has been paid out."] pub fn span_slash( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< @@ -6946,15 +6946,15 @@ pub mod api { #[doc = " The primary structure that holds all offence records keyed by report identifiers."] pub fn reports( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, ), @@ -6985,11 +6985,11 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, ), @@ -7018,7 +7018,7 @@ pub mod api { _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::H256>, + ::std::vec::Vec<::subxt::utils::H256>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -7050,7 +7050,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::H256>, + ::std::vec::Vec<::subxt::utils::H256>, >, (), ::subxt::storage::address::Yes, @@ -7251,7 +7251,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -7319,7 +7319,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::polkadot_runtime::SessionKeys, )>, >, @@ -7369,7 +7369,7 @@ pub mod api { #[doc = " The next session keys for a validator."] pub fn next_keys( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime::SessionKeys, @@ -7423,7 +7423,7 @@ pub mod api { _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::subxt::storage::address::Yes, (), @@ -7449,7 +7449,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, (), (), @@ -7486,7 +7486,7 @@ pub mod api { pub struct ReportEquivocation { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, ::core::primitive::u32, >, >, @@ -7500,7 +7500,7 @@ pub mod api { pub struct ReportEquivocationUnsigned { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, ::core::primitive::u32, >, >, @@ -7523,7 +7523,7 @@ pub mod api { #[doc = "will be reported."] pub fn report_equivocation( &self, - equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 >, + equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: utils :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -7554,7 +7554,7 @@ pub mod api { #[doc = "reporter."] pub fn report_equivocation_unsigned( &self, - equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 >, + equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: utils :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, ) -> ::subxt::tx::StaticTxPayload { @@ -7942,9 +7942,9 @@ pub mod api { #[doc = "At the end of the session, at least one validator was found to be offline."] pub struct SomeOffline { pub offline: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, )>, @@ -8082,7 +8082,7 @@ pub mod api { pub fn authored_blocks( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, @@ -8251,7 +8251,7 @@ pub mod api { Debug, )] pub struct FastTrack { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub voting_period: ::core::primitive::u32, pub delay: ::core::primitive::u32, } @@ -8261,7 +8261,7 @@ pub mod api { Debug, )] pub struct VetoExternal { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -8278,8 +8278,8 @@ pub mod api { Debug, )] pub struct Delegate { - pub to: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub to: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, @@ -8303,8 +8303,8 @@ pub mod api { Debug, )] pub struct Unlock { - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -8323,8 +8323,8 @@ pub mod api { Debug, )] pub struct RemoveOtherVote { - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub index: ::core::primitive::u32, @@ -8335,7 +8335,7 @@ pub mod api { Debug, )] pub struct Blacklist { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, } #[derive( @@ -8551,7 +8551,7 @@ pub mod api { #[doc = "Weight: `O(1)`"] pub fn fast_track( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { @@ -8582,7 +8582,7 @@ pub mod api { #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] pub fn veto_external( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Democracy", @@ -8641,8 +8641,8 @@ pub mod api { #[doc = " voted on. Weight is charged as if maximum votes."] pub fn delegate( &self, - to: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + to: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, conviction: runtime_types::pallet_democracy::conviction::Conviction, @@ -8718,8 +8718,8 @@ pub mod api { #[doc = "Weight: `O(R)` with R number of vote of target."] pub fn unlock( &self, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -8795,8 +8795,8 @@ pub mod api { #[doc = " Weight is calculated for the maximum number of vote."] pub fn remove_other_vote( &self, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, index: ::core::primitive::u32, @@ -8830,7 +8830,7 @@ pub mod api { #[doc = " reasonable value)."] pub fn blacklist( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -8980,8 +8980,8 @@ pub mod api { )] #[doc = "An account has delegated their vote to another account."] pub struct Delegated { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, - pub target: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, + pub target: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Delegated { const PALLET: &'static str = "Democracy"; @@ -8994,7 +8994,7 @@ pub mod api { )] #[doc = "An account has cancelled a previous delegation operation."] pub struct Undelegated { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Undelegated { const PALLET: &'static str = "Democracy"; @@ -9007,8 +9007,8 @@ pub mod api { )] #[doc = "An external proposal has been vetoed."] pub struct Vetoed { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub who: ::subxt::utils::account_id::AccountId32, + pub proposal_hash: ::subxt::utils::H256, pub until: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Vetoed { @@ -9022,7 +9022,7 @@ pub mod api { )] #[doc = "A proposal_hash has been blacklisted permanently."] pub struct Blacklisted { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Blacklisted { const PALLET: &'static str = "Democracy"; @@ -9035,7 +9035,7 @@ pub mod api { )] #[doc = "An account has voted in a referendum"] pub struct Voted { - pub voter: ::subxt::ext::sp_core::crypto::AccountId32, + pub voter: ::subxt::utils::account_id::AccountId32, pub ref_index: ::core::primitive::u32, pub vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, @@ -9052,7 +9052,7 @@ pub mod api { )] #[doc = "An account has secconded a proposal"] pub struct Seconded { - pub seconder: ::subxt::ext::sp_core::crypto::AccountId32, + pub seconder: ::subxt::utils::account_id::AccountId32, pub prop_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Seconded { @@ -9109,7 +9109,7 @@ pub mod api { runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, >, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, )>, >, ::subxt::storage::address::Yes, @@ -9137,7 +9137,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::core::primitive::u128, )>, @@ -9168,7 +9168,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::core::primitive::u128, )>, @@ -9303,12 +9303,12 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] pub fn voting_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u32, >, >, @@ -9341,7 +9341,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u32, >, >, @@ -9416,12 +9416,12 @@ pub mod api { #[doc = " (until when it may not be resubmitted) and who vetoed it."] pub fn blacklist( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( ::core::primitive::u32, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, ::subxt::storage::address::Yes, @@ -9451,7 +9451,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( ::core::primitive::u32, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, (), @@ -9473,7 +9473,7 @@ pub mod api { #[doc = " Record of all proposals that have been subject to emergency cancellation."] pub fn cancellations( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, ::subxt::storage::address::Yes, @@ -9755,10 +9755,9 @@ pub mod api { Debug, )] pub struct SetMembers { - pub new_members: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, pub prime: - ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::option::Option<::subxt::utils::account_id::AccountId32>, pub old_count: ::core::primitive::u32, } #[derive( @@ -9791,7 +9790,7 @@ pub mod api { Debug, )] pub struct Vote { - pub proposal: ::subxt::ext::sp_core::H256, + pub proposal: ::subxt::utils::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, @@ -9802,7 +9801,7 @@ pub mod api { Debug, )] pub struct CloseOldWeight { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] @@ -9816,7 +9815,7 @@ pub mod api { Debug, )] pub struct DisapproveProposal { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -9824,7 +9823,7 @@ pub mod api { Debug, )] pub struct Close { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, @@ -9867,11 +9866,9 @@ pub mod api { #[doc = "# "] pub fn set_members( &self, - new_members: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, - >, + new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, prime: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, old_count: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { @@ -9988,7 +9985,7 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - proposal: ::subxt::ext::sp_core::H256, + proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { @@ -10042,7 +10039,7 @@ pub mod api { #[doc = "# "] pub fn close_old_weight( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::OldWeight, length_bound: ::core::primitive::u32, @@ -10080,7 +10077,7 @@ pub mod api { #[doc = "# "] pub fn disapprove_proposal( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Council", @@ -10128,7 +10125,7 @@ pub mod api { #[doc = "# "] pub fn close( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, length_bound: ::core::primitive::u32, @@ -10164,9 +10161,9 @@ pub mod api { #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] pub struct Proposed { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub threshold: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Proposed { @@ -10181,8 +10178,8 @@ pub mod api { #[doc = "A motion (given hash) has been voted on by given account, leaving"] #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] pub struct Voted { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub account: ::subxt::utils::account_id::AccountId32, + pub proposal_hash: ::subxt::utils::H256, pub voted: ::core::primitive::bool, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, @@ -10198,7 +10195,7 @@ pub mod api { )] #[doc = "A motion was approved by the required threshold."] pub struct Approved { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Approved { const PALLET: &'static str = "Council"; @@ -10211,7 +10208,7 @@ pub mod api { )] #[doc = "A motion was not approved by the required threshold."] pub struct Disapproved { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Disapproved { const PALLET: &'static str = "Council"; @@ -10224,7 +10221,7 @@ pub mod api { )] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] pub struct Executed { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -10239,7 +10236,7 @@ pub mod api { )] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] pub struct MemberExecuted { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -10254,7 +10251,7 @@ pub mod api { )] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] pub struct Closed { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, } @@ -10273,7 +10270,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, ::subxt::storage::address::Yes, @@ -10295,7 +10292,7 @@ pub mod api { #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime::RuntimeCall, @@ -10345,11 +10342,11 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u32, >, >, @@ -10378,7 +10375,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u32, >, >, @@ -10424,7 +10421,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -10447,7 +10444,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::subxt::storage::address::Yes, (), @@ -10482,10 +10479,9 @@ pub mod api { Debug, )] pub struct SetMembers { - pub new_members: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, pub prime: - ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::option::Option<::subxt::utils::account_id::AccountId32>, pub old_count: ::core::primitive::u32, } #[derive( @@ -10518,7 +10514,7 @@ pub mod api { Debug, )] pub struct Vote { - pub proposal: ::subxt::ext::sp_core::H256, + pub proposal: ::subxt::utils::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, @@ -10529,7 +10525,7 @@ pub mod api { Debug, )] pub struct CloseOldWeight { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] @@ -10543,7 +10539,7 @@ pub mod api { Debug, )] pub struct DisapproveProposal { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -10551,7 +10547,7 @@ pub mod api { Debug, )] pub struct Close { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, @@ -10594,11 +10590,9 @@ pub mod api { #[doc = "# "] pub fn set_members( &self, - new_members: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, - >, + new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, prime: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, old_count: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { @@ -10715,7 +10709,7 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - proposal: ::subxt::ext::sp_core::H256, + proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { @@ -10769,7 +10763,7 @@ pub mod api { #[doc = "# "] pub fn close_old_weight( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::OldWeight, length_bound: ::core::primitive::u32, @@ -10807,7 +10801,7 @@ pub mod api { #[doc = "# "] pub fn disapprove_proposal( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalCommittee", @@ -10855,7 +10849,7 @@ pub mod api { #[doc = "# "] pub fn close( &self, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, length_bound: ::core::primitive::u32, @@ -10891,9 +10885,9 @@ pub mod api { #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] pub struct Proposed { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub threshold: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Proposed { @@ -10908,8 +10902,8 @@ pub mod api { #[doc = "A motion (given hash) has been voted on by given account, leaving"] #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] pub struct Voted { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub account: ::subxt::utils::account_id::AccountId32, + pub proposal_hash: ::subxt::utils::H256, pub voted: ::core::primitive::bool, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, @@ -10925,7 +10919,7 @@ pub mod api { )] #[doc = "A motion was approved by the required threshold."] pub struct Approved { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Approved { const PALLET: &'static str = "TechnicalCommittee"; @@ -10938,7 +10932,7 @@ pub mod api { )] #[doc = "A motion was not approved by the required threshold."] pub struct Disapproved { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Disapproved { const PALLET: &'static str = "TechnicalCommittee"; @@ -10951,7 +10945,7 @@ pub mod api { )] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] pub struct Executed { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -10966,7 +10960,7 @@ pub mod api { )] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] pub struct MemberExecuted { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -10981,7 +10975,7 @@ pub mod api { )] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] pub struct Closed { - pub proposal_hash: ::subxt::ext::sp_core::H256, + pub proposal_hash: ::subxt::utils::H256, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, } @@ -11000,7 +10994,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, ::subxt::storage::address::Yes, @@ -11022,7 +11016,7 @@ pub mod api { #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime::RuntimeCall, @@ -11072,11 +11066,11 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u32, >, >, @@ -11105,7 +11099,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u32, >, >, @@ -11151,7 +11145,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -11174,7 +11168,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::subxt::storage::address::Yes, (), @@ -11209,7 +11203,7 @@ pub mod api { Debug, )] pub struct Vote { - pub votes: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub votes: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, #[codec(compact)] pub value: ::core::primitive::u128, } @@ -11242,8 +11236,8 @@ pub mod api { Debug, )] pub struct RemoveMember { - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub slash_bond: ::core::primitive::bool, @@ -11285,7 +11279,7 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - votes: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + votes: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -11403,8 +11397,8 @@ pub mod api { #[doc = "# "] pub fn remove_member( &self, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, slash_bond: ::core::primitive::bool, @@ -11474,7 +11468,7 @@ pub mod api { #[doc = "begin with."] pub struct NewTerm { pub new_members: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, )>, } @@ -11513,7 +11507,7 @@ pub mod api { #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] #[doc = "`EmptyTerm`."] pub struct MemberKicked { - pub member: ::subxt::ext::sp_core::crypto::AccountId32, + pub member: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for MemberKicked { const PALLET: &'static str = "PhragmenElection"; @@ -11526,7 +11520,7 @@ pub mod api { )] #[doc = "Someone has renounced their candidacy."] pub struct Renounced { - pub candidate: ::subxt::ext::sp_core::crypto::AccountId32, + pub candidate: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Renounced { const PALLET: &'static str = "PhragmenElection"; @@ -11542,7 +11536,7 @@ pub mod api { #[doc = ""] #[doc = "Note that old members and runners-up are also candidates."] pub struct CandidateSlashed { - pub candidate: ::subxt::ext::sp_core::crypto::AccountId32, + pub candidate: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for CandidateSlashed { @@ -11556,7 +11550,7 @@ pub mod api { )] #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] pub struct SeatHolderSlashed { - pub seat_holder: ::subxt::ext::sp_core::crypto::AccountId32, + pub seat_holder: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SeatHolderSlashed { @@ -11577,7 +11571,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -11608,7 +11602,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -11640,7 +11634,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, )>, >, @@ -11686,11 +11680,11 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] pub fn voting( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_elections_phragmen::Voter< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -11721,7 +11715,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_elections_phragmen::Voter< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -11929,8 +11923,8 @@ pub mod api { Debug, )] pub struct AddMember { - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -11940,8 +11934,8 @@ pub mod api { Debug, )] pub struct RemoveMember { - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -11951,12 +11945,12 @@ pub mod api { Debug, )] pub struct SwapMember { - pub remove: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub remove: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub add: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub add: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -11966,7 +11960,7 @@ pub mod api { Debug, )] pub struct ResetMembers { - pub members: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -11974,8 +11968,8 @@ pub mod api { Debug, )] pub struct ChangeKey { - pub new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -11985,8 +11979,8 @@ pub mod api { Debug, )] pub struct SetPrime { - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -12003,8 +11997,8 @@ pub mod api { #[doc = "May only be called from `T::AddOrigin`."] pub fn add_member( &self, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12025,8 +12019,8 @@ pub mod api { #[doc = "May only be called from `T::RemoveOrigin`."] pub fn remove_member( &self, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12049,12 +12043,12 @@ pub mod api { #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] pub fn swap_member( &self, - remove: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + remove: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - add: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + add: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12076,7 +12070,7 @@ pub mod api { #[doc = "May only be called from `T::ResetOrigin`."] pub fn reset_members( &self, - members: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12097,8 +12091,8 @@ pub mod api { #[doc = "Prime membership is passed from the origin account to `new`, if extant."] pub fn change_key( &self, - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12119,8 +12113,8 @@ pub mod api { #[doc = "May only be called from `T::PrimeOrigin`."] pub fn set_prime( &self, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12235,7 +12229,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -12259,7 +12253,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ::subxt::storage::address::Yes, (), @@ -12296,8 +12290,8 @@ pub mod api { pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -12327,8 +12321,8 @@ pub mod api { pub struct Spend { #[codec(compact)] pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -12355,8 +12349,8 @@ pub mod api { pub fn propose_spend( &self, value: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12434,8 +12428,8 @@ pub mod api { pub fn spend( &self, amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12528,7 +12522,7 @@ pub mod api { pub struct Awarded { pub proposal_index: ::core::primitive::u32, pub award: ::core::primitive::u128, - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Awarded { const PALLET: &'static str = "Treasury"; @@ -12599,7 +12593,7 @@ pub mod api { pub struct SpendApproved { pub proposal_index: ::core::primitive::u32, pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for SpendApproved { const PALLET: &'static str = "Treasury"; @@ -12638,7 +12632,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_treasury::Proposal< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -12667,7 +12661,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_treasury::Proposal< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -12865,7 +12859,7 @@ pub mod api { Debug, )] pub struct Claim { - pub dest: ::subxt::ext::sp_core::crypto::AccountId32, + pub dest: ::subxt::utils::account_id::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, } @@ -12892,7 +12886,7 @@ pub mod api { Debug, )] pub struct ClaimAttest { - pub dest: ::subxt::ext::sp_core::crypto::AccountId32, + pub dest: ::subxt::utils::account_id::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, pub statement: ::std::vec::Vec<::core::primitive::u8>, @@ -12914,7 +12908,7 @@ pub mod api { pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub maybe_preclaim: - ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::option::Option<::subxt::utils::account_id::AccountId32>, } pub struct TransactionApi; impl TransactionApi { @@ -12944,7 +12938,7 @@ pub mod api { #[doc = ""] pub fn claim( &self, - dest: ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::account_id::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -13035,7 +13029,7 @@ pub mod api { #[doc = ""] pub fn claim_attest( &self, - dest: ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::account_id::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, statement: ::std::vec::Vec<::core::primitive::u8>, ) -> ::subxt::tx::StaticTxPayload { @@ -13093,7 +13087,7 @@ pub mod api { old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, maybe_preclaim: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -13125,7 +13119,7 @@ pub mod api { )] #[doc = "Someone claimed some DOTs."] pub struct Claimed { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub ethereum_address: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub amount: ::core::primitive::u128, @@ -13322,7 +13316,7 @@ pub mod api { #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] pub fn preclaims( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::claims::EthereumAddress, @@ -13416,8 +13410,8 @@ pub mod api { Debug, )] pub struct VestOther { - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -13427,8 +13421,8 @@ pub mod api { Debug, )] pub struct VestedTransfer { - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -13442,12 +13436,12 @@ pub mod api { Debug, )] pub struct ForceVestedTransfer { - pub source: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub source: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -13509,8 +13503,8 @@ pub mod api { #[doc = "# "] pub fn vest_other( &self, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -13545,8 +13539,8 @@ pub mod api { #[doc = "# "] pub fn vested_transfer( &self, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -13586,12 +13580,12 @@ pub mod api { #[doc = "# "] pub fn force_vested_transfer( &self, - source: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + source: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -13670,7 +13664,7 @@ pub mod api { #[doc = "The amount vested has been updated. This could indicate a change in funds available."] #[doc = "The balance given is the amount which is left unvested (and thus locked)."] pub struct VestingUpdated { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub unvested: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for VestingUpdated { @@ -13684,7 +13678,7 @@ pub mod api { )] #[doc = "An \\[account\\] has become fully vested."] pub struct VestingCompleted { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for VestingCompleted { const PALLET: &'static str = "Vesting"; @@ -13698,7 +13692,7 @@ pub mod api { #[doc = " Information regarding the vesting of a given account."] pub fn vesting( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -14153,8 +14147,8 @@ pub mod api { Debug, )] pub struct AddRegistrar { - pub account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -14175,7 +14169,7 @@ pub mod api { )] pub struct SetSubs { pub subs: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_identity::types::Data, )>, } @@ -14224,8 +14218,8 @@ pub mod api { pub struct SetAccountId { #[codec(compact)] pub index: ::core::primitive::u32, - pub new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -14249,14 +14243,14 @@ pub mod api { pub struct ProvideJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - pub identity: ::subxt::ext::sp_core::H256, + pub identity: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14264,8 +14258,8 @@ pub mod api { Debug, )] pub struct KillIdentity { - pub target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -14275,8 +14269,8 @@ pub mod api { Debug, )] pub struct AddSub { - pub sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub data: runtime_types::pallet_identity::types::Data, @@ -14287,8 +14281,8 @@ pub mod api { Debug, )] pub struct RenameSub { - pub sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub data: runtime_types::pallet_identity::types::Data, @@ -14299,8 +14293,8 @@ pub mod api { Debug, )] pub struct RemoveSub { - pub sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -14327,8 +14321,8 @@ pub mod api { #[doc = "# "] pub fn add_registrar( &self, - account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -14405,7 +14399,7 @@ pub mod api { pub fn set_subs( &self, subs: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_identity::types::Data, )>, ) -> ::subxt::tx::StaticTxPayload { @@ -14573,8 +14567,8 @@ pub mod api { pub fn set_account_id( &self, index: ::core::primitive::u32, - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -14645,14 +14639,14 @@ pub mod api { pub fn provide_judgement( &self, reg_index: ::core::primitive::u32, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - identity: ::subxt::ext::sp_core::H256, + identity: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", @@ -14692,8 +14686,8 @@ pub mod api { #[doc = "# "] pub fn kill_identity( &self, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -14718,8 +14712,8 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn add_sub( &self, - sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, @@ -14742,8 +14736,8 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn rename_sub( &self, - sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, @@ -14769,8 +14763,8 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn remove_sub( &self, - sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -14822,7 +14816,7 @@ pub mod api { )] #[doc = "A name was set or reset (which will remove all judgements)."] pub struct IdentitySet { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for IdentitySet { const PALLET: &'static str = "Identity"; @@ -14835,7 +14829,7 @@ pub mod api { )] #[doc = "A name was cleared, and the given balance returned."] pub struct IdentityCleared { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for IdentityCleared { @@ -14849,7 +14843,7 @@ pub mod api { )] #[doc = "A name was removed and the given balance slashed."] pub struct IdentityKilled { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for IdentityKilled { @@ -14863,7 +14857,7 @@ pub mod api { )] #[doc = "A judgement was asked from a registrar."] pub struct JudgementRequested { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub registrar_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for JudgementRequested { @@ -14877,7 +14871,7 @@ pub mod api { )] #[doc = "A judgement request was retracted."] pub struct JudgementUnrequested { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub registrar_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for JudgementUnrequested { @@ -14891,7 +14885,7 @@ pub mod api { )] #[doc = "A judgement was given by a registrar."] pub struct JudgementGiven { - pub target: ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::utils::account_id::AccountId32, pub registrar_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for JudgementGiven { @@ -14919,8 +14913,8 @@ pub mod api { )] #[doc = "A sub-identity was added to an identity and the deposit paid."] pub struct SubIdentityAdded { - pub sub: ::subxt::ext::sp_core::crypto::AccountId32, - pub main: ::subxt::ext::sp_core::crypto::AccountId32, + pub sub: ::subxt::utils::account_id::AccountId32, + pub main: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SubIdentityAdded { @@ -14934,8 +14928,8 @@ pub mod api { )] #[doc = "A sub-identity was removed from an identity and the deposit freed."] pub struct SubIdentityRemoved { - pub sub: ::subxt::ext::sp_core::crypto::AccountId32, - pub main: ::subxt::ext::sp_core::crypto::AccountId32, + pub sub: ::subxt::utils::account_id::AccountId32, + pub main: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SubIdentityRemoved { @@ -14950,8 +14944,8 @@ pub mod api { #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] #[doc = "main identity account to the sub-identity account."] pub struct SubIdentityRevoked { - pub sub: ::subxt::ext::sp_core::crypto::AccountId32, - pub main: ::subxt::ext::sp_core::crypto::AccountId32, + pub sub: ::subxt::utils::account_id::AccountId32, + pub main: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SubIdentityRevoked { @@ -14968,7 +14962,7 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn identity_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_identity::types::Registration< @@ -15025,10 +15019,10 @@ pub mod api { #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] pub fn super_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_identity::types::Data, )>, ::subxt::storage::address::Yes, @@ -15056,7 +15050,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_identity::types::Data, )>, (), @@ -15082,12 +15076,12 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn subs_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, ::subxt::storage::address::Yes, @@ -15120,7 +15114,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, (), @@ -15151,7 +15145,7 @@ pub mod api { ::core::option::Option< runtime_types::pallet_identity::types::RegistrarInfo< ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, >, @@ -15301,8 +15295,8 @@ pub mod api { Debug, )] pub struct Proxy { - pub real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub force_proxy_type: @@ -15315,8 +15309,8 @@ pub mod api { Debug, )] pub struct AddProxy { - pub delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15328,8 +15322,8 @@ pub mod api { Debug, )] pub struct RemoveProxy { - pub delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15357,8 +15351,8 @@ pub mod api { Debug, )] pub struct KillPure { - pub spawner: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub spawner: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15374,11 +15368,11 @@ pub mod api { Debug, )] pub struct Announce { - pub real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub call_hash: ::subxt::ext::sp_core::H256, + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15386,11 +15380,11 @@ pub mod api { Debug, )] pub struct RemoveAnnouncement { - pub real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub call_hash: ::subxt::ext::sp_core::H256, + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15398,11 +15392,11 @@ pub mod api { Debug, )] pub struct RejectAnnouncement { - pub delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub call_hash: ::subxt::ext::sp_core::H256, + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15410,12 +15404,12 @@ pub mod api { Debug, )] pub struct ProxyAnnounced { - pub delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub force_proxy_type: @@ -15437,8 +15431,8 @@ pub mod api { #[doc = "- `call`: The call to be made by the `real` account."] pub fn proxy( &self, - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, force_proxy_type: ::core::option::Option< @@ -15473,8 +15467,8 @@ pub mod api { #[doc = "zero."] pub fn add_proxy( &self, - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15505,8 +15499,8 @@ pub mod api { #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] pub fn remove_proxy( &self, - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15607,8 +15601,8 @@ pub mod api { #[doc = "account whose `pure` call has corresponding parameters."] pub fn kill_pure( &self, - spawner: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + spawner: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15651,11 +15645,11 @@ pub mod api { #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] pub fn announce( &self, - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - call_hash: ::subxt::ext::sp_core::H256, + call_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Proxy", @@ -15681,11 +15675,11 @@ pub mod api { #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] pub fn remove_announcement( &self, - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - call_hash: ::subxt::ext::sp_core::H256, + call_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Proxy", @@ -15711,11 +15705,11 @@ pub mod api { #[doc = "- `call_hash`: The hash of the call to be made."] pub fn reject_announcement( &self, - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - call_hash: ::subxt::ext::sp_core::H256, + call_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Proxy", @@ -15745,12 +15739,12 @@ pub mod api { #[doc = "- `call`: The call to be made by the `real` account."] pub fn proxy_announced( &self, - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, force_proxy_type: ::core::option::Option< @@ -15803,8 +15797,8 @@ pub mod api { #[doc = "A pure account has been created by new proxy with given"] #[doc = "disambiguation index and proxy type."] pub struct PureCreated { - pub pure: ::subxt::ext::sp_core::crypto::AccountId32, - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub pure: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub disambiguation_index: ::core::primitive::u16, } @@ -15819,9 +15813,9 @@ pub mod api { )] #[doc = "An announcement was placed to make a call in the future."] pub struct Announced { - pub real: ::subxt::ext::sp_core::crypto::AccountId32, - pub proxy: ::subxt::ext::sp_core::crypto::AccountId32, - pub call_hash: ::subxt::ext::sp_core::H256, + pub real: ::subxt::utils::account_id::AccountId32, + pub proxy: ::subxt::utils::account_id::AccountId32, + pub call_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Announced { const PALLET: &'static str = "Proxy"; @@ -15834,8 +15828,8 @@ pub mod api { )] #[doc = "A proxy was added."] pub struct ProxyAdded { - pub delegator: ::subxt::ext::sp_core::crypto::AccountId32, - pub delegatee: ::subxt::ext::sp_core::crypto::AccountId32, + pub delegator: ::subxt::utils::account_id::AccountId32, + pub delegatee: ::subxt::utils::account_id::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } @@ -15850,8 +15844,8 @@ pub mod api { )] #[doc = "A proxy was removed."] pub struct ProxyRemoved { - pub delegator: ::subxt::ext::sp_core::crypto::AccountId32, - pub delegatee: ::subxt::ext::sp_core::crypto::AccountId32, + pub delegator: ::subxt::utils::account_id::AccountId32, + pub delegatee: ::subxt::utils::account_id::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } @@ -15868,12 +15862,12 @@ pub mod api { #[doc = " which are being delegated to, together with the amount held on deposit."] pub fn proxies( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::polkadot_runtime::ProxyType, ::core::primitive::u32, >, @@ -15907,7 +15901,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::polkadot_runtime::ProxyType, ::core::primitive::u32, >, @@ -15933,13 +15927,13 @@ pub mod api { #[doc = " The announcements made by the proxy (key)."] pub fn announcements( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::Announcement< - ::subxt::ext::sp_core::crypto::AccountId32, - ::subxt::ext::sp_core::H256, + ::subxt::utils::account_id::AccountId32, + ::subxt::utils::H256, ::core::primitive::u32, >, >, @@ -15971,8 +15965,8 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::Announcement< - ::subxt::ext::sp_core::crypto::AccountId32, - ::subxt::ext::sp_core::H256, + ::subxt::utils::account_id::AccountId32, + ::subxt::utils::H256, ::core::primitive::u32, >, >, @@ -16133,7 +16127,7 @@ pub mod api { )] pub struct AsMultiThreshold1 { pub other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, pub call: ::std::boxed::Box, } #[derive( @@ -16144,7 +16138,7 @@ pub mod api { pub struct AsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, @@ -16159,7 +16153,7 @@ pub mod api { pub struct ApproveAsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, @@ -16174,7 +16168,7 @@ pub mod api { pub struct CancelAsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, pub call_hash: [::core::primitive::u8; 32usize], @@ -16200,7 +16194,7 @@ pub mod api { pub fn as_multi_threshold_1( &self, other_signatories: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, call: runtime_types::polkadot_runtime::RuntimeCall, ) -> ::subxt::tx::StaticTxPayload { @@ -16268,7 +16262,7 @@ pub mod api { &self, threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, @@ -16333,7 +16327,7 @@ pub mod api { &self, threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, @@ -16389,7 +16383,7 @@ pub mod api { &self, threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, @@ -16426,8 +16420,8 @@ pub mod api { )] #[doc = "A new multisig operation has begun."] pub struct NewMultisig { - pub approving: ::subxt::ext::sp_core::crypto::AccountId32, - pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, + pub approving: ::subxt::utils::account_id::AccountId32, + pub multisig: ::subxt::utils::account_id::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } impl ::subxt::events::StaticEvent for NewMultisig { @@ -16441,10 +16435,10 @@ pub mod api { )] #[doc = "A multisig operation has been approved by someone."] pub struct MultisigApproval { - pub approving: ::subxt::ext::sp_core::crypto::AccountId32, + pub approving: ::subxt::utils::account_id::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, + pub multisig: ::subxt::utils::account_id::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } impl ::subxt::events::StaticEvent for MultisigApproval { @@ -16458,10 +16452,10 @@ pub mod api { )] #[doc = "A multisig operation has been executed."] pub struct MultisigExecuted { - pub approving: ::subxt::ext::sp_core::crypto::AccountId32, + pub approving: ::subxt::utils::account_id::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, + pub multisig: ::subxt::utils::account_id::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, @@ -16477,10 +16471,10 @@ pub mod api { )] #[doc = "A multisig operation has been cancelled."] pub struct MultisigCancelled { - pub cancelling: ::subxt::ext::sp_core::crypto::AccountId32, + pub cancelling: ::subxt::utils::account_id::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, + pub multisig: ::subxt::utils::account_id::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } impl ::subxt::events::StaticEvent for MultisigCancelled { @@ -16495,14 +16489,14 @@ pub mod api { #[doc = " The set of open multisig operations."] pub fn multisigs( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_multisig::Multisig< ::core::primitive::u32, ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -16519,7 +16513,7 @@ pub mod api { runtime_types::pallet_multisig::Multisig< ::core::primitive::u32, ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, >, (), @@ -16640,8 +16634,8 @@ pub mod api { pub struct ProposeCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub curator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -16673,8 +16667,8 @@ pub mod api { pub struct AwardBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -16771,8 +16765,8 @@ pub mod api { pub fn propose_curator( &self, bounty_id: ::core::primitive::u32, - curator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + curator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, fee: ::core::primitive::u128, @@ -16865,8 +16859,8 @@ pub mod api { pub fn award_bounty( &self, bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -17019,7 +17013,7 @@ pub mod api { #[doc = "A bounty is awarded to a beneficiary."] pub struct BountyAwarded { pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for BountyAwarded { const PALLET: &'static str = "Bounties"; @@ -17034,7 +17028,7 @@ pub mod api { pub struct BountyClaimed { pub index: ::core::primitive::u32, pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for BountyClaimed { const PALLET: &'static str = "Bounties"; @@ -17101,7 +17095,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_bounties::Bounty< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -17131,7 +17125,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_bounties::Bounty< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -17434,8 +17428,8 @@ pub mod api { pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub curator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -17473,8 +17467,8 @@ pub mod api { pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -17562,8 +17556,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - curator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + curator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, fee: ::core::primitive::u128, @@ -17699,8 +17693,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -17827,7 +17821,7 @@ pub mod api { pub struct Awarded { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Awarded { const PALLET: &'static str = "ChildBounties"; @@ -17843,7 +17837,7 @@ pub mod api { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Claimed { const PALLET: &'static str = "ChildBounties"; @@ -17945,7 +17939,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -17981,7 +17975,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -18160,8 +18154,8 @@ pub mod api { )] pub struct ReportAwesome { pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -18171,7 +18165,7 @@ pub mod api { Debug, )] pub struct RetractTip { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18180,8 +18174,8 @@ pub mod api { )] pub struct TipNew { pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -18193,7 +18187,7 @@ pub mod api { Debug, )] pub struct Tip { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, #[codec(compact)] pub tip_value: ::core::primitive::u128, } @@ -18203,7 +18197,7 @@ pub mod api { Debug, )] pub struct CloseTip { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18211,7 +18205,7 @@ pub mod api { Debug, )] pub struct SlashTip { - pub hash: ::subxt::ext::sp_core::H256, + pub hash: ::subxt::utils::H256, } pub struct TransactionApi; impl TransactionApi { @@ -18237,8 +18231,8 @@ pub mod api { pub fn report_awesome( &self, reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -18275,7 +18269,7 @@ pub mod api { #[doc = "# "] pub fn retract_tip( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Tips", @@ -18314,8 +18308,8 @@ pub mod api { pub fn tip_new( &self, reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, tip_value: ::core::primitive::u128, @@ -18362,7 +18356,7 @@ pub mod api { #[doc = "# "] pub fn tip( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, tip_value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -18395,7 +18389,7 @@ pub mod api { #[doc = "# "] pub fn close_tip( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Tips", @@ -18423,7 +18417,7 @@ pub mod api { #[doc = "# "] pub fn slash_tip( &self, - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Tips", @@ -18450,7 +18444,7 @@ pub mod api { )] #[doc = "A new tip suggestion has been opened."] pub struct NewTip { - pub tip_hash: ::subxt::ext::sp_core::H256, + pub tip_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for NewTip { const PALLET: &'static str = "Tips"; @@ -18463,7 +18457,7 @@ pub mod api { )] #[doc = "A tip suggestion has reached threshold and is closing."] pub struct TipClosing { - pub tip_hash: ::subxt::ext::sp_core::H256, + pub tip_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for TipClosing { const PALLET: &'static str = "Tips"; @@ -18476,8 +18470,8 @@ pub mod api { )] #[doc = "A tip suggestion has been closed."] pub struct TipClosed { - pub tip_hash: ::subxt::ext::sp_core::H256, - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub tip_hash: ::subxt::utils::H256, + pub who: ::subxt::utils::account_id::AccountId32, pub payout: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for TipClosed { @@ -18491,7 +18485,7 @@ pub mod api { )] #[doc = "A tip suggestion has been retracted."] pub struct TipRetracted { - pub tip_hash: ::subxt::ext::sp_core::H256, + pub tip_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for TipRetracted { const PALLET: &'static str = "Tips"; @@ -18504,8 +18498,8 @@ pub mod api { )] #[doc = "A tip suggestion has been slashed."] pub struct TipSlashed { - pub tip_hash: ::subxt::ext::sp_core::H256, - pub finder: ::subxt::ext::sp_core::crypto::AccountId32, + pub tip_hash: ::subxt::utils::H256, + pub finder: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for TipSlashed { @@ -18522,14 +18516,14 @@ pub mod api { #[doc = " guaranteed to be a secure hash."] pub fn tips( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_tips::OpenTip< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, ::subxt::storage::address::Yes, @@ -18559,10 +18553,10 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_tips::OpenTip< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, (), @@ -18585,7 +18579,7 @@ pub mod api { #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] pub fn reasons( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<::core::primitive::u8>, @@ -18762,9 +18756,9 @@ pub mod api { )] pub struct SetEmergencyElectionResult { pub supports: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, } @@ -18860,9 +18854,9 @@ pub mod api { pub fn set_emergency_election_result( &self, supports: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, ) -> ::subxt::tx::StaticTxPayload @@ -18992,7 +18986,7 @@ pub mod api { )] #[doc = "An account has been rewarded for their signed submission being finalized."] pub struct Rewarded { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub value: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Rewarded { @@ -19006,7 +19000,7 @@ pub mod api { )] #[doc = "An account has been slashed for submitting an invalid signed submission."] pub struct Slashed { - pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub account: ::subxt::utils::account_id::AccountId32, pub value: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -19230,7 +19224,7 @@ pub mod api { #[doc = " allowing us to keep only a single one in memory at a time."] #[doc = ""] #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] - #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: ext :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: account_id :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionsMap", @@ -19252,7 +19246,7 @@ pub mod api { #[doc = " allowing us to keep only a single one in memory at a time."] #[doc = ""] #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] - #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: ext :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{ + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: account_id :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionsMap", @@ -19662,8 +19656,8 @@ pub mod api { Debug, )] pub struct Rebag { - pub dislocated: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub dislocated: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -19673,8 +19667,8 @@ pub mod api { Debug, )] pub struct PutInFrontOf { - pub lighter: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub lighter: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -19692,8 +19686,8 @@ pub mod api { #[doc = "If `dislocated` does not exists, it returns an error."] pub fn rebag( &self, - dislocated: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dislocated: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -19719,8 +19713,8 @@ pub mod api { #[doc = "- and `origin` has a greater `Score` than `lighter`."] pub fn put_in_front_of( &self, - lighter: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + lighter: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -19749,7 +19743,7 @@ pub mod api { )] #[doc = "Moved an account from one bag to another."] pub struct Rebagged { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub from: ::core::primitive::u64, pub to: ::core::primitive::u64, } @@ -19764,7 +19758,7 @@ pub mod api { )] #[doc = "Updated the score of some account to the given amount."] pub struct ScoreUpdated { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub new_score: ::core::primitive::u64, } impl ::subxt::events::StaticEvent for ScoreUpdated { @@ -19781,7 +19775,7 @@ pub mod api { #[doc = " Nodes store links forward and back within their respective bags."] pub fn list_nodes( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_bags_list::list::Node, @@ -20015,8 +20009,8 @@ pub mod api { Debug, )] pub struct Unbond { - pub member_account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub member_account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -20037,8 +20031,8 @@ pub mod api { Debug, )] pub struct WithdrawUnbonded { - pub member_account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub member_account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub num_slashing_spans: ::core::primitive::u32, @@ -20051,16 +20045,16 @@ pub mod api { pub struct Create { #[codec(compact)] pub amount: ::core::primitive::u128, - pub root: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub root: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub nominator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub nominator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub state_toggler: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub state_toggler: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, } @@ -20072,16 +20066,16 @@ pub mod api { pub struct CreateWithPoolId { #[codec(compact)] pub amount: ::core::primitive::u128, - pub root: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub root: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub nominator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub nominator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - pub state_toggler: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + pub state_toggler: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pub pool_id: ::core::primitive::u32, @@ -20093,8 +20087,7 @@ pub mod api { )] pub struct Nominate { pub pool_id: ::core::primitive::u32, - pub validators: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub validators: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20145,13 +20138,13 @@ pub mod api { pub struct UpdateRoles { pub pool_id: ::core::primitive::u32, pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, } #[derive( @@ -20265,8 +20258,8 @@ pub mod api { #[doc = "`NoMoreChunks` error from the staking system."] pub fn unbond( &self, - member_account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + member_account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, unbonding_points: ::core::primitive::u128, @@ -20333,8 +20326,8 @@ pub mod api { #[doc = "If the target is the depositor, the pool will be destroyed."] pub fn withdraw_unbonded( &self, - member_account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + member_account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, num_slashing_spans: ::core::primitive::u32, @@ -20374,16 +20367,16 @@ pub mod api { pub fn create( &self, amount: ::core::primitive::u128, - root: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + root: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - nominator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + nominator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - state_toggler: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + state_toggler: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -20413,16 +20406,16 @@ pub mod api { pub fn create_with_pool_id( &self, amount: ::core::primitive::u128, - root: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + root: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - nominator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + nominator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - state_toggler: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + state_toggler: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pool_id: ::core::primitive::u32, @@ -20455,9 +20448,7 @@ pub mod api { pub fn nominate( &self, pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, - >, + validators: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "NominationPools", @@ -20577,13 +20568,13 @@ pub mod api { &self, pool_id: ::core::primitive::u32, new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -20639,7 +20630,7 @@ pub mod api { )] #[doc = "A pool has been created."] pub struct Created { - pub depositor: ::subxt::ext::sp_core::crypto::AccountId32, + pub depositor: ::subxt::utils::account_id::AccountId32, pub pool_id: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Created { @@ -20653,7 +20644,7 @@ pub mod api { )] #[doc = "A member has became bonded in a pool."] pub struct Bonded { - pub member: ::subxt::ext::sp_core::crypto::AccountId32, + pub member: ::subxt::utils::account_id::AccountId32, pub pool_id: ::core::primitive::u32, pub bonded: ::core::primitive::u128, pub joined: ::core::primitive::bool, @@ -20669,7 +20660,7 @@ pub mod api { )] #[doc = "A payout has been made to a member."] pub struct PaidOut { - pub member: ::subxt::ext::sp_core::crypto::AccountId32, + pub member: ::subxt::utils::account_id::AccountId32, pub pool_id: ::core::primitive::u32, pub payout: ::core::primitive::u128, } @@ -20694,7 +20685,7 @@ pub mod api { #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] #[doc = "requested to be unbonded."] pub struct Unbonded { - pub member: ::subxt::ext::sp_core::crypto::AccountId32, + pub member: ::subxt::utils::account_id::AccountId32, pub pool_id: ::core::primitive::u32, pub balance: ::core::primitive::u128, pub points: ::core::primitive::u128, @@ -20716,7 +20707,7 @@ pub mod api { #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] #[doc = "will be 1."] pub struct Withdrawn { - pub member: ::subxt::ext::sp_core::crypto::AccountId32, + pub member: ::subxt::utils::account_id::AccountId32, pub pool_id: ::core::primitive::u32, pub balance: ::core::primitive::u128, pub points: ::core::primitive::u128, @@ -20763,7 +20754,7 @@ pub mod api { #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] pub struct MemberRemoved { pub pool_id: ::core::primitive::u32, - pub member: ::subxt::ext::sp_core::crypto::AccountId32, + pub member: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for MemberRemoved { const PALLET: &'static str = "NominationPools"; @@ -20777,12 +20768,11 @@ pub mod api { #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] #[doc = "can never change."] pub struct RolesUpdated { - pub root: - ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, + pub root: ::core::option::Option<::subxt::utils::account_id::AccountId32>, pub state_toggler: - ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::option::Option<::subxt::utils::account_id::AccountId32>, pub nominator: - ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::option::Option<::subxt::utils::account_id::AccountId32>, } impl ::subxt::events::StaticEvent for RolesUpdated { const PALLET: &'static str = "NominationPools"; @@ -20939,7 +20929,7 @@ pub mod api { #[doc = " Active members."] pub fn pool_members( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_nomination_pools::PoolMember, @@ -21326,7 +21316,7 @@ pub mod api { #[doc = " accounts are deterministically derived from it."] pub fn reverse_pool_id_lookup( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, @@ -21567,7 +21557,7 @@ pub mod api { )] #[doc = "A staker was unstaked."] pub struct Unstaked { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -21582,7 +21572,7 @@ pub mod api { )] #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] pub struct Slashed { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -21597,7 +21587,7 @@ pub mod api { #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] #[doc = "consequence."] pub struct Errored { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Errored { const PALLET: &'static str = "FastUnstake"; @@ -21674,7 +21664,7 @@ pub mod api { #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] pub fn queue( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, ::subxt::storage::address::Yes, @@ -23161,7 +23151,7 @@ pub mod api { #[doc = "A candidate was backed. `[candidate, head_data]`"] pub struct CandidateBacked( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, pub runtime_types::polkadot_parachain::primitives::HeadData, pub runtime_types::polkadot_primitives::v2::CoreIndex, @@ -23179,7 +23169,7 @@ pub mod api { #[doc = "A candidate was included. `[candidate, head_data]`"] pub struct CandidateIncluded( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, pub runtime_types::polkadot_parachain::primitives::HeadData, pub runtime_types::polkadot_primitives::v2::CoreIndex, @@ -23197,7 +23187,7 @@ pub mod api { #[doc = "A candidate timed out. `[candidate, head_data]`"] pub struct CandidateTimedOut( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, pub runtime_types::polkadot_parachain::primitives::HeadData, pub runtime_types::polkadot_primitives::v2::CoreIndex, @@ -23240,7 +23230,7 @@ pub mod api { ], ) } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "PendingAvailability", @@ -23256,7 +23246,7 @@ pub mod api { ], ) } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "PendingAvailability", @@ -23411,7 +23401,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, ::subxt::storage::address::Yes, @@ -25005,7 +24995,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, >, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -25035,7 +25025,7 @@ pub mod api { pub fn downward_message_queue_heads_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -26608,7 +26598,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, >, ::subxt::storage::address::Yes, (), @@ -26634,7 +26624,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, >, (), (), @@ -26972,7 +26962,7 @@ pub mod api { Debug, )] pub struct ForceRegister { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub deposit: ::core::primitive::u128, pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -27083,7 +27073,7 @@ pub mod api { #[doc = "can be registered, including sub-1000 IDs which are System Parachains."] pub fn force_register( &self, - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, id: runtime_types::polkadot_parachain::primitives::Id, genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -27275,7 +27265,7 @@ pub mod api { )] pub struct Registered { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub manager: ::subxt::ext::sp_core::crypto::AccountId32, + pub manager: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Registered { const PALLET: &'static str = "Registrar"; @@ -27300,7 +27290,7 @@ pub mod api { )] pub struct Reserved { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, } impl ::subxt::events::StaticEvent for Reserved { const PALLET: &'static str = "Registrar"; @@ -27375,7 +27365,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -27407,7 +27397,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, >, @@ -27509,7 +27499,7 @@ pub mod api { )] pub struct ForceLease { pub para: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::ext::sp_core::crypto::AccountId32, + pub leaser: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, @@ -27539,7 +27529,7 @@ pub mod api { pub fn force_lease( &self, para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::ext::sp_core::crypto::AccountId32, + leaser: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, @@ -27634,7 +27624,7 @@ pub mod api { #[doc = "Second balance is the total amount reserved."] pub struct Leased { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::ext::sp_core::crypto::AccountId32, + pub leaser: ::subxt::utils::account_id::AccountId32, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, pub extra_reserved: ::core::primitive::u128, @@ -27674,7 +27664,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< ::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, )>, >, @@ -27720,7 +27710,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< ::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, )>, >, @@ -27957,7 +27947,7 @@ pub mod api { #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] #[doc = "Second is the total."] pub struct Reserved { - pub bidder: ::subxt::ext::sp_core::crypto::AccountId32, + pub bidder: ::subxt::utils::account_id::AccountId32, pub extra_reserved: ::core::primitive::u128, pub total_amount: ::core::primitive::u128, } @@ -27972,7 +27962,7 @@ pub mod api { )] #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] pub struct Unreserved { - pub bidder: ::subxt::ext::sp_core::crypto::AccountId32, + pub bidder: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Unreserved { @@ -27988,7 +27978,7 @@ pub mod api { #[doc = "but no parachain slot has been leased."] pub struct ReserveConfiscated { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::ext::sp_core::crypto::AccountId32, + pub leaser: ::subxt::utils::account_id::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for ReserveConfiscated { @@ -28002,7 +27992,7 @@ pub mod api { )] #[doc = "A new bid has been accepted as the current winner."] pub struct BidAccepted { - pub bidder: ::subxt::ext::sp_core::crypto::AccountId32, + pub bidder: ::subxt::utils::account_id::AccountId32, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, pub first_slot: ::core::primitive::u32, @@ -28084,7 +28074,7 @@ pub mod api { #[doc = " (sub-)ranges."] pub fn reserved_amounts( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, _1: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, @@ -28140,7 +28130,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< [::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u128, )>; 36usize], @@ -28172,7 +28162,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< [::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u128, )>; 36usize], @@ -28316,7 +28306,7 @@ pub mod api { Debug, )] pub struct Withdraw { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } @@ -28466,7 +28456,7 @@ pub mod api { #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] pub fn withdraw( &self, - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -28638,7 +28628,7 @@ pub mod api { )] #[doc = "Contributed to a crowd sale."] pub struct Contributed { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub fund_index: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, } @@ -28653,7 +28643,7 @@ pub mod api { )] #[doc = "Withdrew full balance of a contributor."] pub struct Withdrew { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub fund_index: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, } @@ -28736,7 +28726,7 @@ pub mod api { )] #[doc = "A memo has been updated."] pub struct MemoUpdated { - pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::utils::account_id::AccountId32, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, } @@ -28771,7 +28761,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, ::core::primitive::u32, @@ -28802,7 +28792,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, ::core::primitive::u32, ::core::primitive::u32, @@ -29597,7 +29587,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] pub struct AssetsTrapped( - pub ::subxt::ext::sp_core::H256, + pub ::subxt::utils::H256, pub runtime_types::xcm::v1::multilocation::MultiLocation, pub runtime_types::xcm::VersionedMultiAssets, ); @@ -29682,7 +29672,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] pub struct AssetsClaimed( - pub ::subxt::ext::sp_core::H256, + pub ::subxt::utils::H256, pub runtime_types::xcm::v1::multilocation::MultiLocation, pub runtime_types::xcm::VersionedMultiAssets, ); @@ -29776,7 +29766,7 @@ pub mod api { #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] pub fn asset_traps( &self, - _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, @@ -30142,7 +30132,7 @@ pub mod api { pub enum Bounded<_0> { #[codec(index = 0)] Legacy { - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, }, #[codec(index = 1)] Inline( @@ -30152,7 +30142,7 @@ pub mod api { ), #[codec(index = 2)] Lookup { - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, len: ::core::primitive::u32, }, __Ignore(::core::marker::PhantomData<_0>), @@ -30435,18 +30425,18 @@ pub mod api { #[codec(index = 3)] #[doc = "A new account was created."] NewAccount { - account: ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 4)] #[doc = "An account was reaped."] KilledAccount { - account: ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 5)] #[doc = "On on-chain remark happened."] Remarked { - sender: ::subxt::ext::sp_core::crypto::AccountId32, - hash: ::subxt::ext::sp_core::H256, + sender: ::subxt::utils::account_id::AccountId32, + hash: ::subxt::utils::H256, }, } } @@ -30604,12 +30594,10 @@ pub mod api { Debug, )] pub struct Bag { - pub head: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, - >, - pub tail: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, - >, + pub head: + ::core::option::Option<::subxt::utils::account_id::AccountId32>, + pub tail: + ::core::option::Option<::subxt::utils::account_id::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30632,13 +30620,11 @@ pub mod api { Debug, )] pub struct Node { - pub id: ::subxt::ext::sp_core::crypto::AccountId32, - pub prev: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, - >, - pub next: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, - >, + pub id: ::subxt::utils::account_id::AccountId32, + pub prev: + ::core::option::Option<::subxt::utils::account_id::AccountId32>, + pub next: + ::core::option::Option<::subxt::utils::account_id::AccountId32>, pub bag_upper: ::core::primitive::u64, pub score: ::core::primitive::u64, } @@ -30664,8 +30650,8 @@ pub mod api { #[doc = ""] #[doc = "If `dislocated` does not exists, it returns an error."] rebag { - dislocated: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dislocated: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -30679,8 +30665,8 @@ pub mod api { #[doc = "- both nodes are within the same bag,"] #[doc = "- and `origin` has a greater `Score` than `lighter`."] put_in_front_of { - lighter: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + lighter: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -30706,14 +30692,14 @@ pub mod api { #[codec(index = 0)] #[doc = "Moved an account from one bag to another."] Rebagged { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, from: ::core::primitive::u64, to: ::core::primitive::u64, }, #[codec(index = 1)] #[doc = "Updated the score of some account to the given amount."] ScoreUpdated { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, new_score: ::core::primitive::u64, }, } @@ -30757,8 +30743,8 @@ pub mod api { #[doc = "- Origin account is already in memory, so no DB operations for them."] #[doc = "# "] transfer { - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -30774,8 +30760,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call is `root`."] set_balance { - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -30791,12 +30777,12 @@ pub mod api { #[doc = " assumed to be in the overlay."] #[doc = "# "] force_transfer { - source: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + source: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -30810,8 +30796,8 @@ pub mod api { #[doc = ""] #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] transfer_keep_alive { - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -30836,8 +30822,8 @@ pub mod api { #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] #[doc = " #"] transfer_all { - dest: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + dest: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, keep_alive: ::core::primitive::bool, @@ -30847,8 +30833,8 @@ pub mod api { #[doc = ""] #[doc = "Can only be called by ROOT."] force_unreserve { - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, amount: ::core::primitive::u128, @@ -30893,7 +30879,7 @@ pub mod api { )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { - # [codec (index = 0)] # [doc = "An account was created with some free balance."] Endowed { account : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , free_balance : :: core :: primitive :: u128 , } , # [codec (index = 1)] # [doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] # [doc = "resulting in an outright loss."] DustLost { account : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "Transfer succeeded."] Transfer { from : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , to : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 3)] # [doc = "A balance was set by root."] BalanceSet { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , free : :: core :: primitive :: u128 , reserved : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "Some balance was reserved (moved from free to reserved)."] Reserved { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "Some balance was unreserved (moved from reserved to free)."] Unreserved { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 6)] # [doc = "Some balance was moved from the reserve of the first account to the second account."] # [doc = "Final argument indicates the destination balance type."] ReserveRepatriated { from : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , to : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , destination_status : runtime_types :: frame_support :: traits :: tokens :: misc :: BalanceStatus , } , # [codec (index = 7)] # [doc = "Some amount was deposited (e.g. for transaction fees)."] Deposit { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 8)] # [doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] Withdraw { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 9)] # [doc = "Some amount was removed from the account (e.g. for misbehavior)."] Slashed { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , } + # [codec (index = 0)] # [doc = "An account was created with some free balance."] Endowed { account : :: subxt :: utils :: account_id :: AccountId32 , free_balance : :: core :: primitive :: u128 , } , # [codec (index = 1)] # [doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] # [doc = "resulting in an outright loss."] DustLost { account : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "Transfer succeeded."] Transfer { from : :: subxt :: utils :: account_id :: AccountId32 , to : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 3)] # [doc = "A balance was set by root."] BalanceSet { who : :: subxt :: utils :: account_id :: AccountId32 , free : :: core :: primitive :: u128 , reserved : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "Some balance was reserved (moved from free to reserved)."] Reserved { who : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "Some balance was unreserved (moved from reserved to free)."] Unreserved { who : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 6)] # [doc = "Some balance was moved from the reserve of the first account to the second account."] # [doc = "Final argument indicates the destination balance type."] ReserveRepatriated { from : :: subxt :: utils :: account_id :: AccountId32 , to : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , destination_status : runtime_types :: frame_support :: traits :: tokens :: misc :: BalanceStatus , } , # [codec (index = 7)] # [doc = "Some amount was deposited (e.g. for transaction fees)."] Deposit { who : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 8)] # [doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] Withdraw { who : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 9)] # [doc = "Some amount was removed from the account (e.g. for misbehavior)."] Slashed { who : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31003,8 +30989,8 @@ pub mod api { propose_curator { #[codec(compact)] bounty_id: ::core::primitive::u32, - curator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + curator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -31061,8 +31047,8 @@ pub mod api { award_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -31177,14 +31163,14 @@ pub mod api { #[doc = "A bounty is awarded to a beneficiary."] BountyAwarded { index: ::core::primitive::u32, - beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 4)] #[doc = "A bounty is claimed by beneficiary."] BountyClaimed { index: ::core::primitive::u32, payout: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 5)] #[doc = "A bounty is cancelled."] @@ -31290,8 +31276,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, #[codec(compact)] child_bounty_id: ::core::primitive::u32, - curator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + curator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -31387,8 +31373,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, #[codec(compact)] child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -31480,7 +31466,7 @@ pub mod api { Awarded { index: ::core::primitive::u32, child_index: ::core::primitive::u32, - beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 2)] #[doc = "A child-bounty is claimed by beneficiary."] @@ -31488,7 +31474,7 @@ pub mod api { index: ::core::primitive::u32, child_index: ::core::primitive::u32, payout: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 3)] #[doc = "A child-bounty is cancelled."] @@ -31577,9 +31563,9 @@ pub mod api { #[doc = "# "] set_members { new_members: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, prime: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, old_count: ::core::primitive::u32, }, @@ -31656,7 +31642,7 @@ pub mod api { #[doc = "- 1 event"] #[doc = "# "] vote { - proposal: ::subxt::ext::sp_core::H256, + proposal: ::subxt::utils::H256, #[codec(compact)] index: ::core::primitive::u32, approve: ::core::primitive::bool, @@ -31695,7 +31681,7 @@ pub mod api { #[doc = "- up to 3 events"] #[doc = "# "] close_old_weight { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, #[codec(compact)] index: ::core::primitive::u32, #[codec(compact)] @@ -31718,9 +31704,7 @@ pub mod api { #[doc = "* Reads: Proposals"] #[doc = "* Writes: Voting, Proposals, ProposalOf"] #[doc = "# "] - disapprove_proposal { - proposal_hash: ::subxt::ext::sp_core::H256, - }, + disapprove_proposal { proposal_hash: ::subxt::utils::H256 }, #[codec(index = 6)] #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] #[doc = ""] @@ -31755,7 +31739,7 @@ pub mod api { #[doc = "- up to 3 events"] #[doc = "# "] close { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, #[codec(compact)] index: ::core::primitive::u32, proposal_weight_bound: @@ -31813,35 +31797,31 @@ pub mod api { #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] Proposed { - account: ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::account_id::AccountId32, proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, threshold: ::core::primitive::u32, }, #[codec(index = 1)] #[doc = "A motion (given hash) has been voted on by given account, leaving"] #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] Voted { - account: ::subxt::ext::sp_core::crypto::AccountId32, - proposal_hash: ::subxt::ext::sp_core::H256, + account: ::subxt::utils::account_id::AccountId32, + proposal_hash: ::subxt::utils::H256, voted: ::core::primitive::bool, yes: ::core::primitive::u32, no: ::core::primitive::u32, }, #[codec(index = 2)] #[doc = "A motion was approved by the required threshold."] - Approved { - proposal_hash: ::subxt::ext::sp_core::H256, - }, + Approved { proposal_hash: ::subxt::utils::H256 }, #[codec(index = 3)] #[doc = "A motion was not approved by the required threshold."] - Disapproved { - proposal_hash: ::subxt::ext::sp_core::H256, - }, + Disapproved { proposal_hash: ::subxt::utils::H256 }, #[codec(index = 4)] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] Executed { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, @@ -31850,7 +31830,7 @@ pub mod api { #[codec(index = 5)] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] MemberExecuted { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, @@ -31859,7 +31839,7 @@ pub mod api { #[codec(index = 6)] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] Closed { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, yes: ::core::primitive::u32, no: ::core::primitive::u32, }, @@ -32047,7 +32027,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(1)`"] fast_track { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, }, @@ -32061,9 +32041,7 @@ pub mod api { #[doc = "Emits `Vetoed`."] #[doc = ""] #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] - veto_external { - proposal_hash: ::subxt::ext::sp_core::H256, - }, + veto_external { proposal_hash: ::subxt::utils::H256 }, #[codec(index = 9)] #[doc = "Remove a referendum."] #[doc = ""] @@ -32098,8 +32076,8 @@ pub mod api { #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] #[doc = " voted on. Weight is charged as if maximum votes."] delegate { - to: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + to: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, conviction: @@ -32136,8 +32114,8 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(R)` with R number of vote of target."] unlock { - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -32187,8 +32165,8 @@ pub mod api { #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] #[doc = " Weight is calculated for the maximum number of vote."] remove_other_vote { - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, index: ::core::primitive::u32, @@ -32210,7 +32188,7 @@ pub mod api { #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] #[doc = " reasonable value)."] blacklist { - proposal_hash: ::subxt::ext::sp_core::H256, + proposal_hash: ::subxt::utils::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, }, #[codec(index = 17)] @@ -32311,7 +32289,7 @@ pub mod api { )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { - # [codec (index = 0)] # [doc = "A motion has been proposed by a public account."] Proposed { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 1)] # [doc = "A public proposal has been tabled for referendum vote."] Tabled { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "An external proposal has been tabled."] ExternalTabled , # [codec (index = 3)] # [doc = "A referendum has begun."] Started { ref_index : :: core :: primitive :: u32 , threshold : runtime_types :: pallet_democracy :: vote_threshold :: VoteThreshold , } , # [codec (index = 4)] # [doc = "A proposal has been approved by referendum."] Passed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "A proposal has been rejected by referendum."] NotPassed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "A referendum has been cancelled."] Cancelled { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "An account has delegated their vote to another account."] Delegated { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , target : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 8)] # [doc = "An account has cancelled a previous delegation operation."] Undelegated { account : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 9)] # [doc = "An external proposal has been vetoed."] Vetoed { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , proposal_hash : :: subxt :: ext :: sp_core :: H256 , until : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "A proposal_hash has been blacklisted permanently."] Blacklisted { proposal_hash : :: subxt :: ext :: sp_core :: H256 , } , # [codec (index = 11)] # [doc = "An account has voted in a referendum"] Voted { voter : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , ref_index : :: core :: primitive :: u32 , vote : runtime_types :: pallet_democracy :: vote :: AccountVote < :: core :: primitive :: u128 > , } , # [codec (index = 12)] # [doc = "An account has secconded a proposal"] Seconded { seconder : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , # [codec (index = 13)] # [doc = "A proposal got canceled."] ProposalCanceled { prop_index : :: core :: primitive :: u32 , } , } + # [codec (index = 0)] # [doc = "A motion has been proposed by a public account."] Proposed { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 1)] # [doc = "A public proposal has been tabled for referendum vote."] Tabled { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "An external proposal has been tabled."] ExternalTabled , # [codec (index = 3)] # [doc = "A referendum has begun."] Started { ref_index : :: core :: primitive :: u32 , threshold : runtime_types :: pallet_democracy :: vote_threshold :: VoteThreshold , } , # [codec (index = 4)] # [doc = "A proposal has been approved by referendum."] Passed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "A proposal has been rejected by referendum."] NotPassed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "A referendum has been cancelled."] Cancelled { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "An account has delegated their vote to another account."] Delegated { who : :: subxt :: utils :: account_id :: AccountId32 , target : :: subxt :: utils :: account_id :: AccountId32 , } , # [codec (index = 8)] # [doc = "An account has cancelled a previous delegation operation."] Undelegated { account : :: subxt :: utils :: account_id :: AccountId32 , } , # [codec (index = 9)] # [doc = "An external proposal has been vetoed."] Vetoed { who : :: subxt :: utils :: account_id :: AccountId32 , proposal_hash : :: subxt :: utils :: H256 , until : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "A proposal_hash has been blacklisted permanently."] Blacklisted { proposal_hash : :: subxt :: utils :: H256 , } , # [codec (index = 11)] # [doc = "An account has voted in a referendum"] Voted { voter : :: subxt :: utils :: account_id :: AccountId32 , ref_index : :: core :: primitive :: u32 , vote : runtime_types :: pallet_democracy :: vote :: AccountVote < :: core :: primitive :: u128 > , } , # [codec (index = 12)] # [doc = "An account has secconded a proposal"] Seconded { seconder : :: subxt :: utils :: account_id :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , # [codec (index = 13)] # [doc = "A proposal got canceled."] ProposalCanceled { prop_index : :: core :: primitive :: u32 , } , } } pub mod types { use super::runtime_types; @@ -32452,7 +32430,7 @@ pub mod api { )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - # [codec (index = 0)] # [doc = "Submit a solution for the unsigned phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __none__."] # [doc = ""] # [doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] # [doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] # [doc = "that only active validators can submit this transaction when authoring a block (similar"] # [doc = "to an inherent)."] # [doc = ""] # [doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] # [doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] # [doc = "putting their authoring reward at risk."] # [doc = ""] # [doc = "No deposit or reward is associated with this submission."] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] # [doc = "Set a new value for `MinimumUntrustedScore`."] # [doc = ""] # [doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] # [doc = ""] # [doc = "This check can be turned off by setting the value to `None`."] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] # [doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] # [doc = "call to `ElectionProvider::elect`."] # [doc = ""] # [doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] # [doc = ""] # [doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] # [doc = "feasibility check itself can in principle cause the election process to fail (due to"] # [doc = "memory/weight constrains)."] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: subxt :: ext :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: ext :: sp_core :: crypto :: AccountId32 > ,) > , } , # [codec (index = 3)] # [doc = "Submit a solution for the signed phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __signed__."] # [doc = ""] # [doc = "The solution is potentially queued, based on the claimed score and processed at the end"] # [doc = "of the signed phase."] # [doc = ""] # [doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] # [doc = "might be rewarded, slashed, or get all or a part of the deposit back."] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , } , # [codec (index = 4)] # [doc = "Trigger the governance fallback."] # [doc = ""] # [doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] # [doc = "calling [`Call::set_emergency_election_result`]."] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } + # [codec (index = 0)] # [doc = "Submit a solution for the unsigned phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __none__."] # [doc = ""] # [doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] # [doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] # [doc = "that only active validators can submit this transaction when authoring a block (similar"] # [doc = "to an inherent)."] # [doc = ""] # [doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] # [doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] # [doc = "putting their authoring reward at risk."] # [doc = ""] # [doc = "No deposit or reward is associated with this submission."] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] # [doc = "Set a new value for `MinimumUntrustedScore`."] # [doc = ""] # [doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] # [doc = ""] # [doc = "This check can be turned off by setting the value to `None`."] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] # [doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] # [doc = "call to `ElectionProvider::elect`."] # [doc = ""] # [doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] # [doc = ""] # [doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] # [doc = "feasibility check itself can in principle cause the election process to fail (due to"] # [doc = "memory/weight constrains)."] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: subxt :: utils :: account_id :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: utils :: account_id :: AccountId32 > ,) > , } , # [codec (index = 3)] # [doc = "Submit a solution for the signed phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __signed__."] # [doc = ""] # [doc = "The solution is potentially queued, based on the claimed score and processed at the end"] # [doc = "of the signed phase."] # [doc = ""] # [doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] # [doc = "might be rewarded, slashed, or get all or a part of the deposit back."] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , } , # [codec (index = 4)] # [doc = "Trigger the governance fallback."] # [doc = ""] # [doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] # [doc = "calling [`Call::set_emergency_election_result`]."] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -32510,7 +32488,7 @@ pub mod api { )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { - # [codec (index = 0)] # [doc = "A solution was stored with the given compute."] # [doc = ""] # [doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] # [doc = "solution is unsigned, this means that it has also been processed."] # [doc = ""] # [doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] SolutionStored { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , prev_ejected : :: core :: primitive :: bool , } , # [codec (index = 1)] # [doc = "The election has been finalized, with the given computation and score."] ElectionFinalized { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , score : runtime_types :: sp_npos_elections :: ElectionScore , } , # [codec (index = 2)] # [doc = "An election failed."] # [doc = ""] # [doc = "Not much can be said about which computes failed in the process."] ElectionFailed , # [codec (index = 3)] # [doc = "An account has been rewarded for their signed submission being finalized."] Rewarded { account : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "An account has been slashed for submitting an invalid signed submission."] Slashed { account : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } + # [codec (index = 0)] # [doc = "A solution was stored with the given compute."] # [doc = ""] # [doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] # [doc = "solution is unsigned, this means that it has also been processed."] # [doc = ""] # [doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] SolutionStored { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , prev_ejected : :: core :: primitive :: bool , } , # [codec (index = 1)] # [doc = "The election has been finalized, with the given computation and score."] ElectionFinalized { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , score : runtime_types :: sp_npos_elections :: ElectionScore , } , # [codec (index = 2)] # [doc = "An election failed."] # [doc = ""] # [doc = "Not much can be said about which computes failed in the process."] ElectionFailed , # [codec (index = 3)] # [doc = "An account has been rewarded for their signed submission being finalized."] Rewarded { account : :: subxt :: utils :: account_id :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "An account has been slashed for submitting an invalid signed submission."] Slashed { account : :: subxt :: utils :: account_id :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } } pub mod signed { use super::runtime_types; @@ -32578,9 +32556,9 @@ pub mod api { )] pub struct ReadySolution { pub supports: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, pub score: runtime_types::sp_npos_elections::ElectionScore, @@ -32594,13 +32572,13 @@ pub mod api { )] pub struct RoundSnapshot { pub voters: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u64, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, )>, - pub targets: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub targets: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32650,8 +32628,7 @@ pub mod api { #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."] #[doc = "# "] vote { - votes: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + votes: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, #[codec(compact)] value: ::core::primitive::u128, }, @@ -32724,8 +32701,8 @@ pub mod api { #[doc = "will go into phragmen, we assume full block for now."] #[doc = "# "] remove_member { - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, slash_bond: ::core::primitive::bool, @@ -32821,7 +32798,7 @@ pub mod api { #[doc = "begin with."] NewTerm { new_members: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, )>, }, @@ -32836,12 +32813,12 @@ pub mod api { #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] #[doc = "`EmptyTerm`."] MemberKicked { - member: ::subxt::ext::sp_core::crypto::AccountId32, + member: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 4)] #[doc = "Someone has renounced their candidacy."] Renounced { - candidate: ::subxt::ext::sp_core::crypto::AccountId32, + candidate: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 5)] #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] @@ -32849,13 +32826,13 @@ pub mod api { #[doc = ""] #[doc = "Note that old members and runners-up are also candidates."] CandidateSlashed { - candidate: ::subxt::ext::sp_core::crypto::AccountId32, + candidate: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 6)] #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] SeatHolderSlashed { - seat_holder: ::subxt::ext::sp_core::crypto::AccountId32, + seat_holder: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, } @@ -32980,7 +32957,7 @@ pub mod api { #[codec(index = 0)] #[doc = "A staker was unstaked."] Unstaked { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, @@ -32989,14 +32966,14 @@ pub mod api { #[codec(index = 1)] #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] Slashed { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] #[doc = "consequence."] Errored { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 3)] #[doc = "An internal error happened. Operations will be paused now."] @@ -33024,7 +33001,7 @@ pub mod api { pub struct UnstakeRequest { pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, )>, pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -33052,7 +33029,7 @@ pub mod api { report_equivocation { equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, ::core::primitive::u32, >, >, @@ -33071,7 +33048,7 @@ pub mod api { report_equivocation_unsigned { equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, ::core::primitive::u32, >, >, @@ -33206,8 +33183,8 @@ pub mod api { #[doc = "- One event."] #[doc = "# "] add_registrar { - account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -33260,7 +33237,7 @@ pub mod api { #[doc = "# "] set_subs { subs: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_identity::types::Data, )>, }, @@ -33370,8 +33347,8 @@ pub mod api { set_account_id { #[codec(compact)] index: ::core::primitive::u32, - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -33420,14 +33397,14 @@ pub mod api { provide_judgement { #[codec(compact)] reg_index: ::core::primitive::u32, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - identity: ::subxt::ext::sp_core::H256, + identity: ::subxt::utils::H256, }, #[codec(index = 10)] #[doc = "Remove an account's identity and sub-account information and slash the deposits."] @@ -33450,8 +33427,8 @@ pub mod api { #[doc = "- One event."] #[doc = "# "] kill_identity { - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -33464,8 +33441,8 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] #[doc = "sub identity of `sub`."] add_sub { - sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, @@ -33476,8 +33453,8 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] #[doc = "sub identity of `sub`."] rename_sub { - sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, @@ -33491,8 +33468,8 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] #[doc = "sub identity of `sub`."] remove_sub { - sub: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -33581,36 +33558,36 @@ pub mod api { #[codec(index = 0)] #[doc = "A name was set or reset (which will remove all judgements)."] IdentitySet { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 1)] #[doc = "A name was cleared, and the given balance returned."] IdentityCleared { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "A name was removed and the given balance slashed."] IdentityKilled { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "A judgement was asked from a registrar."] JudgementRequested { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 4)] #[doc = "A judgement request was retracted."] JudgementUnrequested { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 5)] #[doc = "A judgement was given by a registrar."] JudgementGiven { - target: ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::account_id::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 6)] @@ -33621,23 +33598,23 @@ pub mod api { #[codec(index = 7)] #[doc = "A sub-identity was added to an identity and the deposit paid."] SubIdentityAdded { - sub: ::subxt::ext::sp_core::crypto::AccountId32, - main: ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::account_id::AccountId32, + main: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 8)] #[doc = "A sub-identity was removed from an identity and the deposit freed."] SubIdentityRemoved { - sub: ::subxt::ext::sp_core::crypto::AccountId32, - main: ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::account_id::AccountId32, + main: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 9)] #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] #[doc = "main identity account to the sub-identity account."] SubIdentityRevoked { - sub: ::subxt::ext::sp_core::crypto::AccountId32, - main: ::subxt::ext::sp_core::crypto::AccountId32, + sub: ::subxt::utils::account_id::AccountId32, + main: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, }, } @@ -33876,9 +33853,9 @@ pub mod api { #[doc = "At the end of the session, at least one validator was found to be offline."] SomeOffline { offline: ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, ::core::primitive::u128, >, )>, @@ -33986,8 +33963,8 @@ pub mod api { #[doc = " - Writes: Indices Accounts, System Account (recipient)"] #[doc = "# "] transfer { - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, index: ::core::primitive::u32, @@ -34035,8 +34012,8 @@ pub mod api { #[doc = " - Writes: Indices Accounts, System Account (original owner)"] #[doc = "# "] force_transfer { - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, index: ::core::primitive::u32, @@ -34096,7 +34073,7 @@ pub mod api { #[codec(index = 0)] #[doc = "A account index was assigned."] IndexAssigned { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, index: ::core::primitive::u32, }, #[codec(index = 1)] @@ -34106,7 +34083,7 @@ pub mod api { #[doc = "A account index has been frozen to its current account ID."] IndexFrozen { index: ::core::primitive::u32, - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, }, } } @@ -34127,8 +34104,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::AddOrigin`."] add_member { - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -34137,8 +34114,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::RemoveOrigin`."] remove_member { - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -34149,12 +34126,12 @@ pub mod api { #[doc = ""] #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] swap_member { - remove: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + remove: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - add: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + add: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -34164,8 +34141,7 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::ResetOrigin`."] reset_members { - members: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, }, #[codec(index = 4)] #[doc = "Swap out the sending member for some other key `new`."] @@ -34174,8 +34150,8 @@ pub mod api { #[doc = ""] #[doc = "Prime membership is passed from the origin account to `new`, if extant."] change_key { - new: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + new: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -34184,8 +34160,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] set_prime { - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -34270,7 +34246,7 @@ pub mod api { #[doc = "# "] as_multi_threshold_1 { other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, call: ::std::boxed::Box< runtime_types::polkadot_runtime::RuntimeCall, >, @@ -34324,7 +34300,7 @@ pub mod api { as_multi { threshold: ::core::primitive::u16, other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, @@ -34374,7 +34350,7 @@ pub mod api { approve_as_multi { threshold: ::core::primitive::u16, other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, @@ -34413,7 +34389,7 @@ pub mod api { cancel_as_multi { threshold: ::core::primitive::u16, other_signatories: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, @@ -34480,28 +34456,28 @@ pub mod api { #[codec(index = 0)] #[doc = "A new multisig operation has begun."] NewMultisig { - approving: ::subxt::ext::sp_core::crypto::AccountId32, - multisig: ::subxt::ext::sp_core::crypto::AccountId32, + approving: ::subxt::utils::account_id::AccountId32, + multisig: ::subxt::utils::account_id::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, #[codec(index = 1)] #[doc = "A multisig operation has been approved by someone."] MultisigApproval { - approving: ::subxt::ext::sp_core::crypto::AccountId32, + approving: ::subxt::utils::account_id::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::ext::sp_core::crypto::AccountId32, + multisig: ::subxt::utils::account_id::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, #[codec(index = 2)] #[doc = "A multisig operation has been executed."] MultisigExecuted { - approving: ::subxt::ext::sp_core::crypto::AccountId32, + approving: ::subxt::utils::account_id::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::ext::sp_core::crypto::AccountId32, + multisig: ::subxt::utils::account_id::AccountId32, call_hash: [::core::primitive::u8; 32usize], result: ::core::result::Result< (), @@ -34511,11 +34487,11 @@ pub mod api { #[codec(index = 3)] #[doc = "A multisig operation has been cancelled."] MultisigCancelled { - cancelling: ::subxt::ext::sp_core::crypto::AccountId32, + cancelling: ::subxt::utils::account_id::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::ext::sp_core::crypto::AccountId32, + multisig: ::subxt::utils::account_id::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, } @@ -34619,8 +34595,8 @@ pub mod api { #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] #[doc = "`NoMoreChunks` error from the staking system."] unbond { - member_account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + member_account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -34658,8 +34634,8 @@ pub mod api { #[doc = ""] #[doc = "If the target is the depositor, the pool will be destroyed."] withdraw_unbonded { - member_account: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + member_account: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, num_slashing_spans: ::core::primitive::u32, @@ -34685,16 +34661,16 @@ pub mod api { create { #[codec(compact)] amount: ::core::primitive::u128, - root: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + root: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - nominator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + nominator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - state_toggler: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + state_toggler: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -34708,16 +34684,16 @@ pub mod api { create_with_pool_id { #[codec(compact)] amount: ::core::primitive::u128, - root: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + root: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - nominator: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + nominator: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - state_toggler: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + state_toggler: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, pool_id: ::core::primitive::u32, @@ -34733,7 +34709,7 @@ pub mod api { nominate { pool_id: ::core::primitive::u32, validators: - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, }, #[codec(index = 9)] #[doc = "Set a new state for the pool."] @@ -34799,14 +34775,14 @@ pub mod api { update_roles { pool_id: ::core::primitive::u32, new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, }, #[codec(index = 13)] @@ -34933,13 +34909,13 @@ pub mod api { #[codec(index = 0)] #[doc = "A pool has been created."] Created { - depositor: ::subxt::ext::sp_core::crypto::AccountId32, + depositor: ::subxt::utils::account_id::AccountId32, pool_id: ::core::primitive::u32, }, #[codec(index = 1)] #[doc = "A member has became bonded in a pool."] Bonded { - member: ::subxt::ext::sp_core::crypto::AccountId32, + member: ::subxt::utils::account_id::AccountId32, pool_id: ::core::primitive::u32, bonded: ::core::primitive::u128, joined: ::core::primitive::bool, @@ -34947,7 +34923,7 @@ pub mod api { #[codec(index = 2)] #[doc = "A payout has been made to a member."] PaidOut { - member: ::subxt::ext::sp_core::crypto::AccountId32, + member: ::subxt::utils::account_id::AccountId32, pool_id: ::core::primitive::u32, payout: ::core::primitive::u128, }, @@ -34964,7 +34940,7 @@ pub mod api { #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] #[doc = "requested to be unbonded."] Unbonded { - member: ::subxt::ext::sp_core::crypto::AccountId32, + member: ::subxt::utils::account_id::AccountId32, pool_id: ::core::primitive::u32, balance: ::core::primitive::u128, points: ::core::primitive::u128, @@ -34978,7 +34954,7 @@ pub mod api { #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] #[doc = "will be 1."] Withdrawn { - member: ::subxt::ext::sp_core::crypto::AccountId32, + member: ::subxt::utils::account_id::AccountId32, pool_id: ::core::primitive::u32, balance: ::core::primitive::u128, points: ::core::primitive::u128, @@ -34998,20 +34974,20 @@ pub mod api { #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] MemberRemoved { pool_id: ::core::primitive::u32, - member: ::subxt::ext::sp_core::crypto::AccountId32, + member: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 8)] #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] #[doc = "can never change."] RolesUpdated { root: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, state_toggler: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, nominator: ::core::option::Option< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, }, #[codec(index = 9)] @@ -35050,7 +35026,7 @@ pub mod api { pub state: runtime_types::pallet_nomination_pools::PoolState, pub member_counter: ::core::primitive::u32, pub roles: runtime_types::pallet_nomination_pools::PoolRoles< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, } #[derive( @@ -35188,18 +35164,18 @@ pub mod api { #[doc = ""] #[doc = "- `hash`: The hash of the preimage to be removed from the store."] #[doc = "- `len`: The length of the preimage of `hash`."] - unnote_preimage { hash: ::subxt::ext::sp_core::H256 }, + unnote_preimage { hash: ::subxt::utils::H256 }, #[codec(index = 2)] #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] #[doc = ""] #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] #[doc = "a user may have paid, and take the control of the preimage out of their hands."] - request_preimage { hash: ::subxt::ext::sp_core::H256 }, + request_preimage { hash: ::subxt::utils::H256 }, #[codec(index = 3)] #[doc = "Clear a previously made request for a preimage."] #[doc = ""] #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - unrequest_preimage { hash: ::subxt::ext::sp_core::H256 }, + unrequest_preimage { hash: ::subxt::utils::H256 }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35236,13 +35212,13 @@ pub mod api { pub enum Event { #[codec(index = 0)] #[doc = "A preimage has been noted."] - Noted { hash: ::subxt::ext::sp_core::H256 }, + Noted { hash: ::subxt::utils::H256 }, #[codec(index = 1)] #[doc = "A preimage has been requested."] - Requested { hash: ::subxt::ext::sp_core::H256 }, + Requested { hash: ::subxt::utils::H256 }, #[codec(index = 2)] #[doc = "A preimage has ben cleared."] - Cleared { hash: ::subxt::ext::sp_core::H256 }, + Cleared { hash: ::subxt::utils::H256 }, } } #[derive( @@ -35288,8 +35264,8 @@ pub mod api { #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] #[doc = "- `call`: The call to be made by the `real` account."] proxy { - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, force_proxy_type: ::core::option::Option< @@ -35310,8 +35286,8 @@ pub mod api { #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] #[doc = "zero."] add_proxy { - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -35326,8 +35302,8 @@ pub mod api { #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] remove_proxy { - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -35383,8 +35359,8 @@ pub mod api { #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] #[doc = "account whose `pure` call has corresponding parameters."] kill_pure { - spawner: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + spawner: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -35411,11 +35387,11 @@ pub mod api { #[doc = "- `real`: The account that the proxy will make a call on behalf of."] #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] announce { - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - call_hash: ::subxt::ext::sp_core::H256, + call_hash: ::subxt::utils::H256, }, #[codec(index = 7)] #[doc = "Remove a given announcement."] @@ -35429,11 +35405,11 @@ pub mod api { #[doc = "- `real`: The account that the proxy will make a call on behalf of."] #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] remove_announcement { - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - call_hash: ::subxt::ext::sp_core::H256, + call_hash: ::subxt::utils::H256, }, #[codec(index = 8)] #[doc = "Remove the given announcement of a delegate."] @@ -35447,11 +35423,11 @@ pub mod api { #[doc = "- `delegate`: The account that previously announced the call."] #[doc = "- `call_hash`: The hash of the call to be made."] reject_announcement { - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - call_hash: ::subxt::ext::sp_core::H256, + call_hash: ::subxt::utils::H256, }, #[codec(index = 9)] #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] @@ -35466,12 +35442,12 @@ pub mod api { #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] #[doc = "- `call`: The call to be made by the `real` account."] proxy_announced { - delegate: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + delegate: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - real: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, force_proxy_type: ::core::option::Option< @@ -35533,31 +35509,31 @@ pub mod api { #[doc = "A pure account has been created by new proxy with given"] #[doc = "disambiguation index and proxy type."] PureCreated { - pure: ::subxt::ext::sp_core::crypto::AccountId32, - who: ::subxt::ext::sp_core::crypto::AccountId32, + pure: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::account_id::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, disambiguation_index: ::core::primitive::u16, }, #[codec(index = 2)] #[doc = "An announcement was placed to make a call in the future."] Announced { - real: ::subxt::ext::sp_core::crypto::AccountId32, - proxy: ::subxt::ext::sp_core::crypto::AccountId32, - call_hash: ::subxt::ext::sp_core::H256, + real: ::subxt::utils::account_id::AccountId32, + proxy: ::subxt::utils::account_id::AccountId32, + call_hash: ::subxt::utils::H256, }, #[codec(index = 3)] #[doc = "A proxy was added."] ProxyAdded { - delegator: ::subxt::ext::sp_core::crypto::AccountId32, - delegatee: ::subxt::ext::sp_core::crypto::AccountId32, + delegator: ::subxt::utils::account_id::AccountId32, + delegatee: ::subxt::utils::account_id::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, #[codec(index = 4)] #[doc = "A proxy was removed."] ProxyRemoved { - delegator: ::subxt::ext::sp_core::crypto::AccountId32, - delegatee: ::subxt::ext::sp_core::crypto::AccountId32, + delegator: ::subxt::utils::account_id::AccountId32, + delegatee: ::subxt::utils::account_id::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, @@ -35876,14 +35852,14 @@ pub mod api { #[doc = "------------------"] #[doc = "# "] bond { - controller: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + controller: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] value: ::core::primitive::u128, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, }, #[codec(index = 1)] @@ -35972,8 +35948,8 @@ pub mod api { #[doc = "# "] nominate { targets: ::std::vec::Vec< - ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, >, @@ -36010,7 +35986,7 @@ pub mod api { #[doc = "# "] set_payee { payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, }, #[codec(index = 8)] @@ -36031,8 +36007,8 @@ pub mod api { #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] #[doc = "# "] set_controller { - controller: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + controller: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -36114,16 +36090,15 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] set_invulnerables { - invulnerables: ::std::vec::Vec< - ::subxt::ext::sp_core::crypto::AccountId32, - >, + invulnerables: + ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, }, #[codec(index = 15)] #[doc = "Force a current staker to become completely unstaked, immediately."] #[doc = ""] #[doc = "The dispatch origin must be Root."] force_unstake { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 16)] @@ -36170,7 +36145,7 @@ pub mod api { #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] #[doc = "# "] payout_stakers { - validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + validator_stash: ::subxt::utils::account_id::AccountId32, era: ::core::primitive::u32, }, #[codec(index = 19)] @@ -36201,7 +36176,7 @@ pub mod api { #[doc = ""] #[doc = "Refunds the transaction fees upon successful execution."] reap_stash { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 21)] @@ -36218,8 +36193,8 @@ pub mod api { #[doc = "block any further nominations."] kick { who: ::std::vec::Vec< - ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, >, @@ -36296,14 +36271,14 @@ pub mod api { #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] #[doc = "who do not satisfy these requirements."] chill_other { - controller: ::subxt::ext::sp_core::crypto::AccountId32, + controller: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 24)] #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] #[doc = "can call this."] force_apply_min_commission { - validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + validator_stash: ::subxt::utils::account_id::AccountId32, }, } #[derive( @@ -36424,13 +36399,13 @@ pub mod api { #[codec(index = 1)] #[doc = "The nominator has been rewarded by this amount."] Rewarded { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] Slashed { - staker: ::subxt::ext::sp_core::crypto::AccountId32, + staker: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 3)] @@ -36448,27 +36423,27 @@ pub mod api { #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] #[doc = "it will not be emitted for staking rewards when they are added to stake."] Bonded { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 6)] #[doc = "An account has unbonded this amount."] Unbonded { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 7)] #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue."] Withdrawn { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 8)] #[doc = "A nominator has been kicked from a validator."] Kicked { - nominator: ::subxt::ext::sp_core::crypto::AccountId32, - stash: ::subxt::ext::sp_core::crypto::AccountId32, + nominator: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 9)] #[doc = "The election failed. No new era is planned."] @@ -36476,18 +36451,18 @@ pub mod api { #[codec(index = 10)] #[doc = "An account has stopped participating as either a validator or nominator."] Chilled { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 11)] #[doc = "The stakers' rewards are getting paid."] PayoutStarted { era_index: ::core::primitive::u32, - validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + validator_stash: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 12)] #[doc = "A validator has set their preferences."] ValidatorPrefsSet { - stash: ::subxt::ext::sp_core::crypto::AccountId32, + stash: ::subxt::utils::account_id::AccountId32, prefs: runtime_types::pallet_staking::ValidatorPrefs, }, } @@ -36580,7 +36555,7 @@ pub mod api { )] pub struct Nominations { pub targets: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, pub submitted_in: ::core::primitive::u32, pub suppressed: ::core::primitive::bool, @@ -36639,7 +36614,7 @@ pub mod api { Debug, )] pub struct StakingLedger { - pub stash: ::subxt::ext::sp_core::crypto::AccountId32, + pub stash: ::subxt::utils::account_id::AccountId32, #[codec(compact)] pub total: ::core::primitive::u128, #[codec(compact)] @@ -36754,8 +36729,8 @@ pub mod api { #[doc = "# "] report_awesome { reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -36779,7 +36754,7 @@ pub mod api { #[doc = "- DbReads: `Tips`, `origin account`"] #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] #[doc = "# "] - retract_tip { hash: ::subxt::ext::sp_core::H256 }, + retract_tip { hash: ::subxt::utils::H256 }, #[codec(index = 2)] #[doc = "Give a tip for something new; no finder's fee will be taken."] #[doc = ""] @@ -36805,8 +36780,8 @@ pub mod api { #[doc = "# "] tip_new { reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, #[codec(compact)] @@ -36838,7 +36813,7 @@ pub mod api { #[doc = "- DbWrites: `Tips`"] #[doc = "# "] tip { - hash: ::subxt::ext::sp_core::H256, + hash: ::subxt::utils::H256, #[codec(compact)] tip_value: ::core::primitive::u128, }, @@ -36859,7 +36834,7 @@ pub mod api { #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] #[doc = "# "] - close_tip { hash: ::subxt::ext::sp_core::H256 }, + close_tip { hash: ::subxt::utils::H256 }, #[codec(index = 5)] #[doc = "Remove and slash an already-open tip."] #[doc = ""] @@ -36873,7 +36848,7 @@ pub mod api { #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] #[doc = " The actual cost depends on the implementation of `T::Tippers`."] #[doc = "# "] - slash_tip { hash: ::subxt::ext::sp_core::H256 }, + slash_tip { hash: ::subxt::utils::H256 }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36910,31 +36885,25 @@ pub mod api { pub enum Event { #[codec(index = 0)] #[doc = "A new tip suggestion has been opened."] - NewTip { - tip_hash: ::subxt::ext::sp_core::H256, - }, + NewTip { tip_hash: ::subxt::utils::H256 }, #[codec(index = 1)] #[doc = "A tip suggestion has reached threshold and is closing."] - TipClosing { - tip_hash: ::subxt::ext::sp_core::H256, - }, + TipClosing { tip_hash: ::subxt::utils::H256 }, #[codec(index = 2)] #[doc = "A tip suggestion has been closed."] TipClosed { - tip_hash: ::subxt::ext::sp_core::H256, - who: ::subxt::ext::sp_core::crypto::AccountId32, + tip_hash: ::subxt::utils::H256, + who: ::subxt::utils::account_id::AccountId32, payout: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "A tip suggestion has been retracted."] - TipRetracted { - tip_hash: ::subxt::ext::sp_core::H256, - }, + TipRetracted { tip_hash: ::subxt::utils::H256 }, #[codec(index = 4)] #[doc = "A tip suggestion has been slashed."] TipSlashed { - tip_hash: ::subxt::ext::sp_core::H256, - finder: ::subxt::ext::sp_core::crypto::AccountId32, + tip_hash: ::subxt::utils::H256, + finder: ::subxt::utils::account_id::AccountId32, deposit: ::core::primitive::u128, }, } @@ -36969,7 +36938,7 @@ pub mod api { #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] #[doc = "has been paid by `who`."] TransactionFeePaid { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, actual_fee: ::core::primitive::u128, tip: ::core::primitive::u128, }, @@ -37019,8 +36988,8 @@ pub mod api { propose_spend { #[codec(compact)] value: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -37065,8 +37034,8 @@ pub mod api { spend { #[codec(compact)] amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -37137,7 +37106,7 @@ pub mod api { Awarded { proposal_index: ::core::primitive::u32, award: ::core::primitive::u128, - account: ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 3)] #[doc = "A proposal was rejected; funds were slashed."] @@ -37163,7 +37132,7 @@ pub mod api { SpendApproved { proposal_index: ::core::primitive::u32, amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, + beneficiary: ::subxt::utils::account_id::AccountId32, }, } } @@ -37385,8 +37354,8 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] #[doc = "# "] vest_other { - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, }, @@ -37409,8 +37378,8 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] #[doc = "# "] vested_transfer { - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, schedule: @@ -37439,12 +37408,12 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] #[doc = "# "] force_vested_transfer { - source: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + source: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, - target: ::subxt::ext::sp_runtime::MultiAddress< - ::subxt::ext::sp_core::crypto::AccountId32, + target: ::subxt::utils::multi_address::MultiAddress< + ::subxt::utils::account_id::AccountId32, (), >, schedule: @@ -37515,13 +37484,13 @@ pub mod api { #[doc = "The amount vested has been updated. This could indicate a change in funds available."] #[doc = "The balance given is the amount which is left unvested (and thus locked)."] VestingUpdated { - account: ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::account_id::AccountId32, unvested: ::core::primitive::u128, }, #[codec(index = 1)] #[doc = "An \\[account\\] has become fully vested."] VestingCompleted { - account: ::subxt::ext::sp_core::crypto::AccountId32, + account: ::subxt::utils::account_id::AccountId32, }, } } @@ -37905,7 +37874,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] AssetsTrapped( - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, runtime_types::xcm::v1::multilocation::MultiLocation, runtime_types::xcm::VersionedMultiAssets, ), @@ -37950,7 +37919,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] AssetsClaimed( - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, runtime_types::xcm::v1::multilocation::MultiLocation, runtime_types::xcm::VersionedMultiAssets, ), @@ -38018,7 +37987,7 @@ pub mod api { :: subxt :: ext :: codec :: Encode, Debug, )] - pub struct CandidateHash(pub ::subxt::ext::sp_core::H256); + pub struct CandidateHash(pub ::subxt::utils::H256); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -38084,7 +38053,7 @@ pub mod api { :: subxt :: ext :: codec :: Encode, Debug, )] - pub struct ValidationCodeHash(pub ::subxt::ext::sp_core::H256); + pub struct ValidationCodeHash(pub ::subxt::utils::H256); } } pub mod polkadot_primitives { @@ -38318,7 +38287,7 @@ pub mod api { >, pub backed_candidates: ::std::vec::Vec< runtime_types::polkadot_primitives::v2::BackedCandidate< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, >, pub disputes: ::std::vec::Vec< @@ -38448,9 +38417,9 @@ pub mod api { #[codec(index = 0)] Explicit, #[codec(index = 1)] - BackingSeconded(::subxt::ext::sp_core::H256), + BackingSeconded(::subxt::utils::H256), #[codec(index = 2)] - BackingValid(::subxt::ext::sp_core::H256), + BackingValid(::subxt::utils::H256), #[codec(index = 3)] ApprovalChecking, } @@ -38650,19 +38619,19 @@ pub mod api { #[codec(index = 0)] system( runtime_types::frame_support::dispatch::RawOrigin< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ), #[codec(index = 15)] Council( runtime_types::pallet_collective::RawOrigin< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ), #[codec(index = 16)] TechnicalCommittee( runtime_types::pallet_collective::RawOrigin< - ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::utils::account_id::AccountId32, >, ), #[codec(index = 50)] @@ -38846,14 +38815,14 @@ pub mod api { #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] #[doc = "Second is the total."] Reserved { - bidder: ::subxt::ext::sp_core::crypto::AccountId32, + bidder: ::subxt::utils::account_id::AccountId32, extra_reserved: ::core::primitive::u128, total_amount: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] Unreserved { - bidder: ::subxt::ext::sp_core::crypto::AccountId32, + bidder: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 4)] @@ -38861,13 +38830,13 @@ pub mod api { #[doc = "but no parachain slot has been leased."] ReserveConfiscated { para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::ext::sp_core::crypto::AccountId32, + leaser: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 5)] #[doc = "A new bid has been accepted as the current winner."] BidAccepted { - bidder: ::subxt::ext::sp_core::crypto::AccountId32, + bidder: ::subxt::utils::account_id::AccountId32, para_id: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, first_slot: ::core::primitive::u32, @@ -38893,7 +38862,7 @@ pub mod api { )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - # [codec (index = 0)] # [doc = "Make a claim to collect your DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to claim is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)"] # [doc = ""] # [doc = "and `address` matches the `dest` account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim { dest : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] # [doc = "Mint a new claim to collect DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _Root_."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `who`: The Ethereum address allowed to collect this claim."] # [doc = "- `value`: The number of DOTs that will be claimed."] # [doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "We assume worst case that both vesting and statement is being inserted."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] mint_claim { who : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , value : :: core :: primitive :: u128 , vesting_schedule : :: core :: option :: Option < (:: core :: primitive :: u128 , :: core :: primitive :: u128 , :: core :: primitive :: u32 ,) > , statement : :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: StatementKind > , } , # [codec (index = 2)] # [doc = "Make a claim to collect your DOTs by signing a statement."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)(statement)"] # [doc = ""] # [doc = "and `address` matches the `dest` account; the `statement` must match that which is"] # [doc = "expected according to your purchase arrangement."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim_attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim_attest { dest : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 3)] # [doc = "Attest to a statement, needed to finalize the claims process."] # [doc = ""] # [doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] # [doc = "and provides a `statement` which is expected for the account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to do pre-validation on `attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] attest { statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] move_claim { old : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , new : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , maybe_preclaim : :: core :: option :: Option < :: subxt :: ext :: sp_core :: crypto :: AccountId32 > , } , } + # [codec (index = 0)] # [doc = "Make a claim to collect your DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to claim is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)"] # [doc = ""] # [doc = "and `address` matches the `dest` account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim { dest : :: subxt :: utils :: account_id :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] # [doc = "Mint a new claim to collect DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _Root_."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `who`: The Ethereum address allowed to collect this claim."] # [doc = "- `value`: The number of DOTs that will be claimed."] # [doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "We assume worst case that both vesting and statement is being inserted."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] mint_claim { who : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , value : :: core :: primitive :: u128 , vesting_schedule : :: core :: option :: Option < (:: core :: primitive :: u128 , :: core :: primitive :: u128 , :: core :: primitive :: u32 ,) > , statement : :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: StatementKind > , } , # [codec (index = 2)] # [doc = "Make a claim to collect your DOTs by signing a statement."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)(statement)"] # [doc = ""] # [doc = "and `address` matches the `dest` account; the `statement` must match that which is"] # [doc = "expected according to your purchase arrangement."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim_attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim_attest { dest : :: subxt :: utils :: account_id :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 3)] # [doc = "Attest to a statement, needed to finalize the claims process."] # [doc = ""] # [doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] # [doc = "and provides a `statement` which is expected for the account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to do pre-validation on `attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] attest { statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] move_claim { old : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , new : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , maybe_preclaim : :: core :: option :: Option < :: subxt :: utils :: account_id :: AccountId32 > , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -38928,7 +38897,7 @@ pub mod api { )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { - # [codec (index = 0)] # [doc = "Someone claimed some DOTs."] Claimed { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } + # [codec (index = 0)] # [doc = "Someone claimed some DOTs."] Claimed { who : :: subxt :: utils :: account_id :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39022,7 +38991,7 @@ pub mod api { #[doc = "- `who`: The account whose contribution should be withdrawn."] #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] withdraw { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, #[codec(compact)] index: runtime_types::polkadot_parachain::primitives::Id, }, @@ -39179,14 +39148,14 @@ pub mod api { #[codec(index = 1)] #[doc = "Contributed to a crowd sale."] Contributed { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, fund_index: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "Withdrew full balance of a contributor."] Withdrew { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, fund_index: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, }, @@ -39223,7 +39192,7 @@ pub mod api { #[codec(index = 8)] #[doc = "A memo has been updated."] MemoUpdated { - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, para_id: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, }, @@ -39265,7 +39234,7 @@ pub mod api { )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - # [codec (index = 0)] # [doc = "Register head data and validation code for a reserved Para Id."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin."] # [doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] # [doc = "- `genesis_head`: The genesis head data of the parachain/thread."] # [doc = "- `validation_code`: The initial validation code of the parachain/thread."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] # [doc = "reserved previously for this para ID is accounted for."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Registered` event is emitted in case of success."] register { id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Force the registration of a Para Id on the relay chain."] # [doc = ""] # [doc = "This function must be called by a Root origin."] # [doc = ""] # [doc = "The deposit taken can be specified for this registration. Any `ParaId`"] # [doc = "can be registered, including sub-1000 IDs which are System Parachains."] force_register { who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 2)] # [doc = "Deregister a Para Id, freeing all data and returning any deposit."] # [doc = ""] # [doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] # [doc = "Swap a parachain with another parachain or parathread."] # [doc = ""] # [doc = "The origin must be Root, the `para` owner, or the `para` itself."] # [doc = ""] # [doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] # [doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] # [doc = ""] # [doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] # [doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] # [doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] # [doc = "and the auction deposit are switched."] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] # [doc = "Remove a manager lock from a para. This will allow the manager of a"] # [doc = "previously locked para to deregister or swap a para without using governance."] # [doc = ""] # [doc = "Can only be called by the Root origin or the parachain."] remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Reserve a Para Id on the relay chain."] # [doc = ""] # [doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] # [doc = "The origin account is able to register head data and validation code using `register` to create"] # [doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] reserve , # [codec (index = 6)] # [doc = "Add a manager lock from a para. This will prevent the manager of a"] # [doc = "para to deregister or swap a para."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] add_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 7)] # [doc = "Schedule a parachain upgrade."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 8)] # [doc = "Set the parachain's current head."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , } + # [codec (index = 0)] # [doc = "Register head data and validation code for a reserved Para Id."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin."] # [doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] # [doc = "- `genesis_head`: The genesis head data of the parachain/thread."] # [doc = "- `validation_code`: The initial validation code of the parachain/thread."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] # [doc = "reserved previously for this para ID is accounted for."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Registered` event is emitted in case of success."] register { id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Force the registration of a Para Id on the relay chain."] # [doc = ""] # [doc = "This function must be called by a Root origin."] # [doc = ""] # [doc = "The deposit taken can be specified for this registration. Any `ParaId`"] # [doc = "can be registered, including sub-1000 IDs which are System Parachains."] force_register { who : :: subxt :: utils :: account_id :: AccountId32 , deposit : :: core :: primitive :: u128 , id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 2)] # [doc = "Deregister a Para Id, freeing all data and returning any deposit."] # [doc = ""] # [doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] # [doc = "Swap a parachain with another parachain or parathread."] # [doc = ""] # [doc = "The origin must be Root, the `para` owner, or the `para` itself."] # [doc = ""] # [doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] # [doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] # [doc = ""] # [doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] # [doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] # [doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] # [doc = "and the auction deposit are switched."] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] # [doc = "Remove a manager lock from a para. This will allow the manager of a"] # [doc = "previously locked para to deregister or swap a para without using governance."] # [doc = ""] # [doc = "Can only be called by the Root origin or the parachain."] remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Reserve a Para Id on the relay chain."] # [doc = ""] # [doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] # [doc = "The origin account is able to register head data and validation code using `register` to create"] # [doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] reserve , # [codec (index = 6)] # [doc = "Add a manager lock from a para. This will prevent the manager of a"] # [doc = "para to deregister or swap a para."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] add_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 7)] # [doc = "Schedule a parachain upgrade."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 8)] # [doc = "Set the parachain's current head."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -39327,7 +39296,7 @@ pub mod api { #[codec(index = 0)] Registered { para_id: runtime_types::polkadot_parachain::primitives::Id, - manager: ::subxt::ext::sp_core::crypto::AccountId32, + manager: ::subxt::utils::account_id::AccountId32, }, #[codec(index = 1)] Deregistered { @@ -39336,7 +39305,7 @@ pub mod api { #[codec(index = 2)] Reserved { para_id: runtime_types::polkadot_parachain::primitives::Id, - who: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::utils::account_id::AccountId32, }, } } @@ -39369,7 +39338,7 @@ pub mod api { #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] force_lease { para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::ext::sp_core::crypto::AccountId32, + leaser: ::subxt::utils::account_id::AccountId32, amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, @@ -39425,7 +39394,7 @@ pub mod api { #[doc = "Second balance is the total amount reserved."] Leased { para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::ext::sp_core::crypto::AccountId32, + leaser: ::subxt::utils::account_id::AccountId32, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, extra_reserved: ::core::primitive::u128, @@ -39903,7 +39872,7 @@ pub mod api { pub max_message_size: ::core::primitive::u32, pub msg_count: ::core::primitive::u32, pub total_size: ::core::primitive::u32, - pub mqc_head: ::core::option::Option<::subxt::ext::sp_core::H256>, + pub mqc_head: ::core::option::Option<::subxt::utils::H256>, pub sender_deposit: ::core::primitive::u128, pub recipient_deposit: ::core::primitive::u128, } @@ -40041,7 +40010,7 @@ pub mod api { #[doc = "A candidate was backed. `[candidate, head_data]`"] CandidateBacked( runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, runtime_types::polkadot_primitives::v2::CoreIndex, @@ -40051,7 +40020,7 @@ pub mod api { #[doc = "A candidate was included. `[candidate, head_data]`"] CandidateIncluded( runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, runtime_types::polkadot_primitives::v2::CoreIndex, @@ -40061,7 +40030,7 @@ pub mod api { #[doc = "A candidate timed out. `[candidate, head_data]`"] CandidateTimedOut( runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::ext::sp_core::H256, + ::subxt::utils::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, runtime_types::polkadot_primitives::v2::CoreIndex, @@ -41458,11 +41427,11 @@ pub mod api { Debug, )] pub struct Header<_0, _1> { - pub parent_hash: ::subxt::ext::sp_core::H256, + pub parent_hash: ::subxt::utils::H256, #[codec(compact)] pub number: _0, - pub state_root: ::subxt::ext::sp_core::H256, - pub extrinsics_root: ::subxt::ext::sp_core::H256, + pub state_root: ::subxt::utils::H256, + pub extrinsics_root: ::subxt::utils::H256, pub digest: runtime_types::sp_runtime::generic::digest::Digest, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index 83bdf06c97..65cd880808 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -18,13 +18,15 @@ use sp_core::{ Pair as _, }; use sp_keyring::AccountKeyring; -use sp_runtime::{ - AccountId32, - MultiAddress, -}; -use subxt::error::{ - DispatchError, - Error, +use subxt::{ + error::{ + DispatchError, + Error, + }, + utils::{ + AccountId32, + MultiAddress, + }, }; #[tokio::test] @@ -250,8 +252,9 @@ async fn storage_total_issuance() { #[tokio::test] async fn storage_balance_lock() -> Result<(), subxt::Error> { - let bob = pair_signer(AccountKeyring::Bob.pair()); - let charlie = AccountKeyring::Charlie.to_account_id(); + let bob_signer = pair_signer(AccountKeyring::Bob.pair()); + let bob: AccountId32 = AccountKeyring::Bob.to_account_id().into(); + let charlie: AccountId32 = AccountKeyring::Charlie.to_account_id().into(); let ctx = test_context().await; let api = ctx.client(); @@ -262,16 +265,14 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> { ); api.tx() - .sign_and_submit_then_watch_default(&tx, &bob) + .sign_and_submit_then_watch_default(&tx, &bob_signer) .await? .wait_for_finalized_success() .await? .find_first::()? .expect("No ExtrinsicSuccess Event found"); - let locks_addr = node_runtime::storage() - .balances() - .locks(AccountKeyring::Bob.to_account_id()); + let locks_addr = node_runtime::storage().balances().locks(bob); let locks = api.storage().fetch_or_default(&locks_addr, None).await?; @@ -330,12 +331,13 @@ async fn transfer_error() { #[tokio::test] async fn transfer_implicit_subscription() { let alice = pair_signer(AccountKeyring::Alice.pair()); - let bob = AccountKeyring::Bob.to_account_id(); - let bob_addr = bob.clone().into(); + let bob: AccountId32 = AccountKeyring::Bob.to_account_id().into(); let ctx = test_context().await; let api = ctx.client(); - let to_bob_tx = node_runtime::tx().balances().transfer(bob_addr, 10_000); + let to_bob_tx = node_runtime::tx() + .balances() + .transfer(bob.clone().into(), 10_000); let event = api .tx() @@ -353,7 +355,7 @@ async fn transfer_implicit_subscription() { event, balances::events::Transfer { from: alice.account_id().clone(), - to: bob.clone(), + to: bob, amount: 10_000 } ); diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 1dfc44a88e..84cf1b8953 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -18,12 +18,12 @@ use crate::{ TestContext, }; use sp_core::sr25519::Pair; -use sp_runtime::MultiAddress; use subxt::{ tx::{ PairSigner, TxProgress, }, + utils::MultiAddress, Config, Error, OnlineClient, diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index 3cae0ef37f..458f8596a6 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -9,6 +9,7 @@ use crate::{ utils::wait_for_blocks, }; use sp_keyring::AccountKeyring; +use subxt::utils::AccountId32; #[tokio::test] async fn storage_plain_lookup() -> Result<(), subxt::Error> { @@ -32,7 +33,7 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { let api = ctx.client(); let signer = pair_signer(AccountKeyring::Alice.pair()); - let alice = AccountKeyring::Alice.to_account_id(); + let alice: AccountId32 = AccountKeyring::Alice.to_account_id().into(); // Do some transaction to bump the Alice nonce to 1: let remark_tx = node_runtime::tx().system().remark(vec![1, 2, 3, 4, 5]); @@ -43,7 +44,7 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { .await?; // Look up the nonce for the user (we expect it to be 1). - let nonce_addr = node_runtime::storage().system().account(&alice); + let nonce_addr = node_runtime::storage().system().account(alice); let entry = api.storage().fetch_or_default(&nonce_addr, None).await?; assert_eq!(entry.nonce, 1); @@ -90,8 +91,8 @@ async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error> { // we "approveTransfer" of some of this asset class. This gives us an // entry in the `Approvals` StorageNMap that we can try to look up. let signer = pair_signer(AccountKeyring::Alice.pair()); - let alice = AccountKeyring::Alice.to_account_id(); - let bob = AccountKeyring::Bob.to_account_id(); + let alice: AccountId32 = AccountKeyring::Alice.to_account_id().into(); + let bob: AccountId32 = AccountKeyring::Bob.to_account_id().into(); let tx1 = node_runtime::tx() .assets() @@ -111,7 +112,7 @@ async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error> { .await?; // The actual test; look up this approval in storage: - let addr = node_runtime::storage().assets().approvals(99, &alice, &bob); + let addr = node_runtime::storage().assets().approvals(99, alice, bob); let entry = api.storage().fetch(&addr, None).await?; assert_eq!(entry.map(|a| a.amount), Some(123)); Ok(()) diff --git a/testing/test-runtime/Cargo.toml b/testing/test-runtime/Cargo.toml index ae32e25e6d..c00248003f 100644 --- a/testing/test-runtime/Cargo.toml +++ b/testing/test-runtime/Cargo.toml @@ -6,12 +6,11 @@ publish = false [dependencies] subxt = { path = "../../subxt" } -sp-runtime = "7.0.0" +sp-runtime = "12.0.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } [build-dependencies] subxt = { path = "../../subxt" } -sp-core = { version = "7.0.0", default-features = false } tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } which = "4.2.2" jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport"] } diff --git a/testing/test-runtime/build.rs b/testing/test-runtime/build.rs index 3b910b5d3e..7d437fcff1 100644 --- a/testing/test-runtime/build.rs +++ b/testing/test-runtime/build.rs @@ -47,7 +47,7 @@ async fn run() { }; // Download metadata from binary; retry until successful, or a limit is hit. - let metadata_bytes: sp_core::Bytes = { + let metadata_bytes: subxt::rpc::types::Bytes = { const MAX_RETRIES: usize = 6; let mut retries = 0;