From 298384d34842be4342ec70848db32bd74cf48809 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 30 Jun 2022 18:35:06 +0100 Subject: [PATCH 01/75] WIP API changes --- subxt/src/client/mod.rs | 13 + subxt/src/client/offline_client.rs | 68 ++++++ subxt/src/client/online_client.rs | 128 ++++++++++ subxt/src/{client.rs => client_OLD.rs} | 0 subxt/src/config.rs | 4 + subxt/src/events/event_subscription.rs | 73 ++++-- subxt/src/events/events_type.rs | 15 +- subxt/src/events/filter_events.rs | 12 +- subxt/src/extrinsic/mod.rs | 1 + subxt/src/extrinsic/params.rs | 2 +- subxt/src/extrinsic/submittable.rs | 320 +++++++++++++++++++++++++ subxt/src/lib.rs | 31 +-- subxt/src/metadata/encode_decode.rs | 44 ++++ subxt/src/metadata/metadata_type.rs | 40 ++-- subxt/src/metadata/mod.rs | 1 + subxt/src/transaction.rs | 67 +++--- 16 files changed, 706 insertions(+), 113 deletions(-) create mode 100644 subxt/src/client/mod.rs create mode 100644 subxt/src/client/offline_client.rs create mode 100644 subxt/src/client/online_client.rs rename subxt/src/{client.rs => client_OLD.rs} (100%) create mode 100644 subxt/src/extrinsic/submittable.rs create mode 100644 subxt/src/metadata/encode_decode.rs diff --git a/subxt/src/client/mod.rs b/subxt/src/client/mod.rs new file mode 100644 index 0000000000..3b985d53a5 --- /dev/null +++ b/subxt/src/client/mod.rs @@ -0,0 +1,13 @@ +// 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. + +mod offline_client; +mod online_client; + +pub use offline_client::{ + OfflineClient +}; +pub use online_client::{ + OnlineClient +}; \ No newline at end of file diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs new file mode 100644 index 0000000000..29a1ff782f --- /dev/null +++ b/subxt/src/client/offline_client.rs @@ -0,0 +1,68 @@ +// 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. + +use crate::{ + Config, + Metadata, + rpc::RuntimeVersion, +}; +use std::sync::Arc; +use derivative::Derivative; + +/// A client that is capable of performing offline-only operations. +/// Can be constructed as long as you can populate the required fields. +#[derive(Derivative)] +#[derivative(Debug(bound = ""), Clone(bound = ""))] +pub struct OfflineClient { + inner: Arc> +} + +struct Inner { + genesis_hash: T::Hash, + runtime_version: RuntimeVersion, + metadata: Metadata, +} + +impl OfflineClient { + /// Construct a new [`OfflineClient`], providing + /// the necessary runtime and compile-time arguments. + pub fn new( + genesis_hash: T::Hash, + runtime_version: RuntimeVersion, + metadata: Metadata, + ) -> OfflineClient { + OfflineClient { + inner: Arc::new(Inner { + genesis_hash, + runtime_version, + metadata, + }) + } + } + + /// Return the genesis hash. + pub fn genesis_hash(&self) -> &T::Hash { + &self.inner.genesis_hash + } + + /// Return the runtime version. + pub fn runtime_version(&self) -> &RuntimeVersion { + &self.inner.runtime_version + } + + /// Return the [`Metadata`] used in this client. + pub fn metadata(&self) -> &Metadata { + &self.inner.metadata + } +} + +// For ergonomics; cloning a client is deliberately fairly cheap (via Arc), +// so this allows users to pass references to a client rather than explicitly +// cloning. This is partly for consistency with OnlineClient, which can be +// easily converted into an OfflineClient for ergonomics. +impl <'a, T: Config> From<&'a OfflineClient> for OfflineClient { + fn from(c: &'a OfflineClient) -> Self { + c.clone() + } +} \ No newline at end of file diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs new file mode 100644 index 0000000000..3d9bf4e463 --- /dev/null +++ b/subxt/src/client/online_client.rs @@ -0,0 +1,128 @@ +// 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. + +use std::sync::Arc; +use parking_lot::RwLock; +use super::{ + OfflineClient, +}; +use futures::future; +use crate::{ + Config, + Call, + Encoded, + rpc::{ + Rpc, + RpcClient, + RuntimeVersion + }, + error::{ + BasicError, + }, + extrinsic::{ + Signer, + ExtrinsicParams, + }, + Metadata, +}; +use codec::{ + Compact, + Encode, +}; +use derivative::Derivative; + +/// A client capable of perfomring offline or online operations. This +/// builds on [`OfflineClient`] to provide connectivity to a node. +#[derive(Derivative)] +#[derivative(Clone(bound = ""))] +pub struct OnlineClient { + inner: Arc>>, + rpc: Rpc, +} + +impl OnlineClient { + /// Construct a new [`OnlineClient`] using default settings which + /// point to a locally running node on `ws://127.0.0.1:9944`. + pub async fn new() -> Result, BasicError> { + let url = "ws://127.0.0.1:9944"; + OnlineClient::from_url(url).await + } + + /// Construct a new [`OnlineClient`], providing a URL to connect to. + pub async fn from_url(url: impl AsRef) -> Result, BasicError> { + let client = crate::rpc::ws_client(url.as_ref()).await?; + OnlineClient::from_rpc_client(client).await + } + + /// Construct a new [`OnlineClient`] by providing the underlying [`RpcClient`] + /// to use to drive the connection. + pub async fn from_rpc_client(rpc_client: impl Into) -> Result, BasicError> { + let rpc = Rpc::new(rpc_client.into()); + + let (genesis_hash, runtime_version, metadata) = future::join3( + rpc.genesis_hash(), + rpc.runtime_version(None), + rpc.metadata() + ) + .await; + + Ok(OnlineClient { + inner: Arc::new(RwLock::new(OfflineClient::new( + genesis_hash?, + runtime_version?, + metadata?, + ))), + rpc + }) + } + + /// Return an [`OfflineClient`] to use. + pub fn offline(&self) -> OfflineClient { + let inner = self.inner.read(); + // This is fairly cheap: + (*inner).clone() + } + + /// Return the [`Metadata`] used in this client. + pub fn metadata(&self) -> Metadata { + let inner = self.inner.read(); + inner.metadata().clone() + } + + /// Return the genesis hash. + pub fn genesis_hash(&self) -> T::Hash { + let inner = self.inner.read(); + *inner.genesis_hash() + } + + /// Return the runtime version. + pub fn runtime_version(&self) -> RuntimeVersion { + let inner = self.inner.read(); + inner.runtime_version().clone() + } + + /// Return the RPC interface. + pub fn rpc(&self) -> &Rpc { + &self.rpc + } +} + +// These allow implementations to take in something like +// `impl Into` and have either an online or +// offline client (or references to) "just work", for ergonomics. +impl From> for OfflineClient { + fn from(client: OnlineClient) -> Self { + client.offline() + } +} +impl <'a, T: Config> From<&'a OnlineClient> for OfflineClient { + fn from(client: &'a OnlineClient) -> Self { + client.offline() + } +} +impl <'a, T: Config> From<&'a OnlineClient> for OnlineClient { + fn from(client: &'a OnlineClient) -> Self { + client.clone() + } +} \ No newline at end of file diff --git a/subxt/src/client.rs b/subxt/src/client_OLD.rs similarity index 100% rename from subxt/src/client.rs rename to subxt/src/client_OLD.rs diff --git a/subxt/src/config.rs b/subxt/src/config.rs index 884af45ae7..a1603ea3e0 100644 --- a/subxt/src/config.rs +++ b/subxt/src/config.rs @@ -74,6 +74,9 @@ pub trait Config: Debug + 'static { /// Extrinsic type within blocks. type Extrinsic: Parameter + Extrinsic + Debug + MaybeSerializeDeserialize; + + /// This type defines the extrinsic extra and additional parameters. + type ExtrinsicParams: crate::extrinsic::ExtrinsicParams; } /// Parameter trait copied from `substrate::frame_support` @@ -97,4 +100,5 @@ impl Config for DefaultConfig { sp_runtime::generic::Header; type Signature = sp_runtime::MultiSignature; type Extrinsic = sp_runtime::OpaqueExtrinsic; + type ExtrinsicParams = crate::extrinsic::SubstrateExtrinsicParams; } diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index c201d6568c..9a13d50d70 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -6,7 +6,7 @@ use crate::{ error::BasicError, - Client, + OnlineClient, Config, }; use codec::Decode; @@ -47,9 +47,15 @@ pub use super::{ /// and is exposed only to be called via the codegen. It may /// break between minor releases. #[doc(hidden)] -pub async fn subscribe<'a, T: Config, Evs: Decode + 'static>( - client: &'a Client, -) -> Result, T, Evs>, BasicError> { +pub async fn subscribe( + client: Client, +) -> Result, T, Evs>, BasicError> +where + Client: Into>, + T: Config, + Evs: Decode + 'static +{ + let client = client.into(); let block_subscription = client.rpc().subscribe_blocks().await?; Ok(EventSubscription::new(client, block_subscription)) } @@ -60,9 +66,16 @@ pub async fn subscribe<'a, T: Config, Evs: Decode + 'static>( /// and is exposed only to be called via the codegen. It may /// break between minor releases. #[doc(hidden)] -pub async fn subscribe_finalized<'a, T: Config, Evs: Decode + 'static>( - client: &'a Client, -) -> Result, T, Evs>, BasicError> { +pub async fn subscribe_finalized( + client: Client, +) -> Result, T, Evs>, BasicError> +where + Client: Into>, + T: Config, + Evs: Decode + 'static +{ + let client = client.into(); + // fetch the last finalised block details immediately, so that we'll get // events for each block after this one. let last_finalized_block_hash = client.rpc().finalized_head().await?; @@ -72,11 +85,13 @@ pub async fn subscribe_finalized<'a, T: Config, Evs: Decode + 'static>( .await? .map(|h| (*h.number()).into()); + let sub = client.rpc().subscribe_finalized_blocks().await?; + // Fill in any gaps between the block above and the finalized blocks reported. let block_subscription = subscribe_to_block_headers_filling_in_gaps( - client, + client.clone(), last_finalized_block_number, - client.rpc().subscribe_finalized_blocks().await?, + sub, ); Ok(EventSubscription::new(client, Box::pin(block_subscription))) @@ -89,16 +104,21 @@ pub async fn subscribe_finalized<'a, T: Config, Evs: Decode + 'static>( /// **Note:** This is exposed so that we can run integration tests on it, but otherwise /// should not be used directly and may break between minor releases. #[doc(hidden)] -pub fn subscribe_to_block_headers_filling_in_gaps<'a, S, E, T: Config>( - client: &'a Client, +pub fn subscribe_to_block_headers_filling_in_gaps( + client: Client, mut last_block_num: Option, sub: S, -) -> impl Stream> + Send + 'a +) -> impl Stream> + Send where - S: Stream> + Send + 'a, + Client: Into>, + S: Stream> + Send, E: Into + Send + 'static, + T: Config, { + let client = client.into(); sub.flat_map(move |s| { + let client = client.clone(); + // Get the header, or return a stream containing just the error. Our EventSubscription // stream will return `None` as soon as it hits an error like this. let header = match s { @@ -116,6 +136,7 @@ where // (which we already have the header info for): let previous_headers = stream::iter(start_block_num..end_block_num) .then(move |n| { + let client = client.clone(); async move { let hash = client.rpc().block_hash(Some(n.into())).await?; let header = client.rpc().header(hash).await?; @@ -135,7 +156,7 @@ where /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back /// in codegen from `subscribe_finalized`, and is exposed to be used in codegen. #[doc(hidden)] -pub type FinalizedEventSub<'a, Header> = BoxStream<'a, Result>; +pub type FinalizedEventSub
= BoxStream<'static, Result>; /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back /// in codegen from `subscribe`, and is exposed to be used in codegen. @@ -145,28 +166,28 @@ pub type EventSub = Subscription; /// A subscription to events that implements [`Stream`], and returns [`Events`] objects for each block. #[derive(Derivative)] #[derivative(Debug(bound = "Sub: std::fmt::Debug"))] -pub struct EventSubscription<'a, Sub, T: Config, Evs: 'static> { +pub struct EventSubscription { finished: bool, - client: &'a Client, + client: OnlineClient, block_header_subscription: Sub, #[derivative(Debug = "ignore")] at: Option< std::pin::Pin< - Box, BasicError>> + Send + 'a>, + Box, BasicError>> + Send>, >, >, _event_type: std::marker::PhantomData, } -impl<'a, Sub, T: Config, Evs: Decode, E: Into> - EventSubscription<'a, Sub, T, Evs> +impl> + EventSubscription where - Sub: Stream> + Unpin + 'a, + Sub: Stream> + Unpin, { - fn new(client: &'a Client, block_header_subscription: Sub) -> Self { + fn new(client: impl Into>, block_header_subscription: Sub) -> Self { EventSubscription { finished: false, - client, + client: client.into(), block_header_subscription, at: None, _event_type: std::marker::PhantomData, @@ -175,13 +196,13 @@ where /// Return only specific events matching the tuple of 1 or more event /// types that has been provided as the `Filter` type parameter. - pub fn filter_events(self) -> FilterEvents<'a, Self, T, Filter> { + pub fn filter_events(self) -> FilterEvents<'static, Self, T, Filter> { FilterEvents::new(self) } } impl<'a, T: Config, Sub: Unpin, Evs: Decode> Unpin - for EventSubscription<'a, Sub, T, Evs> + for EventSubscription { } @@ -202,11 +223,11 @@ impl<'a, T: Config, Sub: Unpin, Evs: Decode> Unpin // // The advantage of this manual implementation is that we have a named type that we (and others) // can derive things on, store away, alias etc. -impl<'a, Sub, T, Evs, E> Stream for EventSubscription<'a, Sub, T, Evs> +impl Stream for EventSubscription where T: Config, Evs: Decode, - Sub: Stream> + Unpin + 'a, + Sub: Stream> + Unpin, E: Into, { type Item = Result, BasicError>; diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 25f563c6cd..cdf580f64d 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -6,7 +6,7 @@ use crate::{ error::BasicError, - Client, + OnlineClient, Config, Event, Metadata, @@ -35,10 +35,17 @@ use std::sync::Arc; /// and is exposed only to be called via the codegen. Thus, prefer to use /// `api.events().at(block_hash)` over calling this directly. #[doc(hidden)] -pub async fn at( - client: &'_ Client, +pub async fn at( + client: Client, block_hash: T::Hash, -) -> Result, BasicError> { +) -> Result, BasicError> +where + Client: Into>, + T: Config, + Evs: Decode, +{ + let client = client.into(); + let mut event_bytes = client .rpc() .storage(&system_events_key(), Some(block_hash)) diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index cc9dba11ff..1944a7a341 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -263,24 +263,24 @@ mod test { #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventA(u8); impl crate::Event for EventA { - const PALLET: &'static str = "Test"; - const EVENT: &'static str = "A"; + fn pallet(&self) -> &str { "Test" } + fn event(&self) -> &str { "A" } } // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventB(bool); impl crate::Event for EventB { - const PALLET: &'static str = "Test"; - const EVENT: &'static str = "B"; + fn pallet(&self) -> &str { "Test" } + fn event(&self) -> &str { "B" } } // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventC(u8, bool); impl crate::Event for EventC { - const PALLET: &'static str = "Test"; - const EVENT: &'static str = "C"; + fn pallet(&self) -> &str { "Test" } + fn event(&self) -> &str { "C" } } // A stream of fake events for us to try filtering on. diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index 6d7b694738..b4af680596 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -20,6 +20,7 @@ mod params; mod signer; +mod submittable; pub use self::{ params::{ diff --git a/subxt/src/extrinsic/params.rs b/subxt/src/extrinsic/params.rs index 38dedbe1a8..51ed082fcf 100644 --- a/subxt/src/extrinsic/params.rs +++ b/subxt/src/extrinsic/params.rs @@ -20,7 +20,7 @@ pub use sp_runtime::generic::Era; /// "additional" parameters that are signed and used in transactions. /// see [`BaseExtrinsicParams`] for an implementation that is compatible with /// a Polkadot node. -pub trait ExtrinsicParams: Debug { +pub trait ExtrinsicParams: Debug { /// These parameters can be provided to the constructor along with /// some default parameters that `subxt` understands, in order to /// help construct your [`ExtrinsicParams`] object. diff --git a/subxt/src/extrinsic/submittable.rs b/subxt/src/extrinsic/submittable.rs new file mode 100644 index 0000000000..23d8021b0f --- /dev/null +++ b/subxt/src/extrinsic/submittable.rs @@ -0,0 +1,320 @@ +// 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. + +use futures::future; +pub use sp_runtime::traits::SignedExtension; +use sp_runtime::{ + traits::Hash, + ApplyExtrinsicResult, +}; + +use crate::{ + client::{ + OfflineClient, + OnlineClient, + }, + error::{ + BasicError, + HasModuleError, + }, + extrinsic::{ + ExtrinsicParams, + Signer, + }, + rpc::{ + Rpc, + RpcClient, + RuntimeVersion, + SystemProperties, + }, + storage::StorageClient, + transaction::TransactionProgress, + updates::UpdateClient, + Call, + Config, + Encoded, + Metadata, +}; +use codec::{ + Compact, + Decode, + Encode, +}; +use derivative::Derivative; +use parking_lot::RwLock; +use std::sync::Arc; + +/// A constructed call ready to be signed and submitted. +pub struct SubmittableExtrinsic { + call: C, + marker: std::marker::PhantomData<(Err, Evs)>, +} + +impl SubmittableExtrinsic +where + C: Call + Encode, + Evs: Decode, + Err: Decode + HasModuleError, +{ + /// Create a new [`SubmittableExtrinsic`]. + pub fn new(call: C) -> SubmittableExtrinsic { + SubmittableExtrinsic { + call, + marker: Default::default(), + } + } + + /// Creates and signs an extrinsic and submits it to the chain. Passes default parameters + /// to construct the "signed extra" and "additional" payloads needed by the extrinsic. + /// + /// Returns a [`TransactionProgress`], 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( + &self, + client: Client, + signer: &(dyn Signer + Send + Sync), + ) -> Result, BasicError> + where + Client: Into>, + >::OtherParams: Default, + T: Config, + { + self.sign_and_submit_then_watch(client, signer, Default::default()) + .await + } + + /// Creates and signs an extrinsic and submits it to the chain. + /// + /// Returns a [`TransactionProgress`], 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( + &self, + client: Client, + signer: &(dyn Signer + Send + Sync), + other_params: >::OtherParams, + ) -> Result, BasicError> + where + Client: Into>, + T: Config, + { + self.create_signed(client, signer, other_params) + .await? + .submit_and_watch() + .await + } + + /// Creates and signs an extrinsic and submits to the chain for block inclusion. Passes + /// default parameters to construct the "signed extra" and "additional" payloads needed + /// by the extrinsic. + /// + /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. + /// + /// # Note + /// + /// 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( + &self, + client: Client, + signer: &(dyn Signer + Send + Sync), + ) -> Result + where + Client: Into>, + >::OtherParams: Default, + T: Config, + { + self.sign_and_submit(client, signer, Default::default()).await + } + + /// Creates and signs an extrinsic and submits to the chain for block inclusion. + /// + /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. + /// + /// # Note + /// + /// 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( + &self, + client: Client, + signer: &(dyn Signer + Send + Sync), + other_params: >::OtherParams, + ) -> Result + where + Client: Into>, + T: Config, + { + self.create_signed(client, signer, other_params) + .await? + .submit() + .await + } + + /// Return the SCALE encoded bytes representing the call data of the transaction. + pub fn call_data(&self, client: Client) -> Result, BasicError> + where + Client: Into>, + T: Config, + { + let mut bytes = Vec::new(); + let metadata = client.into().metadata(); + let pallet = metadata.pallet(self.call.pallet())?; + bytes.push(pallet.index()); + bytes.push(pallet.call_index(self.call.function())?); + self.call.encode_to(&mut bytes); + Ok(bytes) + } + + /// Creates a returns a raw signed extrinsic, without submitting it. + pub async fn create_signed( + &self, + client: Client, + signer: &(dyn Signer + Send + Sync), + other_params: >::OtherParams, + ) -> Result, BasicError> + where + Client: Into>, + T: Config, + { + let client: OnlineClient = client.into(); + + // 1. Get nonce + let account_nonce = if let Some(nonce) = signer.nonce() { + nonce + } else { + client + .rpc() + .system_account_next_index(signer.account_id()) + .await? + }; + + // 2. SCALE encode call data to bytes (pallet u8, call u8, call params). + let call_data = Encoded(self.call_data(client.offline())?); + + // 3. Construct our custom additional/extra params. + let additional_and_extra_params = { + // Obtain spec version and transaction version from the runtime version of the client. + let runtime = client.runtime_version(); + >::new( + runtime.spec_version, + runtime.transaction_version, + account_nonce, + client.genesis_hash(), + other_params, + ) + }; + + tracing::debug!( + "additional_and_extra_params: {:?}", + additional_and_extra_params + ); + + // 4. Construct signature. This is compatible with the Encode impl + // for SignedPayload (which is this payload of bytes that we'd like) + // to sign. See: + // https://github.com/paritytech/substrate/blob/9a6d706d8db00abb6ba183839ec98ecd9924b1f8/primitives/runtime/src/generic/unchecked_extrinsic.rs#L215) + let signature = { + let mut bytes = Vec::new(); + call_data.encode_to(&mut bytes); + 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)) + } else { + signer.sign(&bytes) + } + }; + + tracing::info!("xt signature: {}", hex::encode(signature.encode())); + + // 5. Encode extrinsic, now that we have the parts we need. This is compatible + // with the Encode impl for UncheckedExtrinsic (protocol version 4). + let extrinsic = { + let mut encoded_inner = Vec::new(); + // "is signed" + transaction protocol version (4) + (0b10000000 + 4u8).encode_to(&mut encoded_inner); + // from address for signature + signer.address().encode_to(&mut encoded_inner); + // the signature bytes + signature.encode_to(&mut encoded_inner); + // attach custom extra params + additional_and_extra_params.encode_extra_to(&mut encoded_inner); + // and now, call data + call_data.encode_to(&mut encoded_inner); + // now, prefix byte length: + let len = Compact( + u32::try_from(encoded_inner.len()) + .expect("extrinsic size expected to be <4GB"), + ); + let mut encoded = Vec::new(); + len.encode_to(&mut encoded); + encoded.extend(encoded_inner); + encoded + }; + + // Wrap in Encoded to ensure that any more "encode" calls leave it in the right state. + // maybe we can just return the raw bytes.. + Ok(SignedSubmittableExtrinsic { + client: self.client.clone(), + encoded: Encoded(extrinsic), + marker: self.marker, + }) + } +} + +pub struct SignedSubmittableExtrinsic { + client: OnlineClient, + encoded: Encoded, + marker: std::marker::PhantomData<(Err, Evs)>, +} + +impl<'client, T, E, Evs> SignedSubmittableExtrinsic +where + T: Config, + E: Decode + HasModuleError, + Evs: Decode, +{ + /// Submits the extrinsic to the chain. + /// + /// Returns a [`TransactionProgress`], 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 submit_and_watch( + &self, + ) -> Result, BasicError> { + // Get a hash of the extrinsic (we'll need this later). + let ext_hash = T::Hashing::hash_of(&self.encoded); + + // Submit and watch for transaction progress. + let sub = self.client.rpc().watch_extrinsic(&self.encoded).await?; + + Ok(TransactionProgress::new(sub, self.client.clone(), ext_hash)) + } + + /// Submits the extrinsic to the chain for block inclusion. + /// + /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. + /// + /// # Note + /// + /// 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 submit(&self) -> Result { + self.client.rpc().submit_extrinsic(&self.encoded).await + } + + /// 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 { + self.client.rpc().dry_run(self.encoded(), at).await + } + + /// Returns the SCALE encoded extrinsic bytes. + pub fn encoded(&self) -> &[u8] { + &self.encoded.0 + } +} diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 245340ff10..8898262b91 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -233,9 +233,8 @@ pub mod updates; pub use crate::{ client::{ - Client, - ClientBuilder, - SubmittableExtrinsic, + OfflineClient, + OnlineClient, }, config::{ Config, @@ -296,16 +295,11 @@ pub use crate::{ /// /// When encoding an extrinsic, we use this information to know how to map /// the call to the specific pallet and call index needed by a particular node. -pub trait Call: Encode { +pub trait Call { /// Pallet name. - const PALLET: &'static str; - /// Function name. - const FUNCTION: &'static str; - - /// Returns true if the given pallet and function names match this call. - fn is_call(pallet: &str, function: &str) -> bool { - Self::PALLET == pallet && Self::FUNCTION == function - } + fn pallet(&self) -> &str; + /// Function/call name. + fn function(&self) -> &str; } /// Trait to uniquely identify the events's identity from the runtime metadata. @@ -314,16 +308,11 @@ pub trait Call: Encode { /// /// The trait is utilized to decode emitted events from a block, via obtaining the /// form of the `Event` from the metadata. -pub trait Event: Decode { +pub trait Event { /// Pallet name. - const PALLET: &'static str; - /// Event name. - const EVENT: &'static str; - - /// Returns true if the given pallet and event names match this event. - fn is_event(pallet: &str, event: &str) -> bool { - Self::PALLET == pallet && Self::EVENT == event - } + fn pallet(&self) -> &str; + /// Function/call name. + fn event(&self) -> &str; } /// Wraps an already encoded byte vector, prevents being encoded as a raw byte vector as part of diff --git a/subxt/src/metadata/encode_decode.rs b/subxt/src/metadata/encode_decode.rs new file mode 100644 index 0000000000..23bbbd472c --- /dev/null +++ b/subxt/src/metadata/encode_decode.rs @@ -0,0 +1,44 @@ +// 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. + +use super::Metadata; +use codec::{ + Error as DecodeError, + Encode, + Decode, +}; + +pub trait DecodeWithMetadata: Sized { + type Target; + /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. + fn decode_with_metadata(bytes: &[u8], type_id: u32, metadata: &Metadata) -> Result; +} + +pub trait EncodeWithMetadata { + /// Given some metadata and a type ID, attempt to SCALE encode `Self` to the provided bytes. + fn encode_to_with_metadata(&self, type_id: u32, metadata: &Metadata, out: &mut Vec); + + /// Given some metadata and a type ID, attempt to SCALE encode `Self` and return the resulting bytes. + fn encode_with_metadata(&self, type_id: u32, metadata: &Metadata) { + let mut out = Vec::new(); + self.encode_to_with_metadata(type_id, metadata, &mut out) + } +} + +/// A wrapper which implements [`DecodeWithMetadata`] if the inner type implements [`Decode`], +/// and [`EncodeWithMetadata`] if the inner type implements [`Encode`]. +pub struct EncodeDecodeWrapper(T); + +impl EncodeWithMetadata for EncodeDecodeWrapper { + fn encode_to_with_metadata(&self, _type_id: u32, _metadata: &Metadata, out: &mut Vec) { + self.0.encode_to(out) + } +} + +impl DecodeWithMetadata for EncodeDecodeWrapper { + type Target = T; + fn decode_with_metadata(bytes: &[u8], type_id: u32, metadata: &Metadata) -> Result { + T::decode(&mut bytes) + } +} \ No newline at end of file diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index fe0fea1dc2..a047c78407 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -3,7 +3,6 @@ // see LICENSE for license details. use super::hash_cache::HashCache; -use crate::Call; use codec::Error as CodecError; use frame_metadata::{ PalletConstantMetadata, @@ -139,16 +138,18 @@ impl Metadata { } /// Obtain the unique hash for a specific storage entry. - pub fn storage_hash( + pub fn storage_hash( &self, + pallet: &str, + storage: &str, ) -> Result<[u8; 32], MetadataError> { self.inner .cached_storage_hashes - .get_or_insert(S::PALLET, S::STORAGE, || { + .get_or_insert(pallet, storage, || { subxt_metadata::get_storage_hash( &self.inner.metadata, - S::PALLET, - S::STORAGE, + pallet, + storage, ) .map_err(|e| { match e { @@ -183,14 +184,18 @@ impl Metadata { } /// Obtain the unique hash for a call. - pub fn call_hash(&self) -> Result<[u8; 32], MetadataError> { + pub fn call_hash( + &self, + pallet: &str, + function: &str, + ) -> Result<[u8; 32], MetadataError> { self.inner .cached_call_hashes - .get_or_insert(C::PALLET, C::FUNCTION, || { + .get_or_insert(pallet, function, || { subxt_metadata::get_call_hash( &self.inner.metadata, - C::PALLET, - C::FUNCTION, + pallet, + function, ) .map_err(|e| { match e { @@ -240,13 +245,11 @@ impl PalletMetadata { /// Attempt to resolve a call into an index in this pallet, failing /// if the call is not found in this pallet. - pub fn call_index(&self) -> Result - where - C: Call, + pub fn call_index(&self, function: &str) -> Result { let fn_index = *self .calls - .get(C::FUNCTION) + .get(function) .ok_or(MetadataError::CallNotFound)?; Ok(fn_index) } @@ -553,14 +556,7 @@ mod tests { fn metadata_call_inner_cache() { let metadata = load_metadata(); - #[derive(codec::Encode)] - struct ValidCall; - impl crate::Call for ValidCall { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "fill_block"; - } - - let hash = metadata.call_hash::(); + let hash = metadata.call_hash("System", "fill_block"); let mut call_number = 0; let hash_cached = metadata.inner.cached_call_hashes.get_or_insert( @@ -614,7 +610,7 @@ mod tests { } } - let hash = metadata.storage_hash::(); + let hash = metadata.storage_hash("System", "Account"); let mut call_number = 0; let hash_cached = metadata.inner.cached_storage_hashes.get_or_insert( diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index 23d6eaf7bc..dbf7c062d8 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -2,6 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +mod encode_decode; mod hash_cache; mod metadata_type; diff --git a/subxt/src/transaction.rs b/subxt/src/transaction.rs index f90307e1cb..e0254f3097 100644 --- a/subxt/src/transaction.rs +++ b/subxt/src/transaction.rs @@ -4,13 +4,15 @@ use std::task::Poll; -use crate::PhantomDataSendSync; +use crate::{PhantomDataSendSync, extrinsic::ExtrinsicParams}; use codec::Decode; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; use crate::{ - client::Client, + client::{ + OnlineClient, + }, error::{ BasicError, Error, @@ -43,30 +45,30 @@ use jsonrpsee::core::{ /// returned from [`crate::SubmittableExtrinsic::sign_and_submit_then_watch()`]. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionProgress<'client, T: Config, E, Evs> { +pub struct TransactionProgress { sub: Option>>, ext_hash: T::Hash, - client: &'client Client, - _error: PhantomDataSendSync<(E, Evs)>, + client: OnlineClient, + _error: PhantomDataSendSync<(Err, Evs)>, } // The above type is not `Unpin` by default unless the generic param `T` is, // so we manually make it clear that Unpin is actually fine regardless of `T` // (we don't care if this moves around in memory while it's "pinned"). -impl<'client, T: Config, E, Evs> Unpin for TransactionProgress<'client, T, E, Evs> {} +impl Unpin for TransactionProgress {} -impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> - TransactionProgress<'client, T, E, Evs> +impl + TransactionProgress { /// Instantiate a new [`TransactionProgress`] from a custom subscription. pub fn new( sub: RpcSubscription>, - client: &'client Client, + client: impl Into>, ext_hash: T::Hash, ) -> Self { Self { sub: Some(sub), - client, + client: client.into(), ext_hash, _error: PhantomDataSendSync::new(), } @@ -77,7 +79,7 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> /// avoid importing that trait if you don't otherwise need it. pub async fn next_item( &mut self, - ) -> Option, BasicError>> { + ) -> Option, BasicError>> { self.next().await } @@ -94,7 +96,7 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_in_block( mut self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. @@ -124,7 +126,7 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized( mut self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. @@ -153,16 +155,16 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized_success( self, - ) -> Result, Error> { + ) -> Result, Error> { let evs = self.wait_for_finalized().await?.wait_for_success().await?; Ok(evs) } } -impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> Stream - for TransactionProgress<'client, T, E, Evs> +impl Stream + for TransactionProgress { - type Item = Result, BasicError>; + type Item = Result, BasicError>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -271,7 +273,7 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> Stream /// or that finality gadget is lagging behind. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub enum TransactionStatus<'client, T: Config, E: Decode, Evs: Decode> { +pub enum TransactionStatus { /// The transaction is part of the "future" queue. Future, /// The transaction is part of the "ready" queue. @@ -279,7 +281,7 @@ pub enum TransactionStatus<'client, T: Config, E: Decode, Evs: Decode> { /// The transaction has been broadcast to the given peers. Broadcast(Vec), /// The transaction has been included in a block with given hash. - InBlock(TransactionInBlock<'client, T, E, Evs>), + InBlock(TransactionInBlock), /// The block this transaction was included in has been retracted, /// probably because it did not make it onto the blocks which were /// finalized. @@ -288,7 +290,7 @@ pub enum TransactionStatus<'client, T: Config, E: Decode, Evs: Decode> { /// blocks, and so the subscription has ended. FinalityTimeout(T::Hash), /// The transaction has been finalized by a finality-gadget, e.g GRANDPA. - Finalized(TransactionInBlock<'client, T, E, Evs>), + Finalized(TransactionInBlock), /// The transaction has been replaced in the pool by another transaction /// that provides the same tags. (e.g. same (sender, nonce)). Usurped(T::Hash), @@ -298,10 +300,10 @@ pub enum TransactionStatus<'client, T: Config, E: Decode, Evs: Decode> { Invalid, } -impl<'client, T: Config, E: Decode, Evs: Decode> TransactionStatus<'client, T, E, Evs> { +impl TransactionStatus { /// A convenience method to return the `Finalized` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::Finalized`]. - pub fn as_finalized(&self) -> Option<&TransactionInBlock<'client, T, E, Evs>> { + pub fn as_finalized(&self) -> Option<&TransactionInBlock> { match self { Self::Finalized(val) => Some(val), _ => None, @@ -310,7 +312,7 @@ impl<'client, T: Config, E: Decode, Evs: Decode> TransactionStatus<'client, T, E /// A convenience method to return the `InBlock` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::InBlock`]. - pub fn as_in_block(&self) -> Option<&TransactionInBlock<'client, T, E, Evs>> { + pub fn as_in_block(&self) -> Option<&TransactionInBlock> { match self { Self::InBlock(val) => Some(val), _ => None, @@ -321,20 +323,20 @@ impl<'client, T: Config, E: Decode, Evs: Decode> TransactionStatus<'client, T, E /// This struct represents a transaction that has made it into a block. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionInBlock<'client, T: Config, E: Decode, Evs: Decode> { +pub struct TransactionInBlock { block_hash: T::Hash, ext_hash: T::Hash, - client: &'client Client, + client: OnlineClient, _error: PhantomDataSendSync<(E, Evs)>, } -impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> - TransactionInBlock<'client, T, E, Evs> +impl + TransactionInBlock { pub(crate) fn new( block_hash: T::Hash, ext_hash: T::Hash, - client: &'client Client, + client: OnlineClient, ) -> Self { Self { block_hash, @@ -367,18 +369,17 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn wait_for_success(&self) -> Result, Error> { + pub async fn wait_for_success(&self) -> Result, Error> { let events = self.fetch_events().await?; // Try to find any errors; return the first one we encounter. for ev in events.iter_raw() { let ev = ev?; if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { - let dispatch_error = E::decode(&mut &*ev.bytes)?; + let dispatch_error = Err::decode(&mut &*ev.bytes)?; if let Some(error_data) = dispatch_error.module_error_data() { // Error index is utilized as the first byte from the error array. - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); + let metadata = self.client.metadata(); let details = metadata .error(error_data.pallet_index, error_data.error_index())?; return Err(Error::Module(ModuleError { @@ -420,7 +421,7 @@ impl<'client, T: Config, E: Decode + HasModuleError, Evs: Decode> // extrinsic, the extrinsic should be in there somewhere.. .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; - let events = events::at::(self.client, self.block_hash).await?; + let events = events::at::<_, T, Evs>(self.client.clone(), self.block_hash).await?; Ok(TransactionEvents { ext_hash: self.ext_hash, From f1f65d94984f024ae2841305829a07ad39d22bb8 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 1 Jul 2022 08:57:18 +0100 Subject: [PATCH 02/75] debug impls --- subxt/src/client/offline_client.rs | 2 ++ subxt/src/client/online_client.rs | 9 +++++++++ subxt/src/events/events_type.rs | 25 ++++++++----------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 29a1ff782f..90d493336f 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -18,6 +18,8 @@ pub struct OfflineClient { inner: Arc> } +#[derive(Derivative)] +#[derivative(Debug(bound = ""), Clone(bound = ""))] struct Inner { genesis_hash: T::Hash, runtime_version: RuntimeVersion, diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 3d9bf4e463..31bd979976 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -41,6 +41,15 @@ pub struct OnlineClient { rpc: Rpc, } +impl std::fmt::Debug for OnlineClient { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Client") + .field("rpc", &"") + .field("inner", &self.inner) + .finish() + } +} + impl OnlineClient { /// Construct a new [`OnlineClient`] using default settings which /// point to a locally running node on `ws://127.0.0.1:9944`. diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index cdf580f64d..ff3a429b15 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -86,7 +86,7 @@ fn system_events_key() -> StorageKey { #[derive(Derivative)] #[derivative(Debug(bound = ""))] pub struct Events { - metadata: Arc>, + metadata: Metadata, block_hash: T::Hash, // Note; raw event bytes are prefixed with a Compact containing // the number of events to be decoded. We should have stripped that off @@ -178,11 +178,7 @@ impl<'a, T: Config, Evs: Decode> Events { ) -> impl Iterator> + '_ { let event_bytes = &self.event_bytes; - let metadata = { - let metadata = self.metadata.read(); - metadata.clone() - }; - + let metadata = self.metadata.clone(); let mut pos = 0; let mut index = 0; std::iter::from_fn(move || { @@ -228,11 +224,7 @@ impl<'a, T: Config, Evs: Decode> Events { ) -> impl Iterator> + 'a { let mut pos = 0; let mut index = 0; - let metadata = { - let metadata = self.metadata.read(); - metadata.clone() - }; - + let metadata = self.metadata.clone(); std::iter::from_fn(move || { let cursor = &mut &self.event_bytes[pos..]; let start_len = cursor.len(); @@ -481,7 +473,7 @@ pub(crate) mod test_utils { /// Build an `Events` object for test purposes, based on the details provided, /// and with a default block hash. pub fn events( - metadata: Arc>, + metadata: Metadata, event_records: Vec>, ) -> Events> { let num_events = event_records.len() as u32; @@ -495,7 +487,7 @@ pub(crate) mod test_utils { /// Much like [`events`], but takes pre-encoded events and event count, so that we can /// mess with the bytes in tests if we need to. pub fn events_raw( - metadata: Arc>, + metadata: Metadata, event_bytes: Vec, num_events: u32, ) -> Events> { @@ -526,8 +518,8 @@ mod tests { use scale_value::Value; /// Build a fake wrapped metadata. - fn metadata() -> Arc> { - Arc::new(RwLock::new(test_utils::metadata::())) + fn metadata() -> Metadata { + test_utils::metadata::() } /// [`RawEventDetails`] can be annoying to test, because it contains @@ -549,11 +541,10 @@ mod tests { pub fn assert_raw_events_match( // Just for convenience, pass in the metadata type constructed // by the `metadata` function above to simplify caller code. - metadata: &Arc>, + metadata: &Metadata, actual: RawEventDetails, expected: TestRawEventDetails, ) { - let metadata = metadata.read(); let types = &metadata.runtime_metadata().types; // Make sure that the bytes handed back line up with the fields handed back; From bee829be68c21293e175c605cfbb27f376e442b2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 1 Jul 2022 12:35:06 +0100 Subject: [PATCH 03/75] Get main crate compiling with first round of changes --- subxt/src/error.rs | 7 +- subxt/src/events/event_subscription.rs | 2 +- subxt/src/events/filter_events.rs | 20 +++--- subxt/src/extrinsic/submittable.rs | 22 +++--- subxt/src/lib.rs | 26 ++++--- subxt/src/metadata/encode_decode.rs | 94 +++++++++++++++++++------- subxt/src/metadata/metadata_type.rs | 30 ++++++-- subxt/src/metadata/mod.rs | 5 ++ subxt/src/transaction.rs | 6 +- 9 files changed, 147 insertions(+), 65 deletions(-) diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 6e870e282b..03dbe714a6 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -8,7 +8,12 @@ use crate::metadata::{ }; use core::fmt::Debug; use jsonrpsee::core::error::Error as RequestError; -use scale_value::scale::DecodeError; +use scale_value::{ + scale::{ + DecodeError, + EncodeError, + } +}; use sp_core::crypto::SecretStringError; use sp_runtime::transaction_validity::TransactionValidityError; diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 9a13d50d70..048ddf98a3 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -256,7 +256,7 @@ where Some(Ok(block_header)) => { // Note [jsdw]: We may be able to get rid of the per-item allocation // with https://github.com/oblique/reusable-box-future. - self.at = Some(Box::pin(at(self.client, block_header.hash()))); + self.at = Some(Box::pin(at(self.client.clone(), block_header.hash()))); // Continue, so that we poll this function future we've just created. } } diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index 1944a7a341..a53ed1fd45 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -263,29 +263,29 @@ mod test { #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventA(u8); impl crate::Event for EventA { - fn pallet(&self) -> &str { "Test" } - fn event(&self) -> &str { "A" } + const PALLET: &'static str = "Test"; + const EVENT: &'static str = "A"; } // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventB(bool); impl crate::Event for EventB { - fn pallet(&self) -> &str { "Test" } - fn event(&self) -> &str { "B" } + const PALLET: &'static str = "Test"; + const EVENT: &'static str = "B"; } // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventC(u8, bool); impl crate::Event for EventC { - fn pallet(&self) -> &str { "Test" } - fn event(&self) -> &str { "C" } + const PALLET: &'static str = "Test"; + const EVENT: &'static str = "C"; } // A stream of fake events for us to try filtering on. fn events_stream( - metadata: Arc>, + metadata: Metadata, ) -> impl Stream>, BasicError>> { stream::iter(vec![ @@ -317,7 +317,7 @@ mod test { #[tokio::test] async fn filter_one_event_from_stream() { - let metadata = Arc::new(RwLock::new(metadata::())); + let metadata = metadata::(); // Filter out fake event stream to select events matching `EventA` only. let actual: Vec<_> = @@ -349,7 +349,7 @@ mod test { #[tokio::test] async fn filter_some_events_from_stream() { - let metadata = Arc::new(RwLock::new(metadata::())); + let metadata = metadata::(); // Filter out fake event stream to select events matching `EventA` or `EventB`. let actual: Vec<_> = FilterEvents::<_, DefaultConfig, (EventA, EventB)>::new( @@ -397,7 +397,7 @@ mod test { #[tokio::test] async fn filter_no_events_from_stream() { - let metadata = Arc::new(RwLock::new(metadata::())); + let metadata = metadata::(); // Filter out fake event stream to select events matching `EventC` (none exist). let actual: Vec<_> = diff --git a/subxt/src/extrinsic/submittable.rs b/subxt/src/extrinsic/submittable.rs index 23d8021b0f..54c8230a74 100644 --- a/subxt/src/extrinsic/submittable.rs +++ b/subxt/src/extrinsic/submittable.rs @@ -22,6 +22,9 @@ use crate::{ ExtrinsicParams, Signer, }, + metadata::{ + EncodeWithMetadata, + }, rpc::{ Rpc, RpcClient, @@ -41,6 +44,7 @@ use codec::{ Decode, Encode, }; +use std::borrow::Cow; use derivative::Derivative; use parking_lot::RwLock; use std::sync::Arc; @@ -53,12 +57,13 @@ pub struct SubmittableExtrinsic { impl SubmittableExtrinsic where - C: Call + Encode, + C: EncodeWithMetadata, Evs: Decode, Err: Decode + HasModuleError, { - /// Create a new [`SubmittableExtrinsic`]. - pub fn new(call: C) -> SubmittableExtrinsic { + /// Create a new [`SubmittableExtrinsic`], given some call data that can be SCALE + /// encoded with the help of our [`Metadata`]. + pub fn new(call: C) -> Self { SubmittableExtrinsic { call, marker: Default::default(), @@ -157,12 +162,9 @@ where Client: Into>, T: Config, { - let mut bytes = Vec::new(); - let metadata = client.into().metadata(); - let pallet = metadata.pallet(self.call.pallet())?; - bytes.push(pallet.index()); - bytes.push(pallet.call_index(self.call.function())?); - self.call.encode_to(&mut bytes); + let client = client.into(); + let metadata = client.metadata(); + let bytes = self.call.encode_with_metadata(metadata)?; Ok(bytes) } @@ -256,7 +258,7 @@ where // Wrap in Encoded to ensure that any more "encode" calls leave it in the right state. // maybe we can just return the raw bytes.. Ok(SignedSubmittableExtrinsic { - client: self.client.clone(), + client, encoded: Encoded(extrinsic), marker: self.marker, }) diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 8898262b91..0a4fb99d19 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -295,11 +295,16 @@ pub use crate::{ /// /// When encoding an extrinsic, we use this information to know how to map /// the call to the specific pallet and call index needed by a particular node. -pub trait Call { +pub trait Call: Encode { /// Pallet name. - fn pallet(&self) -> &str; - /// Function/call name. - fn function(&self) -> &str; + const PALLET: &'static str; + /// Function name. + const FUNCTION: &'static str; + + /// Returns true if the given pallet and function names match this call. + fn is_call(pallet: &str, function: &str) -> bool { + Self::PALLET == pallet && Self::FUNCTION == function + } } /// Trait to uniquely identify the events's identity from the runtime metadata. @@ -308,11 +313,16 @@ pub trait Call { /// /// The trait is utilized to decode emitted events from a block, via obtaining the /// form of the `Event` from the metadata. -pub trait Event { +pub trait Event: Decode { /// Pallet name. - fn pallet(&self) -> &str; - /// Function/call name. - fn event(&self) -> &str; + const PALLET: &'static str; + /// Event name. + const EVENT: &'static str; + + /// Returns true if the given pallet and event names match this event. + fn is_event(pallet: &str, event: &str) -> bool { + Self::PALLET == pallet && Self::EVENT == event + } } /// Wraps an already encoded byte vector, prevents being encoded as a raw byte vector as part of diff --git a/subxt/src/metadata/encode_decode.rs b/subxt/src/metadata/encode_decode.rs index 23bbbd472c..c31131a14f 100644 --- a/subxt/src/metadata/encode_decode.rs +++ b/subxt/src/metadata/encode_decode.rs @@ -2,43 +2,87 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use super::Metadata; +use super::{ + Metadata, + MetadataError, +}; +use crate::{ + error::BasicError, +}; use codec::{ - Error as DecodeError, Encode, - Decode, }; -pub trait DecodeWithMetadata: Sized { - type Target; - /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. - fn decode_with_metadata(bytes: &[u8], type_id: u32, metadata: &Metadata) -> Result; -} - pub trait EncodeWithMetadata { - /// Given some metadata and a type ID, attempt to SCALE encode `Self` to the provided bytes. - fn encode_to_with_metadata(&self, type_id: u32, metadata: &Metadata, out: &mut Vec); + /// Given some metadata, attempt to SCALE encode `Self` to the provided bytes. + fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError>; - /// Given some metadata and a type ID, attempt to SCALE encode `Self` and return the resulting bytes. - fn encode_with_metadata(&self, type_id: u32, metadata: &Metadata) { + /// Given some metadata, attempt to SCALE encode `Self` and return the resulting bytes. + fn encode_with_metadata(&self, metadata: &Metadata) -> Result, BasicError> { let mut out = Vec::new(); - self.encode_to_with_metadata(type_id, metadata, &mut out) + self.encode_to_with_metadata(metadata, &mut out)?; + Ok(out) } } -/// A wrapper which implements [`DecodeWithMetadata`] if the inner type implements [`Decode`], -/// and [`EncodeWithMetadata`] if the inner type implements [`Encode`]. -pub struct EncodeDecodeWrapper(T); +/// A wrapper which implements [`EncodeWithMetadata`] if the data provided implements [`Encode`]. +pub struct EncodeStaticCall { + pub pallet: &'static str, + pub call: &'static str, + pub data: T, +} + +impl EncodeWithMetadata for EncodeStaticCall { + fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError> { + let pallet = metadata.pallet(self.pallet)?; + let pallet_index = pallet.index(); + let call_index = pallet.call_index(self.call)?; -impl EncodeWithMetadata for EncodeDecodeWrapper { - fn encode_to_with_metadata(&self, _type_id: u32, _metadata: &Metadata, out: &mut Vec) { - self.0.encode_to(out) + pallet_index.encode_to(out); + call_index.encode_to(out); + self.data.encode_to(out); + Ok(()) } } -impl DecodeWithMetadata for EncodeDecodeWrapper { - type Target = T; - fn decode_with_metadata(bytes: &[u8], type_id: u32, metadata: &Metadata) -> Result { - T::decode(&mut bytes) +/// A wrapper which allows dynamic Value types to be SCALE encoded via [`EncodeWithMetadata`]. +pub struct EncodeDynamicCall { + pub pallet: &'static str, + pub call: &'static str, + pub data: Vec, +} + +impl EncodeWithMetadata for EncodeDynamicCall { + fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError> { + let pallet = metadata.pallet(self.pallet)?; + let pallet_index = pallet.index(); + let call_ty = pallet + .call_ty_id() + .ok_or_else(|| MetadataError::CallNotFound)?; + + // Assemble the variant representing the specific call within the pallet. + // (we could do this ourselves a little more efficiently but it's easier + // reusing scale_value logic). + let composite = scale_value::Composite::Unnamed(self.data.clone()); + let variant = scale_value::Value::variant(self.call, composite); + + // Encode the pallet index and call variant+data: + pallet_index.encode_to(out); + scale_value::scale::encode_as_type(variant, call_ty, metadata.types(), out) + .map_err(|e| e.to_string())?; + Ok(()) } -} \ No newline at end of file +} + +// pub trait DecodeWithMetadata: Sized { +// type Target; +// /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. +// fn decode_with_metadata(bytes: &[u8], type_id: u32, metadata: &Metadata) -> Result; +// } +// +// impl DecodeWithMetadata for EncodeDecodeStaticCall { +// type Target = T; +// fn decode_with_metadata(mut bytes: &[u8], _type_id: u32, _metadata: &Metadata) -> Result { +// T::decode(&mut bytes) +// } +// } \ No newline at end of file diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index a047c78407..fa89ee01bb 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -17,6 +17,7 @@ use scale_info::{ form::PortableForm, Type, Variant, + PortableRegistry, }; use std::{ collections::HashMap, @@ -92,7 +93,7 @@ pub struct Metadata { impl Metadata { /// Returns a reference to [`PalletMetadata`]. - pub fn pallet(&self, name: &'static str) -> Result<&PalletMetadata, MetadataError> { + pub fn pallet(&self, name: &str) -> Result<&PalletMetadata, MetadataError> { self.inner .pallets .get(name) @@ -127,6 +128,11 @@ impl Metadata { Ok(error) } + /// Return the type registry embedded within the metadata. + pub fn types(&self) -> &PortableRegistry { + &self.inner.metadata.types + } + /// Resolve a type definition. pub fn resolve_type(&self, id: u32) -> Option<&Type> { self.inner.metadata.types.resolve(id) @@ -227,7 +233,8 @@ impl Metadata { pub struct PalletMetadata { index: u8, name: String, - calls: HashMap, + call_indexes: HashMap, + call_ty_id: Option, storage: HashMap>, constants: HashMap>, } @@ -243,12 +250,18 @@ impl PalletMetadata { self.index } + /// If calls exist for this pallet, this returns the type ID of the variant + /// representing the different possible calls. + pub fn call_ty_id(&self) -> Option { + self.call_ty_id + } + /// Attempt to resolve a call into an index in this pallet, failing /// if the call is not found in this pallet. pub fn call_index(&self, function: &str) -> Result { let fn_index = *self - .calls + .call_indexes .get(function) .ok_or(MetadataError::CallNotFound)?; Ok(fn_index) @@ -369,14 +382,16 @@ impl TryFrom for Metadata { .pallets .iter() .map(|pallet| { - let calls = pallet.calls.as_ref().map_or(Ok(HashMap::new()), |call| { + let call_ty_id = pallet.calls.as_ref().map(|c| c.ty.id()); + + let call_indexes = pallet.calls.as_ref().map_or(Ok(HashMap::new()), |call| { let type_def_variant = get_type_def_variant(call.ty.id())?; - let calls = type_def_variant + let call_indexes = type_def_variant .variants() .iter() .map(|v| (v.name().clone(), v.index())) .collect(); - Ok(calls) + Ok(call_indexes) })?; let storage = pallet.storage.as_ref().map_or(HashMap::new(), |storage| { @@ -396,7 +411,8 @@ impl TryFrom for Metadata { let pallet_metadata = PalletMetadata { index: pallet.index, name: pallet.name.to_string(), - calls, + call_indexes, + call_ty_id, storage, constants, }; diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index dbf7c062d8..f7f4020e3c 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -14,3 +14,8 @@ pub use metadata_type::{ MetadataError, PalletMetadata, }; + +pub use encode_decode::{ + EncodeStaticCall, + EncodeWithMetadata, +}; diff --git a/subxt/src/transaction.rs b/subxt/src/transaction.rs index e0254f3097..40570d3f2d 100644 --- a/subxt/src/transaction.rs +++ b/subxt/src/transaction.rs @@ -4,7 +4,7 @@ use std::task::Poll; -use crate::{PhantomDataSendSync, extrinsic::ExtrinsicParams}; +use crate::PhantomDataSendSync; use codec::Decode; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; @@ -188,7 +188,7 @@ impl Stream TransactionStatus::InBlock(TransactionInBlock::new( hash, self.ext_hash, - self.client, + self.client.clone(), )) } SubstrateTransactionStatus::Retracted(hash) => { @@ -217,7 +217,7 @@ impl Stream TransactionStatus::Finalized(TransactionInBlock::new( hash, self.ext_hash, - self.client, + self.client.clone(), )) } } From 5335b3af61b43f2d4ed82a7698b810699e5c6938 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 1 Jul 2022 13:45:06 +0100 Subject: [PATCH 04/75] Some tidy up --- subxt/src/client/online_client.rs | 10 - subxt/src/client_OLD.rs | 503 ----------------------------- subxt/src/error.rs | 1 - subxt/src/events/events_type.rs | 2 - subxt/src/events/filter_events.rs | 2 - subxt/src/extrinsic/mod.rs | 4 + subxt/src/extrinsic/submittable.rs | 23 +- 7 files changed, 8 insertions(+), 537 deletions(-) delete mode 100644 subxt/src/client_OLD.rs diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 31bd979976..ecd83ee371 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -10,8 +10,6 @@ use super::{ use futures::future; use crate::{ Config, - Call, - Encoded, rpc::{ Rpc, RpcClient, @@ -20,16 +18,8 @@ use crate::{ error::{ BasicError, }, - extrinsic::{ - Signer, - ExtrinsicParams, - }, Metadata, }; -use codec::{ - Compact, - Encode, -}; use derivative::Derivative; /// A client capable of perfomring offline or online operations. This diff --git a/subxt/src/client_OLD.rs b/subxt/src/client_OLD.rs deleted file mode 100644 index 674a612f1f..0000000000 --- a/subxt/src/client_OLD.rs +++ /dev/null @@ -1,503 +0,0 @@ -// 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. - -use futures::future; -pub use sp_runtime::traits::SignedExtension; -use sp_runtime::{ - traits::Hash, - ApplyExtrinsicResult, -}; - -use crate::{ - error::{ - BasicError, - HasModuleError, - }, - extrinsic::{ - ExtrinsicParams, - Signer, - }, - rpc::{ - Rpc, - RpcClient, - RuntimeVersion, - SystemProperties, - }, - storage::StorageClient, - transaction::TransactionProgress, - updates::UpdateClient, - Call, - Config, - Encoded, - Metadata, -}; -use codec::{ - Compact, - Decode, - Encode, -}; -use derivative::Derivative; -use parking_lot::RwLock; -use std::sync::Arc; - -/// ClientBuilder for constructing a Client. -#[derive(Default)] -pub struct ClientBuilder { - url: Option, - client: Option, - metadata: Option, - page_size: Option, -} - -impl ClientBuilder { - /// Creates a new ClientBuilder. - pub fn new() -> Self { - Self { - url: None, - client: None, - metadata: None, - page_size: None, - } - } - - /// Sets the jsonrpsee client. - pub fn set_client>(mut self, client: C) -> Self { - self.client = Some(client.into()); - self - } - - /// Set the substrate rpc address. - pub fn set_url>(mut self, url: P) -> Self { - self.url = Some(url.into()); - self - } - - /// Set the page size. - pub fn set_page_size(mut self, size: u32) -> Self { - self.page_size = Some(size); - self - } - - /// Set the metadata. - /// - /// *Note:* Metadata will no longer be downloaded from the runtime node. - #[cfg(feature = "integration-tests")] - pub fn set_metadata(mut self, metadata: Metadata) -> Self { - self.metadata = Some(metadata); - self - } - - /// Builder for [Client]. - /// - /// # Examples - /// - /// ```no_run - /// use subxt::{ClientBuilder, DefaultConfig}; - /// - /// #[tokio::main] - /// async fn main() { - /// // Build the client. - /// let client = ClientBuilder::new() - /// .set_url("wss://rpc.polkadot.io:443") - /// .build::() - /// .await - /// .unwrap(); - /// // Use the client... - /// } - /// ``` - pub async fn build(self) -> Result, BasicError> { - let client = if let Some(client) = self.client { - client - } else { - let url = self.url.as_deref().unwrap_or("ws://127.0.0.1:9944"); - crate::rpc::ws_client(url).await? - }; - let rpc = Rpc::new(client); - let (genesis_hash, runtime_version, properties) = future::join3( - rpc.genesis_hash(), - rpc.runtime_version(None), - rpc.system_properties(), - ) - .await; - - let metadata = if let Some(metadata) = self.metadata { - metadata - } else { - rpc.metadata().await? - }; - - Ok(Client { - rpc, - genesis_hash: genesis_hash?, - metadata: Arc::new(RwLock::new(metadata)), - properties: properties.unwrap_or_else(|_| Default::default()), - runtime_version: Arc::new(RwLock::new(runtime_version?)), - iter_page_size: self.page_size.unwrap_or(10), - }) - } -} - -/// Client to interface with a substrate node. -#[derive(Derivative)] -#[derivative(Clone(bound = ""))] -pub struct Client { - rpc: Rpc, - genesis_hash: T::Hash, - metadata: Arc>, - properties: SystemProperties, - runtime_version: Arc>, - iter_page_size: u32, -} - -impl std::fmt::Debug for Client { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("Client") - .field("rpc", &"") - .field("genesis_hash", &self.genesis_hash) - .field("metadata", &"") - .field("events_decoder", &"") - .field("properties", &self.properties) - .field("runtime_version", &self.runtime_version) - .field("iter_page_size", &self.iter_page_size) - .finish() - } -} - -impl Client { - /// Returns the genesis hash. - pub fn genesis(&self) -> &T::Hash { - &self.genesis_hash - } - - /// Returns the chain metadata. - pub fn metadata(&self) -> Arc> { - Arc::clone(&self.metadata) - } - - /// Returns the properties defined in the chain spec as a JSON object. - /// - /// # Note - /// - /// Many chains use this to define common properties such as `token_decimals` and `token_symbol` - /// required for UIs, but this is merely a convention. It is up to the library user to - /// deserialize the JSON into the appropriate type or otherwise extract the properties defined - /// in the target chain's spec. - pub fn properties(&self) -> &SystemProperties { - &self.properties - } - - /// Returns the rpc client. - pub fn rpc(&self) -> &Rpc { - &self.rpc - } - - /// Create a client for accessing runtime storage - pub fn storage(&self) -> StorageClient { - StorageClient::new(&self.rpc, self.metadata(), self.iter_page_size) - } - - /// Create a wrapper for performing runtime updates on this client. - /// - /// # Note - /// - /// The update client is intended to be used in the background for - /// performing runtime updates, while the API is still in use. - /// Without performing runtime updates the submitted extrinsics may fail. - /// - /// # Examples - /// - /// ```no_run - /// # use subxt::{ClientBuilder, DefaultConfig}; - /// # - /// # #[tokio::main] - /// # async fn main() { - /// # let client = ClientBuilder::new() - /// # .set_url("wss://rpc.polkadot.io:443") - /// # .build::() - /// # .await - /// # .unwrap(); - /// # - /// let update_client = client.updates(); - /// // Spawn a new background task to handle runtime updates. - /// tokio::spawn(async move { - /// let result = update_client.perform_runtime_updates().await; - /// println!("Runtime update finished with result={:?}", result); - /// }); - /// # } - /// ``` - pub fn updates(&self) -> UpdateClient { - UpdateClient::new( - self.rpc.clone(), - self.metadata(), - self.runtime_version.clone(), - ) - } - - /// Convert the client to a runtime api wrapper for custom runtime access. - /// - /// The `subxt` proc macro will provide methods to submit extrinsics and read storage specific - /// to the target runtime. - pub fn to_runtime_api>(self) -> R { - self.into() - } - - /// Returns the client's Runtime Version. - pub fn runtime_version(&self) -> Arc> { - Arc::clone(&self.runtime_version) - } -} - -/// A constructed call ready to be signed and submitted. -pub struct SubmittableExtrinsic<'client, T: Config, X, C, E: Decode, Evs: Decode> { - client: &'client Client, - call: C, - marker: std::marker::PhantomData<(X, E, Evs)>, -} - -impl<'client, T, X, C, E, Evs> SubmittableExtrinsic<'client, T, X, C, E, Evs> -where - T: Config, - X: ExtrinsicParams, - C: Call + Send + Sync, - E: Decode + HasModuleError, - Evs: Decode, -{ - /// Create a new [`SubmittableExtrinsic`]. - pub fn new(client: &'client Client, call: C) -> Self { - Self { - client, - call, - marker: Default::default(), - } - } - - /// Creates and signs an extrinsic and submits it to the chain. Passes default parameters - /// to construct the "signed extra" and "additional" payloads needed by the extrinsic. - /// - /// Returns a [`TransactionProgress`], 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( - &self, - signer: &(dyn Signer + Send + Sync), - ) -> Result, BasicError> - where - X::OtherParams: Default, - { - self.sign_and_submit_then_watch(signer, Default::default()) - .await - } - - /// Creates and signs an extrinsic and submits it to the chain. - /// - /// Returns a [`TransactionProgress`], 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( - &self, - signer: &(dyn Signer + Send + Sync), - other_params: X::OtherParams, - ) -> Result, BasicError> { - self.create_signed(signer, other_params) - .await? - .submit_and_watch() - .await - } - - /// Creates and signs an extrinsic and submits to the chain for block inclusion. Passes - /// default parameters to construct the "signed extra" and "additional" payloads needed - /// by the extrinsic. - /// - /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. - /// - /// # Note - /// - /// 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( - &self, - signer: &(dyn Signer + Send + Sync), - ) -> Result - where - X::OtherParams: Default, - { - self.sign_and_submit(signer, Default::default()).await - } - - /// Creates and signs an extrinsic and submits to the chain for block inclusion. - /// - /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. - /// - /// # Note - /// - /// 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( - &self, - signer: &(dyn Signer + Send + Sync), - other_params: X::OtherParams, - ) -> Result { - self.create_signed(signer, other_params) - .await? - .submit() - .await - } - - /// Return the SCALE encoded bytes representing the call data of the transaction. - pub fn call_data(&self) -> Result, BasicError> { - let mut bytes = Vec::new(); - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - let pallet = metadata.pallet(C::PALLET)?; - bytes.push(pallet.index()); - bytes.push(pallet.call_index::()?); - self.call.encode_to(&mut bytes); - Ok(bytes) - } - - /// Creates a returns a raw signed extrinsic, without submitting it. - pub async fn create_signed( - &self, - signer: &(dyn Signer + Send + Sync), - other_params: X::OtherParams, - ) -> Result, BasicError> { - // 1. Get nonce - let account_nonce = if let Some(nonce) = signer.nonce() { - nonce - } else { - self.client - .rpc() - .system_account_next_index(signer.account_id()) - .await? - }; - - // 2. SCALE encode call data to bytes (pallet u8, call u8, call params). - let call_data = Encoded(self.call_data()?); - - // 3. Construct our custom additional/extra params. - let additional_and_extra_params = { - // Obtain spec version and transaction version from the runtime version of the client. - let locked_runtime = self.client.runtime_version(); - let runtime = locked_runtime.read(); - X::new( - runtime.spec_version, - runtime.transaction_version, - account_nonce, - self.client.genesis_hash, - other_params, - ) - }; - - tracing::debug!( - "additional_and_extra_params: {:?}", - additional_and_extra_params - ); - - // 4. Construct signature. This is compatible with the Encode impl - // for SignedPayload (which is this payload of bytes that we'd like) - // to sign. See: - // https://github.com/paritytech/substrate/blob/9a6d706d8db00abb6ba183839ec98ecd9924b1f8/primitives/runtime/src/generic/unchecked_extrinsic.rs#L215) - let signature = { - let mut bytes = Vec::new(); - call_data.encode_to(&mut bytes); - 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)) - } else { - signer.sign(&bytes) - } - }; - - tracing::info!("xt signature: {}", hex::encode(signature.encode())); - - // 5. Encode extrinsic, now that we have the parts we need. This is compatible - // with the Encode impl for UncheckedExtrinsic (protocol version 4). - let extrinsic = { - let mut encoded_inner = Vec::new(); - // "is signed" + transaction protocol version (4) - (0b10000000 + 4u8).encode_to(&mut encoded_inner); - // from address for signature - signer.address().encode_to(&mut encoded_inner); - // the signature bytes - signature.encode_to(&mut encoded_inner); - // attach custom extra params - additional_and_extra_params.encode_extra_to(&mut encoded_inner); - // and now, call data - call_data.encode_to(&mut encoded_inner); - // now, prefix byte length: - let len = Compact( - u32::try_from(encoded_inner.len()) - .expect("extrinsic size expected to be <4GB"), - ); - let mut encoded = Vec::new(); - len.encode_to(&mut encoded); - encoded.extend(encoded_inner); - encoded - }; - - // Wrap in Encoded to ensure that any more "encode" calls leave it in the right state. - // maybe we can just return the raw bytes.. - Ok(SignedSubmittableExtrinsic { - client: self.client, - encoded: Encoded(extrinsic), - marker: self.marker, - }) - } -} - -pub struct SignedSubmittableExtrinsic<'client, T: Config, X, E: Decode, Evs: Decode> { - client: &'client Client, - encoded: Encoded, - marker: std::marker::PhantomData<(X, E, Evs)>, -} - -impl<'client, T, X, E, Evs> SignedSubmittableExtrinsic<'client, T, X, E, Evs> -where - T: Config, - X: ExtrinsicParams, - E: Decode + HasModuleError, - Evs: Decode, -{ - /// Submits the extrinsic to the chain. - /// - /// Returns a [`TransactionProgress`], 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 submit_and_watch( - &self, - ) -> Result, BasicError> { - // Get a hash of the extrinsic (we'll need this later). - let ext_hash = T::Hashing::hash_of(&self.encoded); - - // Submit and watch for transaction progress. - let sub = self.client.rpc().watch_extrinsic(&self.encoded).await?; - - Ok(TransactionProgress::new(sub, self.client, ext_hash)) - } - - /// Submits the extrinsic to the chain for block inclusion. - /// - /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. - /// - /// # Note - /// - /// 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 submit(&self) -> Result { - self.client.rpc().submit_extrinsic(&self.encoded).await - } - - /// 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 { - self.client.rpc().dry_run(self.encoded(), at).await - } - - /// Returns the SCALE encoded extrinsic bytes. - pub fn encoded(&self) -> &[u8] { - &self.encoded.0 - } -} diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 03dbe714a6..55f148d625 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -11,7 +11,6 @@ use jsonrpsee::core::error::Error as RequestError; use scale_value::{ scale::{ DecodeError, - EncodeError, } }; use sp_core::crypto::SecretStringError; diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index ff3a429b15..3fe4214c6e 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -19,12 +19,10 @@ use codec::{ Input, }; use derivative::Derivative; -use parking_lot::RwLock; use sp_core::{ storage::StorageKey, twox_128, }; -use std::sync::Arc; /// Obtain events at some block hash. The generic parameter is what we /// will attempt to decode each event into if using [`Events::iter()`], diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index a53ed1fd45..a4f35126b9 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -247,9 +247,7 @@ mod test { Stream, StreamExt, }; - use parking_lot::RwLock; use scale_info::TypeInfo; - use std::sync::Arc; // Some pretend events in a pallet #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index b4af680596..a56e6502c3 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -39,4 +39,8 @@ pub use self::{ PairSigner, Signer, }, + submittable::{ + SubmittableExtrinsic, + SignedSubmittableExtrinsic, + } }; diff --git a/subxt/src/extrinsic/submittable.rs b/subxt/src/extrinsic/submittable.rs index 54c8230a74..cc0d2fd936 100644 --- a/subxt/src/extrinsic/submittable.rs +++ b/subxt/src/extrinsic/submittable.rs @@ -2,8 +2,6 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use futures::future; -pub use sp_runtime::traits::SignedExtension; use sp_runtime::{ traits::Hash, ApplyExtrinsicResult, @@ -25,29 +23,15 @@ use crate::{ metadata::{ EncodeWithMetadata, }, - rpc::{ - Rpc, - RpcClient, - RuntimeVersion, - SystemProperties, - }, - storage::StorageClient, transaction::TransactionProgress, - updates::UpdateClient, - Call, Config, Encoded, - Metadata, }; use codec::{ Compact, Decode, Encode, }; -use std::borrow::Cow; -use derivative::Derivative; -use parking_lot::RwLock; -use std::sync::Arc; /// A constructed call ready to be signed and submitted. pub struct SubmittableExtrinsic { @@ -265,16 +249,17 @@ where } } +/// This represents an extrinsic that has been signed and is ready to submit. pub struct SignedSubmittableExtrinsic { client: OnlineClient, encoded: Encoded, marker: std::marker::PhantomData<(Err, Evs)>, } -impl<'client, T, E, Evs> SignedSubmittableExtrinsic +impl<'client, T, Err, Evs> SignedSubmittableExtrinsic where T: Config, - E: Decode + HasModuleError, + Err: Decode + HasModuleError, Evs: Decode, { /// Submits the extrinsic to the chain. @@ -283,7 +268,7 @@ where /// and obtain details about it, once it has made it into a block. pub async fn submit_and_watch( &self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { // Get a hash of the extrinsic (we'll need this later). let ext_hash = T::Hashing::hash_of(&self.encoded); From f72f78d44be724050e17954dbdd4071e3bbf5279 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 1 Jul 2022 14:35:20 +0100 Subject: [PATCH 05/75] Add WithExtrinsicParams, and have SubstrateConfig + PolkadotConfig, not DefaultConfig --- examples/examples/balance_transfer.rs | 4 +- .../examples/balance_transfer_with_params.rs | 4 +- .../examples/concurrent_storage_requests.rs | 4 +- examples/examples/custom_config.rs | 18 +++---- examples/examples/fetch_all_accounts.rs | 4 +- examples/examples/fetch_constants.rs | 4 +- examples/examples/fetch_staking_details.rs | 4 +- examples/examples/metadata_compatibility.rs | 4 +- examples/examples/rpc_call.rs | 4 +- .../examples/rpc_call_subscribe_blocks.rs | 4 +- examples/examples/storage_query.rs | 4 +- examples/examples/submit_and_watch.rs | 8 ++-- examples/examples/subscribe_all_events.rs | 8 ++-- examples/examples/subscribe_one_event.rs | 8 ++-- .../examples/subscribe_runtime_updates.rs | 4 +- examples/examples/subscribe_some_events.rs | 8 ++-- subxt/src/client/mod.rs | 6 +++ subxt/src/config.rs | 47 +++++++++++++++++-- subxt/src/error.rs | 2 + subxt/src/events/event_subscription.rs | 8 ++-- subxt/src/events/events_type.rs | 10 ++-- subxt/src/events/filter_events.rs | 28 +++++------ subxt/src/extrinsic/params.rs | 13 ++--- subxt/src/extrinsic/submittable.rs | 12 ++--- subxt/src/lib.rs | 12 ++--- subxt/src/metadata/encode_decode.rs | 34 +++++++++++--- subxt/src/metadata/metadata_type.rs | 4 ++ subxt/src/metadata/mod.rs | 3 ++ subxt/src/transaction.rs | 2 + .../integration-tests/src/frame/contracts.rs | 14 +++--- .../src/metadata/validation.rs | 8 ++-- .../integration-tests/src/utils/context.rs | 20 ++++---- 32 files changed, 196 insertions(+), 121 deletions(-) diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index cacca2e853..f337b0bd13 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -13,7 +13,7 @@ use sp_keyring::AccountKeyring; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -30,7 +30,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Submit the `transfer` extrinsic from Alice's account to Bob's. let dest = AccountKeyring::Bob.to_account_id().into(); diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index 5d5344c0b2..d903435f2e 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -17,7 +17,7 @@ use subxt::{ PlainTip, }, ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, PolkadotExtrinsicParamsBuilder as Params, @@ -36,7 +36,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Configure the transaction tip and era: let tx_params = Params::new() diff --git a/examples/examples/concurrent_storage_requests.rs b/examples/examples/concurrent_storage_requests.rs index 51f0396310..483a0aebdd 100644 --- a/examples/examples/concurrent_storage_requests.rs +++ b/examples/examples/concurrent_storage_requests.rs @@ -6,7 +6,7 @@ use futures::join; use sp_keyring::AccountKeyring; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -18,7 +18,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); let addr = AccountKeyring::Bob.to_account_id(); diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index a1d89212c4..a2df42bf38 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -14,7 +14,7 @@ use sp_keyring::AccountKeyring; use subxt::{ ClientBuilder, Config, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -33,14 +33,14 @@ impl Config for MyConfig { // polkadot runtime used, so some operations will fail. Normally when using a custom `Config` // impl types MUST match exactly those used in the actual runtime. type Index = u64; - type BlockNumber = ::BlockNumber; - type Hash = ::Hash; - type Hashing = ::Hashing; - type AccountId = ::AccountId; - type Address = ::Address; - type Header = ::Header; - type Signature = ::Signature; - type Extrinsic = ::Extrinsic; + type BlockNumber = ::BlockNumber; + type Hash = ::Hash; + type Hashing = ::Hashing; + type AccountId = ::AccountId; + type Address = ::Address; + type Header = ::Header; + type Signature = ::Signature; + type Extrinsic = ::Extrinsic; } #[tokio::main] diff --git a/examples/examples/fetch_all_accounts.rs b/examples/examples/fetch_all_accounts.rs index cc3298d8cf..495c0617a0 100644 --- a/examples/examples/fetch_all_accounts.rs +++ b/examples/examples/fetch_all_accounts.rs @@ -12,7 +12,7 @@ use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -26,7 +26,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); let mut iter = api.storage().system().account_iter(None).await?; diff --git a/examples/examples/fetch_constants.rs b/examples/examples/fetch_constants.rs index 6066b9628f..88e4661120 100644 --- a/examples/examples/fetch_constants.rs +++ b/examples/examples/fetch_constants.rs @@ -12,7 +12,7 @@ use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -29,7 +29,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Constants are queried from the node's runtime metadata. // Query the `ExistentialDeposit` constant from the `Balances` pallet. diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index f487807ef0..9c485cc71f 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -18,7 +18,7 @@ use subxt::{ }, sp_runtime::AccountId32, ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -32,7 +32,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); let era = api.storage().staking().active_era(None).await?.unwrap(); println!( diff --git a/examples/examples/metadata_compatibility.rs b/examples/examples/metadata_compatibility.rs index b006215fb7..3e6aa37764 100644 --- a/examples/examples/metadata_compatibility.rs +++ b/examples/examples/metadata_compatibility.rs @@ -12,7 +12,7 @@ use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -26,7 +26,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Full metadata validation is not enabled by default; instead, the individual calls, // storage requests and constant accesses are runtime type checked against the node diff --git a/examples/examples/rpc_call.rs b/examples/examples/rpc_call.rs index 4306fd5502..f19d6ec0a1 100644 --- a/examples/examples/rpc_call.rs +++ b/examples/examples/rpc_call.rs @@ -12,7 +12,7 @@ use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -27,7 +27,7 @@ async fn main() -> Result<(), Box> { .set_url("wss://rpc.polkadot.io:443") .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); let block_number = 1u32; diff --git a/examples/examples/rpc_call_subscribe_blocks.rs b/examples/examples/rpc_call_subscribe_blocks.rs index e0dfce057e..0246ec7796 100644 --- a/examples/examples/rpc_call_subscribe_blocks.rs +++ b/examples/examples/rpc_call_subscribe_blocks.rs @@ -17,7 +17,7 @@ use subxt::{ traits::BlakeTwo256, }, ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, }; @@ -32,7 +32,7 @@ async fn main() -> Result<(), Box> { .set_url("wss://rpc.polkadot.io:443") .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // For non-finalised blocks use `.subscribe_blocks()` let mut blocks: Subscription> = diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_query.rs index a387432258..5a16b67352 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_query.rs @@ -18,7 +18,7 @@ use subxt::{ StorageKeyPrefix, }, ClientBuilder, - DefaultConfig, + SubstrateConfig, PolkadotExtrinsicParams, StorageEntryKey, StorageMapKey, @@ -34,7 +34,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Obtain the storage client wrapper from the API. let storage: StorageClient<_> = api.client.storage(); diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index deebc167d5..b62c93b6f2 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -14,7 +14,7 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -43,7 +43,7 @@ async fn simple_transfer() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); let balance_transfer = api .tx() @@ -75,7 +75,7 @@ async fn simple_transfer_separate_events() -> Result<(), Box>>(); + .to_runtime_api::>>(); let balance_transfer = api .tx() @@ -126,7 +126,7 @@ async fn handle_transfer_events() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); let mut balance_transfer_progress = api .tx() diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs index eed6ae7037..e4a8c14d36 100644 --- a/examples/examples/subscribe_all_events.rs +++ b/examples/examples/subscribe_all_events.rs @@ -15,7 +15,7 @@ use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -32,7 +32,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Subscribe to any events that occur: let mut event_sub = api.events().subscribe().await?; @@ -46,8 +46,8 @@ async fn main() -> Result<(), Box> { .await .unwrap() .to_runtime_api::, + SubstrateConfig, + PolkadotExtrinsicParams, >>(); let mut transfer_amount = 1_000_000_000; diff --git a/examples/examples/subscribe_one_event.rs b/examples/examples/subscribe_one_event.rs index 06d641a9a8..42828b3dae 100644 --- a/examples/examples/subscribe_one_event.rs +++ b/examples/examples/subscribe_one_event.rs @@ -15,7 +15,7 @@ use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -33,7 +33,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Subscribe to just balance transfer events, making use of `filter_events` // to select a single event type (note the 1-tuple) to filter out and return. @@ -52,8 +52,8 @@ async fn main() -> Result<(), Box> { .await .unwrap() .to_runtime_api::, + SubstrateConfig, + PolkadotExtrinsicParams, >>(); // Make small balance transfers from Alice to Bob in a loop: diff --git a/examples/examples/subscribe_runtime_updates.rs b/examples/examples/subscribe_runtime_updates.rs index 85ed51a7e1..9512b17328 100644 --- a/examples/examples/subscribe_runtime_updates.rs +++ b/examples/examples/subscribe_runtime_updates.rs @@ -14,7 +14,7 @@ use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -29,7 +29,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Start a new tokio task to perform the runtime updates while // utilizing the API for other use cases. diff --git a/examples/examples/subscribe_some_events.rs b/examples/examples/subscribe_some_events.rs index 6dbe01d727..2a138deb05 100644 --- a/examples/examples/subscribe_some_events.rs +++ b/examples/examples/subscribe_some_events.rs @@ -15,7 +15,7 @@ use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, PairSigner, PolkadotExtrinsicParams, }; @@ -33,7 +33,7 @@ async fn main() -> Result<(), Box> { let api = ClientBuilder::new() .build() .await? - .to_runtime_api::>>(); + .to_runtime_api::>>(); // Subscribe to several balance related events. If we ask for more than one event, // we'll be given a correpsonding tuple of `Option`'s, with exactly one @@ -53,8 +53,8 @@ async fn main() -> Result<(), Box> { .await .unwrap() .to_runtime_api::, + SubstrateConfig, + PolkadotExtrinsicParams, >>(); // Make small balance transfers from Alice to Bob in a loop: diff --git a/subxt/src/client/mod.rs b/subxt/src/client/mod.rs index 3b985d53a5..b31dd97621 100644 --- a/subxt/src/client/mod.rs +++ b/subxt/src/client/mod.rs @@ -2,6 +2,12 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! This module provides two clients that can be used to work with +//! transactions, storage and events. The [`OfflineClient`] works +//! entirely offline and can be passed to any function that doesn't +//! require network access. The [`OnlineClient`] requires network +//! access. + mod offline_client; mod online_client; diff --git a/subxt/src/config.rs b/subxt/src/config.rs index a1603ea3e0..887dd64941 100644 --- a/subxt/src/config.rs +++ b/subxt/src/config.rs @@ -2,6 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! This module provides a [`Config`] type, which is used to define various +//! types that are important in order to speak to a particular chain. +//! [`DefaultConfig`] provides a default set of these types suitable for the +//! default Substrate node implementation. + use codec::{ Codec, Encode, @@ -22,7 +27,7 @@ use sp_runtime::traits::{ // Note: the 'static bound isn't strictly required, but currently deriving TypeInfo // automatically applies a 'static bound to all generic types (including this one), // and so until that is resolved, we'll keep the (easy to satisfy) constraint here. -pub trait Config: Debug + 'static { +pub trait Config: 'static { /// Account index (aka nonce) type. This stores the number of previous /// transactions associated with a sender account. type Index: Parameter @@ -76,7 +81,7 @@ pub trait Config: Debug + 'static { type Extrinsic: Parameter + Extrinsic + Debug + MaybeSerializeDeserialize; /// This type defines the extrinsic extra and additional parameters. - type ExtrinsicParams: crate::extrinsic::ExtrinsicParams; + type ExtrinsicParams: crate::extrinsic::ExtrinsicParams; } /// Parameter trait copied from `substrate::frame_support` @@ -86,10 +91,9 @@ 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. -#[derive(Debug)] -pub enum DefaultConfig {} +pub enum SubstrateConfig {} -impl Config for DefaultConfig { +impl Config for SubstrateConfig { type Index = u32; type BlockNumber = u32; type Hash = sp_core::H256; @@ -102,3 +106,36 @@ impl Config for DefaultConfig { type Extrinsic = sp_runtime::OpaqueExtrinsic; type ExtrinsicParams = crate::extrinsic::SubstrateExtrinsicParams; } + +/// Default set of commonly used types by Polkadot nodes. +pub type PolkadotConfig = WithExtrinsicParams>; + +/// Take a type implementing [`Config`] (eg [`SubstrateConfig`]), and some type which describes the +/// additional and extra parameters to pass to an extrinsic (see [`crate::extrinsic::ExtrinsicParams`]), +/// and returns a type implementing [`Config`] with those new `ExtrinsicParams`. +/// +/// # Example +/// +/// ``` +/// use subxt::config::{ SubstrateConfig, WithExtrinsicParams }; +/// use subxt::extrinsic::PolkadotExtrinsicParams; +/// +/// // This is how PolkadotConfig is implemented: +/// type PolkadotConfig = WithExtrinsicParams>; +/// ``` +pub struct WithExtrinsicParams> { + _marker: std::marker::PhantomData<(T, E)> +} + +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 Extrinsic = T::Extrinsic; + type ExtrinsicParams = E; +} diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 55f148d625..a981d7ddb2 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -2,6 +2,8 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! Types representing the errors that can be returned. + use crate::metadata::{ InvalidMetadataError, MetadataError, diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 048ddf98a3..5a33b8ec85 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -284,15 +284,15 @@ mod test { fn assert_send() {} assert_send::< EventSubscription< - EventSub<::Header>, - crate::DefaultConfig, + EventSub<::Header>, + crate::SubstrateConfig, (), >, >(); assert_send::< EventSubscription< - FinalizedEventSub<::Header>, - crate::DefaultConfig, + FinalizedEventSub<::Header>, + crate::SubstrateConfig, (), >, >(); diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 3fe4214c6e..a3c27d9de1 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -397,7 +397,7 @@ pub(crate) mod test_utils { use super::*; use crate::{ Config, - DefaultConfig, + SubstrateConfig, Phase, }; use codec::Encode; @@ -428,7 +428,7 @@ pub(crate) mod test_utils { pub struct EventRecord { phase: Phase, event: AllEvents, - topics: Vec<::Hash>, + topics: Vec<::Hash>, } /// Build an EventRecord, which encoded events in the format expected @@ -473,7 +473,7 @@ pub(crate) mod test_utils { pub fn events( metadata: Metadata, event_records: Vec>, - ) -> Events> { + ) -> Events> { let num_events = event_records.len() as u32; let mut event_bytes = Vec::new(); for ev in event_records { @@ -488,9 +488,9 @@ pub(crate) mod test_utils { metadata: Metadata, event_bytes: Vec, num_events: u32, - ) -> Events> { + ) -> Events> { Events { - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event_bytes, metadata, num_events, diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index a4f35126b9..0e44bbda4d 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -238,7 +238,7 @@ mod test { }; use crate::{ Config, - DefaultConfig, + SubstrateConfig, Metadata, }; use codec::Encode; @@ -284,7 +284,7 @@ mod test { // A stream of fake events for us to try filtering on. fn events_stream( metadata: Metadata, - ) -> impl Stream>, BasicError>> + ) -> impl Stream>, BasicError>> { stream::iter(vec![ events::( @@ -319,7 +319,7 @@ mod test { // Filter out fake event stream to select events matching `EventA` only. let actual: Vec<_> = - FilterEvents::<_, DefaultConfig, (EventA,)>::new(events_stream(metadata)) + FilterEvents::<_, SubstrateConfig, (EventA,)>::new(events_stream(metadata)) .map(|e| e.unwrap()) .collect() .await; @@ -327,17 +327,17 @@ mod test { let expected = vec![ FilteredEventDetails { phase: Phase::Initialization, - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: EventA(1), }, FilteredEventDetails { phase: Phase::Finalization, - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: EventA(2), }, FilteredEventDetails { phase: Phase::ApplyExtrinsic(3), - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: EventA(3), }, ]; @@ -350,7 +350,7 @@ mod test { let metadata = metadata::(); // Filter out fake event stream to select events matching `EventA` or `EventB`. - let actual: Vec<_> = FilterEvents::<_, DefaultConfig, (EventA, EventB)>::new( + let actual: Vec<_> = FilterEvents::<_, SubstrateConfig, (EventA, EventB)>::new( events_stream(metadata), ) .map(|e| e.unwrap()) @@ -360,32 +360,32 @@ mod test { let expected = vec![ FilteredEventDetails { phase: Phase::Initialization, - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: (Some(EventA(1)), None), }, FilteredEventDetails { phase: Phase::ApplyExtrinsic(0), - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: (None, Some(EventB(true))), }, FilteredEventDetails { phase: Phase::Finalization, - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: (Some(EventA(2)), None), }, FilteredEventDetails { phase: Phase::ApplyExtrinsic(1), - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: (None, Some(EventB(false))), }, FilteredEventDetails { phase: Phase::ApplyExtrinsic(2), - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: (None, Some(EventB(true))), }, FilteredEventDetails { phase: Phase::ApplyExtrinsic(3), - block_hash: ::Hash::default(), + block_hash: ::Hash::default(), event: (Some(EventA(3)), None), }, ]; @@ -399,7 +399,7 @@ mod test { // Filter out fake event stream to select events matching `EventC` (none exist). let actual: Vec<_> = - FilterEvents::<_, DefaultConfig, (EventC,)>::new(events_stream(metadata)) + FilterEvents::<_, SubstrateConfig, (EventC,)>::new(events_stream(metadata)) .map(|e| e.unwrap()) .collect() .await; diff --git a/subxt/src/extrinsic/params.rs b/subxt/src/extrinsic/params.rs index 51ed082fcf..367668ee98 100644 --- a/subxt/src/extrinsic/params.rs +++ b/subxt/src/extrinsic/params.rs @@ -7,11 +7,11 @@ use codec::{ Encode, }; use core::fmt::Debug; - use crate::{ Config, Encoded, }; +use derivative::Derivative; // We require Era as a param below, so make it available from here. pub use sp_runtime::generic::Era; @@ -20,7 +20,7 @@ pub use sp_runtime::generic::Era; /// "additional" parameters that are signed and used in transactions. /// see [`BaseExtrinsicParams`] for an implementation that is compatible with /// a Polkadot node. -pub trait ExtrinsicParams: Debug { +pub trait ExtrinsicParams: Debug + 'static { /// These parameters can be provided to the constructor along with /// some default parameters that `subxt` understands, in order to /// help construct your [`ExtrinsicParams`] object. @@ -30,8 +30,8 @@ pub trait ExtrinsicParams: Debug { fn new( spec_version: u32, tx_version: u32, - nonce: T::Index, - genesis_hash: T::Hash, + nonce: Index, + genesis_hash: Hash, other_params: Self::OtherParams, ) -> Self; @@ -73,7 +73,8 @@ pub type PolkadotExtrinsicParamsBuilder = BaseExtrinsicParamsBuilder { era: Era, nonce: T::Index, @@ -132,7 +133,7 @@ impl Default for BaseExtrinsicParamsBuilder { } } -impl ExtrinsicParams for BaseExtrinsicParams { +impl ExtrinsicParams for BaseExtrinsicParams { type OtherParams = BaseExtrinsicParamsBuilder; fn new( diff --git a/subxt/src/extrinsic/submittable.rs b/subxt/src/extrinsic/submittable.rs index cc0d2fd936..7dfa5d6047 100644 --- a/subxt/src/extrinsic/submittable.rs +++ b/subxt/src/extrinsic/submittable.rs @@ -66,7 +66,7 @@ where ) -> Result, BasicError> where Client: Into>, - >::OtherParams: Default, + >::OtherParams: Default, T: Config, { self.sign_and_submit_then_watch(client, signer, Default::default()) @@ -81,7 +81,7 @@ where &self, client: Client, signer: &(dyn Signer + Send + Sync), - other_params: >::OtherParams, + other_params: >::OtherParams, ) -> Result, BasicError> where Client: Into>, @@ -110,7 +110,7 @@ where ) -> Result where Client: Into>, - >::OtherParams: Default, + >::OtherParams: Default, T: Config, { self.sign_and_submit(client, signer, Default::default()).await @@ -128,7 +128,7 @@ where &self, client: Client, signer: &(dyn Signer + Send + Sync), - other_params: >::OtherParams, + other_params: >::OtherParams, ) -> Result where Client: Into>, @@ -157,7 +157,7 @@ where &self, client: Client, signer: &(dyn Signer + Send + Sync), - other_params: >::OtherParams, + other_params: >::OtherParams, ) -> Result, BasicError> where Client: Into>, @@ -182,7 +182,7 @@ where let additional_and_extra_params = { // Obtain spec version and transaction version from the runtime version of the client. let runtime = client.runtime_version(); - >::new( + >::new( runtime.spec_version, runtime.transaction_version, account_nonce, diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 0a4fb99d19..1fa743d131 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -220,15 +220,15 @@ use codec::{ use core::fmt::Debug; use derivative::Derivative; -mod client; -mod config; -mod error; +pub mod client; +pub mod config; +pub mod error; pub mod events; pub mod extrinsic; -mod metadata; +pub mod metadata; pub mod rpc; pub mod storage; -mod transaction; +pub mod transaction; pub mod updates; pub use crate::{ @@ -238,7 +238,7 @@ pub use crate::{ }, config::{ Config, - DefaultConfig, + SubstrateConfig, }, error::{ BasicError, diff --git a/subxt/src/metadata/encode_decode.rs b/subxt/src/metadata/encode_decode.rs index c31131a14f..8446c0a052 100644 --- a/subxt/src/metadata/encode_decode.rs +++ b/subxt/src/metadata/encode_decode.rs @@ -12,7 +12,9 @@ use crate::{ use codec::{ Encode, }; +use std::borrow::Cow; +/// This trait represents any type that can be encoded to bytes with the support of [`Metadata`]. pub trait EncodeWithMetadata { /// Given some metadata, attempt to SCALE encode `Self` to the provided bytes. fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError>; @@ -27,8 +29,11 @@ pub trait EncodeWithMetadata { /// A wrapper which implements [`EncodeWithMetadata`] if the data provided implements [`Encode`]. pub struct EncodeStaticCall { + /// The pallet name pub pallet: &'static str, + /// The call/fucntion name within the pallet pub call: &'static str, + /// Data representing the arguments to pass to the call. pub data: T, } @@ -46,15 +51,30 @@ impl EncodeWithMetadata for EncodeStaticCall { } /// A wrapper which allows dynamic Value types to be SCALE encoded via [`EncodeWithMetadata`]. -pub struct EncodeDynamicCall { - pub pallet: &'static str, - pub call: &'static str, - pub data: Vec, +pub struct EncodeDynamicCall<'a> { + pallet: Cow<'a, str>, + call: Cow<'a, str>, + data: Vec, +} + +impl <'a> EncodeDynamicCall<'a> { + /// Construct a new [`EncodeDynamicCall`], which can be SCALE encoded to call data. + pub fn new( + pallet: impl Into>, + call: impl Into>, + data: Vec + ) -> Self { + Self { + pallet: pallet.into(), + call: call.into(), + data + } + } } -impl EncodeWithMetadata for EncodeDynamicCall { +impl <'a> EncodeWithMetadata for EncodeDynamicCall<'a> { fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError> { - let pallet = metadata.pallet(self.pallet)?; + let pallet = metadata.pallet(&self.pallet)?; let pallet_index = pallet.index(); let call_ty = pallet .call_ty_id() @@ -64,7 +84,7 @@ impl EncodeWithMetadata for EncodeDynamicCall { // (we could do this ourselves a little more efficiently but it's easier // reusing scale_value logic). let composite = scale_value::Composite::Unnamed(self.data.clone()); - let variant = scale_value::Value::variant(self.call, composite); + let variant = scale_value::Value::variant(self.call.to_owned(), composite); // Encode the pallet index and call variant+data: pallet_index.encode_to(out); diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index fa89ee01bb..a877a0c0d4 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -345,12 +345,16 @@ impl ErrorMetadata { /// The runtime metadata is converted when building the [crate::client::Client]. #[derive(Debug, thiserror::Error)] pub enum InvalidMetadataError { + /// Invalid prefix #[error("Invalid prefix")] InvalidPrefix, + /// Invalid version #[error("Invalid version")] InvalidVersion, + /// Type missing from type registry #[error("Type {0} missing from type registry")] MissingType(u32), + /// Type was not a variant/enum type #[error("Type {0} was not a variant/enum type")] TypeDefNotVariant(u32), } diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index f7f4020e3c..0e8a353f35 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -2,6 +2,8 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! Types representing the metadata obtained from a node. + mod encode_decode; mod hash_cache; mod metadata_type; @@ -17,5 +19,6 @@ pub use metadata_type::{ pub use encode_decode::{ EncodeStaticCall, + EncodeDynamicCall, EncodeWithMetadata, }; diff --git a/subxt/src/transaction.rs b/subxt/src/transaction.rs index 40570d3f2d..30a0702e1b 100644 --- a/subxt/src/transaction.rs +++ b/subxt/src/transaction.rs @@ -2,6 +2,8 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! Types representing extrinsics/transactions that have been submitted to a node. + use std::task::Poll; use crate::PhantomDataSendSync; diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 14d496b218..2aa995066b 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -24,7 +24,7 @@ use sp_runtime::MultiAddress; use subxt::{ Client, Config, - DefaultConfig, + SubstrateConfig, Error, PairSigner, TransactionProgress, @@ -32,11 +32,11 @@ use subxt::{ struct ContractsTestContext { cxt: TestContext, - signer: PairSigner, + signer: PairSigner, } -type Hash = ::Hash; -type AccountId = ::AccountId; +type Hash = ::Hash; +type AccountId = ::AccountId; impl ContractsTestContext { async fn init() -> Self { @@ -47,11 +47,11 @@ impl ContractsTestContext { Self { cxt, signer } } - fn client(&self) -> &Client { + fn client(&self) -> &Client { self.cxt.client() } - fn contracts_tx(&self) -> TransactionApi { + fn contracts_tx(&self) -> TransactionApi { self.cxt.api.tx().contracts() } @@ -138,7 +138,7 @@ impl ContractsTestContext { contract: AccountId, input_data: Vec, ) -> Result< - TransactionProgress<'_, DefaultConfig, DispatchError, node_runtime::Event>, + TransactionProgress<'_, SubstrateConfig, DispatchError, node_runtime::Event>, Error, > { tracing::info!("call: {:?}", contract); diff --git a/testing/integration-tests/src/metadata/validation.rs b/testing/integration-tests/src/metadata/validation.rs index e03d25fe1c..224ddffc69 100644 --- a/testing/integration-tests/src/metadata/validation.rs +++ b/testing/integration-tests/src/metadata/validation.rs @@ -29,7 +29,7 @@ use scale_info::{ }; use subxt::{ ClientBuilder, - DefaultConfig, + SubstrateConfig, Metadata, SubstrateExtrinsicParams, }; @@ -37,7 +37,7 @@ use subxt::{ use crate::utils::node_runtime; type RuntimeApi = - node_runtime::RuntimeApi>; + node_runtime::RuntimeApi>; async fn metadata_to_api(metadata: RuntimeMetadataV14, cxt: &TestContext) -> RuntimeApi { let prefixed = RuntimeMetadataPrefixed::from(metadata); @@ -50,8 +50,8 @@ async fn metadata_to_api(metadata: RuntimeMetadataV14, cxt: &TestContext) -> Run .await .unwrap() .to_runtime_api::, + SubstrateConfig, + SubstrateExtrinsicParams, >>() } diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index 45045edbad..d1307db5cf 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -11,7 +11,7 @@ use sp_core::sr25519::Pair; use sp_keyring::AccountKeyring; use subxt::{ Client, - DefaultConfig, + SubstrateConfig, PairSigner, SubstrateExtrinsicParams, }; @@ -19,11 +19,11 @@ use subxt::{ /// substrate node should be installed on the $PATH const SUBSTRATE_NODE_PATH: &str = "substrate"; -pub type NodeRuntimeParams = SubstrateExtrinsicParams; +pub type NodeRuntimeParams = SubstrateExtrinsicParams; pub async fn test_node_process_with( key: AccountKeyring, -) -> TestNodeProcess { +) -> TestNodeProcess { let path = std::env::var("SUBSTRATE_NODE_PATH").unwrap_or_else(|_| { if which::which(SUBSTRATE_NODE_PATH).is_err() { panic!("A substrate binary should be installed on your path for integration tests. \ @@ -32,24 +32,24 @@ pub async fn test_node_process_with( SUBSTRATE_NODE_PATH.to_string() }); - let proc = TestNodeProcess::::build(path.as_str()) + let proc = TestNodeProcess::::build(path.as_str()) .with_authority(key) - .spawn::() + .spawn::() .await; proc.unwrap() } -pub async fn test_node_process() -> TestNodeProcess { +pub async fn test_node_process() -> TestNodeProcess { test_node_process_with(AccountKeyring::Alice).await } pub struct TestContext { - pub node_proc: TestNodeProcess, - pub api: node_runtime::RuntimeApi, + pub node_proc: TestNodeProcess, + pub api: node_runtime::RuntimeApi, } impl TestContext { - pub fn client(&self) -> &Client { + pub fn client(&self) -> &Client { &self.api.client } } @@ -61,6 +61,6 @@ pub async fn test_context() -> TestContext { TestContext { node_proc, api } } -pub fn pair_signer(pair: Pair) -> PairSigner { +pub fn pair_signer(pair: Pair) -> PairSigner { PairSigner::new(pair) } From be46e35741e5cfccc46ae1eedd5f8614addd6c38 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 1 Jul 2022 14:42:56 +0100 Subject: [PATCH 06/75] move transaction into extrinsic folder --- subxt/src/extrinsic/mod.rs | 7 +++++++ subxt/src/extrinsic/submittable.rs | 2 +- subxt/src/{ => extrinsic}/transaction.rs | 0 subxt/src/lib.rs | 11 ++++------- 4 files changed, 12 insertions(+), 8 deletions(-) rename subxt/src/{ => extrinsic}/transaction.rs (100%) diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index a56e6502c3..70da130ce2 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -21,6 +21,7 @@ mod params; mod signer; mod submittable; +mod transaction; pub use self::{ params::{ @@ -42,5 +43,11 @@ pub use self::{ submittable::{ SubmittableExtrinsic, SignedSubmittableExtrinsic, + }, + transaction::{ + TransactionEvents, + TransactionInBlock, + TransactionProgress, + TransactionStatus, } }; diff --git a/subxt/src/extrinsic/submittable.rs b/subxt/src/extrinsic/submittable.rs index 7dfa5d6047..7362f1afa6 100644 --- a/subxt/src/extrinsic/submittable.rs +++ b/subxt/src/extrinsic/submittable.rs @@ -23,10 +23,10 @@ use crate::{ metadata::{ EncodeWithMetadata, }, - transaction::TransactionProgress, Config, Encoded, }; +use super::TransactionProgress; use codec::{ Compact, Decode, diff --git a/subxt/src/transaction.rs b/subxt/src/extrinsic/transaction.rs similarity index 100% rename from subxt/src/transaction.rs rename to subxt/src/extrinsic/transaction.rs diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 1fa743d131..145a8eb4a4 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -228,7 +228,6 @@ pub mod extrinsic; pub mod metadata; pub mod rpc; pub mod storage; -pub mod transaction; pub mod updates; pub use crate::{ @@ -261,6 +260,10 @@ pub use crate::{ PolkadotExtrinsicParamsBuilder, SubstrateExtrinsicParams, SubstrateExtrinsicParamsBuilder, + TransactionEvents, + TransactionInBlock, + TransactionProgress, + TransactionStatus, }, metadata::{ ErrorMetadata, @@ -280,12 +283,6 @@ pub use crate::{ StorageEntryKey, StorageMapKey, }, - transaction::{ - TransactionEvents, - TransactionInBlock, - TransactionProgress, - TransactionStatus, - }, }; /// Trait to uniquely identify the call (extrinsic)'s identity from the runtime metadata. From 90f4589c2ac11a51dfb255a4a5479a1d547d57d0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 1 Jul 2022 15:21:42 +0100 Subject: [PATCH 07/75] Add runtime updates back to OnlineClient --- subxt/src/client/online_client.rs | 98 ++++++++++++++++++++--- subxt/src/lib.rs | 1 - subxt/src/updates.rs | 126 ------------------------------ 3 files changed, 86 insertions(+), 139 deletions(-) delete mode 100644 subxt/src/updates.rs diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index ecd83ee371..88794d029c 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -22,15 +22,22 @@ use crate::{ }; use derivative::Derivative; -/// A client capable of perfomring offline or online operations. This -/// builds on [`OfflineClient`] to provide connectivity to a node. +/// A client capable of perfomring offline or online operations. #[derive(Derivative)] #[derivative(Clone(bound = ""))] pub struct OnlineClient { - inner: Arc>>, + inner: Arc>>, rpc: Rpc, } +#[derive(Derivative)] +#[derivative(Debug(bound = ""))] +struct Inner { + genesis_hash: T::Hash, + runtime_version: RuntimeVersion, + metadata: Metadata, +} + impl std::fmt::Debug for OnlineClient { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Client") @@ -67,11 +74,11 @@ impl OnlineClient { .await; Ok(OnlineClient { - inner: Arc::new(RwLock::new(OfflineClient::new( - genesis_hash?, - runtime_version?, - metadata?, - ))), + inner: Arc::new(RwLock::new(Inner { + genesis_hash: genesis_hash?, + runtime_version: runtime_version?, + metadata: metadata?, + })), rpc }) } @@ -80,31 +87,57 @@ impl OnlineClient { pub fn offline(&self) -> OfflineClient { let inner = self.inner.read(); // This is fairly cheap: - (*inner).clone() + OfflineClient::new( + inner.genesis_hash, + inner.runtime_version.clone(), + inner.metadata.clone() + ) } /// Return the [`Metadata`] used in this client. pub fn metadata(&self) -> Metadata { let inner = self.inner.read(); - inner.metadata().clone() + inner.metadata.clone() } /// Return the genesis hash. pub fn genesis_hash(&self) -> T::Hash { let inner = self.inner.read(); - *inner.genesis_hash() + inner.genesis_hash } /// Return the runtime version. pub fn runtime_version(&self) -> RuntimeVersion { let inner = self.inner.read(); - inner.runtime_version().clone() + inner.runtime_version.clone() } /// Return the RPC interface. pub fn rpc(&self) -> &Rpc { &self.rpc } + + /// Create an object which can be used to keep the runtime uptodate + /// in a separate thread. + /// + /// # Example + /// + /// ```no_run + /// # #[tokio::main] + /// # fn main() { + /// use subxt::client::OnlineClient; + /// + /// let client = OnlineClient::new().await.unwrap(); + /// + /// let update_task = client.subscribe_to_updates(); + /// tokio::spawn(async move { + /// update_task.await; + /// }) + /// # } + /// ``` + pub fn subscribe_to_updates(&self) -> ClientRuntimeUpdater { + ClientRuntimeUpdater(self.clone()) + } } // These allow implementations to take in something like @@ -124,4 +157,45 @@ impl <'a, T: Config> From<&'a OnlineClient> for OnlineClient { fn from(client: &'a OnlineClient) -> Self { client.clone() } +} + + +/// Client wrapper for performing runtime updates. See [`OnlineClient::subscribe_to_updates()`] +/// for example usage. +pub struct ClientRuntimeUpdater(OnlineClient); + +impl ClientRuntimeUpdater { + fn is_runtime_version_different(&self, new: &RuntimeVersion) -> bool { + let curr = self.0.inner.read(); + &curr.runtime_version != new + } + + /// Performs runtime updates indefinitely unless encountering an error. + /// + /// *Note:* This will run indefinitely until it errors, so the typical usage + /// would be to run it in a separate background task. + pub async fn perform_runtime_updates(&self) -> Result<(), BasicError> { + // Obtain an update subscription to further detect changes in the runtime version of the node. + let mut update_subscription = self.0.rpc.subscribe_runtime_version().await?; + + while let Some(new_runtime_version) = update_subscription.next().await { + // The Runtime Version obtained via subscription. + let new_runtime_version = new_runtime_version?; + + // Ignore this update if there is no difference. + if !self.is_runtime_version_different(&new_runtime_version) { + continue; + } + + // Fetch new metadata. + let new_metadata = self.0.rpc.metadata().await?; + + // Do the update. + let mut writable = self.0.inner.write(); + writable.metadata = new_metadata; + writable.runtime_version = new_runtime_version; + } + + Ok(()) + } } \ No newline at end of file diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 145a8eb4a4..4d49155949 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -228,7 +228,6 @@ pub mod extrinsic; pub mod metadata; pub mod rpc; pub mod storage; -pub mod updates; pub use crate::{ client::{ diff --git a/subxt/src/updates.rs b/subxt/src/updates.rs deleted file mode 100644 index 598d3d4d52..0000000000 --- a/subxt/src/updates.rs +++ /dev/null @@ -1,126 +0,0 @@ -// 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. - -//! Perform runtime updates in the background using [UpdateClient]. -//! -//! There are cases when the node would perform a runtime update. As a result, the subxt's metadata -//! would be out of sync and the API would not be able to submit valid extrinsics. -//! This API keeps the `RuntimeVersion` and `Metadata` of the client synced with the target node. -//! -//! The runtime update is recommended for long-running clients, or for cases where manually -//! restarting subxt would not be feasible. Even with this, extrinsics submitted during a node -//! runtime update are at risk or failing, as it will take `subxt` a moment to catch up. -//! -//! ## Note -//! -//! Here we use tokio to check for updates in the background, but any runtime can be used. -//! -//! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig}; -//! # -//! # #[tokio::main] -//! # async fn main() { -//! # let client = ClientBuilder::new() -//! # .set_url("wss://rpc.polkadot.io:443") -//! # .build::() -//! # .await -//! # .unwrap(); -//! # -//! let update_client = client.updates(); -//! // Spawn a new background task to handle runtime updates. -//! tokio::spawn(async move { -//! let result = update_client.perform_runtime_updates().await; -//! println!("Runtime update finished with result={:?}", result); -//! }); -//! # } -//! ``` - -use crate::{ - rpc::{ - Rpc, - RuntimeVersion, - }, - BasicError, - Config, - Metadata, -}; -use parking_lot::RwLock; -use std::sync::Arc; - -/// Client wrapper for performing runtime updates. -pub struct UpdateClient { - rpc: Rpc, - metadata: Arc>, - runtime_version: Arc>, -} - -impl UpdateClient { - /// Create a new [`UpdateClient`]. - pub fn new( - rpc: Rpc, - metadata: Arc>, - runtime_version: Arc>, - ) -> Self { - Self { - rpc, - metadata, - runtime_version, - } - } - - /// Performs runtime updates indefinitely unless encountering an error. - /// - /// *Note:* This should be called from a dedicated background task. - pub async fn perform_runtime_updates(&self) -> Result<(), BasicError> { - // Obtain an update subscription to further detect changes in the runtime version of the node. - let mut update_subscription = self.rpc.subscribe_runtime_version().await?; - - while let Some(update_runtime_version) = update_subscription.next().await { - // The Runtime Version obtained via subscription. - let update_runtime_version = update_runtime_version?; - - // To ensure there are no races between: - // - starting the subxt::Client (fetching runtime version / metadata) - // - subscribing to the runtime updates - // the node provides its runtime version immediately after subscribing. - // - // In those cases, set the Runtime Version on the client if and only if - // the provided runtime version is different than what the client currently - // has stored. - { - // The Runtime Version of the client, as set during building the client - // or during updates. - let runtime_version = self.runtime_version.read(); - if runtime_version.spec_version == update_runtime_version.spec_version { - tracing::debug!( - "Runtime update not performed for spec_version={}, client has spec_version={}", - update_runtime_version.spec_version, runtime_version.spec_version - ); - continue - } - } - - // Update the RuntimeVersion first. - { - let mut runtime_version = self.runtime_version.write(); - // Update both the `RuntimeVersion` and `Metadata` of the client. - tracing::info!( - "Performing runtime update from {} to {}", - runtime_version.spec_version, - update_runtime_version.spec_version, - ); - *runtime_version = update_runtime_version; - } - - // Fetch the new metadata of the runtime node. - let update_metadata = self.rpc.metadata().await?; - tracing::debug!("Performing metadata update"); - let mut metadata = self.metadata.write(); - *metadata = update_metadata; - tracing::debug!("Runtime update completed"); - } - - Ok(()) - } -} From c2c9e9bbee5c65ea8ee98a984d1f945cafbb7d8b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 4 Jul 2022 15:29:39 +0100 Subject: [PATCH 08/75] rework to be 'client first' to fit better with storage + events --- subxt/src/client/mod.rs | 6 +- subxt/src/client/offline_client.rs | 43 ++- subxt/src/client/online_client.rs | 74 ++-- subxt/src/events/event_subscription.rs | 53 +-- subxt/src/events/events_type.rs | 10 +- subxt/src/extrinsic/mod.rs | 9 +- subxt/src/extrinsic/transaction.rs | 60 ++-- .../{submittable.rs => tx_client.rs} | 322 ++++++++++-------- 8 files changed, 307 insertions(+), 270 deletions(-) rename subxt/src/extrinsic/{submittable.rs => tx_client.rs} (65%) diff --git a/subxt/src/client/mod.rs b/subxt/src/client/mod.rs index b31dd97621..25f2911f42 100644 --- a/subxt/src/client/mod.rs +++ b/subxt/src/client/mod.rs @@ -12,8 +12,10 @@ mod offline_client; mod online_client; pub use offline_client::{ - OfflineClient + OfflineClient, + OfflineClientT, }; pub use online_client::{ - OnlineClient + OnlineClient, + OnlineClientT, }; \ No newline at end of file diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 90d493336f..ccdb29292e 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -6,10 +6,27 @@ use crate::{ Config, Metadata, rpc::RuntimeVersion, + extrinsic::TxClient, }; use std::sync::Arc; use derivative::Derivative; +/// A trait representing a client that can perform +/// offline-only actions. +pub trait OfflineClientT: Clone { + /// Return the provided [`Metadata`]. + fn metadata(&self) -> Metadata; + /// Return the provided genesis hash. + fn genesis_hash(&self) -> T::Hash; + /// Return the provided [`RuntimeVersion`]. + fn runtime_version(&self) -> RuntimeVersion; + + /// Work with transactions. + fn tx(&self) -> TxClient { + TxClient::new(self.clone()) + } +} + /// A client that is capable of performing offline-only operations. /// Can be constructed as long as you can populate the required fields. #[derive(Derivative)] @@ -42,21 +59,23 @@ impl OfflineClient { }) } } +} - /// Return the genesis hash. - pub fn genesis_hash(&self) -> &T::Hash { - &self.inner.genesis_hash - } +impl OfflineClientT for OfflineClient { + /// Return the genesis hash. + fn genesis_hash(&self) -> T::Hash { + self.inner.genesis_hash + } - /// Return the runtime version. - pub fn runtime_version(&self) -> &RuntimeVersion { - &self.inner.runtime_version - } + /// Return the runtime version. + fn runtime_version(&self) -> RuntimeVersion { + self.inner.runtime_version.clone() + } - /// Return the [`Metadata`] used in this client. - pub fn metadata(&self) -> &Metadata { - &self.inner.metadata - } + /// Return the [`Metadata`] used in this client. + fn metadata(&self) -> Metadata { + self.inner.metadata.clone() + } } // For ergonomics; cloning a client is deliberately fairly cheap (via Arc), diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 88794d029c..b232964e93 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use parking_lot::RwLock; use super::{ - OfflineClient, + OfflineClientT, }; use futures::future; use crate::{ @@ -22,6 +22,13 @@ use crate::{ }; use derivative::Derivative; +/// A trait representing a client that can perform +/// online actions. +pub trait OnlineClientT: OfflineClientT + Clone { + /// Return an RPC client that can be used to communicate with a node. + fn rpc(&self) -> &Rpc; +} + /// A client capable of perfomring offline or online operations. #[derive(Derivative)] #[derivative(Clone(bound = ""))] @@ -83,40 +90,6 @@ impl OnlineClient { }) } - /// Return an [`OfflineClient`] to use. - pub fn offline(&self) -> OfflineClient { - let inner = self.inner.read(); - // This is fairly cheap: - OfflineClient::new( - inner.genesis_hash, - inner.runtime_version.clone(), - inner.metadata.clone() - ) - } - - /// Return the [`Metadata`] used in this client. - pub fn metadata(&self) -> Metadata { - let inner = self.inner.read(); - inner.metadata.clone() - } - - /// Return the genesis hash. - pub fn genesis_hash(&self) -> T::Hash { - let inner = self.inner.read(); - inner.genesis_hash - } - - /// Return the runtime version. - pub fn runtime_version(&self) -> RuntimeVersion { - let inner = self.inner.read(); - inner.runtime_version.clone() - } - - /// Return the RPC interface. - pub fn rpc(&self) -> &Rpc { - &self.rpc - } - /// Create an object which can be used to keep the runtime uptodate /// in a separate thread. /// @@ -140,25 +113,28 @@ impl OnlineClient { } } -// These allow implementations to take in something like -// `impl Into` and have either an online or -// offline client (or references to) "just work", for ergonomics. -impl From> for OfflineClient { - fn from(client: OnlineClient) -> Self { - client.offline() +impl OfflineClientT for OnlineClient { + fn metadata(&self) -> Metadata { + let inner = self.inner.read(); + inner.metadata.clone() } -} -impl <'a, T: Config> From<&'a OnlineClient> for OfflineClient { - fn from(client: &'a OnlineClient) -> Self { - client.offline() + + fn genesis_hash(&self) -> T::Hash { + let inner = self.inner.read(); + inner.genesis_hash } -} -impl <'a, T: Config> From<&'a OnlineClient> for OnlineClient { - fn from(client: &'a OnlineClient) -> Self { - client.clone() + + fn runtime_version(&self) -> RuntimeVersion { + let inner = self.inner.read(); + inner.runtime_version.clone() } } +impl OnlineClientT for OnlineClient { + fn rpc(&self) -> &Rpc { + &self.rpc + } +} /// Client wrapper for performing runtime updates. See [`OnlineClient::subscribe_to_updates()`] /// for example usage. diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 5a33b8ec85..a17193ea63 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -6,8 +6,10 @@ use crate::{ error::BasicError, - OnlineClient, Config, + client::{ + OnlineClientT, + } }; use codec::Decode; use derivative::Derivative; @@ -47,15 +49,14 @@ pub use super::{ /// and is exposed only to be called via the codegen. It may /// break between minor releases. #[doc(hidden)] -pub async fn subscribe( +pub async fn subscribe( client: Client, -) -> Result, T, Evs>, BasicError> +) -> Result, Evs>, BasicError> where - Client: Into>, T: Config, + Client: OnlineClientT, Evs: Decode + 'static { - let client = client.into(); let block_subscription = client.rpc().subscribe_blocks().await?; Ok(EventSubscription::new(client, block_subscription)) } @@ -66,16 +67,14 @@ where /// and is exposed only to be called via the codegen. It may /// break between minor releases. #[doc(hidden)] -pub async fn subscribe_finalized( +pub async fn subscribe_finalized( client: Client, -) -> Result, T, Evs>, BasicError> +) -> Result, Evs>, BasicError> where - Client: Into>, T: Config, + Client: OnlineClientT + Send + Sync + 'static, Evs: Decode + 'static { - let client = client.into(); - // fetch the last finalised block details immediately, so that we'll get // events for each block after this one. let last_finalized_block_hash = client.rpc().finalized_head().await?; @@ -104,18 +103,17 @@ where /// **Note:** This is exposed so that we can run integration tests on it, but otherwise /// should not be used directly and may break between minor releases. #[doc(hidden)] -pub fn subscribe_to_block_headers_filling_in_gaps( +pub fn subscribe_to_block_headers_filling_in_gaps( client: Client, mut last_block_num: Option, sub: S, ) -> impl Stream> + Send where - Client: Into>, + T: Config, + Client: OnlineClientT + Send + Sync, S: Stream> + Send, E: Into + Send + 'static, - T: Config, { - let client = client.into(); sub.flat_map(move |s| { let client = client.clone(); @@ -165,10 +163,10 @@ pub type EventSub = Subscription; /// A subscription to events that implements [`Stream`], and returns [`Events`] objects for each block. #[derive(Derivative)] -#[derivative(Debug(bound = "Sub: std::fmt::Debug"))] -pub struct EventSubscription { +#[derivative(Debug(bound = "Sub: std::fmt::Debug, C: std::fmt::Debug"))] +pub struct EventSubscription { finished: bool, - client: OnlineClient, + client: C, block_header_subscription: Sub, #[derivative(Debug = "ignore")] at: Option< @@ -179,15 +177,15 @@ pub struct EventSubscription { _event_type: std::marker::PhantomData, } -impl> - EventSubscription +impl> + EventSubscription where Sub: Stream> + Unpin, { - fn new(client: impl Into>, block_header_subscription: Sub) -> Self { + fn new(client: C, block_header_subscription: Sub) -> Self { EventSubscription { finished: false, - client: client.into(), + client: client, block_header_subscription, at: None, _event_type: std::marker::PhantomData, @@ -201,8 +199,8 @@ where } } -impl<'a, T: Config, Sub: Unpin, Evs: Decode> Unpin - for EventSubscription +impl<'a, T: Config, C, Sub: Unpin, Evs: Decode> Unpin + for EventSubscription { } @@ -223,9 +221,10 @@ impl<'a, T: Config, Sub: Unpin, Evs: Decode> Unpin // // The advantage of this manual implementation is that we have a named type that we (and others) // can derive things on, store away, alias etc. -impl Stream for EventSubscription +impl Stream for EventSubscription where T: Config, + C: OnlineClientT + Send + Sync + 'static, Evs: Decode, Sub: Stream> + Unpin, E: Into, @@ -284,16 +283,18 @@ mod test { fn assert_send() {} assert_send::< EventSubscription< - EventSub<::Header>, crate::SubstrateConfig, (), + EventSub<::Header>, + (), >, >(); assert_send::< EventSubscription< - FinalizedEventSub<::Header>, crate::SubstrateConfig, (), + FinalizedEventSub<::Header>, + (), >, >(); } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index a3c27d9de1..d4b52c1a26 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -6,11 +6,13 @@ use crate::{ error::BasicError, - OnlineClient, Config, Event, Metadata, Phase, + client::{ + OnlineClientT, + }, }; use codec::{ Compact, @@ -33,17 +35,15 @@ use sp_core::{ /// and is exposed only to be called via the codegen. Thus, prefer to use /// `api.events().at(block_hash)` over calling this directly. #[doc(hidden)] -pub async fn at( +pub async fn at( client: Client, block_hash: T::Hash, ) -> Result, BasicError> where - Client: Into>, + Client: OnlineClientT, T: Config, Evs: Decode, { - let client = client.into(); - let mut event_bytes = client .rpc() .storage(&system_events_key(), Some(block_hash)) diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index 70da130ce2..02431e6188 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -20,10 +20,13 @@ mod params; mod signer; -mod submittable; mod transaction; +mod tx_client; pub use self::{ + tx_client::{ + TxClient, + }, params::{ AssetTip, BaseExtrinsicParams, @@ -40,10 +43,6 @@ pub use self::{ PairSigner, Signer, }, - submittable::{ - SubmittableExtrinsic, - SignedSubmittableExtrinsic, - }, transaction::{ TransactionEvents, TransactionInBlock, diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index 30a0702e1b..df2bf67184 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -6,14 +6,13 @@ use std::task::Poll; -use crate::PhantomDataSendSync; use codec::Decode; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; use crate::{ client::{ - OnlineClient, + OnlineClientT, }, error::{ BasicError, @@ -30,6 +29,7 @@ use crate::{ RawEventDetails, }, rpc::SubstrateTransactionStatus, + PhantomDataSendSync, Config, Phase, }; @@ -46,31 +46,31 @@ use jsonrpsee::core::{ /// This struct represents a subscription to the progress of some transaction, and is /// returned from [`crate::SubmittableExtrinsic::sign_and_submit_then_watch()`]. #[derive(Derivative)] -#[derivative(Debug(bound = ""))] -pub struct TransactionProgress { +#[derivative(Debug(bound = "C: std::fmt::Debug"))] +pub struct TransactionProgress { sub: Option>>, ext_hash: T::Hash, - client: OnlineClient, + client: C, _error: PhantomDataSendSync<(Err, Evs)>, } // The above type is not `Unpin` by default unless the generic param `T` is, // so we manually make it clear that Unpin is actually fine regardless of `T` // (we don't care if this moves around in memory while it's "pinned"). -impl Unpin for TransactionProgress {} +impl Unpin for TransactionProgress {} -impl - TransactionProgress +impl, Err: Decode + HasModuleError, Evs: Decode> + TransactionProgress { /// Instantiate a new [`TransactionProgress`] from a custom subscription. pub fn new( sub: RpcSubscription>, - client: impl Into>, + client: C, ext_hash: T::Hash, ) -> Self { Self { sub: Some(sub), - client: client.into(), + client, ext_hash, _error: PhantomDataSendSync::new(), } @@ -81,7 +81,7 @@ impl /// avoid importing that trait if you don't otherwise need it. pub async fn next_item( &mut self, - ) -> Option, BasicError>> { + ) -> Option, BasicError>> { self.next().await } @@ -98,7 +98,7 @@ impl /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_in_block( mut self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. @@ -128,7 +128,7 @@ impl /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized( mut self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. @@ -163,10 +163,10 @@ impl } } -impl Stream - for TransactionProgress +impl, Err: Decode + HasModuleError, Evs: Decode> Stream + for TransactionProgress { - type Item = Result, BasicError>; + type Item = Result, BasicError>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -274,8 +274,8 @@ impl Stream /// within 512 blocks. This either indicates that finality is not available for your chain, /// or that finality gadget is lagging behind. #[derive(Derivative)] -#[derivative(Debug(bound = ""))] -pub enum TransactionStatus { +#[derivative(Debug(bound = "C: std::fmt::Debug"))] +pub enum TransactionStatus { /// The transaction is part of the "future" queue. Future, /// The transaction is part of the "ready" queue. @@ -283,7 +283,7 @@ pub enum TransactionStatus { /// The transaction has been broadcast to the given peers. Broadcast(Vec), /// The transaction has been included in a block with given hash. - InBlock(TransactionInBlock), + InBlock(TransactionInBlock), /// The block this transaction was included in has been retracted, /// probably because it did not make it onto the blocks which were /// finalized. @@ -292,7 +292,7 @@ pub enum TransactionStatus { /// blocks, and so the subscription has ended. FinalityTimeout(T::Hash), /// The transaction has been finalized by a finality-gadget, e.g GRANDPA. - Finalized(TransactionInBlock), + Finalized(TransactionInBlock), /// The transaction has been replaced in the pool by another transaction /// that provides the same tags. (e.g. same (sender, nonce)). Usurped(T::Hash), @@ -302,10 +302,10 @@ pub enum TransactionStatus { Invalid, } -impl TransactionStatus { +impl TransactionStatus { /// A convenience method to return the `Finalized` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::Finalized`]. - pub fn as_finalized(&self) -> Option<&TransactionInBlock> { + pub fn as_finalized(&self) -> Option<&TransactionInBlock> { match self { Self::Finalized(val) => Some(val), _ => None, @@ -314,7 +314,7 @@ impl TransactionStatus { /// A convenience method to return the `InBlock` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::InBlock`]. - pub fn as_in_block(&self) -> Option<&TransactionInBlock> { + pub fn as_in_block(&self) -> Option<&TransactionInBlock> { match self { Self::InBlock(val) => Some(val), _ => None, @@ -324,21 +324,21 @@ impl TransactionStatus { /// This struct represents a transaction that has made it into a block. #[derive(Derivative)] -#[derivative(Debug(bound = ""))] -pub struct TransactionInBlock { +#[derivative(Debug(bound = "C: std::fmt::Debug"))] +pub struct TransactionInBlock { block_hash: T::Hash, ext_hash: T::Hash, - client: OnlineClient, - _error: PhantomDataSendSync<(E, Evs)>, + client: C, + _error: PhantomDataSendSync<(Err, Evs)>, } -impl - TransactionInBlock +impl, Err: Decode + HasModuleError, Evs: Decode> + TransactionInBlock { pub(crate) fn new( block_hash: T::Hash, ext_hash: T::Hash, - client: OnlineClient, + client: C, ) -> Self { Self { block_hash, diff --git a/subxt/src/extrinsic/submittable.rs b/subxt/src/extrinsic/tx_client.rs similarity index 65% rename from subxt/src/extrinsic/submittable.rs rename to subxt/src/extrinsic/tx_client.rs index 7362f1afa6..56b413c32a 100644 --- a/subxt/src/extrinsic/submittable.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -6,11 +6,12 @@ use sp_runtime::{ traits::Hash, ApplyExtrinsicResult, }; - +use crate::PhantomDataSendSync; use crate::{ + Config, client::{ - OfflineClient, - OnlineClient, + OfflineClientT, + OnlineClientT, }, error::{ BasicError, @@ -23,170 +24,69 @@ use crate::{ metadata::{ EncodeWithMetadata, }, - Config, Encoded, }; -use super::TransactionProgress; use codec::{ Compact, Decode, Encode, }; +use super::{ + transaction::{ + TransactionProgress, + }, +}; -/// A constructed call ready to be signed and submitted. -pub struct SubmittableExtrinsic { - call: C, - marker: std::marker::PhantomData<(Err, Evs)>, +/// A client for working with transactions. +pub struct TxClient { + client: C, + _marker: PhantomDataSendSync, } -impl SubmittableExtrinsic -where - C: EncodeWithMetadata, - Evs: Decode, - Err: Decode + HasModuleError, -{ - /// Create a new [`SubmittableExtrinsic`], given some call data that can be SCALE - /// encoded with the help of our [`Metadata`]. - pub fn new(call: C) -> Self { - SubmittableExtrinsic { - call, - marker: Default::default(), +impl TxClient { + /// Create a new [`TxClient`] + pub fn new(client: C) -> Self { + Self { + client, + _marker: PhantomDataSendSync::new() } } +} - /// Creates and signs an extrinsic and submits it to the chain. Passes default parameters - /// to construct the "signed extra" and "additional" payloads needed by the extrinsic. - /// - /// Returns a [`TransactionProgress`], 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( - &self, - client: Client, - signer: &(dyn Signer + Send + Sync), - ) -> Result, BasicError> - where - Client: Into>, - >::OtherParams: Default, - T: Config, - { - self.sign_and_submit_then_watch(client, signer, Default::default()) - .await - } - - /// Creates and signs an extrinsic and submits it to the chain. - /// - /// Returns a [`TransactionProgress`], 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( - &self, - client: Client, - signer: &(dyn Signer + Send + Sync), - other_params: >::OtherParams, - ) -> Result, BasicError> - where - Client: Into>, - T: Config, - { - self.create_signed(client, signer, other_params) - .await? - .submit_and_watch() - .await - } - - /// Creates and signs an extrinsic and submits to the chain for block inclusion. Passes - /// default parameters to construct the "signed extra" and "additional" payloads needed - /// by the extrinsic. - /// - /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. - /// - /// # Note - /// - /// 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( - &self, - client: Client, - signer: &(dyn Signer + Send + Sync), - ) -> Result - where - Client: Into>, - >::OtherParams: Default, - T: Config, - { - self.sign_and_submit(client, signer, Default::default()).await - } - - /// Creates and signs an extrinsic and submits to the chain for block inclusion. - /// - /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. - /// - /// # Note - /// - /// 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( - &self, - client: Client, - signer: &(dyn Signer + Send + Sync), - other_params: >::OtherParams, - ) -> Result - where - Client: Into>, - T: Config, - { - self.create_signed(client, signer, other_params) - .await? - .submit() - .await - } - +impl > TxClient { /// Return the SCALE encoded bytes representing the call data of the transaction. - pub fn call_data(&self, client: Client) -> Result, BasicError> + pub fn call_data(&self, call: &Call) -> Result, BasicError> where - Client: Into>, - T: Config, + Call: EncodeWithMetadata, { - let client = client.into(); - let metadata = client.metadata(); - let bytes = self.call.encode_with_metadata(metadata)?; + let metadata = self.client.metadata(); + let bytes = call.encode_with_metadata(&metadata)?; Ok(bytes) } /// Creates a returns a raw signed extrinsic, without submitting it. - pub async fn create_signed( + pub async fn create_signed_with_nonce( &self, - client: Client, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), + account_nonce: T::Index, other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, BasicError> where - Client: Into>, - T: Config, + Call: EncodeWithMetadata, { - let client: OnlineClient = client.into(); - - // 1. Get nonce - let account_nonce = if let Some(nonce) = signer.nonce() { - nonce - } else { - client - .rpc() - .system_account_next_index(signer.account_id()) - .await? - }; - // 2. SCALE encode call data to bytes (pallet u8, call u8, call params). - let call_data = Encoded(self.call_data(client.offline())?); + let call_data = Encoded(self.call_data(call)?); // 3. Construct our custom additional/extra params. let additional_and_extra_params = { // Obtain spec version and transaction version from the runtime version of the client. - let runtime = client.runtime_version(); + let runtime = self.client.runtime_version(); >::new( runtime.spec_version, runtime.transaction_version, account_nonce, - client.genesis_hash(), + self.client.genesis_hash(), other_params, ) }; @@ -242,23 +142,163 @@ where // Wrap in Encoded to ensure that any more "encode" calls leave it in the right state. // maybe we can just return the raw bytes.. Ok(SignedSubmittableExtrinsic { - client, + client: self.client.clone(), encoded: Encoded(extrinsic), - marker: self.marker, + marker: std::marker::PhantomData, }) } } +impl > TxClient { + + /// Creates a returns a raw signed extrinsic, without submitting it. + pub async fn create_signed( + &self, + call: &SubmittableExtrinsic, + signer: &(dyn Signer + Send + Sync), + other_params: >::OtherParams, + ) -> Result, BasicError> + where + Call: EncodeWithMetadata, + Err: Decode + HasModuleError, + Evs: Decode, + { + // Get nonce from the node. + let account_nonce = if let Some(nonce) = signer.nonce() { + nonce + } else { + self.client + .rpc() + .system_account_next_index(signer.account_id()) + .await? + }; + + self.create_signed_with_nonce(call, signer, account_nonce, other_params).await + } + + /// Creates and signs an extrinsic and submits it to the chain. Passes default parameters + /// to construct the "signed extra" and "additional" payloads needed by the extrinsic. + /// + /// Returns a [`TransactionProgress`], 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( + &self, + call: &SubmittableExtrinsic, + signer: &(dyn Signer + Send + Sync), + ) -> Result, BasicError> + where + Call: EncodeWithMetadata, + Err: Decode + HasModuleError, + Evs: Decode, + >::OtherParams: Default, + { + self.sign_and_submit_then_watch(call, signer, Default::default()) + .await + } + + /// Creates and signs an extrinsic and submits it to the chain. + /// + /// Returns a [`TransactionProgress`], 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( + &self, + call: &SubmittableExtrinsic, + signer: &(dyn Signer + Send + Sync), + other_params: >::OtherParams, + ) -> Result, BasicError> + where + Call: EncodeWithMetadata, + Err: Decode + HasModuleError, + Evs: Decode, + { + self.create_signed(call, signer, other_params) + .await? + .submit_and_watch() + .await + } + + /// Creates and signs an extrinsic and submits to the chain for block inclusion. Passes + /// default parameters to construct the "signed extra" and "additional" payloads needed + /// by the extrinsic. + /// + /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. + /// + /// # Note + /// + /// 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( + &self, + call: &SubmittableExtrinsic, + signer: &(dyn Signer + Send + Sync), + ) -> Result + where + Call: EncodeWithMetadata, + Err: Decode + HasModuleError, + Evs: Decode, + >::OtherParams: Default, + { + self.sign_and_submit(call, signer, Default::default()).await + } + + /// Creates and signs an extrinsic and submits to the chain for block inclusion. + /// + /// Returns `Ok` with the extrinsic hash if it is valid extrinsic. + /// + /// # Note + /// + /// 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( + &self, + call: &SubmittableExtrinsic, + signer: &(dyn Signer + Send + Sync), + other_params: >::OtherParams, + ) -> Result + where + Call: EncodeWithMetadata, + Err: Decode + HasModuleError, + Evs: Decode, + { + self.create_signed(call, signer, other_params) + .await? + .submit() + .await + } +} + +/// A constructed call ready to be signed and submitted. As well as the raw call +/// data (which ultimately is anything that can be SCALE encoded with the help of +/// [`crate::Metadata`]), this contains type information which can help us decode the +/// resulting events or error. +pub struct SubmittableExtrinsic { + call: Call, + marker: std::marker::PhantomData<(Err, Evs)>, +} + +impl SubmittableExtrinsic { + pub fn new(call: Call) -> Self { + Self { call, marker: std::marker::PhantomData } + } +} + +impl EncodeWithMetadata for SubmittableExtrinsic { + fn encode_to_with_metadata(&self, metadata: &crate::Metadata, out: &mut Vec) -> Result<(), BasicError> { + self.call.encode_to_with_metadata(metadata, out) + } +} + /// This represents an extrinsic that has been signed and is ready to submit. -pub struct SignedSubmittableExtrinsic { - client: OnlineClient, +pub struct SignedSubmittableExtrinsic { + client: C, encoded: Encoded, - marker: std::marker::PhantomData<(Err, Evs)>, + marker: std::marker::PhantomData<(Err, Evs, T)>, } -impl<'client, T, Err, Evs> SignedSubmittableExtrinsic +impl SignedSubmittableExtrinsic where T: Config, + C: OnlineClientT, Err: Decode + HasModuleError, Evs: Decode, { @@ -268,7 +308,7 @@ where /// and obtain details about it, once it has made it into a block. pub async fn submit_and_watch( &self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { // Get a hash of the extrinsic (we'll need this later). let ext_hash = T::Hashing::hash_of(&self.encoded); @@ -304,4 +344,4 @@ where pub fn encoded(&self) -> &[u8] { &self.encoded.0 } -} +} \ No newline at end of file From 02f4eae8bed61081f3dbbaa22f8e6f0987c79c85 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 4 Jul 2022 16:59:55 +0100 Subject: [PATCH 09/75] add support for events to Client --- subxt/src/client/offline_client.rs | 8 +- subxt/src/client/online_client.rs | 2 +- subxt/src/events/event_subscription.rs | 146 ++------------- subxt/src/events/events_client.rs | 241 +++++++++++++++++++++++++ subxt/src/events/events_type.rs | 86 +++------ subxt/src/events/mod.rs | 8 +- subxt/src/extrinsic/transaction.rs | 5 +- 7 files changed, 300 insertions(+), 196 deletions(-) create mode 100644 subxt/src/events/events_client.rs diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index ccdb29292e..998d0fed36 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -7,13 +7,14 @@ use crate::{ Metadata, rpc::RuntimeVersion, extrinsic::TxClient, + events::EventsClient, }; use std::sync::Arc; use derivative::Derivative; /// A trait representing a client that can perform /// offline-only actions. -pub trait OfflineClientT: Clone { +pub trait OfflineClientT: Clone + Send + Sync + Clone + 'static { /// Return the provided [`Metadata`]. fn metadata(&self) -> Metadata; /// Return the provided genesis hash. @@ -25,6 +26,11 @@ pub trait OfflineClientT: Clone { fn tx(&self) -> TxClient { TxClient::new(self.clone()) } + + /// Work with events. + fn events(&self) -> EventsClient { + EventsClient::new(self.clone()) + } } /// A client that is capable of performing offline-only operations. diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index b232964e93..cefbd8525c 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -24,7 +24,7 @@ use derivative::Derivative; /// A trait representing a client that can perform /// online actions. -pub trait OnlineClientT: OfflineClientT + Clone { +pub trait OnlineClientT: OfflineClientT { /// Return an RPC client that can be used to communicate with a node. fn rpc(&self) -> &Rpc; } diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index a17193ea63..2a3588b1f5 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -14,11 +14,7 @@ use crate::{ use codec::Decode; use derivative::Derivative; use futures::{ - future::Either, - stream::{ - self, - BoxStream, - }, + stream::BoxStream, Future, FutureExt, Stream, @@ -32,7 +28,7 @@ use std::{ }; pub use super::{ - at, + EventsClient, EventDetails, EventFilter, Events, @@ -40,117 +36,6 @@ pub use super::{ RawEventDetails, }; -/// Subscribe to events from blocks. -/// -/// **Note:** these blocks haven't necessarily been finalised yet; prefer -/// [`Events::subscribe_finalized()`] if that is important. -/// -/// **Note:** This function is hidden from the documentation -/// and is exposed only to be called via the codegen. It may -/// break between minor releases. -#[doc(hidden)] -pub async fn subscribe( - client: Client, -) -> Result, Evs>, BasicError> -where - T: Config, - Client: OnlineClientT, - Evs: Decode + 'static -{ - let block_subscription = client.rpc().subscribe_blocks().await?; - Ok(EventSubscription::new(client, block_subscription)) -} - -/// Subscribe to events from finalized blocks. -/// -/// **Note:** This function is hidden from the documentation -/// and is exposed only to be called via the codegen. It may -/// break between minor releases. -#[doc(hidden)] -pub async fn subscribe_finalized( - client: Client, -) -> Result, Evs>, BasicError> -where - T: Config, - Client: OnlineClientT + Send + Sync + 'static, - Evs: Decode + 'static -{ - // fetch the last finalised block details immediately, so that we'll get - // events for each block after this one. - let last_finalized_block_hash = client.rpc().finalized_head().await?; - let last_finalized_block_number = client - .rpc() - .header(Some(last_finalized_block_hash)) - .await? - .map(|h| (*h.number()).into()); - - let sub = client.rpc().subscribe_finalized_blocks().await?; - - // Fill in any gaps between the block above and the finalized blocks reported. - let block_subscription = subscribe_to_block_headers_filling_in_gaps( - client.clone(), - last_finalized_block_number, - sub, - ); - - Ok(EventSubscription::new(client, Box::pin(block_subscription))) -} - -/// Take a subscription that returns block headers, and if any block numbers are missed out -/// betweem the block number provided and what's returned from the subscription, we fill in -/// the gaps and get hold of all intermediate block headers. -/// -/// **Note:** This is exposed so that we can run integration tests on it, but otherwise -/// should not be used directly and may break between minor releases. -#[doc(hidden)] -pub fn subscribe_to_block_headers_filling_in_gaps( - client: Client, - mut last_block_num: Option, - sub: S, -) -> impl Stream> + Send -where - T: Config, - Client: OnlineClientT + Send + Sync, - S: Stream> + Send, - E: Into + Send + 'static, -{ - sub.flat_map(move |s| { - let client = client.clone(); - - // Get the header, or return a stream containing just the error. Our EventSubscription - // stream will return `None` as soon as it hits an error like this. - let header = match s { - Ok(header) => header, - Err(e) => return Either::Left(stream::once(async { Err(e.into()) })), - }; - - // We want all previous details up to, but not including this current block num. - 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); - - // Iterate over all of the previous blocks we need headers for, ignoring the current block - // (which we already have the header info for): - let previous_headers = stream::iter(start_block_num..end_block_num) - .then(move |n| { - let client = client.clone(); - async move { - let hash = client.rpc().block_hash(Some(n.into())).await?; - let header = client.rpc().header(hash).await?; - Ok::<_, BasicError>(header) - } - }) - .filter_map(|h| async { h.transpose() }); - - // On the next iteration, we'll get details starting just after this end block. - last_block_num = Some(end_block_num); - - // Return a combination of any previous headers plus the new header. - Either::Right(previous_headers.chain(stream::once(async { Ok(header) }))) - }) -} - /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back /// in codegen from `subscribe_finalized`, and is exposed to be used in codegen. #[doc(hidden)] @@ -163,10 +48,10 @@ pub type EventSub = Subscription; /// A subscription to events that implements [`Stream`], and returns [`Events`] objects for each block. #[derive(Derivative)] -#[derivative(Debug(bound = "Sub: std::fmt::Debug, C: std::fmt::Debug"))] -pub struct EventSubscription { +#[derivative(Debug(bound = "Sub: std::fmt::Debug, Client: std::fmt::Debug"))] +pub struct EventSubscription { finished: bool, - client: C, + client: Client, block_header_subscription: Sub, #[derivative(Debug = "ignore")] at: Option< @@ -177,12 +62,14 @@ pub struct EventSubscription { _event_type: std::marker::PhantomData, } -impl> - EventSubscription +impl> + EventSubscription where Sub: Stream> + Unpin, { - fn new(client: C, block_header_subscription: Sub) -> Self { + /// Create a new [`EventSubscription`] from a client and a subscription + /// which returns block headers. + pub fn new(client: Client, block_header_subscription: Sub) -> Self { EventSubscription { finished: false, client: client, @@ -199,8 +86,8 @@ where } } -impl<'a, T: Config, C, Sub: Unpin, Evs: Decode> Unpin - for EventSubscription +impl<'a, T: Config, Client, Sub: Unpin, Evs: Decode> Unpin + for EventSubscription { } @@ -221,12 +108,12 @@ impl<'a, T: Config, C, Sub: Unpin, Evs: Decode> Unpin // // The advantage of this manual implementation is that we have a named type that we (and others) // can derive things on, store away, alias etc. -impl Stream for EventSubscription +impl Stream for EventSubscription where T: Config, - C: OnlineClientT + Send + Sync + 'static, - Evs: Decode, + Client: OnlineClientT, Sub: Stream> + Unpin, + Evs: Decode, E: Into, { type Item = Result, BasicError>; @@ -255,7 +142,8 @@ where Some(Ok(block_header)) => { // Note [jsdw]: We may be able to get rid of the per-item allocation // with https://github.com/oblique/reusable-box-future. - self.at = Some(Box::pin(at(self.client.clone(), block_header.hash()))); + let at = EventsClient::new(self.client.clone()).at(block_header.hash()); + self.at = Some(Box::pin(at)); // Continue, so that we poll this function future we've just created. } } diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs new file mode 100644 index 0000000000..21bcf46533 --- /dev/null +++ b/subxt/src/events/events_client.rs @@ -0,0 +1,241 @@ +// 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. + +use codec::Decode; +use futures::{ + future::Either, + stream, + Stream, + StreamExt, +}; +use sp_runtime::traits::Header; +use sp_core::{ + storage::StorageKey, + twox_128, +}; +use std::future::Future; +use crate::{ + client::{ + OnlineClientT + }, + error::{ + BasicError, + }, + Config, +}; +use super::{ + EventSubscription, + Events, + EventSub, + FinalizedEventSub, +}; + +/// A client for working with events. +pub struct EventsClient { + client: Client, + _marker: std::marker::PhantomData +} + +impl EventsClient { + /// Create a new [`EventsClient`]. + pub fn new(client: Client) -> Self { + Self { + client, + _marker: std::marker::PhantomData + } + } +} + +impl EventsClient +where + T: Config, + Client: OnlineClientT +{ + /// Obtain events at some block hash. The generic parameter is what we + /// will attempt to decode each event into if using [`crate::events::Events::iter()`], + /// and is expected to be the outermost event enum that contains all of + /// the possible events across all pallets. + pub fn at( + &self, + block_hash: T::Hash, + ) -> impl Future, BasicError>> + Send + 'static + where + Evs: Decode, + { + // Clone and pass the client in like this so that we can explicitly + // return a Future that's Send + 'static, rather than tied to &self. + let client = self.client.clone(); + async move { + at(client, block_hash).await + } + } + + /// Subscribe to events from blocks. + /// + /// **Note:** these blocks haven't necessarily been finalised yet; prefer + /// [`Events::subscribe_finalized()`] if that is important. + pub fn subscribe( + &self + ) -> impl Future, Evs>, BasicError>> + Send + 'static + where + Evs: Decode + 'static + { + let client = self.client.clone(); + async move { + subscribe(client).await + } + } + + /// Subscribe to events from finalized blocks. + pub async fn subscribe_finalized( + &self, + ) -> impl Future, Evs>, BasicError>> + Send + 'static + where + Client: Send + Sync + 'static, + Evs: Decode + 'static + { + let client = self.client.clone(); + async move { + subscribe_finalized(client).await + } + } + + /// Take a subscription that returns block headers, and if any block numbers are missed out + /// betweem the block number provided and what's returned from the subscription, we fill in + /// the gaps and get hold of all intermediate block headers. + pub fn subscribe_to_block_headers_filling_in_gaps( + &self, + last_block_num: Option, + sub: S, + ) -> impl Stream> + Send + where + T: Config, + Client: OnlineClientT, + S: Stream> + Send, + E: Into + Send + 'static, + { + let client = self.client.clone(); + subscribe_to_block_headers_filling_in_gaps(client, last_block_num, sub) + } +} + +async fn at( + client: Client, + block_hash: T::Hash, +) -> Result, BasicError> +where + T: Config, + Client: OnlineClientT, + Evs: Decode, +{ + let event_bytes = client + .rpc() + .storage(&system_events_key(), Some(block_hash)) + .await? + .map(|s| s.0) + .unwrap_or_else(Vec::new); + + Ok(Events::new( + client.metadata(), + block_hash, + event_bytes, + )) +} + +async fn subscribe( + client: Client +) -> Result, Evs>, BasicError> +where + T: Config, + Client: OnlineClientT, + Evs: Decode + 'static +{ + let block_subscription = client.rpc().subscribe_blocks().await?; + Ok(EventSubscription::new(client, block_subscription)) +} + +/// Subscribe to events from finalized blocks. +async fn subscribe_finalized( + client: Client, +) -> Result, Evs>, BasicError> +where + T: Config, + Client: OnlineClientT, + Evs: Decode + 'static +{ + // fetch the last finalised block details immediately, so that we'll get + // events for each block after this one. + let last_finalized_block_hash = client.rpc().finalized_head().await?; + let last_finalized_block_number = client + .rpc() + .header(Some(last_finalized_block_hash)) + .await? + .map(|h| (*h.number()).into()); + + let sub = client.rpc().subscribe_finalized_blocks().await?; + + // Fill in any gaps between the block above and the finalized blocks reported. + let block_subscription = subscribe_to_block_headers_filling_in_gaps( + client.clone(), + last_finalized_block_number, + sub, + ); + + Ok(EventSubscription::new(client, Box::pin(block_subscription))) +} + +fn subscribe_to_block_headers_filling_in_gaps( + client: Client, + mut last_block_num: Option, + sub: S, +) -> impl Stream> + Send +where + T: Config, + Client: OnlineClientT + Send + Sync, + S: Stream> + Send, + E: Into + Send + 'static, +{ + sub.flat_map(move |s| { + let client = client.clone(); + + // Get the header, or return a stream containing just the error. Our EventSubscription + // stream will return `None` as soon as it hits an error like this. + let header = match s { + Ok(header) => header, + Err(e) => return Either::Left(stream::once(async { Err(e.into()) })), + }; + + // We want all previous details up to, but not including this current block num. + 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); + + // Iterate over all of the previous blocks we need headers for, ignoring the current block + // (which we already have the header info for): + let previous_headers = stream::iter(start_block_num..end_block_num) + .then(move |n| { + let client = client.clone(); + async move { + let hash = client.rpc().block_hash(Some(n.into())).await?; + let header = client.rpc().header(hash).await?; + Ok::<_, BasicError>(header) + } + }) + .filter_map(|h| async { h.transpose() }); + + // On the next iteration, we'll get details starting just after this end block. + last_block_num = Some(end_block_num); + + // Return a combination of any previous headers plus the new header. + Either::Right(previous_headers.chain(stream::once(async { Ok(header) }))) + }) +} + +// 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()); + StorageKey(storage_key) +} \ No newline at end of file diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index d4b52c1a26..db4a40da1c 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -10,9 +10,6 @@ use crate::{ Event, Metadata, Phase, - client::{ - OnlineClientT, - }, }; use codec::{ Compact, @@ -21,63 +18,6 @@ use codec::{ Input, }; use derivative::Derivative; -use sp_core::{ - storage::StorageKey, - twox_128, -}; - -/// Obtain events at some block hash. The generic parameter is what we -/// will attempt to decode each event into if using [`Events::iter()`], -/// and is expected to be the outermost event enum that contains all of -/// the possible events across all pallets. -/// -/// **Note:** This function is hidden from the documentation -/// and is exposed only to be called via the codegen. Thus, prefer to use -/// `api.events().at(block_hash)` over calling this directly. -#[doc(hidden)] -pub async fn at( - client: Client, - block_hash: T::Hash, -) -> Result, BasicError> -where - Client: OnlineClientT, - T: Config, - Evs: Decode, -{ - let mut event_bytes = client - .rpc() - .storage(&system_events_key(), Some(block_hash)) - .await? - .map(|s| s.0) - .unwrap_or_else(Vec::new); - - // event_bytes is a SCALE encoded vector of events. So, pluck the - // compact encoded length from the front, leaving the remaining bytes - // for our iterating to decode. - // - // Note: if we get no bytes back, avoid an error reading vec length - // and default to 0 events. - let cursor = &mut &*event_bytes; - let num_events = >::decode(cursor).unwrap_or(Compact(0)).0; - let event_bytes_len = event_bytes.len(); - let remaining_len = cursor.len(); - event_bytes.drain(0..event_bytes_len - remaining_len); - - Ok(Events { - metadata: client.metadata(), - block_hash, - event_bytes, - num_events, - _event_type: std::marker::PhantomData, - }) -} - -// 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()); - StorageKey(storage_key) -} /// A collection of events obtained from a block, bundled with the necessary /// information needed to decode and iterate over them. @@ -95,6 +35,32 @@ pub struct Events { } impl<'a, T: Config, Evs: Decode> Events { + pub (crate) fn new( + metadata: Metadata, + block_hash: T::Hash, + mut event_bytes: Vec + ) -> Self { + // event_bytes is a SCALE encoded vector of events. So, pluck the + // compact encoded length from the front, leaving the remaining bytes + // for our iterating to decode. + // + // Note: if we get no bytes back, avoid an error reading vec length + // and default to 0 events. + let cursor = &mut &*event_bytes; + let num_events = >::decode(cursor).unwrap_or(Compact(0)).0; + let event_bytes_len = event_bytes.len(); + let remaining_len = cursor.len(); + event_bytes.drain(0..event_bytes_len - remaining_len); + + Self { + metadata, + block_hash, + event_bytes, + num_events, + _event_type: std::marker::PhantomData + } + } + /// The number of events. pub fn len(&self) -> u32 { self.num_events diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 83fc828321..b3a3083333 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -86,17 +86,17 @@ mod event_subscription; mod events_type; mod filter_events; +mod events_client; +pub use events_client::{ + EventsClient, +}; pub use event_subscription::{ - subscribe, - subscribe_finalized, - subscribe_to_block_headers_filling_in_gaps, EventSub, EventSubscription, FinalizedEventSub, }; pub use events_type::{ - at, DecodedValue, EventDetails, Events, diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index df2bf67184..9fb60b3c4e 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -24,6 +24,7 @@ use crate::{ }, events::{ self, + EventsClient, EventDetails, Events, RawEventDetails, @@ -423,7 +424,9 @@ impl, Err: Decode + HasModuleError, Evs: Decode> // extrinsic, the extrinsic should be in there somewhere.. .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; - let events = events::at::<_, T, Evs>(self.client.clone(), self.block_hash).await?; + let events = EventsClient::new(self.client.clone()) + .at(self.block_hash) + .await?; Ok(TransactionEvents { ext_hash: self.ext_hash, From 7a609b8c054c51da22d7d3bbf3c578e9087cb016 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 4 Jul 2022 17:00:41 +0100 Subject: [PATCH 10/75] tidy dupe trait bound --- subxt/src/client/offline_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 998d0fed36..bf94bc1bd2 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -14,7 +14,7 @@ use derivative::Derivative; /// A trait representing a client that can perform /// offline-only actions. -pub trait OfflineClientT: Clone + Send + Sync + Clone + 'static { +pub trait OfflineClientT: Clone + Send + Sync + 'static { /// Return the provided [`Metadata`]. fn metadata(&self) -> Metadata; /// Return the provided genesis hash. From 31b3eef26881307878fb34145fcc91176d46a49f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 5 Jul 2022 11:08:05 +0100 Subject: [PATCH 11/75] Wire storage into client, but need to remove static reliance --- subxt/src/client/offline_client.rs | 6 + subxt/src/storage/mod.rs | 89 +++++ .../{storage.rs => storage/storage_client.rs} | 325 +++++++----------- 3 files changed, 221 insertions(+), 199 deletions(-) create mode 100644 subxt/src/storage/mod.rs rename subxt/src/{storage.rs => storage/storage_client.rs} (67%) diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index bf94bc1bd2..382a3b51d5 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -8,6 +8,7 @@ use crate::{ rpc::RuntimeVersion, extrinsic::TxClient, events::EventsClient, + storage::StorageClient, }; use std::sync::Arc; use derivative::Derivative; @@ -31,6 +32,11 @@ pub trait OfflineClientT: Clone + Send + Sync + 'static { fn events(&self) -> EventsClient { EventsClient::new(self.clone()) } + + /// Work with storage. + fn storage(&self) -> StorageClient { + StorageClient::new(self.clone()) + } } /// A client that is capable of performing offline-only operations. diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs new file mode 100644 index 0000000000..8f7e209f7d --- /dev/null +++ b/subxt/src/storage/mod.rs @@ -0,0 +1,89 @@ +// 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. + +//! Query the runtime storage using [StorageClient]. +//! +//! This module is the core of performing runtime storage queries. While you can +//! work with it directly, it's prefer to use the generated `storage()` interface where +//! possible. +//! +//! The exposed API is performing RPC calls to `state_getStorage` and `state_getKeysPaged`. +//! +//! A runtime storage entry can be of type: +//! - [StorageEntryKey::Plain] for keys constructed just from the prefix +//! `twox_128(pallet) ++ twox_128(storage_item)` +//! - [StorageEntryKey::Map] for mapped keys constructed from the prefix, +//! plus other arguments `twox_128(pallet) ++ twox_128(storage_item) ++ hash(arg1) ++ arg1` +//! +//! # Examples +//! +//! ## Fetch Storage Keys +//! +//! ```no_run +//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; +//! # use subxt::storage::StorageClient; +//! +//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] +//! pub mod polkadot {} +//! +//! # #[tokio::main] +//! # async fn main() { +//! # let api = ClientBuilder::new() +//! # .build() +//! # .await +//! # .unwrap() +//! # .to_runtime_api::>>(); +//! # // Obtain the storage client wrapper from the API. +//! # let storage: StorageClient<_> = api.client.storage(); +//! // Fetch just the keys, returning up to 10 keys. +//! let keys = storage +//! .fetch_keys::(10, None, None) +//! .await +//! .unwrap(); +//! // Iterate over each key +//! for key in keys.iter() { +//! println!("Key: 0x{}", hex::encode(&key)); +//! } +//! # } +//! ``` +//! +//! ## Iterate over Storage +//! +//! ```no_run +//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; +//! # use subxt::storage::StorageClient; +//! +//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] +//! pub mod polkadot {} +//! +//! # #[tokio::main] +//! # async fn main() { +//! # let api = ClientBuilder::new() +//! # .build() +//! # .await +//! # .unwrap() +//! # .to_runtime_api::>>(); +//! # // Obtain the storage client wrapper from the API. +//! # let storage: StorageClient<_> = api.client.storage(); +//! // Iterate over keys and values. +//! let mut iter = storage +//! .iter::(None) +//! .await +//! .unwrap(); +//! while let Some((key, value)) = iter.next().await.unwrap() { +//! println!("Key: 0x{}", hex::encode(&key)); +//! println!("Value: {}", value); +//! } +//! # } +//! ``` + +mod storage_client; + +pub use storage_client::{ + StorageClient, + KeyIter, + StorageEntry, + StorageEntryKey, + StorageMapKey, +}; \ No newline at end of file diff --git a/subxt/src/storage.rs b/subxt/src/storage/storage_client.rs similarity index 67% rename from subxt/src/storage.rs rename to subxt/src/storage/storage_client.rs index 18efe82730..361c979971 100644 --- a/subxt/src/storage.rs +++ b/subxt/src/storage/storage_client.rs @@ -2,87 +2,10 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! Query the runtime storage using [StorageClient]. -//! -//! This module is the core of performing runtime storage queries. While you can -//! work with it directly, it's prefer to use the generated `storage()` interface where -//! possible. -//! -//! The exposed API is performing RPC calls to `state_getStorage` and `state_getKeysPaged`. -//! -//! A runtime storage entry can be of type: -//! - [StorageEntryKey::Plain] for keys constructed just from the prefix -//! `twox_128(pallet) ++ twox_128(storage_item)` -//! - [StorageEntryKey::Map] for mapped keys constructed from the prefix, -//! plus other arguments `twox_128(pallet) ++ twox_128(storage_item) ++ hash(arg1) ++ arg1` -//! -//! # Examples -//! -//! ## Fetch Storage Keys -//! -//! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # use subxt::storage::StorageClient; -//! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} -//! -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! # // Obtain the storage client wrapper from the API. -//! # let storage: StorageClient<_> = api.client.storage(); -//! // Fetch just the keys, returning up to 10 keys. -//! let keys = storage -//! .fetch_keys::(10, None, None) -//! .await -//! .unwrap(); -//! // Iterate over each key -//! for key in keys.iter() { -//! println!("Key: 0x{}", hex::encode(&key)); -//! } -//! # } -//! ``` -//! -//! ## Iterate over Storage -//! -//! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # use subxt::storage::StorageClient; -//! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} -//! -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! # // Obtain the storage client wrapper from the API. -//! # let storage: StorageClient<_> = api.client.storage(); -//! // Iterate over keys and values. -//! let mut iter = storage -//! .iter::(None) -//! .await -//! .unwrap(); -//! while let Some((key, value)) = iter.next().await.unwrap() { -//! println!("Key: 0x{}", hex::encode(&key)); -//! println!("Value: {}", value); -//! } -//! # } -//! ``` - use codec::{ Decode, Encode, }; -use parking_lot::RwLock; use sp_core::storage::{ StorageChangeSet, StorageData, @@ -91,149 +14,58 @@ use sp_core::storage::{ pub use sp_runtime::traits::SignedExtension; use std::{ marker::PhantomData, - sync::Arc, }; - use crate::{ error::BasicError, metadata::{ - Metadata, MetadataError, }, - rpc::Rpc, + client::{ + OnlineClientT, + }, Config, StorageHasher, }; -/// Storage entry trait. -pub trait StorageEntry { - /// Pallet name. - const PALLET: &'static str; - /// Storage name. - const STORAGE: &'static str; - /// Type of the storage entry value. - type Value: Decode; - /// Get the key data for the storage. - fn key(&self) -> StorageEntryKey; -} - -/// The prefix of the key to a [`StorageEntry`] -pub struct StorageKeyPrefix(Vec); - -impl StorageKeyPrefix { - /// Create the storage key prefix for a [`StorageEntry`] - pub fn new() -> Self { - let mut bytes = sp_core::twox_128(T::PALLET.as_bytes()).to_vec(); - bytes.extend(&sp_core::twox_128(T::STORAGE.as_bytes())[..]); - Self(bytes) - } - - /// Convert the prefix into a [`StorageKey`] - pub fn to_storage_key(self) -> StorageKey { - StorageKey(self.0) - } -} - -/// Storage key. -pub enum StorageEntryKey { - /// Plain key. - Plain, - /// Map key(s). - Map(Vec), -} - -impl StorageEntryKey { - /// Construct the final [`sp_core::storage::StorageKey`] for the storage entry. - pub fn final_key(&self, prefix: StorageKeyPrefix) -> sp_core::storage::StorageKey { - let mut bytes = prefix.0; - if let Self::Map(map_keys) = self { - for map_key in map_keys { - bytes.extend(Self::hash(&map_key.hasher, &map_key.value)) - } - } - sp_core::storage::StorageKey(bytes) - } - - fn hash(hasher: &StorageHasher, bytes: &[u8]) -> Vec { - match hasher { - StorageHasher::Identity => bytes.to_vec(), - StorageHasher::Blake2_128 => sp_core::blake2_128(bytes).to_vec(), - StorageHasher::Blake2_128Concat => { - // copied from substrate Blake2_128Concat::hash since StorageHasher is not public - sp_core::blake2_128(bytes) - .iter() - .chain(bytes) - .cloned() - .collect() - } - StorageHasher::Blake2_256 => sp_core::blake2_256(bytes).to_vec(), - StorageHasher::Twox128 => sp_core::twox_128(bytes).to_vec(), - StorageHasher::Twox256 => sp_core::twox_256(bytes).to_vec(), - StorageHasher::Twox64Concat => { - sp_core::twox_64(bytes) - .iter() - .chain(bytes) - .cloned() - .collect() - } - } - } -} - -/// Storage key for a Map. -pub struct StorageMapKey { - value: Vec, - hasher: StorageHasher, -} - -impl StorageMapKey { - /// Create a new [`StorageMapKey`] with the encoded data and the hasher. - pub fn new(value: &T, hasher: StorageHasher) -> Self { - Self { - value: value.encode(), - hasher, - } - } -} - /// Client for querying runtime storage. -pub struct StorageClient<'a, T: Config> { - rpc: &'a Rpc, - metadata: Arc>, - iter_page_size: u32, +pub struct StorageClient { + client: Client, + _marker: PhantomData } -impl<'a, T: Config> Clone for StorageClient<'a, T> { +impl Clone for StorageClient { fn clone(&self) -> Self { Self { - rpc: self.rpc, - metadata: Arc::clone(&self.metadata), - iter_page_size: self.iter_page_size, + client: self.client.clone(), + _marker: PhantomData, } } } -impl<'a, T: Config> StorageClient<'a, T> { +impl StorageClient{ /// Create a new [`StorageClient`] pub fn new( - rpc: &'a Rpc, - metadata: Arc>, - iter_page_size: u32, + client: Client, ) -> Self { Self { - rpc, - metadata, - iter_page_size, + client, + _marker: PhantomData, } } +} +impl StorageClient +where + T: Config, + Client: OnlineClientT, +{ /// Fetch the value under an unhashed storage key pub async fn fetch_unhashed( &self, key: StorageKey, hash: Option, ) -> Result, BasicError> { - if let Some(data) = self.rpc.storage(&key, hash).await? { + if let Some(data) = self.client.rpc().storage(&key, hash).await? { Ok(Some(Decode::decode(&mut &data.0[..])?)) } else { Ok(None) @@ -246,7 +78,7 @@ impl<'a, T: Config> StorageClient<'a, T> { key: StorageKey, hash: Option, ) -> Result, BasicError> { - self.rpc.storage(&key, hash).await + self.client.rpc().storage(&key, hash).await } /// Fetch a StorageKey with an optional block hash. @@ -269,7 +101,7 @@ impl<'a, T: Config> StorageClient<'a, T> { if let Some(data) = self.fetch(store, hash).await? { Ok(data) } else { - let metadata = self.metadata.read(); + let metadata = self.client.metadata(); let pallet_metadata = metadata.pallet(F::PALLET)?; let storage_metadata = pallet_metadata.storage(F::STORAGE)?; let default = Decode::decode(&mut &storage_metadata.default[..]) @@ -285,7 +117,7 @@ impl<'a, T: Config> StorageClient<'a, T> { from: T::Hash, to: Option, ) -> Result>, BasicError> { - self.rpc.query_storage(keys, from, to).await + self.client.rpc().query_storage(keys, from, to).await } /// Fetch up to `count` keys for a storage map in lexicographic order. @@ -299,7 +131,8 @@ impl<'a, T: Config> StorageClient<'a, T> { ) -> Result, BasicError> { let key = StorageKeyPrefix::new::().to_storage_key(); let keys = self - .rpc + .client + .rpc() .storage_keys_paged(Some(key), count, start_key, hash) .await?; Ok(keys) @@ -308,12 +141,14 @@ impl<'a, T: Config> StorageClient<'a, T> { /// Returns an iterator of key value pairs. pub async fn iter( &self, + page_size: u32, hash: Option, - ) -> Result, BasicError> { + ) -> Result, BasicError> { let hash = if let Some(hash) = hash { hash } else { - self.rpc + self.client + .rpc() .block_hash(None) .await? .expect("didn't pass a block number; qed") @@ -321,7 +156,7 @@ impl<'a, T: Config> StorageClient<'a, T> { Ok(KeyIter { client: self.clone(), hash, - count: self.iter_page_size, + count: page_size, start_key: None, buffer: Default::default(), _marker: PhantomData, @@ -329,9 +164,100 @@ impl<'a, T: Config> StorageClient<'a, T> { } } +/// Storage entry trait. +pub trait StorageEntry { + /// Pallet name. + const PALLET: &'static str; + /// Storage name. + const STORAGE: &'static str; + /// Type of the storage entry value. + type Value: Decode; + /// Get the key data for the storage. + fn key(&self) -> StorageEntryKey; +} + +/// The prefix of the key to a [`StorageEntry`] +pub struct StorageKeyPrefix(Vec); + +impl StorageKeyPrefix { + /// Create the storage key prefix for a [`StorageEntry`] + pub fn new() -> Self { + let mut bytes = sp_core::twox_128(T::PALLET.as_bytes()).to_vec(); + bytes.extend(&sp_core::twox_128(T::STORAGE.as_bytes())[..]); + Self(bytes) + } + + /// Convert the prefix into a [`StorageKey`] + pub fn to_storage_key(self) -> StorageKey { + StorageKey(self.0) + } +} + +/// Storage key. +pub enum StorageEntryKey { + /// Plain key. + Plain, + /// Map key(s). + Map(Vec), +} + +impl StorageEntryKey { + /// Construct the final [`sp_core::storage::StorageKey`] for the storage entry. + pub fn final_key(&self, prefix: StorageKeyPrefix) -> sp_core::storage::StorageKey { + let mut bytes = prefix.0; + if let Self::Map(map_keys) = self { + for map_key in map_keys { + bytes.extend(Self::hash(&map_key.hasher, &map_key.value)) + } + } + sp_core::storage::StorageKey(bytes) + } + + fn hash(hasher: &StorageHasher, bytes: &[u8]) -> Vec { + match hasher { + StorageHasher::Identity => bytes.to_vec(), + StorageHasher::Blake2_128 => sp_core::blake2_128(bytes).to_vec(), + StorageHasher::Blake2_128Concat => { + // copied from substrate Blake2_128Concat::hash since StorageHasher is not public + sp_core::blake2_128(bytes) + .iter() + .chain(bytes) + .cloned() + .collect() + } + StorageHasher::Blake2_256 => sp_core::blake2_256(bytes).to_vec(), + StorageHasher::Twox128 => sp_core::twox_128(bytes).to_vec(), + StorageHasher::Twox256 => sp_core::twox_256(bytes).to_vec(), + StorageHasher::Twox64Concat => { + sp_core::twox_64(bytes) + .iter() + .chain(bytes) + .cloned() + .collect() + } + } + } +} + +/// Storage key for a Map. +pub struct StorageMapKey { + value: Vec, + hasher: StorageHasher, +} + +impl StorageMapKey { + /// Create a new [`StorageMapKey`] with the encoded data and the hasher. + pub fn new(value: &T, hasher: StorageHasher) -> Self { + Self { + value: value.encode(), + hasher, + } + } +} + /// Iterates over key value pairs in a map. -pub struct KeyIter<'a, T: Config, F: StorageEntry> { - client: StorageClient<'a, T>, +pub struct KeyIter { + client: StorageClient, _marker: PhantomData, count: u32, hash: T::Hash, @@ -339,7 +265,7 @@ pub struct KeyIter<'a, T: Config, F: StorageEntry> { buffer: Vec<(StorageKey, StorageData)>, } -impl<'a, T: Config, F: StorageEntry> KeyIter<'a, T, F> { +impl<'a, T: Config, Client: OnlineClientT, F: StorageEntry> KeyIter { /// Returns the next key value pair from a map. pub async fn next(&mut self) -> Result, BasicError> { loop { @@ -359,7 +285,8 @@ impl<'a, T: Config, F: StorageEntry> KeyIter<'a, T, F> { let change_sets = self .client - .rpc + .client + .rpc() .query_storage_at(&keys, Some(self.hash)) .await?; for change_set in change_sets { From 0e67e8af90788c7a131a5a260fd5d8043645bc76 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 5 Jul 2022 16:48:32 +0100 Subject: [PATCH 12/75] various tidy up and start stripping codegen to remove bits we dont need now --- codegen/src/api/calls.rs | 36 +-- codegen/src/api/mod.rs | 126 +++-------- integration-tests/src/client/mod.rs | 214 ------------------ subxt/src/events/events_type.rs | 2 +- subxt/src/extrinsic/tx_client.rs | 63 +++++- subxt/src/lib.rs | 20 +- subxt/src/metadata/decode_with_metadata.rs | 26 +++ ...code_decode.rs => encode_with_metadata.rs} | 32 +-- subxt/src/metadata/metadata_location.rs | 14 ++ subxt/src/metadata/mod.rs | 10 +- testing/integration-tests/src/client/mod.rs | 83 +++++++ 11 files changed, 254 insertions(+), 372 deletions(-) delete mode 100644 integration-tests/src/client/mod.rs create mode 100644 subxt/src/metadata/decode_with_metadata.rs rename subxt/src/metadata/{encode_decode.rs => encode_with_metadata.rs} (85%) create mode 100644 subxt/src/metadata/metadata_location.rs diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 0f222735a4..dddfe62d3b 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -124,18 +124,15 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> Result<::subxt::SubmittableExtrinsic<'a, T, X, #struct_name, DispatchError, root_mod::Event>, ::subxt::BasicError> { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::<#struct_name>()? - }; - if runtime_call_hash == [#(#call_hash,)*] { - let call = #struct_name { #( #call_args, )* }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, #struct_name, DispatchError, root_mod::Event> { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: #pallet_name, + call: #call_name, + data: #struct_name { #( #call_args, )* } + }, + [#(#call_hash,)*] + ) } }; (call_struct, client_fn) @@ -155,20 +152,9 @@ pub fn generate_calls( #( #call_structs )* - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client, marker: ::core::marker::PhantomData } - } + pub struct TransactionApi + impl TransactionApi { #( #call_fns )* } } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 541d943eac..1de771ea91 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -276,123 +276,55 @@ impl RuntimeGenerator { // Impl HasModuleError on DispatchError so we can pluck out module error details. #has_module_error_impl - pub struct RuntimeApi { - pub client: ::subxt::Client, - marker: ::core::marker::PhantomData, + pub fn constants(&'a self) -> ConstantsApi { + ConstantsApi } - impl Clone for RuntimeApi { - fn clone(&self) -> Self { - Self { client: self.client.clone(), marker: ::core::marker::PhantomData } - } - } - - impl ::core::convert::From<::subxt::Client> for RuntimeApi - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams - { - fn from(client: ::subxt::Client) -> Self { - Self { client, marker: ::core::marker::PhantomData } - } - } - - impl<'a, T, X> RuntimeApi - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn validate_metadata(&'a self) -> Result<(), ::subxt::MetadataError> { - let runtime_metadata_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.metadata_hash(&PALLETS) - }; - if runtime_metadata_hash != [ #(#metadata_hash,)* ] { - Err(::subxt::MetadataError::IncompatibleMetadata) - } else { - Ok(()) - } - } - - pub fn constants(&'a self) -> ConstantsApi<'a, T> { - ConstantsApi { client: &self.client } - } - - pub fn storage(&'a self) -> StorageApi<'a, T> { - StorageApi { client: &self.client } - } - - pub fn tx(&'a self) -> TransactionApi<'a, T, X> { - TransactionApi { client: &self.client, marker: ::core::marker::PhantomData } - } - - pub fn events(&'a self) -> EventsApi<'a, T> { - EventsApi { client: &self.client } - } + pub fn storage(&'a self) -> StorageApi { + StorageApi } - pub struct EventsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + pub fn tx(&'a self) -> TransactionApi { + TransactionApi } - impl <'a, T: ::subxt::Config> EventsApi<'a, T> { - pub async fn at(&self, block_hash: T::Hash) -> Result<::subxt::events::Events, ::subxt::BasicError> { - ::subxt::events::at::(self.client, block_hash).await - } - - pub async fn subscribe(&self) -> Result<::subxt::events::EventSubscription<'a, ::subxt::events::EventSub, T, Event>, ::subxt::BasicError> { - ::subxt::events::subscribe::(self.client).await - } - - pub async fn subscribe_finalized(&self) -> Result<::subxt::events::EventSubscription<'a, ::subxt::events::FinalizedEventSub<'a, T::Header>, T, Event>, ::subxt::BasicError> { - ::subxt::events::subscribe_finalized::(self.client).await - } - } - - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + impl ConstantsApi { #( - pub fn #pallets_with_constants(&self) -> #pallets_with_constants::constants::ConstantsApi<'a, T> { - #pallets_with_constants::constants::ConstantsApi::new(self.client) + pub fn #pallets_with_constants(&self) -> #pallets_with_constants::constants::ConstantsApi { + #pallets_with_constants::constants::ConstantsApi } )* } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - - impl<'a, T> StorageApi<'a, T> - where - T: ::subxt::Config, - { + impl StorageApi { #( - pub fn #pallets_with_storage(&self) -> #pallets_with_storage::storage::StorageApi<'a, T> { - #pallets_with_storage::storage::StorageApi::new(self.client) + pub fn #pallets_with_storage(&self) -> #pallets_with_storage::storage::StorageApi { + #pallets_with_storage::storage::StorageApi } )* } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { + impl TransactionApi { #( - pub fn #pallets_with_calls(&self) -> #pallets_with_calls::calls::TransactionApi<'a, T, X> { - #pallets_with_calls::calls::TransactionApi::new(self.client) + pub fn #pallets_with_calls(&self) -> #pallets_with_calls::calls::TransactionApi { + #pallets_with_calls::calls::TransactionApi } )* } + + /// check whether the Client you are using is aligned with the statically generated codegen. + pub fn validate_codegen>(client: C) -> Result<(), ::subxt::MetadataError> { + let runtime_metadata_hash = { + let locked_metadata = self.client.metadata(); + let metadata = locked_metadata.read(); + metadata.metadata_hash(&PALLETS) + }; + if runtime_metadata_hash != [ #(#metadata_hash,)* ] { + Err(::subxt::MetadataError::IncompatibleMetadata) + } else { + Ok(()) + } + } } } } diff --git a/integration-tests/src/client/mod.rs b/integration-tests/src/client/mod.rs deleted file mode 100644 index 52d1e0650d..0000000000 --- a/integration-tests/src/client/mod.rs +++ /dev/null @@ -1,214 +0,0 @@ -// 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. - -use crate::{ - test_node_process, - test_node_process_with, - utils::{ - node_runtime::system, - pair_signer, - test_context, - }, -}; - -use sp_core::{ - sr25519::Pair, - storage::{ - well_known_keys, - StorageKey, - }, - Pair as _, -}; -use sp_keyring::AccountKeyring; -use sp_runtime::DispatchOutcome; -use subxt::Error; - -#[tokio::test] -async fn insert_key() { - let test_node_process = test_node_process_with(AccountKeyring::Bob).await; - let client = test_node_process.client(); - let public = AccountKeyring::Alice.public().as_array_ref().to_vec(); - client - .rpc() - .insert_key( - "aura".to_string(), - "//Alice".to_string(), - public.clone().into(), - ) - .await - .unwrap(); - assert!(client - .rpc() - .has_key(public.clone().into(), "aura".to_string()) - .await - .unwrap()); -} - -#[tokio::test] -async fn fetch_block_hash() { - let node_process = test_node_process().await; - node_process.client().rpc().block_hash(None).await.unwrap(); -} - -#[tokio::test] -async fn fetch_block() { - let node_process = test_node_process().await; - let client = node_process.client(); - let block_hash = client.rpc().block_hash(None).await.unwrap(); - client.rpc().block(block_hash).await.unwrap(); -} - -#[tokio::test] -async fn fetch_read_proof() { - let node_process = test_node_process().await; - let client = node_process.client(); - let block_hash = client.rpc().block_hash(None).await.unwrap(); - client - .rpc() - .read_proof( - vec![ - StorageKey(well_known_keys::HEAP_PAGES.to_vec()), - StorageKey(well_known_keys::EXTRINSIC_INDEX.to_vec()), - ], - block_hash, - ) - .await - .unwrap(); -} - -#[tokio::test] -async fn chain_subscribe_blocks() { - let node_process = test_node_process().await; - let client = node_process.client(); - let mut blocks = client.rpc().subscribe_blocks().await.unwrap(); - blocks.next().await.unwrap().unwrap(); -} - -#[tokio::test] -async fn chain_subscribe_finalized_blocks() { - let node_process = test_node_process().await; - let client = node_process.client(); - let mut blocks = client.rpc().subscribe_finalized_blocks().await.unwrap(); - blocks.next().await.unwrap().unwrap(); -} - -#[tokio::test] -async fn fetch_keys() { - let node_process = test_node_process().await; - let client = node_process.client(); - let keys = client - .storage() - .fetch_keys::(4, None, None) - .await - .unwrap(); - assert_eq!(keys.len(), 4) -} - -#[tokio::test] -async fn test_iter() { - let node_process = test_node_process().await; - let client = node_process.client(); - let mut iter = client - .storage() - .iter::(None) - .await - .unwrap(); - let mut i = 0; - while iter.next().await.unwrap().is_some() { - i += 1; - } - assert_eq!(i, 13); -} - -#[tokio::test] -async fn fetch_system_info() { - let node_process = test_node_process().await; - let client = node_process.client(); - assert_eq!(client.rpc().system_chain().await.unwrap(), "Development"); - assert_eq!(client.rpc().system_name().await.unwrap(), "Substrate Node"); - assert!(!client.rpc().system_version().await.unwrap().is_empty()); -} - -#[tokio::test] -async fn dry_run_passes() { - let node_process = test_node_process().await; - let client = node_process.client(); - - let alice = pair_signer(AccountKeyring::Alice.pair()); - let bob = pair_signer(AccountKeyring::Bob.pair()); - let bob_address = bob.account_id().clone().into(); - let cxt = test_context().await; - let api = &cxt.api; - let signed_extrinsic = api - .tx() - .balances() - .transfer(bob_address, 10_000) - .unwrap() - .create_signed(&alice, Default::default()) - .await - .unwrap(); - - client - .rpc() - .dry_run(signed_extrinsic.encoded(), None) - .await - .expect("dryrunning failed") - .expect("expected dryrunning to be successful") - .unwrap(); - signed_extrinsic - .submit_and_watch() - .await - .unwrap() - .wait_for_finalized_success() - .await - .unwrap(); -} - -#[tokio::test] -async fn dry_run_fails() { - let node_process = test_node_process().await; - let client = node_process.client(); - - let alice = pair_signer(AccountKeyring::Alice.pair()); - let hans = pair_signer(Pair::generate().0); - let hans_address = hans.account_id().clone().into(); - let cxt = test_context().await; - let api = &cxt.api; - let signed_extrinsic = api - .tx() - .balances() - .transfer( - hans_address, - 100_000_000_000_000_000_000_000_000_000_000_000, - ) - .unwrap() - .create_signed(&alice, Default::default()) - .await - .unwrap(); - - let dry_run_res: DispatchOutcome = client - .rpc() - .dry_run(signed_extrinsic.encoded(), None) - .await - .expect("dryrunning failed") - .expect("expected dryrun transaction to be valid"); - if let Err(sp_runtime::DispatchError::Module(module_error)) = dry_run_res { - assert_eq!(module_error.index, 6); - assert_eq!(module_error.error, 2); - } else { - panic!("expected a module error when dryrunning"); - } - let res = signed_extrinsic - .submit_and_watch() - .await - .unwrap() - .wait_for_finalized_success() - .await; - if let Err(Error::Module(err)) = res { - assert_eq!(err.pallet, "Balances"); - assert_eq!(err.error, "InsufficientBalance"); - } else { - panic!("expected a runtime module error"); - } -} diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index db4a40da1c..8947324b4f 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -243,7 +243,7 @@ impl<'a, T: Config, Evs: Decode> Events { /// /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to /// use even if you do not statically know about all of the possible events. - pub fn has(&self) -> Result { + pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) } } diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index 56b413c32a..ec4a723ada 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -23,6 +23,7 @@ use crate::{ }, metadata::{ EncodeWithMetadata, + MetadataLocation, }, Encoded, }; @@ -73,8 +74,18 @@ impl > TxClient { other_params: >::OtherParams, ) -> Result, BasicError> where - Call: EncodeWithMetadata, + Call: EncodeWithMetadata + MetadataLocation, { + // 1. Validate this call against the current node metadata if the call comes + // with a hash allowing us to do so. + if let Some(actual_hash) = call.call_hash { + let metadata = self.client.metadata(); + let expected_hash = metadata.call_hash(call.call_data.pallet(), call.call_data.item())?; + if actual_hash != expected_hash { + return Err(crate::metadata::MetadataError::IncompatibleMetadata.into()) + } + } + // 2. SCALE encode call data to bytes (pallet u8, call u8, call params). let call_data = Encoded(self.call_data(call)?); @@ -159,7 +170,7 @@ impl > TxClient { other_params: >::OtherParams, ) -> Result, BasicError> where - Call: EncodeWithMetadata, + Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, Evs: Decode, { @@ -187,7 +198,7 @@ impl > TxClient { signer: &(dyn Signer + Send + Sync), ) -> Result, BasicError> where - Call: EncodeWithMetadata, + Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, Evs: Decode, >::OtherParams: Default, @@ -207,7 +218,7 @@ impl > TxClient { other_params: >::OtherParams, ) -> Result, BasicError> where - Call: EncodeWithMetadata, + Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, Evs: Decode, { @@ -233,7 +244,7 @@ impl > TxClient { signer: &(dyn Signer + Send + Sync), ) -> Result where - Call: EncodeWithMetadata, + Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, Evs: Decode, >::OtherParams: Default, @@ -256,7 +267,7 @@ impl > TxClient { other_params: >::OtherParams, ) -> Result where - Call: EncodeWithMetadata, + Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, Evs: Decode, { @@ -272,19 +283,51 @@ impl > TxClient { /// [`crate::Metadata`]), this contains type information which can help us decode the /// resulting events or error. pub struct SubmittableExtrinsic { - call: Call, + call_data: Call, + // static calls come with a hash that allows us to validate them + // against metadata. Dynamic calls have no such info, but instead can be + // validated more comprehensively at runtime when we attempt to encode them. + call_hash: Option<[u8; 32]>, marker: std::marker::PhantomData<(Err, Evs)>, } impl SubmittableExtrinsic { - pub fn new(call: Call) -> Self { - Self { call, marker: std::marker::PhantomData } + /// Create a new [`SubmittableExtrinsic`] that will not be validated + /// against node metadata. + pub fn new_unvalidated( + call_data: Call + ) -> Self { + Self { + call_data, + call_hash: None, + marker: std::marker::PhantomData + } + } + /// Create a new [`SubmittableExtrinsic`] that will be validated + /// against node metadata. + pub fn new_with_validation( + call_data: Call, + hash: [u8; 32] + ) -> Self { + Self { + call_data, + call_hash: Some(hash), + marker: std::marker::PhantomData + } + } + /// Do not validate this call prior to submitting it. + pub fn unvalidated(self) -> Self { + Self { + call_data: self.call_data, + call_hash: None, + marker: self.marker + } } } impl EncodeWithMetadata for SubmittableExtrinsic { fn encode_to_with_metadata(&self, metadata: &crate::Metadata, out: &mut Vec) -> Result<(), BasicError> { - self.call.encode_to_with_metadata(metadata, out) + self.call_data.encode_to_with_metadata(metadata, out) } } diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 4d49155949..00d6ed61ef 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -291,17 +291,17 @@ pub use crate::{ /// /// When encoding an extrinsic, we use this information to know how to map /// the call to the specific pallet and call index needed by a particular node. -pub trait Call: Encode { - /// Pallet name. - const PALLET: &'static str; - /// Function name. - const FUNCTION: &'static str; +// pub trait Call: Encode { +// /// Pallet name. +// const PALLET: &'static str; +// /// Function name. +// const FUNCTION: &'static str; - /// Returns true if the given pallet and function names match this call. - fn is_call(pallet: &str, function: &str) -> bool { - Self::PALLET == pallet && Self::FUNCTION == function - } -} +// /// Returns true if the given pallet and function names match this call. +// fn is_call(pallet: &str, function: &str) -> bool { +// Self::PALLET == pallet && Self::FUNCTION == function +// } +// } /// Trait to uniquely identify the events's identity from the runtime metadata. /// diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs new file mode 100644 index 0000000000..4c9862e611 --- /dev/null +++ b/subxt/src/metadata/decode_with_metadata.rs @@ -0,0 +1,26 @@ +// 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. + +use super::{ + Metadata, +}; +use crate::{ + error::BasicError, +}; + +pub trait DecodeWithMetadata: Sized { + type Target; + /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. + fn decode_with_metadata(bytes: &mut &[u8], type_id: u32, metadata: &Metadata) -> Result; +} + +// Things can be dynamically decoded to our Value type: +impl DecodeWithMetadata for scale_value::Value { + type Target = Self; + fn decode_with_metadata(bytes: &mut &[u8], type_id: u32, metadata: &Metadata) -> Result { + let res = scale_value::scale::decode_as_type(bytes, type_id, metadata.types())?; + Ok(res) + } +} + diff --git a/subxt/src/metadata/encode_decode.rs b/subxt/src/metadata/encode_with_metadata.rs similarity index 85% rename from subxt/src/metadata/encode_decode.rs rename to subxt/src/metadata/encode_with_metadata.rs index 8446c0a052..1f2c4ad3d4 100644 --- a/subxt/src/metadata/encode_decode.rs +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -5,6 +5,7 @@ use super::{ Metadata, MetadataError, + MetadataLocation, }; use crate::{ error::BasicError, @@ -50,6 +51,15 @@ impl EncodeWithMetadata for EncodeStaticCall { } } +impl MetadataLocation for EncodeStaticCall { + fn pallet(&self) -> &str { + self.pallet + } + fn item(&self) -> &str { + self.call + } +} + /// A wrapper which allows dynamic Value types to be SCALE encoded via [`EncodeWithMetadata`]. pub struct EncodeDynamicCall<'a> { pallet: Cow<'a, str>, @@ -72,6 +82,15 @@ impl <'a> EncodeDynamicCall<'a> { } } +impl <'a> MetadataLocation for EncodeDynamicCall<'a> { + fn pallet(&self) -> &str { + self.pallet.as_ref() + } + fn item(&self) -> &str { + self.call.as_ref() + } +} + impl <'a> EncodeWithMetadata for EncodeDynamicCall<'a> { fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError> { let pallet = metadata.pallet(&self.pallet)?; @@ -93,16 +112,3 @@ impl <'a> EncodeWithMetadata for EncodeDynamicCall<'a> { Ok(()) } } - -// pub trait DecodeWithMetadata: Sized { -// type Target; -// /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. -// fn decode_with_metadata(bytes: &[u8], type_id: u32, metadata: &Metadata) -> Result; -// } -// -// impl DecodeWithMetadata for EncodeDecodeStaticCall { -// type Target = T; -// fn decode_with_metadata(mut bytes: &[u8], _type_id: u32, _metadata: &Metadata) -> Result { -// T::decode(&mut bytes) -// } -// } \ No newline at end of file diff --git a/subxt/src/metadata/metadata_location.rs b/subxt/src/metadata/metadata_location.rs new file mode 100644 index 0000000000..fb7b925530 --- /dev/null +++ b/subxt/src/metadata/metadata_location.rs @@ -0,0 +1,14 @@ +// 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. + +/// Locate an item of a known type in the metadata. +/// We should already know that the item we're looking +/// for is a call or event for instance, and then with this, +/// we can dig up details for that item in the metadata. +pub trait MetadataLocation { + /// The pallet in which the item lives. + fn pallet(&self) -> &str; + /// The name of the item. + fn item(&self) -> &str; +} diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index 0e8a353f35..bdfd7c79e8 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -4,10 +4,16 @@ //! Types representing the metadata obtained from a node. -mod encode_decode; +mod encode_with_metadata; +mod decode_with_metadata; +mod metadata_location; mod hash_cache; mod metadata_type; +pub use metadata_location::{ + MetadataLocation, +}; + pub use metadata_type::{ ErrorMetadata, EventMetadata, @@ -17,7 +23,7 @@ pub use metadata_type::{ PalletMetadata, }; -pub use encode_decode::{ +pub use encode_with_metadata::{ EncodeStaticCall, EncodeDynamicCall, EncodeWithMetadata, diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index bcfe5ba4ce..b130f7bd6e 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -119,3 +119,86 @@ async fn fetch_system_info() { assert_eq!(client.rpc().system_name().await.unwrap(), "Substrate Node"); assert!(!client.rpc().system_version().await.unwrap().is_empty()); } + +#[tokio::test] +async fn dry_run_passes() { + let node_process = test_node_process().await; + let client = node_process.client(); + + let alice = pair_signer(AccountKeyring::Alice.pair()); + let bob = pair_signer(AccountKeyring::Bob.pair()); + let bob_address = bob.account_id().clone().into(); + let cxt = test_context().await; + let api = &cxt.api; + let signed_extrinsic = api + .tx() + .balances() + .transfer(bob_address, 10_000) + .unwrap() + .create_signed(&alice, Default::default()) + .await + .unwrap(); + + client + .rpc() + .dry_run(signed_extrinsic.encoded(), None) + .await + .expect("dryrunning failed") + .expect("expected dryrunning to be successful") + .unwrap(); + signed_extrinsic + .submit_and_watch() + .await + .unwrap() + .wait_for_finalized_success() + .await + .unwrap(); +} + +#[tokio::test] +async fn dry_run_fails() { + let node_process = test_node_process().await; + let client = node_process.client(); + + let alice = pair_signer(AccountKeyring::Alice.pair()); + let hans = pair_signer(Pair::generate().0); + let hans_address = hans.account_id().clone().into(); + let cxt = test_context().await; + let api = &cxt.api; + let signed_extrinsic = api + .tx() + .balances() + .transfer( + hans_address, + 100_000_000_000_000_000_000_000_000_000_000_000, + ) + .unwrap() + .create_signed(&alice, Default::default()) + .await + .unwrap(); + + let dry_run_res: DispatchOutcome = client + .rpc() + .dry_run(signed_extrinsic.encoded(), None) + .await + .expect("dryrunning failed") + .expect("expected dryrun transaction to be valid"); + if let Err(sp_runtime::DispatchError::Module(module_error)) = dry_run_res { + assert_eq!(module_error.index, 6); + assert_eq!(module_error.error, 2); + } else { + panic!("expected a module error when dryrunning"); + } + let res = signed_extrinsic + .submit_and_watch() + .await + .unwrap() + .wait_for_finalized_success() + .await; + if let Err(Error::Module(err)) = res { + assert_eq!(err.pallet, "Balances"); + assert_eq!(err.error, "InsufficientBalance"); + } else { + panic!("expected a runtime module error"); + } +} From 243b45214c6e5cc29c4e676651be6a92a9bf3896 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 5 Jul 2022 17:53:47 +0100 Subject: [PATCH 13/75] First pass updating calls and constants codegen --- TEMP_METADATA.json | 47380 ++++++++++++++++ codegen/src/api/constants.rs | 27 +- subxt/src/client/constants_client.rs | 89 + subxt/src/{events => client}/events_client.rs | 2 +- subxt/src/client/mod.rs | 26 +- subxt/src/client/offline_client.rs | 10 +- .../src/{storage => client}/storage_client.rs | 76 +- subxt/src/{extrinsic => client}/tx_client.rs | 6 +- subxt/src/events/event_subscription.rs | 2 +- subxt/src/events/mod.rs | 4 - subxt/src/extrinsic/mod.rs | 4 - subxt/src/extrinsic/transaction.rs | 2 +- subxt/src/lib.rs | 27 +- subxt/src/metadata/metadata_type.rs | 4 +- subxt/src/storage/mod.rs | 89 - 15 files changed, 47603 insertions(+), 145 deletions(-) create mode 100644 TEMP_METADATA.json create mode 100644 subxt/src/client/constants_client.rs rename subxt/src/{events => client}/events_client.rs (99%) rename subxt/src/{storage => client}/storage_client.rs (76%) rename subxt/src/{extrinsic => client}/tx_client.rs (99%) delete mode 100644 subxt/src/storage/mod.rs diff --git a/TEMP_METADATA.json b/TEMP_METADATA.json new file mode 100644 index 0000000000..22578a4508 --- /dev/null +++ b/TEMP_METADATA.json @@ -0,0 +1,47380 @@ +[ + 1635018093, + { + "V14": { + "types": { + "types": [ + { + "id": 0, + "type": { + "path": [ + "sp_core", + "crypto", + "AccountId32" + ], + "def": { + "composite": { + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ] + } + } + } + }, + { + "id": 1, + "type": { + "def": { + "array": { + "len": 32, + "type": 2 + } + } + } + }, + { + "id": 2, + "type": { + "def": { + "primitive": "u8" + } + } + }, + { + "id": 3, + "type": { + "path": [ + "frame_system", + "AccountInfo" + ], + "params": [ + { + "name": "Index", + "type": 4 + }, + { + "name": "AccountData", + "type": 5 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "nonce", + "type": 4, + "typeName": "Index" + }, + { + "name": "consumers", + "type": 4, + "typeName": "RefCount" + }, + { + "name": "providers", + "type": 4, + "typeName": "RefCount" + }, + { + "name": "sufficients", + "type": 4, + "typeName": "RefCount" + }, + { + "name": "data", + "type": 5, + "typeName": "AccountData" + } + ] + } + } + } + }, + { + "id": 4, + "type": { + "def": { + "primitive": "u32" + } + } + }, + { + "id": 5, + "type": { + "path": [ + "pallet_balances", + "AccountData" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "free", + "type": 6, + "typeName": "Balance" + }, + { + "name": "reserved", + "type": 6, + "typeName": "Balance" + }, + { + "name": "misc_frozen", + "type": 6, + "typeName": "Balance" + }, + { + "name": "fee_frozen", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 6, + "type": { + "def": { + "primitive": "u128" + } + } + }, + { + "id": 7, + "type": { + "path": [ + "frame_support", + "weights", + "PerDispatchClass" + ], + "params": [ + { + "name": "T", + "type": 8 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "normal", + "type": 8, + "typeName": "T" + }, + { + "name": "operational", + "type": 8, + "typeName": "T" + }, + { + "name": "mandatory", + "type": 8, + "typeName": "T" + } + ] + } + } + } + }, + { + "id": 8, + "type": { + "def": { + "primitive": "u64" + } + } + }, + { + "id": 9, + "type": { + "path": [ + "primitive_types", + "H256" + ], + "def": { + "composite": { + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ] + } + } + } + }, + { + "id": 10, + "type": { + "def": { + "sequence": { + "type": 2 + } + } + } + }, + { + "id": 11, + "type": { + "path": [ + "sp_runtime", + "generic", + "digest", + "Digest" + ], + "def": { + "composite": { + "fields": [ + { + "name": "logs", + "type": 12, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 12, + "type": { + "def": { + "sequence": { + "type": 13 + } + } + } + }, + { + "id": 13, + "type": { + "path": [ + "sp_runtime", + "generic", + "digest", + "DigestItem" + ], + "def": { + "variant": { + "variants": [ + { + "name": "PreRuntime", + "fields": [ + { + "type": 14, + "typeName": "ConsensusEngineId" + }, + { + "type": 10, + "typeName": "Vec" + } + ], + "index": 6 + }, + { + "name": "Consensus", + "fields": [ + { + "type": 14, + "typeName": "ConsensusEngineId" + }, + { + "type": 10, + "typeName": "Vec" + } + ], + "index": 4 + }, + { + "name": "Seal", + "fields": [ + { + "type": 14, + "typeName": "ConsensusEngineId" + }, + { + "type": 10, + "typeName": "Vec" + } + ], + "index": 5 + }, + { + "name": "Other", + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ], + "index": 0 + }, + { + "name": "RuntimeEnvironmentUpdated", + "index": 8 + } + ] + } + } + } + }, + { + "id": 14, + "type": { + "def": { + "array": { + "len": 4, + "type": 2 + } + } + } + }, + { + "id": 15, + "type": { + "def": { + "sequence": { + "type": 16 + } + } + } + }, + { + "id": 16, + "type": { + "path": [ + "frame_system", + "EventRecord" + ], + "params": [ + { + "name": "E", + "type": 17 + }, + { + "name": "T", + "type": 9 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "phase", + "type": 109, + "typeName": "Phase" + }, + { + "name": "event", + "type": 17, + "typeName": "E" + }, + { + "name": "topics", + "type": 110, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 17, + "type": { + "path": [ + "node_runtime", + "Event" + ], + "def": { + "variant": { + "variants": [ + { + "name": "System", + "fields": [ + { + "type": 18, + "typeName": "frame_system::Event" + } + ], + "index": 0 + }, + { + "name": "Utility", + "fields": [ + { + "type": 27, + "typeName": "pallet_utility::Event" + } + ], + "index": 1 + }, + { + "name": "Indices", + "fields": [ + { + "type": 30, + "typeName": "pallet_indices::Event" + } + ], + "index": 5 + }, + { + "name": "Balances", + "fields": [ + { + "type": 31, + "typeName": "pallet_balances::Event" + } + ], + "index": 6 + }, + { + "name": "ElectionProviderMultiPhase", + "fields": [ + { + "type": 33, + "typeName": "pallet_election_provider_multi_phase::Event" + } + ], + "index": 9 + }, + { + "name": "Staking", + "fields": [ + { + "type": 37, + "typeName": "pallet_staking::Event" + } + ], + "index": 10 + }, + { + "name": "Session", + "fields": [ + { + "type": 38, + "typeName": "pallet_session::Event" + } + ], + "index": 11 + }, + { + "name": "Democracy", + "fields": [ + { + "type": 39, + "typeName": "pallet_democracy::Event" + } + ], + "index": 12 + }, + { + "name": "Council", + "fields": [ + { + "type": 44, + "typeName": "pallet_collective::Event" + } + ], + "index": 13 + }, + { + "name": "TechnicalCommittee", + "fields": [ + { + "type": 45, + "typeName": "pallet_collective::Event" + } + ], + "index": 14 + }, + { + "name": "Elections", + "fields": [ + { + "type": 46, + "typeName": "pallet_elections_phragmen::Event" + } + ], + "index": 15 + }, + { + "name": "TechnicalMembership", + "fields": [ + { + "type": 49, + "typeName": "pallet_membership::Event" + } + ], + "index": 16 + }, + { + "name": "Grandpa", + "fields": [ + { + "type": 50, + "typeName": "pallet_grandpa::Event" + } + ], + "index": 17 + }, + { + "name": "Treasury", + "fields": [ + { + "type": 55, + "typeName": "pallet_treasury::Event" + } + ], + "index": 18 + }, + { + "name": "Contracts", + "fields": [ + { + "type": 56, + "typeName": "pallet_contracts::Event" + } + ], + "index": 19 + }, + { + "name": "Sudo", + "fields": [ + { + "type": 57, + "typeName": "pallet_sudo::Event" + } + ], + "index": 20 + }, + { + "name": "ImOnline", + "fields": [ + { + "type": 59, + "typeName": "pallet_im_online::Event" + } + ], + "index": 21 + }, + { + "name": "Offences", + "fields": [ + { + "type": 68, + "typeName": "pallet_offences::Event" + } + ], + "index": 23 + }, + { + "name": "Identity", + "fields": [ + { + "type": 70, + "typeName": "pallet_identity::Event" + } + ], + "index": 26 + }, + { + "name": "Society", + "fields": [ + { + "type": 71, + "typeName": "pallet_society::Event" + } + ], + "index": 27 + }, + { + "name": "Recovery", + "fields": [ + { + "type": 72, + "typeName": "pallet_recovery::Event" + } + ], + "index": 28 + }, + { + "name": "Vesting", + "fields": [ + { + "type": 73, + "typeName": "pallet_vesting::Event" + } + ], + "index": 29 + }, + { + "name": "Scheduler", + "fields": [ + { + "type": 74, + "typeName": "pallet_scheduler::Event" + } + ], + "index": 30 + }, + { + "name": "Preimage", + "fields": [ + { + "type": 78, + "typeName": "pallet_preimage::Event" + } + ], + "index": 31 + }, + { + "name": "Proxy", + "fields": [ + { + "type": 79, + "typeName": "pallet_proxy::Event" + } + ], + "index": 32 + }, + { + "name": "Multisig", + "fields": [ + { + "type": 82, + "typeName": "pallet_multisig::Event" + } + ], + "index": 33 + }, + { + "name": "Bounties", + "fields": [ + { + "type": 84, + "typeName": "pallet_bounties::Event" + } + ], + "index": 34 + }, + { + "name": "Tips", + "fields": [ + { + "type": 85, + "typeName": "pallet_tips::Event" + } + ], + "index": 35 + }, + { + "name": "Assets", + "fields": [ + { + "type": 86, + "typeName": "pallet_assets::Event" + } + ], + "index": 36 + }, + { + "name": "Lottery", + "fields": [ + { + "type": 87, + "typeName": "pallet_lottery::Event" + } + ], + "index": 38 + }, + { + "name": "Gilt", + "fields": [ + { + "type": 89, + "typeName": "pallet_gilt::Event" + } + ], + "index": 39 + }, + { + "name": "Uniques", + "fields": [ + { + "type": 90, + "typeName": "pallet_uniques::Event" + } + ], + "index": 40 + }, + { + "name": "TransactionStorage", + "fields": [ + { + "type": 96, + "typeName": "pallet_transaction_storage::Event" + } + ], + "index": 41 + }, + { + "name": "BagsList", + "fields": [ + { + "type": 97, + "typeName": "pallet_bags_list::Event" + } + ], + "index": 42 + }, + { + "name": "StateTrieMigration", + "fields": [ + { + "type": 98, + "typeName": "pallet_state_trie_migration::Event" + } + ], + "index": 43 + }, + { + "name": "ChildBounties", + "fields": [ + { + "type": 100, + "typeName": "pallet_child_bounties::Event" + } + ], + "index": 44 + }, + { + "name": "Referenda", + "fields": [ + { + "type": 101, + "typeName": "pallet_referenda::Event" + } + ], + "index": 45 + }, + { + "name": "ConvictionVoting", + "fields": [ + { + "type": 103, + "typeName": "pallet_conviction_voting::Event" + } + ], + "index": 46 + }, + { + "name": "Whitelist", + "fields": [ + { + "type": 104, + "typeName": "pallet_whitelist::Event" + } + ], + "index": 47 + } + ] + } + } + } + }, + { + "id": 18, + "type": { + "path": [ + "frame_system", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "ExtrinsicSuccess", + "fields": [ + { + "name": "dispatch_info", + "type": 19, + "typeName": "DispatchInfo" + } + ], + "index": 0, + "docs": [ + "An extrinsic completed successfully." + ] + }, + { + "name": "ExtrinsicFailed", + "fields": [ + { + "name": "dispatch_error", + "type": 22, + "typeName": "DispatchError" + }, + { + "name": "dispatch_info", + "type": 19, + "typeName": "DispatchInfo" + } + ], + "index": 1, + "docs": [ + "An extrinsic failed." + ] + }, + { + "name": "CodeUpdated", + "index": 2, + "docs": [ + "`:code` was updated." + ] + }, + { + "name": "NewAccount", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "A new account was created." + ] + }, + { + "name": "KilledAccount", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "An account was reaped." + ] + }, + { + "name": "Remarked", + "fields": [ + { + "name": "sender", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 5, + "docs": [ + "On on-chain remark happened." + ] + } + ] + } + }, + "docs": [ + "Event for the System pallet." + ] + } + }, + { + "id": 19, + "type": { + "path": [ + "frame_support", + "weights", + "DispatchInfo" + ], + "def": { + "composite": { + "fields": [ + { + "name": "weight", + "type": 8, + "typeName": "Weight" + }, + { + "name": "class", + "type": 20, + "typeName": "DispatchClass" + }, + { + "name": "pays_fee", + "type": 21, + "typeName": "Pays" + } + ] + } + } + } + }, + { + "id": 20, + "type": { + "path": [ + "frame_support", + "weights", + "DispatchClass" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Normal", + "index": 0 + }, + { + "name": "Operational", + "index": 1 + }, + { + "name": "Mandatory", + "index": 2 + } + ] + } + } + } + }, + { + "id": 21, + "type": { + "path": [ + "frame_support", + "weights", + "Pays" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Yes", + "index": 0 + }, + { + "name": "No", + "index": 1 + } + ] + } + } + } + }, + { + "id": 22, + "type": { + "path": [ + "sp_runtime", + "DispatchError" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Other", + "index": 0 + }, + { + "name": "CannotLookup", + "index": 1 + }, + { + "name": "BadOrigin", + "index": 2 + }, + { + "name": "Module", + "fields": [ + { + "type": 23, + "typeName": "ModuleError" + } + ], + "index": 3 + }, + { + "name": "ConsumerRemaining", + "index": 4 + }, + { + "name": "NoProviders", + "index": 5 + }, + { + "name": "TooManyConsumers", + "index": 6 + }, + { + "name": "Token", + "fields": [ + { + "type": 24, + "typeName": "TokenError" + } + ], + "index": 7 + }, + { + "name": "Arithmetic", + "fields": [ + { + "type": 25, + "typeName": "ArithmeticError" + } + ], + "index": 8 + }, + { + "name": "Transactional", + "fields": [ + { + "type": 26, + "typeName": "TransactionalError" + } + ], + "index": 9 + } + ] + } + } + } + }, + { + "id": 23, + "type": { + "path": [ + "sp_runtime", + "ModuleError" + ], + "def": { + "composite": { + "fields": [ + { + "name": "index", + "type": 2, + "typeName": "u8" + }, + { + "name": "error", + "type": 14, + "typeName": "[u8; MAX_MODULE_ERROR_ENCODED_SIZE]" + } + ] + } + } + } + }, + { + "id": 24, + "type": { + "path": [ + "sp_runtime", + "TokenError" + ], + "def": { + "variant": { + "variants": [ + { + "name": "NoFunds", + "index": 0 + }, + { + "name": "WouldDie", + "index": 1 + }, + { + "name": "BelowMinimum", + "index": 2 + }, + { + "name": "CannotCreate", + "index": 3 + }, + { + "name": "UnknownAsset", + "index": 4 + }, + { + "name": "Frozen", + "index": 5 + }, + { + "name": "Unsupported", + "index": 6 + } + ] + } + } + } + }, + { + "id": 25, + "type": { + "path": [ + "sp_runtime", + "ArithmeticError" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Underflow", + "index": 0 + }, + { + "name": "Overflow", + "index": 1 + }, + { + "name": "DivisionByZero", + "index": 2 + } + ] + } + } + } + }, + { + "id": 26, + "type": { + "path": [ + "sp_runtime", + "TransactionalError" + ], + "def": { + "variant": { + "variants": [ + { + "name": "LimitReached", + "index": 0 + }, + { + "name": "NoLayer", + "index": 1 + } + ] + } + } + } + }, + { + "id": 27, + "type": { + "path": [ + "pallet_utility", + "pallet", + "Event" + ], + "def": { + "variant": { + "variants": [ + { + "name": "BatchInterrupted", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "u32" + }, + { + "name": "error", + "type": 22, + "typeName": "DispatchError" + } + ], + "index": 0, + "docs": [ + "Batch of dispatches did not complete fully. Index of first failing dispatch given, as", + "well as the error." + ] + }, + { + "name": "BatchCompleted", + "index": 1, + "docs": [ + "Batch of dispatches completed fully with no error." + ] + }, + { + "name": "ItemCompleted", + "index": 2, + "docs": [ + "A single item within a Batch of dispatches has completed with no error." + ] + }, + { + "name": "DispatchedAs", + "fields": [ + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 3, + "docs": [ + "A call was dispatched." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 28, + "type": { + "path": [ + "Result" + ], + "params": [ + { + "name": "T", + "type": 29 + }, + { + "name": "E", + "type": 22 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Ok", + "fields": [ + { + "type": 29 + } + ], + "index": 0 + }, + { + "name": "Err", + "fields": [ + { + "type": 22 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 29, + "type": { + "def": { + "tuple": [] + } + } + }, + { + "id": 30, + "type": { + "path": [ + "pallet_indices", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "IndexAssigned", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + } + ], + "index": 0, + "docs": [ + "A account index was assigned." + ] + }, + { + "name": "IndexFreed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + } + ], + "index": 1, + "docs": [ + "A account index has been freed up (unassigned)." + ] + }, + { + "name": "IndexFrozen", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 2, + "docs": [ + "A account index has been frozen to its current account ID." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 31, + "type": { + "path": [ + "pallet_balances", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Endowed", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "free_balance", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 0, + "docs": [ + "An account was created with some free balance." + ] + }, + { + "name": "DustLost", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 1, + "docs": [ + "An account was removed whose balance was non-zero but below ExistentialDeposit,", + "resulting in an outright loss." + ] + }, + { + "name": "Transfer", + "fields": [ + { + "name": "from", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "to", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 2, + "docs": [ + "Transfer succeeded." + ] + }, + { + "name": "BalanceSet", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "free", + "type": 6, + "typeName": "T::Balance" + }, + { + "name": "reserved", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 3, + "docs": [ + "A balance was set by root." + ] + }, + { + "name": "Reserved", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 4, + "docs": [ + "Some balance was reserved (moved from free to reserved)." + ] + }, + { + "name": "Unreserved", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 5, + "docs": [ + "Some balance was unreserved (moved from reserved to free)." + ] + }, + { + "name": "ReserveRepatriated", + "fields": [ + { + "name": "from", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "to", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + }, + { + "name": "destination_status", + "type": 32, + "typeName": "Status" + } + ], + "index": 6, + "docs": [ + "Some balance was moved from the reserve of the first account to the second account.", + "Final argument indicates the destination balance type." + ] + }, + { + "name": "Deposit", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 7, + "docs": [ + "Some amount was deposited (e.g. for transaction fees)." + ] + }, + { + "name": "Withdraw", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 8, + "docs": [ + "Some amount was withdrawn from the account (e.g. for transaction fees)." + ] + }, + { + "name": "Slashed", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 9, + "docs": [ + "Some amount was removed from the account (e.g. for misbehavior)." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 32, + "type": { + "path": [ + "frame_support", + "traits", + "tokens", + "misc", + "BalanceStatus" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Free", + "index": 0 + }, + { + "name": "Reserved", + "index": 1 + } + ] + } + } + } + }, + { + "id": 33, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "SolutionStored", + "fields": [ + { + "name": "election_compute", + "type": 34, + "typeName": "ElectionCompute" + }, + { + "name": "prev_ejected", + "type": 35, + "typeName": "bool" + } + ], + "index": 0, + "docs": [ + "A solution was stored with the given compute.", + "", + "If the solution is signed, this means that it hasn't yet been processed. If the", + "solution is unsigned, this means that it has also been processed.", + "", + "The `bool` is `true` when a previous solution was ejected to make room for this one." + ] + }, + { + "name": "ElectionFinalized", + "fields": [ + { + "name": "election_compute", + "type": 36, + "typeName": "Option" + } + ], + "index": 1, + "docs": [ + "The election has been finalized, with `Some` of the given computation, or else if the", + "election failed, `None`." + ] + }, + { + "name": "Rewarded", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "::AccountId" + }, + { + "name": "value", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "An account has been rewarded for their signed submission being finalized." + ] + }, + { + "name": "Slashed", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "::AccountId" + }, + { + "name": "value", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 3, + "docs": [ + "An account has been slashed for submitting an invalid signed submission." + ] + }, + { + "name": "SignedPhaseStarted", + "fields": [ + { + "name": "round", + "type": 4, + "typeName": "u32" + } + ], + "index": 4, + "docs": [ + "The signed phase of the given round has started." + ] + }, + { + "name": "UnsignedPhaseStarted", + "fields": [ + { + "name": "round", + "type": 4, + "typeName": "u32" + } + ], + "index": 5, + "docs": [ + "The unsigned phase of the given round has started." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 34, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "ElectionCompute" + ], + "def": { + "variant": { + "variants": [ + { + "name": "OnChain", + "index": 0 + }, + { + "name": "Signed", + "index": 1 + }, + { + "name": "Unsigned", + "index": 2 + }, + { + "name": "Fallback", + "index": 3 + }, + { + "name": "Emergency", + "index": 4 + } + ] + } + } + } + }, + { + "id": 35, + "type": { + "def": { + "primitive": "bool" + } + } + }, + { + "id": 36, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 34 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 34 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 37, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "EraPaid", + "fields": [ + { + "type": 4, + "typeName": "EraIndex" + }, + { + "type": 6, + "typeName": "BalanceOf" + }, + { + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 0, + "docs": [ + "The era payout has been set; the first balance is the validator-payout; the second is", + "the remainder from the maximum amount of reward.", + "\\[era_index, validator_payout, remainder\\]" + ] + }, + { + "name": "Rewarded", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "The nominator has been rewarded by this amount. \\[stash, amount\\]" + ] + }, + { + "name": "Slashed", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "One validator (and its nominators) has been slashed by the given amount.", + "\\[validator, amount\\]" + ] + }, + { + "name": "OldSlashingReportDiscarded", + "fields": [ + { + "type": 4, + "typeName": "SessionIndex" + } + ], + "index": 3, + "docs": [ + "An old slashing report from a prior era was discarded because it could", + "not be processed. \\[session_index\\]" + ] + }, + { + "name": "StakersElected", + "index": 4, + "docs": [ + "A new set of stakers was elected." + ] + }, + { + "name": "Bonded", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 5, + "docs": [ + "An account has bonded this amount. \\[stash, amount\\]", + "", + "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", + "it will not be emitted for staking rewards when they are added to stake." + ] + }, + { + "name": "Unbonded", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 6, + "docs": [ + "An account has unbonded this amount. \\[stash, amount\\]" + ] + }, + { + "name": "Withdrawn", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 7, + "docs": [ + "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", + "from the unlocking queue. \\[stash, amount\\]" + ] + }, + { + "name": "Kicked", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 8, + "docs": [ + "A nominator has been kicked from a validator. \\[nominator, stash\\]" + ] + }, + { + "name": "StakingElectionFailed", + "index": 9, + "docs": [ + "The election failed. No new era is planned." + ] + }, + { + "name": "Chilled", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 10, + "docs": [ + "An account has stopped participating as either a validator or nominator.", + "\\[stash\\]" + ] + }, + { + "name": "PayoutStarted", + "fields": [ + { + "type": 4, + "typeName": "EraIndex" + }, + { + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 11, + "docs": [ + "The stakers' rewards are getting paid. \\[era_index, validator_stash\\]" + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 38, + "type": { + "path": [ + "pallet_session", + "pallet", + "Event" + ], + "def": { + "variant": { + "variants": [ + { + "name": "NewSession", + "fields": [ + { + "name": "session_index", + "type": 4, + "typeName": "SessionIndex" + } + ], + "index": 0, + "docs": [ + "New session has happened. Note that the argument is the session index, not the", + "block number as the type might suggest." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 39, + "type": { + "path": [ + "pallet_democracy", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Proposed", + "fields": [ + { + "name": "proposal_index", + "type": 4, + "typeName": "PropIndex" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 0, + "docs": [ + "A motion has been proposed by a public account." + ] + }, + { + "name": "Tabled", + "fields": [ + { + "name": "proposal_index", + "type": 4, + "typeName": "PropIndex" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "depositors", + "type": 40, + "typeName": "Vec" + } + ], + "index": 1, + "docs": [ + "A public proposal has been tabled for referendum vote." + ] + }, + { + "name": "ExternalTabled", + "index": 2, + "docs": [ + "An external proposal has been tabled." + ] + }, + { + "name": "Started", + "fields": [ + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + }, + { + "name": "threshold", + "type": 41, + "typeName": "VoteThreshold" + } + ], + "index": 3, + "docs": [ + "A referendum has begun." + ] + }, + { + "name": "Passed", + "fields": [ + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 4, + "docs": [ + "A proposal has been approved by referendum." + ] + }, + { + "name": "NotPassed", + "fields": [ + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 5, + "docs": [ + "A proposal has been rejected by referendum." + ] + }, + { + "name": "Cancelled", + "fields": [ + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 6, + "docs": [ + "A referendum has been cancelled." + ] + }, + { + "name": "Executed", + "fields": [ + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 7, + "docs": [ + "A proposal has been enacted." + ] + }, + { + "name": "Delegated", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "target", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 8, + "docs": [ + "An account has delegated their vote to another account." + ] + }, + { + "name": "Undelegated", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 9, + "docs": [ + "An account has cancelled a previous delegation operation." + ] + }, + { + "name": "Vetoed", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "until", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 10, + "docs": [ + "An external proposal has been vetoed." + ] + }, + { + "name": "PreimageNoted", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 11, + "docs": [ + "A proposal's preimage was noted, and the deposit taken." + ] + }, + { + "name": "PreimageUsed", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "provider", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 12, + "docs": [ + "A proposal preimage was removed and used (the deposit was returned)." + ] + }, + { + "name": "PreimageInvalid", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 13, + "docs": [ + "A proposal could not be executed because its preimage was invalid." + ] + }, + { + "name": "PreimageMissing", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 14, + "docs": [ + "A proposal could not be executed because its preimage was missing." + ] + }, + { + "name": "PreimageReaped", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "provider", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "reaper", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 15, + "docs": [ + "A registered preimage was removed and the deposit collected by the reaper." + ] + }, + { + "name": "Blacklisted", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 16, + "docs": [ + "A proposal_hash has been blacklisted permanently." + ] + }, + { + "name": "Voted", + "fields": [ + { + "name": "voter", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + }, + { + "name": "vote", + "type": 42, + "typeName": "AccountVote>" + } + ], + "index": 17, + "docs": [ + "An account has voted in a referendum" + ] + }, + { + "name": "Seconded", + "fields": [ + { + "name": "seconder", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "prop_index", + "type": 4, + "typeName": "PropIndex" + } + ], + "index": 18, + "docs": [ + "An account has secconded a proposal" + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 40, + "type": { + "def": { + "sequence": { + "type": 0 + } + } + } + }, + { + "id": 41, + "type": { + "path": [ + "pallet_democracy", + "vote_threshold", + "VoteThreshold" + ], + "def": { + "variant": { + "variants": [ + { + "name": "SuperMajorityApprove", + "index": 0 + }, + { + "name": "SuperMajorityAgainst", + "index": 1 + }, + { + "name": "SimpleMajority", + "index": 2 + } + ] + } + } + } + }, + { + "id": 42, + "type": { + "path": [ + "pallet_democracy", + "vote", + "AccountVote" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Standard", + "fields": [ + { + "name": "vote", + "type": 43, + "typeName": "Vote" + }, + { + "name": "balance", + "type": 6, + "typeName": "Balance" + } + ], + "index": 0 + }, + { + "name": "Split", + "fields": [ + { + "name": "aye", + "type": 6, + "typeName": "Balance" + }, + { + "name": "nay", + "type": 6, + "typeName": "Balance" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 43, + "type": { + "path": [ + "pallet_democracy", + "vote", + "Vote" + ], + "def": { + "composite": { + "fields": [ + { + "type": 2 + } + ] + } + } + } + }, + { + "id": 44, + "type": { + "path": [ + "pallet_collective", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Proposed", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proposal_index", + "type": 4, + "typeName": "ProposalIndex" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "threshold", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 0, + "docs": [ + "A motion (given hash) has been proposed (by given account) with a threshold (given", + "`MemberCount`)." + ] + }, + { + "name": "Voted", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "voted", + "type": 35, + "typeName": "bool" + }, + { + "name": "yes", + "type": 4, + "typeName": "MemberCount" + }, + { + "name": "no", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 1, + "docs": [ + "A motion (given hash) has been voted on by given account, leaving", + "a tally (yes votes and no votes given respectively as `MemberCount`)." + ] + }, + { + "name": "Approved", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 2, + "docs": [ + "A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 3, + "docs": [ + "A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 4, + "docs": [ + "A motion was executed; result will be `Ok` if it returned without error." + ] + }, + { + "name": "MemberExecuted", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 5, + "docs": [ + "A single member did some action; result will be `Ok` if it returned without error." + ] + }, + { + "name": "Closed", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "yes", + "type": 4, + "typeName": "MemberCount" + }, + { + "name": "no", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 6, + "docs": [ + "A proposal was closed because its threshold was reached or after its duration was up." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 45, + "type": { + "path": [ + "pallet_collective", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Proposed", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proposal_index", + "type": 4, + "typeName": "ProposalIndex" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "threshold", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 0, + "docs": [ + "A motion (given hash) has been proposed (by given account) with a threshold (given", + "`MemberCount`)." + ] + }, + { + "name": "Voted", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "voted", + "type": 35, + "typeName": "bool" + }, + { + "name": "yes", + "type": 4, + "typeName": "MemberCount" + }, + { + "name": "no", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 1, + "docs": [ + "A motion (given hash) has been voted on by given account, leaving", + "a tally (yes votes and no votes given respectively as `MemberCount`)." + ] + }, + { + "name": "Approved", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 2, + "docs": [ + "A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 3, + "docs": [ + "A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 4, + "docs": [ + "A motion was executed; result will be `Ok` if it returned without error." + ] + }, + { + "name": "MemberExecuted", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 5, + "docs": [ + "A single member did some action; result will be `Ok` if it returned without error." + ] + }, + { + "name": "Closed", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "yes", + "type": 4, + "typeName": "MemberCount" + }, + { + "name": "no", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 6, + "docs": [ + "A proposal was closed because its threshold was reached or after its duration was up." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 46, + "type": { + "path": [ + "pallet_elections_phragmen", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NewTerm", + "fields": [ + { + "name": "new_members", + "type": 47, + "typeName": "Vec<(::AccountId, BalanceOf)>" + } + ], + "index": 0, + "docs": [ + "A new term with new_members. This indicates that enough candidates existed to run", + "the election, not that enough have has been elected. The inner value must be examined", + "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond", + "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to", + "begin with." + ] + }, + { + "name": "EmptyTerm", + "index": 1, + "docs": [ + "No (or not enough) candidates existed for this round. This is different from", + "`NewTerm(\\[\\])`. See the description of `NewTerm`." + ] + }, + { + "name": "ElectionError", + "index": 2, + "docs": [ + "Internal error happened while trying to perform election." + ] + }, + { + "name": "MemberKicked", + "fields": [ + { + "name": "member", + "type": 0, + "typeName": "::AccountId" + } + ], + "index": 3, + "docs": [ + "A member has been removed. This should always be followed by either `NewTerm` or", + "`EmptyTerm`." + ] + }, + { + "name": "Renounced", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "::AccountId" + } + ], + "index": 4, + "docs": [ + "Someone has renounced their candidacy." + ] + }, + { + "name": "CandidateSlashed", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 5, + "docs": [ + "A candidate was slashed by amount due to failing to obtain a seat as member or", + "runner-up.", + "", + "Note that old members and runners-up are also candidates." + ] + }, + { + "name": "SeatHolderSlashed", + "fields": [ + { + "name": "seat_holder", + "type": 0, + "typeName": "::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 6, + "docs": [ + "A seat holder was slashed by amount by being forcefully removed from the set." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 47, + "type": { + "def": { + "sequence": { + "type": 48 + } + } + } + }, + { + "id": 48, + "type": { + "def": { + "tuple": [ + 0, + 6 + ] + } + } + }, + { + "id": 49, + "type": { + "path": [ + "pallet_membership", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "MemberAdded", + "index": 0, + "docs": [ + "The given member was added; see the transaction for who." + ] + }, + { + "name": "MemberRemoved", + "index": 1, + "docs": [ + "The given member was removed; see the transaction for who." + ] + }, + { + "name": "MembersSwapped", + "index": 2, + "docs": [ + "Two members were swapped; see the transaction for who." + ] + }, + { + "name": "MembersReset", + "index": 3, + "docs": [ + "The membership was reset; see the transaction for who the new set is." + ] + }, + { + "name": "KeyChanged", + "index": 4, + "docs": [ + "One of the members' keys changed." + ] + }, + { + "name": "Dummy", + "index": 5, + "docs": [ + "Phantom member, never used." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 50, + "type": { + "path": [ + "pallet_grandpa", + "pallet", + "Event" + ], + "def": { + "variant": { + "variants": [ + { + "name": "NewAuthorities", + "fields": [ + { + "name": "authority_set", + "type": 51, + "typeName": "AuthorityList" + } + ], + "index": 0, + "docs": [ + "New authority set has been applied." + ] + }, + { + "name": "Paused", + "index": 1, + "docs": [ + "Current authority set has been paused." + ] + }, + { + "name": "Resumed", + "index": 2, + "docs": [ + "Current authority set has been resumed." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 51, + "type": { + "def": { + "sequence": { + "type": 52 + } + } + } + }, + { + "id": 52, + "type": { + "def": { + "tuple": [ + 53, + 8 + ] + } + } + }, + { + "id": 53, + "type": { + "path": [ + "sp_finality_grandpa", + "app", + "Public" + ], + "def": { + "composite": { + "fields": [ + { + "type": 54, + "typeName": "ed25519::Public" + } + ] + } + } + } + }, + { + "id": 54, + "type": { + "path": [ + "sp_core", + "ed25519", + "Public" + ], + "def": { + "composite": { + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ] + } + } + } + }, + { + "id": 55, + "type": { + "path": [ + "pallet_treasury", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Proposed", + "fields": [ + { + "name": "proposal_index", + "type": 4, + "typeName": "ProposalIndex" + } + ], + "index": 0, + "docs": [ + "New proposal." + ] + }, + { + "name": "Spending", + "fields": [ + { + "name": "budget_remaining", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "We have ended a spend period and will now allocate funds." + ] + }, + { + "name": "Awarded", + "fields": [ + { + "name": "proposal_index", + "type": 4, + "typeName": "ProposalIndex" + }, + { + "name": "award", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 2, + "docs": [ + "Some funds have been allocated." + ] + }, + { + "name": "Rejected", + "fields": [ + { + "name": "proposal_index", + "type": 4, + "typeName": "ProposalIndex" + }, + { + "name": "slashed", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 3, + "docs": [ + "A proposal was rejected; funds were slashed." + ] + }, + { + "name": "Burnt", + "fields": [ + { + "name": "burnt_funds", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 4, + "docs": [ + "Some of our funds have been burnt." + ] + }, + { + "name": "Rollover", + "fields": [ + { + "name": "rollover_balance", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 5, + "docs": [ + "Spending has finished; this is the amount that rolls over until next spend." + ] + }, + { + "name": "Deposit", + "fields": [ + { + "name": "value", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 6, + "docs": [ + "Some funds have been deposited." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 56, + "type": { + "path": [ + "pallet_contracts", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Instantiated", + "fields": [ + { + "name": "deployer", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "contract", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "Contract deployed by address at the specified address." + ] + }, + { + "name": "Terminated", + "fields": [ + { + "name": "contract", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The contract that was terminated." + ] + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The account that received the contracts remaining balance" + ] + } + ], + "index": 1, + "docs": [ + "Contract has been removed.", + "", + "# Note", + "", + "The only way for a contract to be removed and emitting this event is by calling", + "`seal_terminate`." + ] + }, + { + "name": "CodeStored", + "fields": [ + { + "name": "code_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 2, + "docs": [ + "Code with the specified hash has been stored." + ] + }, + { + "name": "ContractEmitted", + "fields": [ + { + "name": "contract", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The contract that emitted the event." + ] + }, + { + "name": "data", + "type": 10, + "typeName": "Vec", + "docs": [ + "Data supplied by the contract. Metadata generated during contract compilation", + "is needed to decode it." + ] + } + ], + "index": 3, + "docs": [ + "A custom event emitted by the contract." + ] + }, + { + "name": "CodeRemoved", + "fields": [ + { + "name": "code_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 4, + "docs": [ + "A code with the specified hash was removed." + ] + }, + { + "name": "ContractCodeUpdated", + "fields": [ + { + "name": "contract", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The contract that has been updated." + ] + }, + { + "name": "new_code_hash", + "type": 9, + "typeName": "T::Hash", + "docs": [ + "New code hash that was set for the contract." + ] + }, + { + "name": "old_code_hash", + "type": 9, + "typeName": "T::Hash", + "docs": [ + "Previous code hash of the contract." + ] + } + ], + "index": 5, + "docs": [ + "A contract's code was updated." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 57, + "type": { + "path": [ + "pallet_sudo", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Sudid", + "fields": [ + { + "name": "sudo_result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 0, + "docs": [ + "A sudo just took place. \\[result\\]" + ] + }, + { + "name": "KeyChanged", + "fields": [ + { + "name": "old_sudoer", + "type": 58, + "typeName": "Option" + } + ], + "index": 1, + "docs": [ + "The \\[sudoer\\] just switched identity; the old key is supplied if one existed." + ] + }, + { + "name": "SudoAsDone", + "fields": [ + { + "name": "sudo_result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 2, + "docs": [ + "A sudo just took place. \\[result\\]" + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 58, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 0 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 0 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 59, + "type": { + "path": [ + "pallet_im_online", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "HeartbeatReceived", + "fields": [ + { + "name": "authority_id", + "type": 60, + "typeName": "T::AuthorityId" + } + ], + "index": 0, + "docs": [ + "A new heartbeat was received from `AuthorityId`." + ] + }, + { + "name": "AllGood", + "index": 1, + "docs": [ + "At the end of the session, no offence was committed." + ] + }, + { + "name": "SomeOffline", + "fields": [ + { + "name": "offline", + "type": 62, + "typeName": "Vec>" + } + ], + "index": 2, + "docs": [ + "At the end of the session, at least one validator was found to be offline." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 60, + "type": { + "path": [ + "pallet_im_online", + "sr25519", + "app_sr25519", + "Public" + ], + "def": { + "composite": { + "fields": [ + { + "type": 61, + "typeName": "sr25519::Public" + } + ] + } + } + } + }, + { + "id": 61, + "type": { + "path": [ + "sp_core", + "sr25519", + "Public" + ], + "def": { + "composite": { + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ] + } + } + } + }, + { + "id": 62, + "type": { + "def": { + "sequence": { + "type": 63 + } + } + } + }, + { + "id": 63, + "type": { + "def": { + "tuple": [ + 0, + 64 + ] + } + } + }, + { + "id": 64, + "type": { + "path": [ + "pallet_staking", + "Exposure" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "total", + "type": 65, + "typeName": "Balance" + }, + { + "name": "own", + "type": 65, + "typeName": "Balance" + }, + { + "name": "others", + "type": 66, + "typeName": "Vec>" + } + ] + } + } + } + }, + { + "id": 65, + "type": { + "def": { + "compact": { + "type": 6 + } + } + } + }, + { + "id": 66, + "type": { + "def": { + "sequence": { + "type": 67 + } + } + } + }, + { + "id": 67, + "type": { + "path": [ + "pallet_staking", + "IndividualExposure" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "value", + "type": 65, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 68, + "type": { + "path": [ + "pallet_offences", + "pallet", + "Event" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Offence", + "fields": [ + { + "name": "kind", + "type": 69, + "typeName": "Kind" + }, + { + "name": "timeslot", + "type": 10, + "typeName": "OpaqueTimeSlot" + } + ], + "index": 0, + "docs": [ + "There is an offence reported of the given `kind` happened at the `session_index` and", + "(kind-specific) time slot. This event is not deposited for duplicate slashes.", + "\\[kind, timeslot\\]." + ] + } + ] + } + }, + "docs": [ + "Events type." + ] + } + }, + { + "id": 69, + "type": { + "def": { + "array": { + "len": 16, + "type": 2 + } + } + } + }, + { + "id": 70, + "type": { + "path": [ + "pallet_identity", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "IdentitySet", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "A name was set or reset (which will remove all judgements)." + ] + }, + { + "name": "IdentityCleared", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "A name was cleared, and the given balance returned." + ] + }, + { + "name": "IdentityKilled", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "A name was removed and the given balance slashed." + ] + }, + { + "name": "JudgementRequested", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "registrar_index", + "type": 4, + "typeName": "RegistrarIndex" + } + ], + "index": 3, + "docs": [ + "A judgement was asked from a registrar." + ] + }, + { + "name": "JudgementUnrequested", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "registrar_index", + "type": 4, + "typeName": "RegistrarIndex" + } + ], + "index": 4, + "docs": [ + "A judgement request was retracted." + ] + }, + { + "name": "JudgementGiven", + "fields": [ + { + "name": "target", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "registrar_index", + "type": 4, + "typeName": "RegistrarIndex" + } + ], + "index": 5, + "docs": [ + "A judgement was given by a registrar." + ] + }, + { + "name": "RegistrarAdded", + "fields": [ + { + "name": "registrar_index", + "type": 4, + "typeName": "RegistrarIndex" + } + ], + "index": 6, + "docs": [ + "A registrar was added." + ] + }, + { + "name": "SubIdentityAdded", + "fields": [ + { + "name": "sub", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "main", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 7, + "docs": [ + "A sub-identity was added to an identity and the deposit paid." + ] + }, + { + "name": "SubIdentityRemoved", + "fields": [ + { + "name": "sub", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "main", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 8, + "docs": [ + "A sub-identity was removed from an identity and the deposit freed." + ] + }, + { + "name": "SubIdentityRevoked", + "fields": [ + { + "name": "sub", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "main", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 9, + "docs": [ + "A sub-identity was cleared, and the given deposit repatriated from the", + "main identity account to the sub-identity account." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 71, + "type": { + "path": [ + "pallet_society", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Founded", + "fields": [ + { + "name": "founder", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "The society is founded by the given identity." + ] + }, + { + "name": "Bid", + "fields": [ + { + "name": "candidate_id", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "offer", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "A membership bid just happened. The given account is the candidate's ID and their offer", + "is the second." + ] + }, + { + "name": "Vouch", + "fields": [ + { + "name": "candidate_id", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "offer", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "vouching", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 2, + "docs": [ + "A membership bid just happened by vouching. The given account is the candidate's ID and", + "their offer is the second. The vouching party is the third." + ] + }, + { + "name": "AutoUnbid", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "A candidate was dropped (due to an excess of bids in the system)." + ] + }, + { + "name": "Unbid", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "A candidate was dropped (by their request)." + ] + }, + { + "name": "Unvouch", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 5, + "docs": [ + "A candidate was dropped (by request of who vouched for them)." + ] + }, + { + "name": "Inducted", + "fields": [ + { + "name": "primary", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "candidates", + "type": 40, + "typeName": "Vec" + } + ], + "index": 6, + "docs": [ + "A group of candidates have been inducted. The batch's primary is the first value, the", + "batch in full is the second." + ] + }, + { + "name": "SuspendedMemberJudgement", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "judged", + "type": 35, + "typeName": "bool" + } + ], + "index": 7, + "docs": [ + "A suspended member has been judged." + ] + }, + { + "name": "CandidateSuspended", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 8, + "docs": [ + "A candidate has been suspended" + ] + }, + { + "name": "MemberSuspended", + "fields": [ + { + "name": "member", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 9, + "docs": [ + "A member has been suspended" + ] + }, + { + "name": "Challenged", + "fields": [ + { + "name": "member", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 10, + "docs": [ + "A member has been challenged" + ] + }, + { + "name": "Vote", + "fields": [ + { + "name": "candidate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "voter", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "vote", + "type": 35, + "typeName": "bool" + } + ], + "index": 11, + "docs": [ + "A vote has been placed" + ] + }, + { + "name": "DefenderVote", + "fields": [ + { + "name": "voter", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "vote", + "type": 35, + "typeName": "bool" + } + ], + "index": 12, + "docs": [ + "A vote has been placed for a defending member" + ] + }, + { + "name": "NewMaxMembers", + "fields": [ + { + "name": "max", + "type": 4, + "typeName": "u32" + } + ], + "index": 13, + "docs": [ + "A new \\[max\\] member count has been set" + ] + }, + { + "name": "Unfounded", + "fields": [ + { + "name": "founder", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 14, + "docs": [ + "Society is unfounded." + ] + }, + { + "name": "Deposit", + "fields": [ + { + "name": "value", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 15, + "docs": [ + "Some funds were deposited into the society account." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 72, + "type": { + "path": [ + "pallet_recovery", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "RecoveryCreated", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "A recovery process has been set up for an account." + ] + }, + { + "name": "RecoveryInitiated", + "fields": [ + { + "name": "lost_account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "rescuer_account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "A recovery process has been initiated for lost account by rescuer account." + ] + }, + { + "name": "RecoveryVouched", + "fields": [ + { + "name": "lost_account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "rescuer_account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "sender", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 2, + "docs": [ + "A recovery process for lost account by rescuer account has been vouched for by sender." + ] + }, + { + "name": "RecoveryClosed", + "fields": [ + { + "name": "lost_account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "rescuer_account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "A recovery process for lost account by rescuer account has been closed." + ] + }, + { + "name": "AccountRecovered", + "fields": [ + { + "name": "lost_account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "rescuer_account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "Lost account has been successfully recovered by rescuer account." + ] + }, + { + "name": "RecoveryRemoved", + "fields": [ + { + "name": "lost_account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 5, + "docs": [ + "A recovery process has been removed for an account." + ] + } + ] + } + }, + "docs": [ + "Events type." + ] + } + }, + { + "id": 73, + "type": { + "path": [ + "pallet_vesting", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "VestingUpdated", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "unvested", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 0, + "docs": [ + "The amount vested has been updated. This could indicate a change in funds available.", + "The balance given is the amount which is left unvested (and thus locked)." + ] + }, + { + "name": "VestingCompleted", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "An \\[account\\] has become fully vested." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 74, + "type": { + "path": [ + "pallet_scheduler", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Scheduled", + "fields": [ + { + "name": "when", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ], + "index": 0, + "docs": [ + "Scheduled some task." + ] + }, + { + "name": "Canceled", + "fields": [ + { + "name": "when", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Canceled some task." + ] + }, + { + "name": "Dispatched", + "fields": [ + { + "name": "task", + "type": 75, + "typeName": "TaskAddress" + }, + { + "name": "id", + "type": 76, + "typeName": "Option>" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 2, + "docs": [ + "Dispatched some task." + ] + }, + { + "name": "CallLookupFailed", + "fields": [ + { + "name": "task", + "type": 75, + "typeName": "TaskAddress" + }, + { + "name": "id", + "type": 76, + "typeName": "Option>" + }, + { + "name": "error", + "type": 77, + "typeName": "LookupError" + } + ], + "index": 3, + "docs": [ + "The call for the provided hash was not found so the task has been aborted." + ] + } + ] + } + }, + "docs": [ + "Events type." + ] + } + }, + { + "id": 75, + "type": { + "def": { + "tuple": [ + 4, + 4 + ] + } + } + }, + { + "id": 76, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 10 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 10 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 77, + "type": { + "path": [ + "frame_support", + "traits", + "schedule", + "LookupError" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Unknown", + "index": 0 + }, + { + "name": "BadFormat", + "index": 1 + } + ] + } + } + } + }, + { + "id": 78, + "type": { + "path": [ + "pallet_preimage", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Noted", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 0, + "docs": [ + "A preimage has been noted." + ] + }, + { + "name": "Requested", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 1, + "docs": [ + "A preimage has been requested." + ] + }, + { + "name": "Cleared", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 2, + "docs": [ + "A preimage has ben cleared." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 79, + "type": { + "path": [ + "pallet_proxy", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "ProxyExecuted", + "fields": [ + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 0, + "docs": [ + "A proxy was executed correctly, with the given." + ] + }, + { + "name": "AnonymousCreated", + "fields": [ + { + "name": "anonymous", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "disambiguation_index", + "type": 81, + "typeName": "u16" + } + ], + "index": 1, + "docs": [ + "Anonymous account has been created by new proxy with given", + "disambiguation index and proxy type." + ] + }, + { + "name": "Announced", + "fields": [ + { + "name": "real", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 9, + "typeName": "CallHashOf" + } + ], + "index": 2, + "docs": [ + "An announcement was placed to make a call in the future." + ] + }, + { + "name": "ProxyAdded", + "fields": [ + { + "name": "delegator", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegatee", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 3, + "docs": [ + "A proxy was added." + ] + }, + { + "name": "ProxyRemoved", + "fields": [ + { + "name": "delegator", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegatee", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 4, + "docs": [ + "A proxy was removed." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 80, + "type": { + "path": [ + "node_runtime", + "ProxyType" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Any", + "index": 0 + }, + { + "name": "NonTransfer", + "index": 1 + }, + { + "name": "Governance", + "index": 2 + }, + { + "name": "Staking", + "index": 3 + } + ] + } + } + } + }, + { + "id": 81, + "type": { + "def": { + "primitive": "u16" + } + } + }, + { + "id": 82, + "type": { + "path": [ + "pallet_multisig", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NewMultisig", + "fields": [ + { + "name": "approving", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "multisig", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 1, + "typeName": "CallHash" + } + ], + "index": 0, + "docs": [ + "A new multisig operation has begun." + ] + }, + { + "name": "MultisigApproval", + "fields": [ + { + "name": "approving", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "timepoint", + "type": 83, + "typeName": "Timepoint" + }, + { + "name": "multisig", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 1, + "typeName": "CallHash" + } + ], + "index": 1, + "docs": [ + "A multisig operation has been approved by someone." + ] + }, + { + "name": "MultisigExecuted", + "fields": [ + { + "name": "approving", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "timepoint", + "type": 83, + "typeName": "Timepoint" + }, + { + "name": "multisig", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 1, + "typeName": "CallHash" + }, + { + "name": "result", + "type": 28, + "typeName": "DispatchResult" + } + ], + "index": 2, + "docs": [ + "A multisig operation has been executed." + ] + }, + { + "name": "MultisigCancelled", + "fields": [ + { + "name": "cancelling", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "timepoint", + "type": 83, + "typeName": "Timepoint" + }, + { + "name": "multisig", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 1, + "typeName": "CallHash" + } + ], + "index": 3, + "docs": [ + "A multisig operation has been cancelled." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 83, + "type": { + "path": [ + "pallet_multisig", + "Timepoint" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "height", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 84, + "type": { + "path": [ + "pallet_bounties", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "BountyProposed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + } + ], + "index": 0, + "docs": [ + "New bounty proposal." + ] + }, + { + "name": "BountyRejected", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "bond", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "A bounty proposal was rejected; funds were slashed." + ] + }, + { + "name": "BountyBecameActive", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + } + ], + "index": 2, + "docs": [ + "A bounty proposal is funded and became active." + ] + }, + { + "name": "BountyAwarded", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "A bounty is awarded to a beneficiary." + ] + }, + { + "name": "BountyClaimed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "payout", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "A bounty is claimed by beneficiary." + ] + }, + { + "name": "BountyCanceled", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + } + ], + "index": 5, + "docs": [ + "A bounty is cancelled." + ] + }, + { + "name": "BountyExtended", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + } + ], + "index": 6, + "docs": [ + "A bounty expiry is extended." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 85, + "type": { + "path": [ + "pallet_tips", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NewTip", + "fields": [ + { + "name": "tip_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 0, + "docs": [ + "A new tip suggestion has been opened." + ] + }, + { + "name": "TipClosing", + "fields": [ + { + "name": "tip_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 1, + "docs": [ + "A tip suggestion has reached threshold and is closing." + ] + }, + { + "name": "TipClosed", + "fields": [ + { + "name": "tip_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "payout", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "A tip suggestion has been closed." + ] + }, + { + "name": "TipRetracted", + "fields": [ + { + "name": "tip_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 3, + "docs": [ + "A tip suggestion has been retracted." + ] + }, + { + "name": "TipSlashed", + "fields": [ + { + "name": "tip_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "finder", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 4, + "docs": [ + "A tip suggestion has been slashed." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 86, + "type": { + "path": [ + "pallet_assets", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Created", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "creator", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "Some asset class was created." + ] + }, + { + "name": "Issued", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "total_supply", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 1, + "docs": [ + "Some assets were issued." + ] + }, + { + "name": "Transferred", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "from", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "to", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 2, + "docs": [ + "Some assets were transferred." + ] + }, + { + "name": "Burned", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "balance", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 3, + "docs": [ + "Some assets were destroyed." + ] + }, + { + "name": "TeamChanged", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "issuer", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "admin", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "freezer", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "The management team changed." + ] + }, + { + "name": "OwnerChanged", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 5, + "docs": [ + "The owner changed." + ] + }, + { + "name": "Frozen", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 6, + "docs": [ + "Some account `who` was frozen." + ] + }, + { + "name": "Thawed", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 7, + "docs": [ + "Some account `who` was thawed." + ] + }, + { + "name": "AssetFrozen", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + } + ], + "index": 8, + "docs": [ + "Some asset `asset_id` was frozen." + ] + }, + { + "name": "AssetThawed", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + } + ], + "index": 9, + "docs": [ + "Some asset `asset_id` was thawed." + ] + }, + { + "name": "Destroyed", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + } + ], + "index": 10, + "docs": [ + "An asset class was destroyed." + ] + }, + { + "name": "ForceCreated", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 11, + "docs": [ + "Some asset class was force-created." + ] + }, + { + "name": "MetadataSet", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "name", + "type": 10, + "typeName": "Vec" + }, + { + "name": "symbol", + "type": 10, + "typeName": "Vec" + }, + { + "name": "decimals", + "type": 2, + "typeName": "u8" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 12, + "docs": [ + "New metadata has been set for an asset." + ] + }, + { + "name": "MetadataCleared", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + } + ], + "index": 13, + "docs": [ + "Metadata has been cleared for an asset." + ] + }, + { + "name": "ApprovedTransfer", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "source", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 14, + "docs": [ + "(Additional) funds have been approved for transfer to a destination account." + ] + }, + { + "name": "ApprovalCancelled", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 15, + "docs": [ + "An approval for account `delegate` was cancelled by `owner`." + ] + }, + { + "name": "TransferredApproved", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "destination", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 16, + "docs": [ + "An `amount` was transferred in its entirety from `owner` to `destination` by", + "the approved `delegate`." + ] + }, + { + "name": "AssetStatusChanged", + "fields": [ + { + "name": "asset_id", + "type": 4, + "typeName": "T::AssetId" + } + ], + "index": 17, + "docs": [ + "An asset has had its attributes changed by the `Force` origin." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 87, + "type": { + "path": [ + "pallet_lottery", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "LotteryStarted", + "index": 0, + "docs": [ + "A lottery has been started!" + ] + }, + { + "name": "CallsUpdated", + "index": 1, + "docs": [ + "A new set of calls have been set!" + ] + }, + { + "name": "Winner", + "fields": [ + { + "name": "winner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "lottery_balance", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "A winner has been chosen!" + ] + }, + { + "name": "TicketBought", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_index", + "type": 88, + "typeName": "CallIndex" + } + ], + "index": 3, + "docs": [ + "A ticket has been bought!" + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 88, + "type": { + "def": { + "tuple": [ + 2, + 2 + ] + } + } + }, + { + "id": 89, + "type": { + "path": [ + "pallet_gilt", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "BidPlaced", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "duration", + "type": 4, + "typeName": "u32" + } + ], + "index": 0, + "docs": [ + "A bid was successfully placed." + ] + }, + { + "name": "BidRetracted", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "duration", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "A bid was successfully removed (before being accepted as a gilt)." + ] + }, + { + "name": "GiltIssued", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ActiveIndex" + }, + { + "name": "expiry", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "A bid was accepted as a gilt. The balance may not be released until expiry." + ] + }, + { + "name": "GiltThawed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ActiveIndex" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "original_amount", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "additional_amount", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 3, + "docs": [ + "An expired gilt has been thawed." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 90, + "type": { + "path": [ + "pallet_uniques", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Created", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "creator", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "An asset class was created." + ] + }, + { + "name": "ForceCreated", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "An asset class was force-created." + ] + }, + { + "name": "Destroyed", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 2, + "docs": [ + "An asset `class` was destroyed." + ] + }, + { + "name": "Issued", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "An asset `instance` was issued." + ] + }, + { + "name": "Transferred", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "from", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "to", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "An asset `instance` was transferred." + ] + }, + { + "name": "Burned", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 5, + "docs": [ + "An asset `instance` was destroyed." + ] + }, + { + "name": "Frozen", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + } + ], + "index": 6, + "docs": [ + "Some asset `instance` was frozen." + ] + }, + { + "name": "Thawed", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + } + ], + "index": 7, + "docs": [ + "Some asset `instance` was thawed." + ] + }, + { + "name": "ClassFrozen", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 8, + "docs": [ + "Some asset `class` was frozen." + ] + }, + { + "name": "ClassThawed", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 9, + "docs": [ + "Some asset `class` was thawed." + ] + }, + { + "name": "OwnerChanged", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "new_owner", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 10, + "docs": [ + "The owner changed." + ] + }, + { + "name": "TeamChanged", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "issuer", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "admin", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "freezer", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 11, + "docs": [ + "The management team changed." + ] + }, + { + "name": "ApprovedTransfer", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 12, + "docs": [ + "An `instance` of an asset `class` has been approved by the `owner` for transfer by a", + "`delegate`." + ] + }, + { + "name": "ApprovalCancelled", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "owner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 13, + "docs": [ + "An approval for a `delegate` account to transfer the `instance` of an asset `class` was", + "cancelled by its `owner`." + ] + }, + { + "name": "AssetStatusChanged", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 14, + "docs": [ + "An asset `class` has had its attributes changed by the `Force` origin." + ] + }, + { + "name": "ClassMetadataSet", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "data", + "type": 91, + "typeName": "BoundedVec" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 15, + "docs": [ + "New metadata has been set for an asset class." + ] + }, + { + "name": "ClassMetadataCleared", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 16, + "docs": [ + "Metadata has been cleared for an asset class." + ] + }, + { + "name": "MetadataSet", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "data", + "type": 91, + "typeName": "BoundedVec" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 17, + "docs": [ + "New metadata has been set for an asset instance." + ] + }, + { + "name": "MetadataCleared", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + } + ], + "index": 18, + "docs": [ + "Metadata has been cleared for an asset instance." + ] + }, + { + "name": "Redeposited", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "successful_instances", + "type": 92, + "typeName": "Vec" + } + ], + "index": 19, + "docs": [ + "Metadata has been cleared for an asset instance." + ] + }, + { + "name": "AttributeSet", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "maybe_instance", + "type": 93, + "typeName": "Option" + }, + { + "name": "key", + "type": 94, + "typeName": "BoundedVec" + }, + { + "name": "value", + "type": 95, + "typeName": "BoundedVec" + } + ], + "index": 20, + "docs": [ + "New attribute metadata has been set for an asset class or instance." + ] + }, + { + "name": "AttributeCleared", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "maybe_instance", + "type": 93, + "typeName": "Option" + }, + { + "name": "key", + "type": 94, + "typeName": "BoundedVec" + } + ], + "index": 21, + "docs": [ + "Attribute metadata has been cleared for an asset class or instance." + ] + }, + { + "name": "OwnershipAcceptanceChanged", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "maybe_class", + "type": 93, + "typeName": "Option" + } + ], + "index": 22, + "docs": [ + "Ownership acceptance has changed for an account." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 91, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 2 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 92, + "type": { + "def": { + "sequence": { + "type": 4 + } + } + } + }, + { + "id": 93, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 4 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 94, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 2 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 95, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 2 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 96, + "type": { + "path": [ + "pallet_transaction_storage", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Stored", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ], + "index": 0, + "docs": [ + "Stored data under specified index." + ] + }, + { + "name": "Renewed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Renewed data under specified index." + ] + }, + { + "name": "ProofChecked", + "index": 2, + "docs": [ + "Storage proof was successfully checked." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 97, + "type": { + "path": [ + "pallet_bags_list", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Rebagged", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "from", + "type": 8, + "typeName": "T::Score" + }, + { + "name": "to", + "type": 8, + "typeName": "T::Score" + } + ], + "index": 0, + "docs": [ + "Moved an account from one bag to another." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 98, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Migrated", + "fields": [ + { + "name": "top", + "type": 4, + "typeName": "u32" + }, + { + "name": "child", + "type": 4, + "typeName": "u32" + }, + { + "name": "compute", + "type": 99, + "typeName": "MigrationCompute" + } + ], + "index": 0, + "docs": [ + "Given number of `(top, child)` keys were migrated respectively, with the given", + "`compute`." + ] + }, + { + "name": "Slashed", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "Some account got slashed by the given amount." + ] + }, + { + "name": "AutoMigrationFinished", + "index": 2, + "docs": [ + "The auto migration task finished." + ] + }, + { + "name": "Halted", + "index": 3, + "docs": [ + "Migration got halted." + ] + } + ] + } + }, + "docs": [ + "Inner events of this pallet." + ] + } + }, + { + "id": 99, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "MigrationCompute" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Signed", + "index": 0 + }, + { + "name": "Auto", + "index": 1 + } + ] + } + } + } + }, + { + "id": 100, + "type": { + "path": [ + "pallet_child_bounties", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Added", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "child_index", + "type": 4, + "typeName": "BountyIndex" + } + ], + "index": 0, + "docs": [ + "A child-bounty is added." + ] + }, + { + "name": "Awarded", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "child_index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "A child-bounty is awarded to a beneficiary." + ] + }, + { + "name": "Claimed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "child_index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "payout", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 2, + "docs": [ + "A child-bounty is claimed by beneficiary." + ] + }, + { + "name": "Canceled", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "child_index", + "type": 4, + "typeName": "BountyIndex" + } + ], + "index": 3, + "docs": [ + "A child-bounty is cancelled." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 101, + "type": { + "path": [ + "pallet_referenda", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Submitted", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "track", + "type": 2, + "typeName": "TrackIdOf", + "docs": [ + "The track (and by extension proposal dispatch origin) of this referendum." + ] + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash", + "docs": [ + "The hash of the proposal up for referendum." + ] + } + ], + "index": 0, + "docs": [ + "A referendum has being submitted." + ] + }, + { + "name": "DecisionDepositPlaced", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The account who placed the deposit." + ] + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf", + "docs": [ + "The amount placed by the account." + ] + } + ], + "index": 1, + "docs": [ + "The decision deposit has been placed." + ] + }, + { + "name": "DecisionDepositRefunded", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The account who placed the deposit." + ] + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf", + "docs": [ + "The amount placed by the account." + ] + } + ], + "index": 2, + "docs": [ + "The decision deposit has been refunded." + ] + }, + { + "name": "DepositSlashed", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId", + "docs": [ + "The account who placed the deposit." + ] + }, + { + "name": "amount", + "type": 6, + "typeName": "BalanceOf", + "docs": [ + "The amount placed by the account." + ] + } + ], + "index": 3, + "docs": [ + "A deposit has been slashaed." + ] + }, + { + "name": "DecisionStarted", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "track", + "type": 2, + "typeName": "TrackIdOf", + "docs": [ + "The track (and by extension proposal dispatch origin) of this referendum." + ] + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash", + "docs": [ + "The hash of the proposal up for referendum." + ] + }, + { + "name": "tally", + "type": 102, + "typeName": "T::Tally", + "docs": [ + "The current tally of votes in this referendum." + ] + } + ], + "index": 4, + "docs": [ + "A referendum has moved into the deciding phase." + ] + }, + { + "name": "ConfirmStarted", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + } + ], + "index": 5 + }, + { + "name": "ConfirmAborted", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + } + ], + "index": 6 + }, + { + "name": "Confirmed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "tally", + "type": 102, + "typeName": "T::Tally", + "docs": [ + "The final tally of votes in this referendum." + ] + } + ], + "index": 7, + "docs": [ + "A referendum has ended its confirmation phase and is ready for approval." + ] + }, + { + "name": "Approved", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + } + ], + "index": 8, + "docs": [ + "A referendum has been approved and its proposal has been scheduled." + ] + }, + { + "name": "Rejected", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "tally", + "type": 102, + "typeName": "T::Tally", + "docs": [ + "The final tally of votes in this referendum." + ] + } + ], + "index": 9, + "docs": [ + "A proposal has been rejected by referendum." + ] + }, + { + "name": "TimedOut", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "tally", + "type": 102, + "typeName": "T::Tally", + "docs": [ + "The final tally of votes in this referendum." + ] + } + ], + "index": 10, + "docs": [ + "A referendum has been timed out without being decided." + ] + }, + { + "name": "Cancelled", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "tally", + "type": 102, + "typeName": "T::Tally", + "docs": [ + "The final tally of votes in this referendum." + ] + } + ], + "index": 11, + "docs": [ + "A referendum has been cancelled." + ] + }, + { + "name": "Killed", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex", + "docs": [ + "Index of the referendum." + ] + }, + { + "name": "tally", + "type": 102, + "typeName": "T::Tally", + "docs": [ + "The final tally of votes in this referendum." + ] + } + ], + "index": 12, + "docs": [ + "A referendum has been killed." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 102, + "type": { + "path": [ + "pallet_conviction_voting", + "types", + "Tally" + ], + "params": [ + { + "name": "Votes", + "type": 6 + }, + { + "name": "Total", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "ayes", + "type": 6, + "typeName": "Votes" + }, + { + "name": "nays", + "type": 6, + "typeName": "Votes" + }, + { + "name": "turnout", + "type": 6, + "typeName": "Votes" + } + ] + } + } + } + }, + { + "id": 103, + "type": { + "path": [ + "pallet_conviction_voting", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Delegated", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + }, + { + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "An account has delegated their vote to another account. \\[who, target\\]" + ] + }, + { + "name": "Undelegated", + "fields": [ + { + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "An \\[account\\] has cancelled a previous delegation operation." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 104, + "type": { + "path": [ + "pallet_whitelist", + "pallet", + "Event" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "CallWhitelisted", + "fields": [ + { + "name": "call_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 0 + }, + { + "name": "WhitelistedCallRemoved", + "fields": [ + { + "name": "call_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 1 + }, + { + "name": "WhitelistedCallDispatched", + "fields": [ + { + "name": "call_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "result", + "type": 105, + "typeName": "DispatchResultWithPostInfo" + } + ], + "index": 2 + } + ] + } + }, + "docs": [ + "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" + ] + } + }, + { + "id": 105, + "type": { + "path": [ + "Result" + ], + "params": [ + { + "name": "T", + "type": 106 + }, + { + "name": "E", + "type": 108 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Ok", + "fields": [ + { + "type": 106 + } + ], + "index": 0 + }, + { + "name": "Err", + "fields": [ + { + "type": 108 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 106, + "type": { + "path": [ + "frame_support", + "weights", + "PostDispatchInfo" + ], + "def": { + "composite": { + "fields": [ + { + "name": "actual_weight", + "type": 107, + "typeName": "Option" + }, + { + "name": "pays_fee", + "type": 21, + "typeName": "Pays" + } + ] + } + } + } + }, + { + "id": 107, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 8 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 8 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 108, + "type": { + "path": [ + "sp_runtime", + "DispatchErrorWithPostInfo" + ], + "params": [ + { + "name": "Info", + "type": 106 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "post_info", + "type": 106, + "typeName": "Info" + }, + { + "name": "error", + "type": 22, + "typeName": "DispatchError" + } + ] + } + } + } + }, + { + "id": 109, + "type": { + "path": [ + "frame_system", + "Phase" + ], + "def": { + "variant": { + "variants": [ + { + "name": "ApplyExtrinsic", + "fields": [ + { + "type": 4, + "typeName": "u32" + } + ], + "index": 0 + }, + { + "name": "Finalization", + "index": 1 + }, + { + "name": "Initialization", + "index": 2 + } + ] + } + } + } + }, + { + "id": 110, + "type": { + "def": { + "sequence": { + "type": 9 + } + } + } + }, + { + "id": 111, + "type": { + "def": { + "sequence": { + "type": 75 + } + } + } + }, + { + "id": 112, + "type": { + "path": [ + "frame_system", + "LastRuntimeUpgradeInfo" + ], + "def": { + "composite": { + "fields": [ + { + "name": "spec_version", + "type": 113, + "typeName": "codec::Compact" + }, + { + "name": "spec_name", + "type": 114, + "typeName": "sp_runtime::RuntimeString" + } + ] + } + } + } + }, + { + "id": 113, + "type": { + "def": { + "compact": { + "type": 4 + } + } + } + }, + { + "id": 114, + "type": { + "def": { + "primitive": "str" + } + } + }, + { + "id": 115, + "type": { + "path": [ + "frame_system", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "fill_block", + "fields": [ + { + "name": "ratio", + "type": 116, + "typeName": "Perbill" + } + ], + "index": 0, + "docs": [ + "A dispatch that will fill the block weight up to the given ratio." + ] + }, + { + "name": "remark", + "fields": [ + { + "name": "remark", + "type": 10, + "typeName": "Vec" + } + ], + "index": 1, + "docs": [ + "Make some on-chain remark.", + "", + "# ", + "- `O(1)`", + "# " + ] + }, + { + "name": "set_heap_pages", + "fields": [ + { + "name": "pages", + "type": 8, + "typeName": "u64" + } + ], + "index": 2, + "docs": [ + "Set the number of pages in the WebAssembly environment's heap." + ] + }, + { + "name": "set_code", + "fields": [ + { + "name": "code", + "type": 10, + "typeName": "Vec" + } + ], + "index": 3, + "docs": [ + "Set the new runtime code.", + "", + "# ", + "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`", + "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is", + " expensive).", + "- 1 storage write (codec `O(C)`).", + "- 1 digest item.", + "- 1 event.", + "The weight of this function is dependent on the runtime, but generally this is very", + "expensive. We will treat this as a full block.", + "# " + ] + }, + { + "name": "set_code_without_checks", + "fields": [ + { + "name": "code", + "type": 10, + "typeName": "Vec" + } + ], + "index": 4, + "docs": [ + "Set the new runtime code without doing any checks of the given `code`.", + "", + "# ", + "- `O(C)` where `C` length of `code`", + "- 1 storage write (codec `O(C)`).", + "- 1 digest item.", + "- 1 event.", + "The weight of this function is dependent on the runtime. We will treat this as a full", + "block. # " + ] + }, + { + "name": "set_storage", + "fields": [ + { + "name": "items", + "type": 117, + "typeName": "Vec" + } + ], + "index": 5, + "docs": [ + "Set some items of storage." + ] + }, + { + "name": "kill_storage", + "fields": [ + { + "name": "keys", + "type": 119, + "typeName": "Vec" + } + ], + "index": 6, + "docs": [ + "Kill some items from storage." + ] + }, + { + "name": "kill_prefix", + "fields": [ + { + "name": "prefix", + "type": 10, + "typeName": "Key" + }, + { + "name": "subkeys", + "type": 4, + "typeName": "u32" + } + ], + "index": 7, + "docs": [ + "Kill all storage items with a key that starts with the given prefix.", + "", + "**NOTE:** We rely on the Root origin to provide us the number of subkeys under", + "the prefix we are removing to accurately calculate the weight of this function." + ] + }, + { + "name": "remark_with_event", + "fields": [ + { + "name": "remark", + "type": 10, + "typeName": "Vec" + } + ], + "index": 8, + "docs": [ + "Make some on-chain remark and emit event." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 116, + "type": { + "path": [ + "sp_arithmetic", + "per_things", + "Perbill" + ], + "def": { + "composite": { + "fields": [ + { + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 117, + "type": { + "def": { + "sequence": { + "type": 118 + } + } + } + }, + { + "id": 118, + "type": { + "def": { + "tuple": [ + 10, + 10 + ] + } + } + }, + { + "id": 119, + "type": { + "def": { + "sequence": { + "type": 10 + } + } + } + }, + { + "id": 120, + "type": { + "path": [ + "frame_system", + "limits", + "BlockWeights" + ], + "def": { + "composite": { + "fields": [ + { + "name": "base_block", + "type": 8, + "typeName": "Weight" + }, + { + "name": "max_block", + "type": 8, + "typeName": "Weight" + }, + { + "name": "per_class", + "type": 121, + "typeName": "PerDispatchClass" + } + ] + } + } + } + }, + { + "id": 121, + "type": { + "path": [ + "frame_support", + "weights", + "PerDispatchClass" + ], + "params": [ + { + "name": "T", + "type": 122 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "normal", + "type": 122, + "typeName": "T" + }, + { + "name": "operational", + "type": 122, + "typeName": "T" + }, + { + "name": "mandatory", + "type": 122, + "typeName": "T" + } + ] + } + } + } + }, + { + "id": 122, + "type": { + "path": [ + "frame_system", + "limits", + "WeightsPerClass" + ], + "def": { + "composite": { + "fields": [ + { + "name": "base_extrinsic", + "type": 8, + "typeName": "Weight" + }, + { + "name": "max_extrinsic", + "type": 107, + "typeName": "Option" + }, + { + "name": "max_total", + "type": 107, + "typeName": "Option" + }, + { + "name": "reserved", + "type": 107, + "typeName": "Option" + } + ] + } + } + } + }, + { + "id": 123, + "type": { + "path": [ + "frame_system", + "limits", + "BlockLength" + ], + "def": { + "composite": { + "fields": [ + { + "name": "max", + "type": 124, + "typeName": "PerDispatchClass" + } + ] + } + } + } + }, + { + "id": 124, + "type": { + "path": [ + "frame_support", + "weights", + "PerDispatchClass" + ], + "params": [ + { + "name": "T", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "normal", + "type": 4, + "typeName": "T" + }, + { + "name": "operational", + "type": 4, + "typeName": "T" + }, + { + "name": "mandatory", + "type": 4, + "typeName": "T" + } + ] + } + } + } + }, + { + "id": 125, + "type": { + "path": [ + "frame_support", + "weights", + "RuntimeDbWeight" + ], + "def": { + "composite": { + "fields": [ + { + "name": "read", + "type": 8, + "typeName": "Weight" + }, + { + "name": "write", + "type": 8, + "typeName": "Weight" + } + ] + } + } + } + }, + { + "id": 126, + "type": { + "path": [ + "sp_version", + "RuntimeVersion" + ], + "def": { + "composite": { + "fields": [ + { + "name": "spec_name", + "type": 114, + "typeName": "RuntimeString" + }, + { + "name": "impl_name", + "type": 114, + "typeName": "RuntimeString" + }, + { + "name": "authoring_version", + "type": 4, + "typeName": "u32" + }, + { + "name": "spec_version", + "type": 4, + "typeName": "u32" + }, + { + "name": "impl_version", + "type": 4, + "typeName": "u32" + }, + { + "name": "apis", + "type": 127, + "typeName": "ApisVec" + }, + { + "name": "transaction_version", + "type": 4, + "typeName": "u32" + }, + { + "name": "state_version", + "type": 2, + "typeName": "u8" + } + ] + } + } + } + }, + { + "id": 127, + "type": { + "path": [ + "Cow" + ], + "params": [ + { + "name": "T", + "type": 128 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 128 + } + ] + } + } + } + }, + { + "id": 128, + "type": { + "def": { + "sequence": { + "type": 129 + } + } + } + }, + { + "id": 129, + "type": { + "def": { + "tuple": [ + 130, + 4 + ] + } + } + }, + { + "id": 130, + "type": { + "def": { + "array": { + "len": 8, + "type": 2 + } + } + } + }, + { + "id": 131, + "type": { + "path": [ + "frame_system", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InvalidSpecName", + "index": 0, + "docs": [ + "The name of specification does not match between the current runtime", + "and the new runtime." + ] + }, + { + "name": "SpecVersionNeedsToIncrease", + "index": 1, + "docs": [ + "The specification version is not allowed to decrease between the current runtime", + "and the new runtime." + ] + }, + { + "name": "FailedToExtractRuntimeVersion", + "index": 2, + "docs": [ + "Failed to extract the runtime version from the new runtime.", + "", + "Either calling `Core_version` or decoding `RuntimeVersion` failed." + ] + }, + { + "name": "NonDefaultComposite", + "index": 3, + "docs": [ + "Suicide called when the account has non-default composite data." + ] + }, + { + "name": "NonZeroRefCount", + "index": 4, + "docs": [ + "There is a non-zero reference count preventing the account from being purged." + ] + }, + { + "name": "CallFiltered", + "index": 5, + "docs": [ + "The origin filter prevent the call to be dispatched." + ] + } + ] + } + }, + "docs": [ + "Error for the System pallet" + ] + } + }, + { + "id": 132, + "type": { + "path": [ + "pallet_utility", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "batch", + "fields": [ + { + "name": "calls", + "type": 133, + "typeName": "Vec<::Call>" + } + ], + "index": 0, + "docs": [ + "Send a batch of dispatch calls.", + "", + "May be called from any origin.", + "", + "- `calls`: The calls to be dispatched from the same origin. The number of call must not", + " exceed the constant: `batched_calls_limit` (available in constant metadata).", + "", + "If origin is root then call are dispatch without checking origin filter. (This includes", + "bypassing `frame_system::Config::BaseCallFilter`).", + "", + "# ", + "- Complexity: O(C) where C is the number of calls to be batched.", + "# ", + "", + "This will return `Ok` in all circumstances. To determine the success of the batch, an", + "event is deposited. If a call failed and the batch was interrupted, then the", + "`BatchInterrupted` event is deposited, along with the number of successful calls made", + "and the error of the failed call. If all were successful, then the `BatchCompleted`", + "event is deposited." + ] + }, + { + "name": "as_derivative", + "fields": [ + { + "name": "index", + "type": 81, + "typeName": "u16" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 1, + "docs": [ + "Send a call through an indexed pseudonym of the sender.", + "", + "Filter from origin are passed along. The call will be dispatched with an origin which", + "use the same filter as the origin of this call.", + "", + "NOTE: If you need to ensure that any account-based filtering is not honored (i.e.", + "because you expect `proxy` to have been used prior in the call stack and you do not want", + "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`", + "in the Multisig pallet instead.", + "", + "NOTE: Prior to version *12, this was called `as_limited_sub`.", + "", + "The dispatch origin for this call must be _Signed_." + ] + }, + { + "name": "batch_all", + "fields": [ + { + "name": "calls", + "type": 133, + "typeName": "Vec<::Call>" + } + ], + "index": 2, + "docs": [ + "Send a batch of dispatch calls and atomically execute them.", + "The whole transaction will rollback and fail if any of the calls failed.", + "", + "May be called from any origin.", + "", + "- `calls`: The calls to be dispatched from the same origin. The number of call must not", + " exceed the constant: `batched_calls_limit` (available in constant metadata).", + "", + "If origin is root then call are dispatch without checking origin filter. (This includes", + "bypassing `frame_system::Config::BaseCallFilter`).", + "", + "# ", + "- Complexity: O(C) where C is the number of calls to be batched.", + "# " + ] + }, + { + "name": "dispatch_as", + "fields": [ + { + "name": "as_origin", + "type": 331, + "typeName": "Box" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 3, + "docs": [ + "Dispatches a function call with a provided origin.", + "", + "The dispatch origin for this call must be _Root_.", + "", + "# ", + "- O(1).", + "- Limited storage reads.", + "- One DB write (event).", + "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as().", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 133, + "type": { + "def": { + "sequence": { + "type": 134 + } + } + } + }, + { + "id": 134, + "type": { + "path": [ + "node_runtime", + "Call" + ], + "def": { + "variant": { + "variants": [ + { + "name": "System", + "fields": [ + { + "type": 115, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 0 + }, + { + "name": "Utility", + "fields": [ + { + "type": 132, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 1 + }, + { + "name": "Babe", + "fields": [ + { + "type": 135, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 2 + }, + { + "name": "Timestamp", + "fields": [ + { + "type": 145, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 3 + }, + { + "name": "Authorship", + "fields": [ + { + "type": 147, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 4 + }, + { + "name": "Indices", + "fields": [ + { + "type": 149, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 5 + }, + { + "name": "Balances", + "fields": [ + { + "type": 150, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 6 + }, + { + "name": "ElectionProviderMultiPhase", + "fields": [ + { + "type": 153, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 9 + }, + { + "name": "Staking", + "fields": [ + { + "type": 212, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 10 + }, + { + "name": "Session", + "fields": [ + { + "type": 222, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 11 + }, + { + "name": "Democracy", + "fields": [ + { + "type": 225, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 12 + }, + { + "name": "Council", + "fields": [ + { + "type": 227, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 13 + }, + { + "name": "TechnicalCommittee", + "fields": [ + { + "type": 228, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 14 + }, + { + "name": "Elections", + "fields": [ + { + "type": 229, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 15 + }, + { + "name": "TechnicalMembership", + "fields": [ + { + "type": 231, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 16 + }, + { + "name": "Grandpa", + "fields": [ + { + "type": 232, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 17 + }, + { + "name": "Treasury", + "fields": [ + { + "type": 244, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 18 + }, + { + "name": "Contracts", + "fields": [ + { + "type": 245, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 19 + }, + { + "name": "Sudo", + "fields": [ + { + "type": 247, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 20 + }, + { + "name": "ImOnline", + "fields": [ + { + "type": 248, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 21 + }, + { + "name": "Identity", + "fields": [ + { + "type": 256, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 26 + }, + { + "name": "Society", + "fields": [ + { + "type": 296, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 27 + }, + { + "name": "Recovery", + "fields": [ + { + "type": 298, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 28 + }, + { + "name": "Vesting", + "fields": [ + { + "type": 299, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 29 + }, + { + "name": "Scheduler", + "fields": [ + { + "type": 301, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 30 + }, + { + "name": "Preimage", + "fields": [ + { + "type": 304, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 31 + }, + { + "name": "Proxy", + "fields": [ + { + "type": 305, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 32 + }, + { + "name": "Multisig", + "fields": [ + { + "type": 307, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 33 + }, + { + "name": "Bounties", + "fields": [ + { + "type": 310, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 34 + }, + { + "name": "Tips", + "fields": [ + { + "type": 311, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 35 + }, + { + "name": "Assets", + "fields": [ + { + "type": 312, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 36 + }, + { + "name": "Lottery", + "fields": [ + { + "type": 314, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 38 + }, + { + "name": "Gilt", + "fields": [ + { + "type": 315, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 39 + }, + { + "name": "Uniques", + "fields": [ + { + "type": 318, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 40 + }, + { + "name": "TransactionStorage", + "fields": [ + { + "type": 321, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 41 + }, + { + "name": "BagsList", + "fields": [ + { + "type": 323, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 42 + }, + { + "name": "StateTrieMigration", + "fields": [ + { + "type": 324, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 43 + }, + { + "name": "ChildBounties", + "fields": [ + { + "type": 329, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 44 + }, + { + "name": "Referenda", + "fields": [ + { + "type": 330, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 45 + }, + { + "name": "ConvictionVoting", + "fields": [ + { + "type": 337, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 46 + }, + { + "name": "Whitelist", + "fields": [ + { + "type": 342, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" + } + ], + "index": 47 + } + ] + } + } + } + }, + { + "id": 135, + "type": { + "path": [ + "pallet_babe", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "report_equivocation", + "fields": [ + { + "name": "equivocation_proof", + "type": 136, + "typeName": "Box>" + }, + { + "name": "key_owner_proof", + "type": 141, + "typeName": "T::KeyOwnerProof" + } + ], + "index": 0, + "docs": [ + "Report authority equivocation/misbehavior. This method will verify", + "the equivocation proof and validate the given key ownership proof", + "against the extracted offender. If both are valid, the offence will", + "be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "fields": [ + { + "name": "equivocation_proof", + "type": 136, + "typeName": "Box>" + }, + { + "name": "key_owner_proof", + "type": 141, + "typeName": "T::KeyOwnerProof" + } + ], + "index": 1, + "docs": [ + "Report authority equivocation/misbehavior. This method will verify", + "the equivocation proof and validate the given key ownership proof", + "against the extracted offender. If both are valid, the offence will", + "be reported.", + "This extrinsic must be called unsigned and it is expected that only", + "block authors will call it (validated in `ValidateUnsigned`), as such", + "if the block author is defined it will be defined as the equivocation", + "reporter." + ] + }, + { + "name": "plan_config_change", + "fields": [ + { + "name": "config", + "type": 142, + "typeName": "NextConfigDescriptor" + } + ], + "index": 2, + "docs": [ + "Plan an epoch config change. The epoch config change is recorded and will be enacted on", + "the next call to `enact_epoch_change`. The config will be activated one epoch after.", + "Multiple calls to this method will replace any existing planned config change that had", + "not been enacted yet." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 136, + "type": { + "path": [ + "sp_consensus_slots", + "EquivocationProof" + ], + "params": [ + { + "name": "Header", + "type": 137 + }, + { + "name": "Id", + "type": 139 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "offender", + "type": 139, + "typeName": "Id" + }, + { + "name": "slot", + "type": 140, + "typeName": "Slot" + }, + { + "name": "first_header", + "type": 137, + "typeName": "Header" + }, + { + "name": "second_header", + "type": 137, + "typeName": "Header" + } + ] + } + } + } + }, + { + "id": 137, + "type": { + "path": [ + "sp_runtime", + "generic", + "header", + "Header" + ], + "params": [ + { + "name": "Number", + "type": 4 + }, + { + "name": "Hash", + "type": 138 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "parent_hash", + "type": 9, + "typeName": "Hash::Output" + }, + { + "name": "number", + "type": 113, + "typeName": "Number" + }, + { + "name": "state_root", + "type": 9, + "typeName": "Hash::Output" + }, + { + "name": "extrinsics_root", + "type": 9, + "typeName": "Hash::Output" + }, + { + "name": "digest", + "type": 11, + "typeName": "Digest" + } + ] + } + } + } + }, + { + "id": 138, + "type": { + "path": [ + "sp_runtime", + "traits", + "BlakeTwo256" + ], + "def": { + "composite": {} + } + } + }, + { + "id": 139, + "type": { + "path": [ + "sp_consensus_babe", + "app", + "Public" + ], + "def": { + "composite": { + "fields": [ + { + "type": 61, + "typeName": "sr25519::Public" + } + ] + } + } + } + }, + { + "id": 140, + "type": { + "path": [ + "sp_consensus_slots", + "Slot" + ], + "def": { + "composite": { + "fields": [ + { + "type": 8, + "typeName": "u64" + } + ] + } + } + } + }, + { + "id": 141, + "type": { + "path": [ + "sp_session", + "MembershipProof" + ], + "def": { + "composite": { + "fields": [ + { + "name": "session", + "type": 4, + "typeName": "SessionIndex" + }, + { + "name": "trie_nodes", + "type": 119, + "typeName": "Vec>" + }, + { + "name": "validator_count", + "type": 4, + "typeName": "ValidatorCount" + } + ] + } + } + } + }, + { + "id": 142, + "type": { + "path": [ + "sp_consensus_babe", + "digests", + "NextConfigDescriptor" + ], + "def": { + "variant": { + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "c", + "type": 143, + "typeName": "(u64, u64)" + }, + { + "name": "allowed_slots", + "type": 144, + "typeName": "AllowedSlots" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 143, + "type": { + "def": { + "tuple": [ + 8, + 8 + ] + } + } + }, + { + "id": 144, + "type": { + "path": [ + "sp_consensus_babe", + "AllowedSlots" + ], + "def": { + "variant": { + "variants": [ + { + "name": "PrimarySlots", + "index": 0 + }, + { + "name": "PrimaryAndSecondaryPlainSlots", + "index": 1 + }, + { + "name": "PrimaryAndSecondaryVRFSlots", + "index": 2 + } + ] + } + } + } + }, + { + "id": 145, + "type": { + "path": [ + "pallet_timestamp", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "set", + "fields": [ + { + "name": "now", + "type": 146, + "typeName": "T::Moment" + } + ], + "index": 0, + "docs": [ + "Set the current time.", + "", + "This call should be invoked exactly once per block. It will panic at the finalization", + "phase, if this call hasn't been invoked by that time.", + "", + "The timestamp should be greater than the previous one by the amount specified by", + "`MinimumPeriod`.", + "", + "The dispatch origin for this call must be `Inherent`.", + "", + "# ", + "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)", + "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in", + " `on_finalize`)", + "- 1 event handler `on_timestamp_set`. Must be `O(1)`.", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 146, + "type": { + "def": { + "compact": { + "type": 8 + } + } + } + }, + { + "id": 147, + "type": { + "path": [ + "pallet_authorship", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "set_uncles", + "fields": [ + { + "name": "new_uncles", + "type": 148, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Provide a set of uncles." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 148, + "type": { + "def": { + "sequence": { + "type": 137 + } + } + } + }, + { + "id": 149, + "type": { + "path": [ + "pallet_indices", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "claim", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + } + ], + "index": 0, + "docs": [ + "Assign an previously unassigned index.", + "", + "Payment: `Deposit` is reserved from the sender account.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `index`: the index to be claimed. This must not be in use.", + "", + "Emits `IndexAssigned` if successful.", + "", + "# ", + "- `O(1)`.", + "- One storage mutation (codec `O(1)`).", + "- One reserve operation.", + "- One event.", + "-------------------", + "- DB Weight: 1 Read/Write (Accounts)", + "# " + ] + }, + { + "name": "transfer", + "fields": [ + { + "name": "new", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + } + ], + "index": 1, + "docs": [ + "Assign an index already owned by the sender to another account. The balance reservation", + "is effectively transferred to the new account.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `index`: the index to be re-assigned. This must be owned by the sender.", + "- `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + "", + "Emits `IndexAssigned` if successful.", + "", + "# ", + "- `O(1)`.", + "- One storage mutation (codec `O(1)`).", + "- One transfer operation.", + "- One event.", + "-------------------", + "- DB Weight:", + " - Reads: Indices Accounts, System Account (recipient)", + " - Writes: Indices Accounts, System Account (recipient)", + "# " + ] + }, + { + "name": "free", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + } + ], + "index": 2, + "docs": [ + "Free up an index owned by the sender.", + "", + "Payment: Any previous deposit placed for the index is unreserved in the sender account.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must own the index.", + "", + "- `index`: the index to be freed. This must be owned by the sender.", + "", + "Emits `IndexFreed` if successful.", + "", + "# ", + "- `O(1)`.", + "- One storage mutation (codec `O(1)`).", + "- One reserve operation.", + "- One event.", + "-------------------", + "- DB Weight: 1 Read/Write (Accounts)", + "# " + ] + }, + { + "name": "force_transfer", + "fields": [ + { + "name": "new", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + }, + { + "name": "freeze", + "type": 35, + "typeName": "bool" + } + ], + "index": 3, + "docs": [ + "Force an index to an account. This doesn't require a deposit. If the index is already", + "held, then any deposit is reimbursed to its current owner.", + "", + "The dispatch origin for this call must be _Root_.", + "", + "- `index`: the index to be (re-)assigned.", + "- `new`: the new owner of the index. This function is a no-op if it is equal to sender.", + "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred.", + "", + "Emits `IndexAssigned` if successful.", + "", + "# ", + "- `O(1)`.", + "- One storage mutation (codec `O(1)`).", + "- Up to one reserve operation.", + "- One event.", + "-------------------", + "- DB Weight:", + " - Reads: Indices Accounts, System Account (original owner)", + " - Writes: Indices Accounts, System Account (original owner)", + "# " + ] + }, + { + "name": "freeze", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "T::AccountIndex" + } + ], + "index": 4, + "docs": [ + "Freeze an index so it will always point to the sender account. This consumes the", + "deposit.", + "", + "The dispatch origin for this call must be _Signed_ and the signing account must have a", + "non-frozen account `index`.", + "", + "- `index`: the index to be frozen in place.", + "", + "Emits `IndexFrozen` if successful.", + "", + "# ", + "- `O(1)`.", + "- One storage mutation (codec `O(1)`).", + "- Up to one slash operation.", + "- One event.", + "-------------------", + "- DB Weight: 1 Read/Write (Accounts)", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 150, + "type": { + "path": [ + "pallet_balances", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "transfer", + "fields": [ + { + "name": "dest", + "type": 151, + "typeName": "::Source" + }, + { + "name": "value", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 0, + "docs": [ + "Transfer some liquid free balance to another account.", + "", + "`transfer` will set the `FreeBalance` of the sender and receiver.", + "If the sender's account is below the existential deposit as a result", + "of the transfer, the account will be reaped.", + "", + "The dispatch origin for this call must be `Signed` by the transactor.", + "", + "# ", + "- Dependent on arguments but not critical, given proper implementations for input config", + " types. See related functions below.", + "- It contains a limited number of reads and writes internally and no complex", + " computation.", + "", + "Related functions:", + "", + " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", + " - Transferring balances to accounts that did not exist before will cause", + " `T::OnNewAccount::on_new_account` to be called.", + " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.", + " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check", + " that the transfer will not kill the origin account.", + "---------------------------------", + "- Origin account is already in memory, so no DB operations for them.", + "# " + ] + }, + { + "name": "set_balance", + "fields": [ + { + "name": "who", + "type": 151, + "typeName": "::Source" + }, + { + "name": "new_free", + "type": 65, + "typeName": "T::Balance" + }, + { + "name": "new_reserved", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 1, + "docs": [ + "Set the balances of a given account.", + "", + "This will alter `FreeBalance` and `ReservedBalance` in storage. it will", + "also alter the total issuance of the system (`TotalIssuance`) appropriately.", + "If the new free or reserved balance is below the existential deposit,", + "it will reset the account nonce (`frame_system::AccountNonce`).", + "", + "The dispatch origin for this call is `root`." + ] + }, + { + "name": "force_transfer", + "fields": [ + { + "name": "source", + "type": 151, + "typeName": "::Source" + }, + { + "name": "dest", + "type": 151, + "typeName": "::Source" + }, + { + "name": "value", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 2, + "docs": [ + "Exactly as `transfer`, except the origin must be root and the source account may be", + "specified.", + "# ", + "- Same as transfer, but additional read and write because the source account is not", + " assumed to be in the overlay.", + "# " + ] + }, + { + "name": "transfer_keep_alive", + "fields": [ + { + "name": "dest", + "type": 151, + "typeName": "::Source" + }, + { + "name": "value", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 3, + "docs": [ + "Same as the [`transfer`] call, but with a check that the transfer will not kill the", + "origin account.", + "", + "99% of the time you want [`transfer`] instead.", + "", + "[`transfer`]: struct.Pallet.html#method.transfer" + ] + }, + { + "name": "transfer_all", + "fields": [ + { + "name": "dest", + "type": 151, + "typeName": "::Source" + }, + { + "name": "keep_alive", + "type": 35, + "typeName": "bool" + } + ], + "index": 4, + "docs": [ + "Transfer the entire transferable balance from the caller account.", + "", + "NOTE: This function only attempts to transfer _transferable_ balances. This means that", + "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be", + "transferred by this function. To ensure that this function results in a killed account,", + "you might need to prepare the account by removing any reference counters, storage", + "deposits, etc...", + "", + "The dispatch origin of this call must be Signed.", + "", + "- `dest`: The recipient of the transfer.", + "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all", + " of the funds the account has, causing the sender account to be killed (false), or", + " transfer everything except at least the existential deposit, which will guarantee to", + " keep the sender account alive (true). # ", + "- O(1). Just like transfer, but reading the user's transferable balance first.", + " #" + ] + }, + { + "name": "force_unreserve", + "fields": [ + { + "name": "who", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 5, + "docs": [ + "Unreserve some balance from a user by force.", + "", + "Can only be called by ROOT." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 151, + "type": { + "path": [ + "sp_runtime", + "multiaddress", + "MultiAddress" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "AccountIndex", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Id", + "fields": [ + { + "type": 0, + "typeName": "AccountId" + } + ], + "index": 0 + }, + { + "name": "Index", + "fields": [ + { + "type": 113, + "typeName": "AccountIndex" + } + ], + "index": 1 + }, + { + "name": "Raw", + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ], + "index": 2 + }, + { + "name": "Address32", + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ], + "index": 3 + }, + { + "name": "Address20", + "fields": [ + { + "type": 152, + "typeName": "[u8; 20]" + } + ], + "index": 4 + } + ] + } + } + } + }, + { + "id": 152, + "type": { + "def": { + "array": { + "len": 20, + "type": 2 + } + } + } + }, + { + "id": 153, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "submit_unsigned", + "fields": [ + { + "name": "raw_solution", + "type": 154, + "typeName": "Box>>" + }, + { + "name": "witness", + "type": 207, + "typeName": "SolutionOrSnapshotSize" + } + ], + "index": 0, + "docs": [ + "Submit a solution for the unsigned phase.", + "", + "The dispatch origin fo this call must be __none__.", + "", + "This submission is checked on the fly. Moreover, this unsigned solution is only", + "validated when submitted to the pool from the **local** node. Effectively, this means", + "that only active validators can submit this transaction when authoring a block (similar", + "to an inherent).", + "", + "To prevent any incorrect solution (and thus wasted time/weight), this transaction will", + "panic if the solution submitted by the validator is invalid in any way, effectively", + "putting their authoring reward at risk.", + "", + "No deposit or reward is associated with this submission." + ] + }, + { + "name": "set_minimum_untrusted_score", + "fields": [ + { + "name": "maybe_next_score", + "type": 208, + "typeName": "Option" + } + ], + "index": 1, + "docs": [ + "Set a new value for `MinimumUntrustedScore`.", + "", + "Dispatch origin must be aligned with `T::ForceOrigin`.", + "", + "This check can be turned off by setting the value to `None`." + ] + }, + { + "name": "set_emergency_election_result", + "fields": [ + { + "name": "supports", + "type": 209, + "typeName": "Supports" + } + ], + "index": 2, + "docs": [ + "Set a solution in the queue, to be handed out to the client of this pallet in the next", + "call to `ElectionProvider::elect`.", + "", + "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`.", + "", + "The solution is not checked for any feasibility and is assumed to be trustworthy, as any", + "feasibility check itself can in principle cause the election process to fail (due to", + "memory/weight constrains)." + ] + }, + { + "name": "submit", + "fields": [ + { + "name": "raw_solution", + "type": 154, + "typeName": "Box>>" + } + ], + "index": 3, + "docs": [ + "Submit a solution for the signed phase.", + "", + "The dispatch origin fo this call must be __signed__.", + "", + "The solution is potentially queued, based on the claimed score and processed at the end", + "of the signed phase.", + "", + "A deposit is reserved and recorded for the solution. Based on the outcome, the solution", + "might be rewarded, slashed, or get all or a part of the deposit back." + ] + }, + { + "name": "governance_fallback", + "fields": [ + { + "name": "maybe_max_voters", + "type": 93, + "typeName": "Option" + }, + { + "name": "maybe_max_targets", + "type": 93, + "typeName": "Option" + } + ], + "index": 4, + "docs": [ + "Trigger the governance fallback.", + "", + "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to", + "calling [`Call::set_emergency_election_result`]." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 154, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "RawSolution" + ], + "params": [ + { + "name": "S", + "type": 155 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "solution", + "type": 155, + "typeName": "S" + }, + { + "name": "score", + "type": 206, + "typeName": "ElectionScore" + }, + { + "name": "round", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 155, + "type": { + "path": [ + "node_runtime", + "NposSolution16" + ], + "def": { + "composite": { + "fields": [ + { + "name": "votes1", + "type": 156 + }, + { + "name": "votes2", + "type": 159 + }, + { + "name": "votes3", + "type": 164 + }, + { + "name": "votes4", + "type": 167 + }, + { + "name": "votes5", + "type": 170 + }, + { + "name": "votes6", + "type": 173 + }, + { + "name": "votes7", + "type": 176 + }, + { + "name": "votes8", + "type": 179 + }, + { + "name": "votes9", + "type": 182 + }, + { + "name": "votes10", + "type": 185 + }, + { + "name": "votes11", + "type": 188 + }, + { + "name": "votes12", + "type": 191 + }, + { + "name": "votes13", + "type": 194 + }, + { + "name": "votes14", + "type": 197 + }, + { + "name": "votes15", + "type": 200 + }, + { + "name": "votes16", + "type": 203 + } + ] + } + } + } + }, + { + "id": 156, + "type": { + "def": { + "sequence": { + "type": 157 + } + } + } + }, + { + "id": 157, + "type": { + "def": { + "tuple": [ + 113, + 158 + ] + } + } + }, + { + "id": 158, + "type": { + "def": { + "compact": { + "type": 81 + } + } + } + }, + { + "id": 159, + "type": { + "def": { + "sequence": { + "type": 160 + } + } + } + }, + { + "id": 160, + "type": { + "def": { + "tuple": [ + 113, + 161, + 158 + ] + } + } + }, + { + "id": 161, + "type": { + "def": { + "tuple": [ + 158, + 162 + ] + } + } + }, + { + "id": 162, + "type": { + "def": { + "compact": { + "type": 163 + } + } + } + }, + { + "id": 163, + "type": { + "path": [ + "sp_arithmetic", + "per_things", + "PerU16" + ], + "def": { + "composite": { + "fields": [ + { + "type": 81, + "typeName": "u16" + } + ] + } + } + } + }, + { + "id": 164, + "type": { + "def": { + "sequence": { + "type": 165 + } + } + } + }, + { + "id": 165, + "type": { + "def": { + "tuple": [ + 113, + 166, + 158 + ] + } + } + }, + { + "id": 166, + "type": { + "def": { + "array": { + "len": 2, + "type": 161 + } + } + } + }, + { + "id": 167, + "type": { + "def": { + "sequence": { + "type": 168 + } + } + } + }, + { + "id": 168, + "type": { + "def": { + "tuple": [ + 113, + 169, + 158 + ] + } + } + }, + { + "id": 169, + "type": { + "def": { + "array": { + "len": 3, + "type": 161 + } + } + } + }, + { + "id": 170, + "type": { + "def": { + "sequence": { + "type": 171 + } + } + } + }, + { + "id": 171, + "type": { + "def": { + "tuple": [ + 113, + 172, + 158 + ] + } + } + }, + { + "id": 172, + "type": { + "def": { + "array": { + "len": 4, + "type": 161 + } + } + } + }, + { + "id": 173, + "type": { + "def": { + "sequence": { + "type": 174 + } + } + } + }, + { + "id": 174, + "type": { + "def": { + "tuple": [ + 113, + 175, + 158 + ] + } + } + }, + { + "id": 175, + "type": { + "def": { + "array": { + "len": 5, + "type": 161 + } + } + } + }, + { + "id": 176, + "type": { + "def": { + "sequence": { + "type": 177 + } + } + } + }, + { + "id": 177, + "type": { + "def": { + "tuple": [ + 113, + 178, + 158 + ] + } + } + }, + { + "id": 178, + "type": { + "def": { + "array": { + "len": 6, + "type": 161 + } + } + } + }, + { + "id": 179, + "type": { + "def": { + "sequence": { + "type": 180 + } + } + } + }, + { + "id": 180, + "type": { + "def": { + "tuple": [ + 113, + 181, + 158 + ] + } + } + }, + { + "id": 181, + "type": { + "def": { + "array": { + "len": 7, + "type": 161 + } + } + } + }, + { + "id": 182, + "type": { + "def": { + "sequence": { + "type": 183 + } + } + } + }, + { + "id": 183, + "type": { + "def": { + "tuple": [ + 113, + 184, + 158 + ] + } + } + }, + { + "id": 184, + "type": { + "def": { + "array": { + "len": 8, + "type": 161 + } + } + } + }, + { + "id": 185, + "type": { + "def": { + "sequence": { + "type": 186 + } + } + } + }, + { + "id": 186, + "type": { + "def": { + "tuple": [ + 113, + 187, + 158 + ] + } + } + }, + { + "id": 187, + "type": { + "def": { + "array": { + "len": 9, + "type": 161 + } + } + } + }, + { + "id": 188, + "type": { + "def": { + "sequence": { + "type": 189 + } + } + } + }, + { + "id": 189, + "type": { + "def": { + "tuple": [ + 113, + 190, + 158 + ] + } + } + }, + { + "id": 190, + "type": { + "def": { + "array": { + "len": 10, + "type": 161 + } + } + } + }, + { + "id": 191, + "type": { + "def": { + "sequence": { + "type": 192 + } + } + } + }, + { + "id": 192, + "type": { + "def": { + "tuple": [ + 113, + 193, + 158 + ] + } + } + }, + { + "id": 193, + "type": { + "def": { + "array": { + "len": 11, + "type": 161 + } + } + } + }, + { + "id": 194, + "type": { + "def": { + "sequence": { + "type": 195 + } + } + } + }, + { + "id": 195, + "type": { + "def": { + "tuple": [ + 113, + 196, + 158 + ] + } + } + }, + { + "id": 196, + "type": { + "def": { + "array": { + "len": 12, + "type": 161 + } + } + } + }, + { + "id": 197, + "type": { + "def": { + "sequence": { + "type": 198 + } + } + } + }, + { + "id": 198, + "type": { + "def": { + "tuple": [ + 113, + 199, + 158 + ] + } + } + }, + { + "id": 199, + "type": { + "def": { + "array": { + "len": 13, + "type": 161 + } + } + } + }, + { + "id": 200, + "type": { + "def": { + "sequence": { + "type": 201 + } + } + } + }, + { + "id": 201, + "type": { + "def": { + "tuple": [ + 113, + 202, + 158 + ] + } + } + }, + { + "id": 202, + "type": { + "def": { + "array": { + "len": 14, + "type": 161 + } + } + } + }, + { + "id": 203, + "type": { + "def": { + "sequence": { + "type": 204 + } + } + } + }, + { + "id": 204, + "type": { + "def": { + "tuple": [ + 113, + 205, + 158 + ] + } + } + }, + { + "id": 205, + "type": { + "def": { + "array": { + "len": 15, + "type": 161 + } + } + } + }, + { + "id": 206, + "type": { + "path": [ + "sp_npos_elections", + "ElectionScore" + ], + "def": { + "composite": { + "fields": [ + { + "name": "minimal_stake", + "type": 6, + "typeName": "ExtendedBalance" + }, + { + "name": "sum_stake", + "type": 6, + "typeName": "ExtendedBalance" + }, + { + "name": "sum_stake_squared", + "type": 6, + "typeName": "ExtendedBalance" + } + ] + } + } + } + }, + { + "id": 207, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "SolutionOrSnapshotSize" + ], + "def": { + "composite": { + "fields": [ + { + "name": "voters", + "type": 113, + "typeName": "u32" + }, + { + "name": "targets", + "type": 113, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 208, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 206 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 206 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 209, + "type": { + "def": { + "sequence": { + "type": 210 + } + } + } + }, + { + "id": 210, + "type": { + "def": { + "tuple": [ + 0, + 211 + ] + } + } + }, + { + "id": 211, + "type": { + "path": [ + "sp_npos_elections", + "Support" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "total", + "type": 6, + "typeName": "ExtendedBalance" + }, + { + "name": "voters", + "type": 47, + "typeName": "Vec<(AccountId, ExtendedBalance)>" + } + ] + } + } + } + }, + { + "id": 212, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "bond", + "fields": [ + { + "name": "controller", + "type": 151, + "typeName": "::Source" + }, + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "payee", + "type": 213, + "typeName": "RewardDestination" + } + ], + "index": 0, + "docs": [ + "Take the origin account as a stash and lock up `value` of its balance. `controller` will", + "be the account that controls it.", + "", + "`value` must be more than the `minimum_balance` specified by `T::Currency`.", + "", + "The dispatch origin for this call must be _Signed_ by the stash account.", + "", + "Emits `Bonded`.", + "# ", + "- Independent of the arguments. Moderate complexity.", + "- O(1).", + "- Three extra DB entries.", + "", + "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned", + "unless the `origin` falls below _existential deposit_ and gets removed as dust.", + "------------------", + "# " + ] + }, + { + "name": "bond_extra", + "fields": [ + { + "name": "max_additional", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "Add some extra amount that have appeared in the stash `free_balance` into the balance up", + "for staking.", + "", + "The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + "Use this if there are additional funds in your stash account that you wish to bond.", + "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose", + "any limitation on the amount that can be added.", + "", + "Emits `Bonded`.", + "", + "# ", + "- Independent of the arguments. Insignificant complexity.", + "- O(1).", + "# " + ] + }, + { + "name": "unbond", + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "Schedule a portion of the stash to be unlocked ready for transfer out after the bond", + "period ends. If this leaves an amount actively bonded less than", + "T::Currency::minimum_balance(), then it is increased to the full amount.", + "", + "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + "Once the unlock period is done, you can call `withdraw_unbonded` to actually move", + "the funds out of management ready for transfer.", + "", + "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)", + "can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", + "to be called first to remove some of the chunks (if possible).", + "", + "If a user encounters the `InsufficientBond` error when calling this extrinsic,", + "they should call `chill` first in order to free up their bonded funds.", + "", + "Emits `Unbonded`.", + "", + "See also [`Call::withdraw_unbonded`]." + ] + }, + { + "name": "withdraw_unbonded", + "fields": [ + { + "name": "num_slashing_spans", + "type": 4, + "typeName": "u32" + } + ], + "index": 3, + "docs": [ + "Remove any unlocked chunks from the `unlocking` queue from our management.", + "", + "This essentially frees up that balance to be used by the stash account to do", + "whatever it wants.", + "", + "The dispatch origin for this call must be _Signed_ by the controller.", + "", + "Emits `Withdrawn`.", + "", + "See also [`Call::unbond`].", + "", + "# ", + "Complexity O(S) where S is the number of slashing spans to remove", + "NOTE: Weight annotation is the kill scenario, we refund otherwise.", + "# " + ] + }, + { + "name": "validate", + "fields": [ + { + "name": "prefs", + "type": 214, + "typeName": "ValidatorPrefs" + } + ], + "index": 4, + "docs": [ + "Declare the desire to validate for the origin controller.", + "", + "Effects will be felt at the beginning of the next era.", + "", + "The dispatch origin for this call must be _Signed_ by the controller, not the stash." + ] + }, + { + "name": "nominate", + "fields": [ + { + "name": "targets", + "type": 216, + "typeName": "Vec<::Source>" + } + ], + "index": 5, + "docs": [ + "Declare the desire to nominate `targets` for the origin controller.", + "", + "Effects will be felt at the beginning of the next era.", + "", + "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + "# ", + "- The transaction's complexity is proportional to the size of `targets` (N)", + "which is capped at CompactAssignments::LIMIT (T::MaxNominations).", + "- Both the reads and writes follow a similar pattern.", + "# " + ] + }, + { + "name": "chill", + "index": 6, + "docs": [ + "Declare no desire to either validate or nominate.", + "", + "Effects will be felt at the beginning of the next era.", + "", + "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + "# ", + "- Independent of the arguments. Insignificant complexity.", + "- Contains one read.", + "- Writes are limited to the `origin` account key.", + "# " + ] + }, + { + "name": "set_payee", + "fields": [ + { + "name": "payee", + "type": 213, + "typeName": "RewardDestination" + } + ], + "index": 7, + "docs": [ + "(Re-)set the payment target for a controller.", + "", + "Effects will be felt instantly (as soon as this function is completed successfully).", + "", + "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + "# ", + "- Independent of the arguments. Insignificant complexity.", + "- Contains a limited number of reads.", + "- Writes are limited to the `origin` account key.", + "---------", + "- Weight: O(1)", + "- DB Weight:", + " - Read: Ledger", + " - Write: Payee", + "# " + ] + }, + { + "name": "set_controller", + "fields": [ + { + "name": "controller", + "type": 151, + "typeName": "::Source" + } + ], + "index": 8, + "docs": [ + "(Re-)set the controller of a stash.", + "", + "Effects will be felt instantly (as soon as this function is completed successfully).", + "", + "The dispatch origin for this call must be _Signed_ by the stash, not the controller.", + "", + "# ", + "- Independent of the arguments. Insignificant complexity.", + "- Contains a limited number of reads.", + "- Writes are limited to the `origin` account key.", + "----------", + "Weight: O(1)", + "DB Weight:", + "- Read: Bonded, Ledger New Controller, Ledger Old Controller", + "- Write: Bonded, Ledger New Controller, Ledger Old Controller", + "# " + ] + }, + { + "name": "set_validator_count", + "fields": [ + { + "name": "new", + "type": 113, + "typeName": "u32" + } + ], + "index": 9, + "docs": [ + "Sets the ideal number of validators.", + "", + "The dispatch origin must be Root.", + "", + "# ", + "Weight: O(1)", + "Write: Validator Count", + "# " + ] + }, + { + "name": "increase_validator_count", + "fields": [ + { + "name": "additional", + "type": 113, + "typeName": "u32" + } + ], + "index": 10, + "docs": [ + "Increments the ideal number of validators.", + "", + "The dispatch origin must be Root.", + "", + "# ", + "Same as [`Self::set_validator_count`].", + "# " + ] + }, + { + "name": "scale_validator_count", + "fields": [ + { + "name": "factor", + "type": 217, + "typeName": "Percent" + } + ], + "index": 11, + "docs": [ + "Scale up the ideal number of validators by a factor.", + "", + "The dispatch origin must be Root.", + "", + "# ", + "Same as [`Self::set_validator_count`].", + "# " + ] + }, + { + "name": "force_no_eras", + "index": 12, + "docs": [ + "Force there to be no new eras indefinitely.", + "", + "The dispatch origin must be Root.", + "", + "# Warning", + "", + "The election process starts multiple blocks before the end of the era.", + "Thus the election process may be ongoing when this is called. In this case the", + "election will continue until the next era is triggered.", + "", + "# ", + "- No arguments.", + "- Weight: O(1)", + "- Write: ForceEra", + "# " + ] + }, + { + "name": "force_new_era", + "index": 13, + "docs": [ + "Force there to be a new era at the end of the next session. After this, it will be", + "reset to normal (non-forced) behaviour.", + "", + "The dispatch origin must be Root.", + "", + "# Warning", + "", + "The election process starts multiple blocks before the end of the era.", + "If this is called just before a new era is triggered, the election process may not", + "have enough blocks to get a result.", + "", + "# ", + "- No arguments.", + "- Weight: O(1)", + "- Write ForceEra", + "# " + ] + }, + { + "name": "set_invulnerables", + "fields": [ + { + "name": "invulnerables", + "type": 40, + "typeName": "Vec" + } + ], + "index": 14, + "docs": [ + "Set the validators who cannot be slashed (if any).", + "", + "The dispatch origin must be Root." + ] + }, + { + "name": "force_unstake", + "fields": [ + { + "name": "stash", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "num_slashing_spans", + "type": 4, + "typeName": "u32" + } + ], + "index": 15, + "docs": [ + "Force a current staker to become completely unstaked, immediately.", + "", + "The dispatch origin must be Root." + ] + }, + { + "name": "force_new_era_always", + "index": 16, + "docs": [ + "Force there to be a new era at the end of sessions indefinitely.", + "", + "The dispatch origin must be Root.", + "", + "# Warning", + "", + "The election process starts multiple blocks before the end of the era.", + "If this is called just before a new era is triggered, the election process may not", + "have enough blocks to get a result." + ] + }, + { + "name": "cancel_deferred_slash", + "fields": [ + { + "name": "era", + "type": 4, + "typeName": "EraIndex" + }, + { + "name": "slash_indices", + "type": 92, + "typeName": "Vec" + } + ], + "index": 17, + "docs": [ + "Cancel enactment of a deferred slash.", + "", + "Can be called by the `T::SlashCancelOrigin`.", + "", + "Parameters: era and indices of the slashes for that era to kill." + ] + }, + { + "name": "payout_stakers", + "fields": [ + { + "name": "validator_stash", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "era", + "type": 4, + "typeName": "EraIndex" + } + ], + "index": 18, + "docs": [ + "Pay out all the stakers behind a single validator for a single era.", + "", + "- `validator_stash` is the stash account of the validator. Their nominators, up to", + " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.", + "- `era` may be any era between `[current_era - history_depth; current_era]`.", + "", + "The origin of this call must be _Signed_. Any account can call this function, even if", + "it is not one of the stakers.", + "", + "# ", + "- Time complexity: at most O(MaxNominatorRewardedPerValidator).", + "- Contains a limited number of reads and writes.", + "-----------", + "N is the Number of payouts for the validator (including the validator)", + "Weight:", + "- Reward Destination Staked: O(N)", + "- Reward Destination Controller (Creating): O(N)", + "", + " NOTE: weights are assuming that payouts are made to alive stash account (Staked).", + " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here.", + "# " + ] + }, + { + "name": "rebond", + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 19, + "docs": [ + "Rebond a portion of the stash scheduled to be unlocked.", + "", + "The dispatch origin must be signed by the controller.", + "", + "# ", + "- Time complexity: O(L), where L is unlocking chunks", + "- Bounded by `MaxUnlockingChunks`.", + "- Storage changes: Can't increase storage, only decrease it.", + "# " + ] + }, + { + "name": "set_history_depth", + "fields": [ + { + "name": "new_history_depth", + "type": 113, + "typeName": "EraIndex" + }, + { + "name": "era_items_deleted", + "type": 113, + "typeName": "u32" + } + ], + "index": 20, + "docs": [ + "Set `HistoryDepth` value. This function will delete any history information", + "when `HistoryDepth` is reduced.", + "", + "Parameters:", + "- `new_history_depth`: The new history depth you would like to set.", + "- `era_items_deleted`: The number of items that will be deleted by this dispatch. This", + " should report all the storage items that will be deleted by clearing old era history.", + " Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an", + " accurate number.", + "", + "Origin must be root.", + "", + "# ", + "- E: Number of history depths removed, i.e. 10 -> 7 = 3", + "- Weight: O(E)", + "- DB Weight:", + " - Reads: Current Era, History Depth", + " - Writes: History Depth", + " - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs", + " - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake,", + " ErasStartSessionIndex", + "# " + ] + }, + { + "name": "reap_stash", + "fields": [ + { + "name": "stash", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "num_slashing_spans", + "type": 4, + "typeName": "u32" + } + ], + "index": 21, + "docs": [ + "Remove all data structures concerning a staker/stash once it is at a state where it can", + "be considered `dust` in the staking system. The requirements are:", + "", + "1. the `total_balance` of the stash is below existential deposit.", + "2. or, the `ledger.total` of the stash is below existential deposit.", + "", + "The former can happen in cases like a slash; the latter when a fully unbonded account", + "is still receiving staking rewards in `RewardDestination::Staked`.", + "", + "It can be called by anyone, as long as `stash` meets the above requirements.", + "", + "Refunds the transaction fees upon successful execution." + ] + }, + { + "name": "kick", + "fields": [ + { + "name": "who", + "type": 216, + "typeName": "Vec<::Source>" + } + ], + "index": 22, + "docs": [ + "Remove the given nominations from the calling validator.", + "", + "Effects will be felt at the beginning of the next era.", + "", + "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", + "", + "- `who`: A list of nominator stash accounts who are nominating this validator which", + " should no longer be nominating this validator.", + "", + "Note: Making this call only makes sense if you first set the validator preferences to", + "block any further nominations." + ] + }, + { + "name": "set_staking_configs", + "fields": [ + { + "name": "min_nominator_bond", + "type": 218, + "typeName": "ConfigOp>" + }, + { + "name": "min_validator_bond", + "type": 218, + "typeName": "ConfigOp>" + }, + { + "name": "max_nominator_count", + "type": 219, + "typeName": "ConfigOp" + }, + { + "name": "max_validator_count", + "type": 219, + "typeName": "ConfigOp" + }, + { + "name": "chill_threshold", + "type": 220, + "typeName": "ConfigOp" + }, + { + "name": "min_commission", + "type": 221, + "typeName": "ConfigOp" + } + ], + "index": 23, + "docs": [ + "Update the various staking configurations .", + "", + "* `min_nominator_bond`: The minimum active bond needed to be a nominator.", + "* `min_validator_bond`: The minimum active bond needed to be a validator.", + "* `max_nominator_count`: The max number of users who can be a nominator at once. When", + " set to `None`, no limit is enforced.", + "* `max_validator_count`: The max number of users who can be a validator at once. When", + " set to `None`, no limit is enforced.", + "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which", + " should be filled in order for the `chill_other` transaction to work.", + "* `min_commission`: The minimum amount of commission that each validators must maintain.", + " This is checked only upon calling `validate`. Existing validators are not affected.", + "", + "Origin must be Root to call this function.", + "", + "NOTE: Existing nominators and validators will not be affected by this update.", + "to kick people under the new limits, `chill_other` should be called." + ] + }, + { + "name": "chill_other", + "fields": [ + { + "name": "controller", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 24, + "docs": [ + "Declare a `controller` to stop participating as either a validator or nominator.", + "", + "Effects will be felt at the beginning of the next era.", + "", + "The dispatch origin for this call must be _Signed_, but can be called by anyone.", + "", + "If the caller is the same as the controller being targeted, then no further checks are", + "enforced, and this function behaves just like `chill`.", + "", + "If the caller is different than the controller being targeted, the following conditions", + "must be met:", + "", + "* `controller` must belong to a nominator who has become non-decodable,", + "", + "Or:", + "", + "* A `ChillThreshold` must be set and checked which defines how close to the max", + " nominators or validators we must reach before users can start chilling one-another.", + "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine", + " how close we are to the threshold.", + "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines", + " if this is a person that should be chilled because they have not met the threshold", + " bond required.", + "", + "This can be helpful if bond requirements are updated, and we need to remove old users", + "who do not satisfy these requirements." + ] + }, + { + "name": "force_apply_min_commission", + "fields": [ + { + "name": "validator_stash", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 25, + "docs": [ + "Force a validator to have at least the minimum commission. This will not affect a", + "validator who already has a commission greater than or equal to the minimum. Any account", + "can call this." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 213, + "type": { + "path": [ + "pallet_staking", + "RewardDestination" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Staked", + "index": 0 + }, + { + "name": "Stash", + "index": 1 + }, + { + "name": "Controller", + "index": 2 + }, + { + "name": "Account", + "fields": [ + { + "type": 0, + "typeName": "AccountId" + } + ], + "index": 3 + }, + { + "name": "None", + "index": 4 + } + ] + } + } + } + }, + { + "id": 214, + "type": { + "path": [ + "pallet_staking", + "ValidatorPrefs" + ], + "def": { + "composite": { + "fields": [ + { + "name": "commission", + "type": 215, + "typeName": "Perbill" + }, + { + "name": "blocked", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 215, + "type": { + "def": { + "compact": { + "type": 116 + } + } + } + }, + { + "id": 216, + "type": { + "def": { + "sequence": { + "type": 151 + } + } + } + }, + { + "id": 217, + "type": { + "path": [ + "sp_arithmetic", + "per_things", + "Percent" + ], + "def": { + "composite": { + "fields": [ + { + "type": 2, + "typeName": "u8" + } + ] + } + } + } + }, + { + "id": 218, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "ConfigOp" + ], + "params": [ + { + "name": "T", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Noop", + "index": 0 + }, + { + "name": "Set", + "fields": [ + { + "type": 6, + "typeName": "T" + } + ], + "index": 1 + }, + { + "name": "Remove", + "index": 2 + } + ] + } + } + } + }, + { + "id": 219, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "ConfigOp" + ], + "params": [ + { + "name": "T", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Noop", + "index": 0 + }, + { + "name": "Set", + "fields": [ + { + "type": 4, + "typeName": "T" + } + ], + "index": 1 + }, + { + "name": "Remove", + "index": 2 + } + ] + } + } + } + }, + { + "id": 220, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "ConfigOp" + ], + "params": [ + { + "name": "T", + "type": 217 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Noop", + "index": 0 + }, + { + "name": "Set", + "fields": [ + { + "type": 217, + "typeName": "T" + } + ], + "index": 1 + }, + { + "name": "Remove", + "index": 2 + } + ] + } + } + } + }, + { + "id": 221, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "ConfigOp" + ], + "params": [ + { + "name": "T", + "type": 116 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Noop", + "index": 0 + }, + { + "name": "Set", + "fields": [ + { + "type": 116, + "typeName": "T" + } + ], + "index": 1 + }, + { + "name": "Remove", + "index": 2 + } + ] + } + } + } + }, + { + "id": 222, + "type": { + "path": [ + "pallet_session", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "set_keys", + "fields": [ + { + "name": "keys", + "type": 223, + "typeName": "T::Keys" + }, + { + "name": "proof", + "type": 10, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Sets the session key(s) of the function caller to `keys`.", + "Allows an account to set its session key prior to becoming a validator.", + "This doesn't take effect until the next session.", + "", + "The dispatch origin of this function must be signed.", + "", + "# ", + "- Complexity: `O(1)`. Actual cost depends on the number of length of", + " `T::Keys::key_ids()` which is fixed.", + "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`", + "- DbWrites: `origin account`, `NextKeys`", + "- DbReads per key id: `KeyOwner`", + "- DbWrites per key id: `KeyOwner`", + "# " + ] + }, + { + "name": "purge_keys", + "index": 1, + "docs": [ + "Removes any session key(s) of the function caller.", + "", + "This doesn't take effect until the next session.", + "", + "The dispatch origin of this function must be Signed and the account must be either be", + "convertible to a validator ID using the chain's typical addressing system (this usually", + "means being a controller account) or directly convertible into a validator ID (which", + "usually means being a stash account).", + "", + "# ", + "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length", + " of `T::Keys::key_ids()` which is fixed.", + "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`", + "- DbWrites: `NextKeys`, `origin account`", + "- DbWrites per key id: `KeyOwner`", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 223, + "type": { + "path": [ + "node_runtime", + "SessionKeys" + ], + "def": { + "composite": { + "fields": [ + { + "name": "grandpa", + "type": 53, + "typeName": "::Public" + }, + { + "name": "babe", + "type": 139, + "typeName": "::Public" + }, + { + "name": "im_online", + "type": 60, + "typeName": "::Public" + }, + { + "name": "authority_discovery", + "type": 224, + "typeName": "::Public" + } + ] + } + } + } + }, + { + "id": 224, + "type": { + "path": [ + "sp_authority_discovery", + "app", + "Public" + ], + "def": { + "composite": { + "fields": [ + { + "type": 61, + "typeName": "sr25519::Public" + } + ] + } + } + } + }, + { + "id": 225, + "type": { + "path": [ + "pallet_democracy", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "propose", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 0, + "docs": [ + "Propose a sensitive action to be taken.", + "", + "The dispatch origin of this call must be _Signed_ and the sender must", + "have funds to cover the deposit.", + "", + "- `proposal_hash`: The hash of the proposal preimage.", + "- `value`: The amount of deposit (must be at least `MinimumDeposit`).", + "", + "Emits `Proposed`.", + "", + "Weight: `O(p)`" + ] + }, + { + "name": "second", + "fields": [ + { + "name": "proposal", + "type": 113, + "typeName": "PropIndex" + }, + { + "name": "seconds_upper_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Signals agreement with a particular proposal.", + "", + "The dispatch origin of this call must be _Signed_ and the sender", + "must have funds to cover the deposit, equal to the original deposit.", + "", + "- `proposal`: The index of the proposal to second.", + "- `seconds_upper_bound`: an upper bound on the current number of seconds on this", + " proposal. Extrinsic is weighted according to this value with no refund.", + "", + "Weight: `O(S)` where S is the number of seconds a proposal already has." + ] + }, + { + "name": "vote", + "fields": [ + { + "name": "ref_index", + "type": 113, + "typeName": "ReferendumIndex" + }, + { + "name": "vote", + "type": 42, + "typeName": "AccountVote>" + } + ], + "index": 2, + "docs": [ + "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + "otherwise it is a vote to keep the status quo.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `ref_index`: The index of the referendum to vote for.", + "- `vote`: The vote configuration.", + "", + "Weight: `O(R)` where R is the number of referendums the voter has voted on." + ] + }, + { + "name": "emergency_cancel", + "fields": [ + { + "name": "ref_index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 3, + "docs": [ + "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", + "referendum.", + "", + "The dispatch origin of this call must be `CancellationOrigin`.", + "", + "-`ref_index`: The index of the referendum to cancel.", + "", + "Weight: `O(1)`." + ] + }, + { + "name": "external_propose", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 4, + "docs": [ + "Schedule a referendum to be tabled once it is legal to schedule an external", + "referendum.", + "", + "The dispatch origin of this call must be `ExternalOrigin`.", + "", + "- `proposal_hash`: The preimage hash of the proposal.", + "", + "Weight: `O(V)` with V number of vetoers in the blacklist of proposal.", + " Decoding vec of length V. Charged as maximum" + ] + }, + { + "name": "external_propose_majority", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 5, + "docs": [ + "Schedule a majority-carries referendum to be tabled next once it is legal to schedule", + "an external referendum.", + "", + "The dispatch of this call must be `ExternalMajorityOrigin`.", + "", + "- `proposal_hash`: The preimage hash of the proposal.", + "", + "Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + "pre-scheduled `external_propose` call.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "external_propose_default", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 6, + "docs": [ + "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", + "schedule an external referendum.", + "", + "The dispatch of this call must be `ExternalDefaultOrigin`.", + "", + "- `proposal_hash`: The preimage hash of the proposal.", + "", + "Unlike `external_propose`, blacklisting has no effect on this and it may replace a", + "pre-scheduled `external_propose` call.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "fast_track", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "voting_period", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 7, + "docs": [ + "Schedule the currently externally-proposed majority-carries referendum to be tabled", + "immediately. If there is no externally-proposed referendum currently, or if there is one", + "but it is not a majority-carries referendum then it fails.", + "", + "The dispatch of this call must be `FastTrackOrigin`.", + "", + "- `proposal_hash`: The hash of the current external proposal.", + "- `voting_period`: The period that is allowed for voting on this proposal. Increased to", + " `FastTrackVotingPeriod` if too low.", + "- `delay`: The number of block after voting has ended in approval and this should be", + " enacted. This doesn't have a minimum amount.", + "", + "Emits `Started`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "veto_external", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 8, + "docs": [ + "Veto and blacklist the external proposal hash.", + "", + "The dispatch origin of this call must be `VetoOrigin`.", + "", + "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist.", + "", + "Emits `Vetoed`.", + "", + "Weight: `O(V + log(V))` where V is number of `existing vetoers`" + ] + }, + { + "name": "cancel_referendum", + "fields": [ + { + "name": "ref_index", + "type": 113, + "typeName": "ReferendumIndex" + } + ], + "index": 9, + "docs": [ + "Remove a referendum.", + "", + "The dispatch origin of this call must be _Root_.", + "", + "- `ref_index`: The index of the referendum to cancel.", + "", + "# Weight: `O(1)`." + ] + }, + { + "name": "cancel_queued", + "fields": [ + { + "name": "which", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 10, + "docs": [ + "Cancel a proposal queued for enactment.", + "", + "The dispatch origin of this call must be _Root_.", + "", + "- `which`: The index of the referendum to cancel.", + "", + "Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`." + ] + }, + { + "name": "delegate", + "fields": [ + { + "name": "to", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "conviction", + "type": 226, + "typeName": "Conviction" + }, + { + "name": "balance", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 11, + "docs": [ + "Delegate the voting power (with some given conviction) of the sending account.", + "", + "The balance delegated is locked for as long as it's delegated, and thereafter for the", + "time appropriate for the conviction's lock period.", + "", + "The dispatch origin of this call must be _Signed_, and the signing account must either:", + " - be delegating already; or", + " - have no voting activity (if there is, then it will need to be removed/consolidated", + " through `reap_vote` or `unvote`).", + "", + "- `to`: The account whose voting the `target` account's voting power will follow.", + "- `conviction`: The conviction that will be attached to the delegated votes. When the", + " account is undelegated, the funds will be locked for the corresponding period.", + "- `balance`: The amount of the account's balance to be used in delegating. This must not", + " be more than the account's current balance.", + "", + "Emits `Delegated`.", + "", + "Weight: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes." + ] + }, + { + "name": "undelegate", + "index": 12, + "docs": [ + "Undelegate the voting power of the sending account.", + "", + "Tokens may be unlocked following once an amount of time consistent with the lock period", + "of the conviction with which the delegation was issued.", + "", + "The dispatch origin of this call must be _Signed_ and the signing account must be", + "currently delegating.", + "", + "Emits `Undelegated`.", + "", + "Weight: `O(R)` where R is the number of referendums the voter delegating to has", + " voted on. Weight is charged as if maximum votes." + ] + }, + { + "name": "clear_public_proposals", + "index": 13, + "docs": [ + "Clears all public proposals.", + "", + "The dispatch origin of this call must be _Root_.", + "", + "Weight: `O(1)`." + ] + }, + { + "name": "note_preimage", + "fields": [ + { + "name": "encoded_proposal", + "type": 10, + "typeName": "Vec" + } + ], + "index": 14, + "docs": [ + "Register the preimage for an upcoming proposal. This doesn't require the proposal to be", + "in the dispatch queue but does require a deposit, returned once enacted.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `encoded_proposal`: The preimage of a proposal.", + "", + "Emits `PreimageNoted`.", + "", + "Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." + ] + }, + { + "name": "note_preimage_operational", + "fields": [ + { + "name": "encoded_proposal", + "type": 10, + "typeName": "Vec" + } + ], + "index": 15, + "docs": [ + "Same as `note_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "note_imminent_preimage", + "fields": [ + { + "name": "encoded_proposal", + "type": 10, + "typeName": "Vec" + } + ], + "index": 16, + "docs": [ + "Register the preimage for an upcoming proposal. This requires the proposal to be", + "in the dispatch queue. No deposit is needed. When this call is successful, i.e.", + "the preimage has not been uploaded before and matches some imminent proposal,", + "no fee is paid.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `encoded_proposal`: The preimage of a proposal.", + "", + "Emits `PreimageNoted`.", + "", + "Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." + ] + }, + { + "name": "note_imminent_preimage_operational", + "fields": [ + { + "name": "encoded_proposal", + "type": 10, + "typeName": "Vec" + } + ], + "index": 17, + "docs": [ + "Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." + ] + }, + { + "name": "reap_preimage", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "proposal_len_upper_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 18, + "docs": [ + "Remove an expired proposal preimage and collect the deposit.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `proposal_hash`: The preimage hash of a proposal.", + "- `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is", + " weighted according to this value with no refund.", + "", + "This will only work after `VotingPeriod` blocks from the time that the preimage was", + "noted, if it's the same account doing it. If it's a different account, then it'll only", + "work an additional `EnactmentPeriod` later.", + "", + "Emits `PreimageReaped`.", + "", + "Weight: `O(D)` where D is length of proposal." + ] + }, + { + "name": "unlock", + "fields": [ + { + "name": "target", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 19, + "docs": [ + "Unlock tokens that have an expired lock.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `target`: The account to remove the lock on.", + "", + "Weight: `O(R)` with R number of vote of target." + ] + }, + { + "name": "remove_vote", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 20, + "docs": [ + "Remove a vote for a referendum.", + "", + "If:", + "- the referendum was cancelled, or", + "- the referendum is ongoing, or", + "- the referendum has ended such that", + " - the vote of the account was in opposition to the result; or", + " - there was no conviction to the account's vote; or", + " - the account made a split vote", + "...then the vote is removed cleanly and a following call to `unlock` may result in more", + "funds being available.", + "", + "If, however, the referendum has ended and:", + "- it finished corresponding to the vote of the account, and", + "- the account made a standard vote with conviction, and", + "- the lock period of the conviction is not over", + "...then the lock will be aggregated into the overall account's lock, which may involve", + "*overlocking* (where the two locks are combined into a single lock that is the maximum", + "of both the amount locked and the time is it locked for).", + "", + "The dispatch origin of this call must be _Signed_, and the signer must have a vote", + "registered for referendum `index`.", + "", + "- `index`: The index of referendum of the vote to be removed.", + "", + "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "remove_other_vote", + "fields": [ + { + "name": "target", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 21, + "docs": [ + "Remove a vote for a referendum.", + "", + "If the `target` is equal to the signer, then this function is exactly equivalent to", + "`remove_vote`. If not equal to the signer, then the vote must have expired,", + "either because the referendum was cancelled, because the voter lost the referendum or", + "because the conviction period is over.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `target`: The account of the vote to be removed; this account must have voted for", + " referendum `index`.", + "- `index`: The index of referendum of the vote to be removed.", + "", + "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "enact_proposal", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 22, + "docs": [ + "Enact a proposal from a referendum. For now we just make the weight be the maximum." + ] + }, + { + "name": "blacklist", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "maybe_ref_index", + "type": 93, + "typeName": "Option" + } + ], + "index": 23, + "docs": [ + "Permanently place a proposal into the blacklist. This prevents it from ever being", + "proposed again.", + "", + "If called on a queued public or external proposal, then this will result in it being", + "removed. If the `ref_index` supplied is an active referendum with the proposal hash,", + "then it will be cancelled.", + "", + "The dispatch origin of this call must be `BlacklistOrigin`.", + "", + "- `proposal_hash`: The proposal hash to blacklist permanently.", + "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be", + "cancelled.", + "", + "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a", + " reasonable value)." + ] + }, + { + "name": "cancel_proposal", + "fields": [ + { + "name": "prop_index", + "type": 113, + "typeName": "PropIndex" + } + ], + "index": 24, + "docs": [ + "Remove a proposal.", + "", + "The dispatch origin of this call must be `CancelProposalOrigin`.", + "", + "- `prop_index`: The index of the proposal to cancel.", + "", + "Weight: `O(p)` where `p = PublicProps::::decode_len()`" + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 226, + "type": { + "path": [ + "pallet_democracy", + "conviction", + "Conviction" + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Locked1x", + "index": 1 + }, + { + "name": "Locked2x", + "index": 2 + }, + { + "name": "Locked3x", + "index": 3 + }, + { + "name": "Locked4x", + "index": 4 + }, + { + "name": "Locked5x", + "index": 5 + }, + { + "name": "Locked6x", + "index": 6 + } + ] + } + } + } + }, + { + "id": 227, + "type": { + "path": [ + "pallet_collective", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "set_members", + "fields": [ + { + "name": "new_members", + "type": 40, + "typeName": "Vec" + }, + { + "name": "prime", + "type": 58, + "typeName": "Option" + }, + { + "name": "old_count", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 0, + "docs": [ + "Set the collective's membership.", + "", + "- `new_members`: The new member list. Be nice to the chain and provide it sorted.", + "- `prime`: The prime member whose vote sets the default.", + "- `old_count`: The upper bound for the previous number of members in storage. Used for", + " weight estimation.", + "", + "Requires root origin.", + "", + "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + "# WARNING:", + "", + "The `pallet-collective` can also be managed by logic outside of the pallet through the", + "implementation of the trait [`ChangeMembers`].", + "Any call to `set_members` must be careful that the member set doesn't get out of sync", + "with other logic managing the member set.", + "", + "# ", + "## Weight", + "- `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + "- DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the", + " members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + "# " + ] + }, + { + "name": "execute", + "fields": [ + { + "name": "proposal", + "type": 134, + "typeName": "Box<>::Proposal>" + }, + { + "name": "length_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Dispatch a proposal from a member using the `Member` origin.", + "", + "Origin must be a member of the collective.", + "", + "# ", + "## Weight", + "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching", + " `proposal`", + "- DB: 1 read (codec `O(M)`) + DB access of `proposal`", + "- 1 event", + "# " + ] + }, + { + "name": "propose", + "fields": [ + { + "name": "threshold", + "type": 113, + "typeName": "MemberCount" + }, + { + "name": "proposal", + "type": 134, + "typeName": "Box<>::Proposal>" + }, + { + "name": "length_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 2, + "docs": [ + "Add a new proposal to either be voted on or executed directly.", + "", + "Requires the sender to be member.", + "", + "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + "or put up for voting.", + "", + "# ", + "## Weight", + "- `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + "- DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + "# " + ] + }, + { + "name": "vote", + "fields": [ + { + "name": "proposal", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "index", + "type": 113, + "typeName": "ProposalIndex" + }, + { + "name": "approve", + "type": 35, + "typeName": "bool" + } + ], + "index": 3, + "docs": [ + "Add an aye or nay vote for the sender to the given proposal.", + "", + "Requires the sender to be a member.", + "", + "Transaction fees will be waived if the member is voting on any particular proposal", + "for the first time and the call is successful. Subsequent vote changes will charge a", + "fee.", + "# ", + "## Weight", + "- `O(M)` where `M` is members-count (code- and governance-bounded)", + "- DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + "- 1 event", + "# " + ] + }, + { + "name": "close", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "index", + "type": 113, + "typeName": "ProposalIndex" + }, + { + "name": "proposal_weight_bound", + "type": 146, + "typeName": "Weight" + }, + { + "name": "length_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 4, + "docs": [ + "Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + "May be called by any signed account in order to finish voting and close the proposal.", + "", + "If called before the end of the voting period it will only close the vote if it is", + "has enough votes to be approved or disapproved.", + "", + "If called after the end of the voting period abstentions are counted as rejections", + "unless there is a prime member set and the prime member cast an approval.", + "", + "If the close operation completes successfully with disapproval, the transaction fee will", + "be waived. Otherwise execution of the approved operation will be charged to the caller.", + "", + "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed", + "proposal.", + "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + "`storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + "# ", + "## Weight", + "- `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + "- DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec", + " `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + "- up to 3 events", + "# " + ] + }, + { + "name": "disapprove_proposal", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 5, + "docs": [ + "Disapprove a proposal, close, and remove it from the system, regardless of its current", + "state.", + "", + "Must be called by the Root origin.", + "", + "Parameters:", + "* `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + "# ", + "Complexity: O(P) where P is the number of max proposals", + "DB Weight:", + "* Reads: Proposals", + "* Writes: Voting, Proposals, ProposalOf", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 228, + "type": { + "path": [ + "pallet_collective", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "set_members", + "fields": [ + { + "name": "new_members", + "type": 40, + "typeName": "Vec" + }, + { + "name": "prime", + "type": 58, + "typeName": "Option" + }, + { + "name": "old_count", + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 0, + "docs": [ + "Set the collective's membership.", + "", + "- `new_members`: The new member list. Be nice to the chain and provide it sorted.", + "- `prime`: The prime member whose vote sets the default.", + "- `old_count`: The upper bound for the previous number of members in storage. Used for", + " weight estimation.", + "", + "Requires root origin.", + "", + "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", + " the weight estimations rely on it to estimate dispatchable weight.", + "", + "# WARNING:", + "", + "The `pallet-collective` can also be managed by logic outside of the pallet through the", + "implementation of the trait [`ChangeMembers`].", + "Any call to `set_members` must be careful that the member set doesn't get out of sync", + "with other logic managing the member set.", + "", + "# ", + "## Weight", + "- `O(MP + N)` where:", + " - `M` old-members-count (code- and governance-bounded)", + " - `N` new-members-count (code- and governance-bounded)", + " - `P` proposals-count (code-bounded)", + "- DB:", + " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the", + " members", + " - 1 storage read (codec `O(P)`) for reading the proposals", + " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", + " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", + "# " + ] + }, + { + "name": "execute", + "fields": [ + { + "name": "proposal", + "type": 134, + "typeName": "Box<>::Proposal>" + }, + { + "name": "length_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Dispatch a proposal from a member using the `Member` origin.", + "", + "Origin must be a member of the collective.", + "", + "# ", + "## Weight", + "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching", + " `proposal`", + "- DB: 1 read (codec `O(M)`) + DB access of `proposal`", + "- 1 event", + "# " + ] + }, + { + "name": "propose", + "fields": [ + { + "name": "threshold", + "type": 113, + "typeName": "MemberCount" + }, + { + "name": "proposal", + "type": 134, + "typeName": "Box<>::Proposal>" + }, + { + "name": "length_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 2, + "docs": [ + "Add a new proposal to either be voted on or executed directly.", + "", + "Requires the sender to be member.", + "", + "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)", + "or put up for voting.", + "", + "# ", + "## Weight", + "- `O(B + M + P1)` or `O(B + M + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - branching is influenced by `threshold` where:", + " - `P1` is proposal execution complexity (`threshold < 2`)", + " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", + "- DB:", + " - 1 storage read `is_member` (codec `O(M)`)", + " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", + " - DB accesses influenced by `threshold`:", + " - EITHER storage accesses done by `proposal` (`threshold < 2`)", + " - OR proposal insertion (`threshold <= 2`)", + " - 1 storage mutation `Proposals` (codec `O(P2)`)", + " - 1 storage mutation `ProposalCount` (codec `O(1)`)", + " - 1 storage write `ProposalOf` (codec `O(B)`)", + " - 1 storage write `Voting` (codec `O(M)`)", + " - 1 event", + "# " + ] + }, + { + "name": "vote", + "fields": [ + { + "name": "proposal", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "index", + "type": 113, + "typeName": "ProposalIndex" + }, + { + "name": "approve", + "type": 35, + "typeName": "bool" + } + ], + "index": 3, + "docs": [ + "Add an aye or nay vote for the sender to the given proposal.", + "", + "Requires the sender to be a member.", + "", + "Transaction fees will be waived if the member is voting on any particular proposal", + "for the first time and the call is successful. Subsequent vote changes will charge a", + "fee.", + "# ", + "## Weight", + "- `O(M)` where `M` is members-count (code- and governance-bounded)", + "- DB:", + " - 1 storage read `Members` (codec `O(M)`)", + " - 1 storage mutation `Voting` (codec `O(M)`)", + "- 1 event", + "# " + ] + }, + { + "name": "close", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "index", + "type": 113, + "typeName": "ProposalIndex" + }, + { + "name": "proposal_weight_bound", + "type": 146, + "typeName": "Weight" + }, + { + "name": "length_bound", + "type": 113, + "typeName": "u32" + } + ], + "index": 4, + "docs": [ + "Close a vote that is either approved, disapproved or whose voting period has ended.", + "", + "May be called by any signed account in order to finish voting and close the proposal.", + "", + "If called before the end of the voting period it will only close the vote if it is", + "has enough votes to be approved or disapproved.", + "", + "If called after the end of the voting period abstentions are counted as rejections", + "unless there is a prime member set and the prime member cast an approval.", + "", + "If the close operation completes successfully with disapproval, the transaction fee will", + "be waived. Otherwise execution of the approved operation will be charged to the caller.", + "", + "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed", + "proposal.", + "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via", + "`storage::read` so it is `size_of::() == 4` larger than the pure length.", + "", + "# ", + "## Weight", + "- `O(B + M + P1 + P2)` where:", + " - `B` is `proposal` size in bytes (length-fee-bounded)", + " - `M` is members-count (code- and governance-bounded)", + " - `P1` is the complexity of `proposal` preimage.", + " - `P2` is proposal-count (code-bounded)", + "- DB:", + " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", + " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec", + " `O(P2)`)", + " - any mutations done while executing `proposal` (`P1`)", + "- up to 3 events", + "# " + ] + }, + { + "name": "disapprove_proposal", + "fields": [ + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 5, + "docs": [ + "Disapprove a proposal, close, and remove it from the system, regardless of its current", + "state.", + "", + "Must be called by the Root origin.", + "", + "Parameters:", + "* `proposal_hash`: The hash of the proposal that should be disapproved.", + "", + "# ", + "Complexity: O(P) where P is the number of max proposals", + "DB Weight:", + "* Reads: Proposals", + "* Writes: Voting, Proposals, ProposalOf", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 229, + "type": { + "path": [ + "pallet_elections_phragmen", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "vote", + "fields": [ + { + "name": "votes", + "type": 40, + "typeName": "Vec" + }, + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 0, + "docs": [ + "Vote for a set of candidates for the upcoming round of election. This can be called to", + "set the initial votes, or update already existing votes.", + "", + "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is", + "reserved. The deposit is based on the number of votes and can be updated over time.", + "", + "The `votes` should:", + " - not be empty.", + " - be less than the number of possible candidates. Note that all current members and", + " runners-up are also automatically candidates for the next round.", + "", + "If `value` is more than `who`'s free balance, then the maximum of the two is used.", + "", + "The dispatch origin of this call must be signed.", + "", + "### Warning", + "", + "It is the responsibility of the caller to **NOT** place all of their balance into the", + "lock and keep some for further operations.", + "", + "# ", + "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less.", + "# " + ] + }, + { + "name": "remove_voter", + "index": 1, + "docs": [ + "Remove `origin` as a voter.", + "", + "This removes the lock and returns the deposit.", + "", + "The dispatch origin of this call must be signed and be a voter." + ] + }, + { + "name": "submit_candidacy", + "fields": [ + { + "name": "candidate_count", + "type": 113, + "typeName": "u32" + } + ], + "index": 2, + "docs": [ + "Submit oneself for candidacy. A fixed amount of deposit is recorded.", + "", + "All candidates are wiped at the end of the term. They either become a member/runner-up,", + "or leave the system while their deposit is slashed.", + "", + "The dispatch origin of this call must be signed.", + "", + "### Warning", + "", + "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]", + "to get their deposit back. Losing the spot in an election will always lead to a slash.", + "", + "# ", + "The number of current candidates must be provided as witness data.", + "# " + ] + }, + { + "name": "renounce_candidacy", + "fields": [ + { + "name": "renouncing", + "type": 230, + "typeName": "Renouncing" + } + ], + "index": 3, + "docs": [ + "Renounce one's intention to be a candidate for the next election round. 3 potential", + "outcomes exist:", + "", + "- `origin` is a candidate and not elected in any set. In this case, the deposit is", + " unreserved, returned and origin is removed as a candidate.", + "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and", + " origin is removed as a runner-up.", + "- `origin` is a current member. In this case, the deposit is unreserved and origin is", + " removed as a member, consequently not being a candidate for the next round anymore.", + " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they", + " are immediately used. If the prime is renouncing, then no prime will exist until the", + " next round.", + "", + "The dispatch origin of this call must be signed, and have one of the above roles.", + "", + "# ", + "The type of renouncing must be provided as witness data.", + "# " + ] + }, + { + "name": "remove_member", + "fields": [ + { + "name": "who", + "type": 151, + "typeName": "::Source" + }, + { + "name": "has_replacement", + "type": 35, + "typeName": "bool" + } + ], + "index": 4, + "docs": [ + "Remove a particular member from the set. This is effective immediately and the bond of", + "the outgoing member is slashed.", + "", + "If a runner-up is available, then the best runner-up will be removed and replaces the", + "outgoing member. Otherwise, a new phragmen election is started.", + "", + "The dispatch origin of this call must be root.", + "", + "Note that this does not affect the designated block number of the next election.", + "", + "# ", + "If we have a replacement, we use a small weight. Else, since this is a root call and", + "will go into phragmen, we assume full block for now.", + "# " + ] + }, + { + "name": "clean_defunct_voters", + "fields": [ + { + "name": "num_voters", + "type": 4, + "typeName": "u32" + }, + { + "name": "num_defunct", + "type": 4, + "typeName": "u32" + } + ], + "index": 5, + "docs": [ + "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The", + "deposit of the removed voters are returned.", + "", + "This is an root function to be used only for cleaning the state.", + "", + "The dispatch origin of this call must be root.", + "", + "# ", + "The total number of voters and those that are defunct must be provided as witness data.", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 230, + "type": { + "path": [ + "pallet_elections_phragmen", + "Renouncing" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Member", + "index": 0 + }, + { + "name": "RunnerUp", + "index": 1 + }, + { + "name": "Candidate", + "fields": [ + { + "type": 113, + "typeName": "u32" + } + ], + "index": 2 + } + ] + } + } + } + }, + { + "id": 231, + "type": { + "path": [ + "pallet_membership", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "add_member", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "Add a member `who` to the set.", + "", + "May only be called from `T::AddOrigin`." + ] + }, + { + "name": "remove_member", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "Remove a member `who` from the set.", + "", + "May only be called from `T::RemoveOrigin`." + ] + }, + { + "name": "swap_member", + "fields": [ + { + "name": "remove", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "add", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 2, + "docs": [ + "Swap out one member `remove` for another `add`.", + "", + "May only be called from `T::SwapOrigin`.", + "", + "Prime membership is *not* passed from `remove` to `add`, if extant." + ] + }, + { + "name": "reset_members", + "fields": [ + { + "name": "members", + "type": 40, + "typeName": "Vec" + } + ], + "index": 3, + "docs": [ + "Change the membership to a new set, disregarding the existing membership. Be nice and", + "pass `members` pre-sorted.", + "", + "May only be called from `T::ResetOrigin`." + ] + }, + { + "name": "change_key", + "fields": [ + { + "name": "new", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "Swap out the sending member for some other key `new`.", + "", + "May only be called from `Signed` origin of a current member.", + "", + "Prime membership is passed from the origin account to `new`, if extant." + ] + }, + { + "name": "set_prime", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 5, + "docs": [ + "Set the prime member. Must be a current member.", + "", + "May only be called from `T::PrimeOrigin`." + ] + }, + { + "name": "clear_prime", + "index": 6, + "docs": [ + "Remove the prime member if it exists.", + "", + "May only be called from `T::PrimeOrigin`." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 232, + "type": { + "path": [ + "pallet_grandpa", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "report_equivocation", + "fields": [ + { + "name": "equivocation_proof", + "type": 233, + "typeName": "Box>" + }, + { + "name": "key_owner_proof", + "type": 141, + "typeName": "T::KeyOwnerProof" + } + ], + "index": 0, + "docs": [ + "Report voter equivocation/misbehavior. This method will verify the", + "equivocation proof and validate the given key ownership proof", + "against the extracted offender. If both are valid, the offence", + "will be reported." + ] + }, + { + "name": "report_equivocation_unsigned", + "fields": [ + { + "name": "equivocation_proof", + "type": 233, + "typeName": "Box>" + }, + { + "name": "key_owner_proof", + "type": 141, + "typeName": "T::KeyOwnerProof" + } + ], + "index": 1, + "docs": [ + "Report voter equivocation/misbehavior. This method will verify the", + "equivocation proof and validate the given key ownership proof", + "against the extracted offender. If both are valid, the offence", + "will be reported.", + "", + "This extrinsic must be called unsigned and it is expected that only", + "block authors will call it (validated in `ValidateUnsigned`), as such", + "if the block author is defined it will be defined as the equivocation", + "reporter." + ] + }, + { + "name": "note_stalled", + "fields": [ + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "best_finalized_block_number", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 2, + "docs": [ + "Note that the current authority set of the GRANDPA finality gadget has", + "stalled. This will trigger a forced authority set change at the beginning", + "of the next session, to be enacted `delay` blocks after that. The delay", + "should be high enough to safely assume that the block signalling the", + "forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters", + "will start the new authority set using the given finalized block as base.", + "Only callable by root." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 233, + "type": { + "path": [ + "sp_finality_grandpa", + "EquivocationProof" + ], + "params": [ + { + "name": "H", + "type": 9 + }, + { + "name": "N", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "set_id", + "type": 8, + "typeName": "SetId" + }, + { + "name": "equivocation", + "type": 234, + "typeName": "Equivocation" + } + ] + } + } + } + }, + { + "id": 234, + "type": { + "path": [ + "sp_finality_grandpa", + "Equivocation" + ], + "params": [ + { + "name": "H", + "type": 9 + }, + { + "name": "N", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Prevote", + "fields": [ + { + "type": 235, + "typeName": "grandpa::Equivocation,\nAuthoritySignature>" + } + ], + "index": 0 + }, + { + "name": "Precommit", + "fields": [ + { + "type": 241, + "typeName": "grandpa::Equivocation,\nAuthoritySignature>" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 235, + "type": { + "path": [ + "finality_grandpa", + "Equivocation" + ], + "params": [ + { + "name": "Id", + "type": 53 + }, + { + "name": "V", + "type": 236 + }, + { + "name": "S", + "type": 237 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "round_number", + "type": 8, + "typeName": "u64" + }, + { + "name": "identity", + "type": 53, + "typeName": "Id" + }, + { + "name": "first", + "type": 240, + "typeName": "(V, S)" + }, + { + "name": "second", + "type": 240, + "typeName": "(V, S)" + } + ] + } + } + } + }, + { + "id": 236, + "type": { + "path": [ + "finality_grandpa", + "Prevote" + ], + "params": [ + { + "name": "H", + "type": 9 + }, + { + "name": "N", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "target_hash", + "type": 9, + "typeName": "H" + }, + { + "name": "target_number", + "type": 4, + "typeName": "N" + } + ] + } + } + } + }, + { + "id": 237, + "type": { + "path": [ + "sp_finality_grandpa", + "app", + "Signature" + ], + "def": { + "composite": { + "fields": [ + { + "type": 238, + "typeName": "ed25519::Signature" + } + ] + } + } + } + }, + { + "id": 238, + "type": { + "path": [ + "sp_core", + "ed25519", + "Signature" + ], + "def": { + "composite": { + "fields": [ + { + "type": 239, + "typeName": "[u8; 64]" + } + ] + } + } + } + }, + { + "id": 239, + "type": { + "def": { + "array": { + "len": 64, + "type": 2 + } + } + } + }, + { + "id": 240, + "type": { + "def": { + "tuple": [ + 236, + 237 + ] + } + } + }, + { + "id": 241, + "type": { + "path": [ + "finality_grandpa", + "Equivocation" + ], + "params": [ + { + "name": "Id", + "type": 53 + }, + { + "name": "V", + "type": 242 + }, + { + "name": "S", + "type": 237 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "round_number", + "type": 8, + "typeName": "u64" + }, + { + "name": "identity", + "type": 53, + "typeName": "Id" + }, + { + "name": "first", + "type": 243, + "typeName": "(V, S)" + }, + { + "name": "second", + "type": 243, + "typeName": "(V, S)" + } + ] + } + } + } + }, + { + "id": 242, + "type": { + "path": [ + "finality_grandpa", + "Precommit" + ], + "params": [ + { + "name": "H", + "type": 9 + }, + { + "name": "N", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "target_hash", + "type": 9, + "typeName": "H" + }, + { + "name": "target_number", + "type": 4, + "typeName": "N" + } + ] + } + } + } + }, + { + "id": 243, + "type": { + "def": { + "tuple": [ + 242, + 237 + ] + } + } + }, + { + "id": 244, + "type": { + "path": [ + "pallet_treasury", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "propose_spend", + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "beneficiary", + "type": 151, + "typeName": "::Source" + } + ], + "index": 0, + "docs": [ + "Put forward a suggestion for spending. A deposit proportional to the value", + "is reserved and slashed if the proposal is rejected. It is returned once the", + "proposal is awarded.", + "", + "# ", + "- Complexity: O(1)", + "- DbReads: `ProposalCount`, `origin account`", + "- DbWrites: `ProposalCount`, `Proposals`, `origin account`", + "# " + ] + }, + { + "name": "reject_proposal", + "fields": [ + { + "name": "proposal_id", + "type": 113, + "typeName": "ProposalIndex" + } + ], + "index": 1, + "docs": [ + "Reject a proposed spend. The original deposit will be slashed.", + "", + "May only be called from `T::RejectOrigin`.", + "", + "# ", + "- Complexity: O(1)", + "- DbReads: `Proposals`, `rejected proposer account`", + "- DbWrites: `Proposals`, `rejected proposer account`", + "# " + ] + }, + { + "name": "approve_proposal", + "fields": [ + { + "name": "proposal_id", + "type": 113, + "typeName": "ProposalIndex" + } + ], + "index": 2, + "docs": [ + "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + "and the original deposit will be returned.", + "", + "May only be called from `T::ApproveOrigin`.", + "", + "# ", + "- Complexity: O(1).", + "- DbReads: `Proposals`, `Approvals`", + "- DbWrite: `Approvals`", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 245, + "type": { + "path": [ + "pallet_contracts", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "call", + "fields": [ + { + "name": "dest", + "type": 151, + "typeName": "::Source" + }, + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "gas_limit", + "type": 146, + "typeName": "Weight" + }, + { + "name": "storage_deposit_limit", + "type": 246, + "typeName": "Option< as codec::HasCompact>::Type>" + }, + { + "name": "data", + "type": 10, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Makes a call to an account, optionally transferring some balance.", + "", + "# Parameters", + "", + "* `dest`: Address of the contract to call.", + "* `value`: The balance to transfer from the `origin` to `dest`.", + "* `gas_limit`: The gas limit enforced when executing the constructor.", + "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the", + " caller to pay for the storage consumed.", + "* `data`: The input data to pass to the contract.", + "", + "* If the account is a smart-contract account, the associated code will be", + "executed and any value will be transferred.", + "* If the account is a regular account, any value will be transferred.", + "* If no account exists and the call value is not less than `existential_deposit`,", + "a regular account will be created and any value will be transferred." + ] + }, + { + "name": "instantiate_with_code", + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "gas_limit", + "type": 146, + "typeName": "Weight" + }, + { + "name": "storage_deposit_limit", + "type": 246, + "typeName": "Option< as codec::HasCompact>::Type>" + }, + { + "name": "code", + "type": 10, + "typeName": "Vec" + }, + { + "name": "data", + "type": 10, + "typeName": "Vec" + }, + { + "name": "salt", + "type": 10, + "typeName": "Vec" + } + ], + "index": 1, + "docs": [ + "Instantiates a new contract from the supplied `code` optionally transferring", + "some balance.", + "", + "This dispatchable has the same effect as calling [`Self::upload_code`] +", + "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please", + "also check the documentation of [`Self::upload_code`].", + "", + "# Parameters", + "", + "* `value`: The balance to transfer from the `origin` to the newly created contract.", + "* `gas_limit`: The gas limit enforced when executing the constructor.", + "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved", + " from the caller to pay for the storage consumed.", + "* `code`: The contract code to deploy in raw bytes.", + "* `data`: The input data to pass to the contract constructor.", + "* `salt`: Used for the address derivation. See [`Pallet::contract_address`].", + "", + "Instantiation is executed as follows:", + "", + "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that", + " code.", + "- If the `code_hash` already exists on the chain the underlying `code` will be shared.", + "- The destination address is computed based on the sender, code_hash and the salt.", + "- The smart-contract account is created at the computed address.", + "- The `value` is transferred to the new account.", + "- The `deploy` function is executed in the context of the newly-created account." + ] + }, + { + "name": "instantiate", + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "gas_limit", + "type": 146, + "typeName": "Weight" + }, + { + "name": "storage_deposit_limit", + "type": 246, + "typeName": "Option< as codec::HasCompact>::Type>" + }, + { + "name": "code_hash", + "type": 9, + "typeName": "CodeHash" + }, + { + "name": "data", + "type": 10, + "typeName": "Vec" + }, + { + "name": "salt", + "type": 10, + "typeName": "Vec" + } + ], + "index": 2, + "docs": [ + "Instantiates a contract from a previously deployed wasm binary.", + "", + "This function is identical to [`Self::instantiate_with_code`] but without the", + "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary", + "must be supplied." + ] + }, + { + "name": "upload_code", + "fields": [ + { + "name": "code", + "type": 10, + "typeName": "Vec" + }, + { + "name": "storage_deposit_limit", + "type": 246, + "typeName": "Option< as codec::HasCompact>::Type>" + } + ], + "index": 3, + "docs": [ + "Upload new `code` without instantiating a contract from it.", + "", + "If the code does not already exist a deposit is reserved from the caller", + "and unreserved only when [`Self::remove_code`] is called. The size of the reserve", + "depends on the instrumented size of the the supplied `code`.", + "", + "If the code already exists in storage it will still return `Ok` and upgrades", + "the in storage version to the current", + "[`InstructionWeights::version`](InstructionWeights).", + "", + "# Note", + "", + "Anyone can instantiate a contract from any uploaded code and thus prevent its removal.", + "To avoid this situation a constructor could employ access control so that it can", + "only be instantiated by permissioned entities. The same is true when uploading", + "through [`Self::instantiate_with_code`]." + ] + }, + { + "name": "remove_code", + "fields": [ + { + "name": "code_hash", + "type": 9, + "typeName": "CodeHash" + } + ], + "index": 4, + "docs": [ + "Remove the code stored under `code_hash` and refund the deposit to its owner.", + "", + "A code can only be removed by its original uploader (its owner) and only if it is", + "not used by any contract." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 246, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 65 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 65 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 247, + "type": { + "path": [ + "pallet_sudo", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "sudo", + "fields": [ + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 0, + "docs": [ + "Authenticates the sudo key and dispatches a function call with `Root` origin.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "# ", + "- O(1).", + "- Limited storage reads.", + "- One DB write (event).", + "- Weight of derivative `call` execution + 10,000.", + "# " + ] + }, + { + "name": "sudo_unchecked_weight", + "fields": [ + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + }, + { + "name": "weight", + "type": 8, + "typeName": "Weight" + } + ], + "index": 1, + "docs": [ + "Authenticates the sudo key and dispatches a function call with `Root` origin.", + "This function does not check the weight of the call, and instead allows the", + "Sudo user to specify the weight of the call.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "# ", + "- O(1).", + "- The weight of this call is defined by the caller.", + "# " + ] + }, + { + "name": "set_key", + "fields": [ + { + "name": "new", + "type": 151, + "typeName": "::Source" + } + ], + "index": 2, + "docs": [ + "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo", + "key.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "# ", + "- O(1).", + "- Limited storage reads.", + "- One DB change.", + "# " + ] + }, + { + "name": "sudo_as", + "fields": [ + { + "name": "who", + "type": 151, + "typeName": "::Source" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 3, + "docs": [ + "Authenticates the sudo key and dispatches a function call with `Signed` origin from", + "a given account.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "# ", + "- O(1).", + "- Limited storage reads.", + "- One DB write (event).", + "- Weight of derivative `call` execution + 10,000.", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 248, + "type": { + "path": [ + "pallet_im_online", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "heartbeat", + "fields": [ + { + "name": "heartbeat", + "type": 249, + "typeName": "Heartbeat" + }, + { + "name": "signature", + "type": 254, + "typeName": "::Signature" + } + ], + "index": 0, + "docs": [ + "# ", + "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is", + " length of `heartbeat.network_state.external_address`", + " - `O(K)`: decoding of length `K`", + " - `O(E)`: decoding/encoding of length `E`", + "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,", + " `ReceivedHeartbeats`", + "- DbWrites: `ReceivedHeartbeats`", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 249, + "type": { + "path": [ + "pallet_im_online", + "Heartbeat" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "block_number", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "network_state", + "type": 250, + "typeName": "OpaqueNetworkState" + }, + { + "name": "session_index", + "type": 4, + "typeName": "SessionIndex" + }, + { + "name": "authority_index", + "type": 4, + "typeName": "AuthIndex" + }, + { + "name": "validators_len", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 250, + "type": { + "path": [ + "sp_core", + "offchain", + "OpaqueNetworkState" + ], + "def": { + "composite": { + "fields": [ + { + "name": "peer_id", + "type": 251, + "typeName": "OpaquePeerId" + }, + { + "name": "external_addresses", + "type": 252, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 251, + "type": { + "path": [ + "sp_core", + "OpaquePeerId" + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 252, + "type": { + "def": { + "sequence": { + "type": 253 + } + } + } + }, + { + "id": 253, + "type": { + "path": [ + "sp_core", + "offchain", + "OpaqueMultiaddr" + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 254, + "type": { + "path": [ + "pallet_im_online", + "sr25519", + "app_sr25519", + "Signature" + ], + "def": { + "composite": { + "fields": [ + { + "type": 255, + "typeName": "sr25519::Signature" + } + ] + } + } + } + }, + { + "id": 255, + "type": { + "path": [ + "sp_core", + "sr25519", + "Signature" + ], + "def": { + "composite": { + "fields": [ + { + "type": 239, + "typeName": "[u8; 64]" + } + ] + } + } + } + }, + { + "id": 256, + "type": { + "path": [ + "pallet_identity", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "add_registrar", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "Add a registrar to the system.", + "", + "The dispatch origin for this call must be `T::RegistrarOrigin`.", + "", + "- `account`: the account of the registrar.", + "", + "Emits `RegistrarAdded` if successful.", + "", + "# ", + "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded).", + "- One storage mutation (codec `O(R)`).", + "- One event.", + "# " + ] + }, + { + "name": "set_identity", + "fields": [ + { + "name": "info", + "type": 257, + "typeName": "Box>" + } + ], + "index": 1, + "docs": [ + "Set an account's identity information and reserve the appropriate deposit.", + "", + "If the account already has identity information, the deposit is taken as part payment", + "for the new deposit.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `info`: The identity information.", + "", + "Emits `IdentitySet` if successful.", + "", + "# ", + "- `O(X + X' + R)`", + " - where `X` additional-field-count (deposit-bounded and code-bounded)", + " - where `R` judgements-count (registrar-count-bounded)", + "- One balance reserve operation.", + "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).", + "- One event.", + "# " + ] + }, + { + "name": "set_subs", + "fields": [ + { + "name": "subs", + "type": 291, + "typeName": "Vec<(T::AccountId, Data)>" + } + ], + "index": 2, + "docs": [ + "Set the sub-accounts of the sender.", + "", + "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", + "and an amount `SubAccountDeposit` will be reserved for each item in `subs`.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a registered", + "identity.", + "", + "- `subs`: The identity's (new) sub-accounts.", + "", + "# ", + "- `O(P + S)`", + " - where `P` old-subs-count (hard- and deposit-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + "- At most one balance operations.", + "- DB:", + " - `P + S` storage mutations (codec complexity `O(1)`)", + " - One storage read (codec complexity `O(P)`).", + " - One storage write (codec complexity `O(S)`).", + " - One storage-exists (`IdentityOf::contains_key`).", + "# " + ] + }, + { + "name": "clear_identity", + "index": 3, + "docs": [ + "Clear an account's identity info and all sub-accounts and return all deposits.", + "", + "Payment: All reserved balances on the account are returned.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a registered", + "identity.", + "", + "Emits `IdentityCleared` if successful.", + "", + "# ", + "- `O(R + S + X)`", + " - where `R` registrar-count (governance-bounded).", + " - where `S` subs-count (hard- and deposit-bounded).", + " - where `X` additional-field-count (deposit-bounded and code-bounded).", + "- One balance-unreserve operation.", + "- `2` storage reads and `S + 2` storage deletions.", + "- One event.", + "# " + ] + }, + { + "name": "request_judgement", + "fields": [ + { + "name": "reg_index", + "type": 113, + "typeName": "RegistrarIndex" + }, + { + "name": "max_fee", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 4, + "docs": [ + "Request a judgement from a registrar.", + "", + "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", + "given.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a", + "registered identity.", + "", + "- `reg_index`: The index of the registrar whose judgement is requested.", + "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:", + "", + "```nocompile", + "Self::registrars().get(reg_index).unwrap().fee", + "```", + "", + "Emits `JudgementRequested` if successful.", + "", + "# ", + "- `O(R + X)`.", + "- One balance-reserve operation.", + "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.", + "- One event.", + "# " + ] + }, + { + "name": "cancel_request", + "fields": [ + { + "name": "reg_index", + "type": 4, + "typeName": "RegistrarIndex" + } + ], + "index": 5, + "docs": [ + "Cancel a previous request.", + "", + "Payment: A previously reserved deposit is returned on success.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a", + "registered identity.", + "", + "- `reg_index`: The index of the registrar whose judgement is no longer requested.", + "", + "Emits `JudgementUnrequested` if successful.", + "", + "# ", + "- `O(R + X)`.", + "- One balance-reserve operation.", + "- One storage mutation `O(R + X)`.", + "- One event", + "# " + ] + }, + { + "name": "set_fee", + "fields": [ + { + "name": "index", + "type": 113, + "typeName": "RegistrarIndex" + }, + { + "name": "fee", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 6, + "docs": [ + "Set the fee required for a judgement to be requested from a registrar.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must be the account", + "of the registrar whose index is `index`.", + "", + "- `index`: the index of the registrar whose fee is to be set.", + "- `fee`: the new fee.", + "", + "# ", + "- `O(R)`.", + "- One storage mutation `O(R)`.", + "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)", + "# " + ] + }, + { + "name": "set_account_id", + "fields": [ + { + "name": "index", + "type": 113, + "typeName": "RegistrarIndex" + }, + { + "name": "new", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 7, + "docs": [ + "Change the account associated with a registrar.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must be the account", + "of the registrar whose index is `index`.", + "", + "- `index`: the index of the registrar whose fee is to be set.", + "- `new`: the new account ID.", + "", + "# ", + "- `O(R)`.", + "- One storage mutation `O(R)`.", + "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)", + "# " + ] + }, + { + "name": "set_fields", + "fields": [ + { + "name": "index", + "type": 113, + "typeName": "RegistrarIndex" + }, + { + "name": "fields", + "type": 293, + "typeName": "IdentityFields" + } + ], + "index": 8, + "docs": [ + "Set the field information for a registrar.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must be the account", + "of the registrar whose index is `index`.", + "", + "- `index`: the index of the registrar whose fee is to be set.", + "- `fields`: the fields that the registrar concerns themselves with.", + "", + "# ", + "- `O(R)`.", + "- One storage mutation `O(R)`.", + "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)", + "# " + ] + }, + { + "name": "provide_judgement", + "fields": [ + { + "name": "reg_index", + "type": 113, + "typeName": "RegistrarIndex" + }, + { + "name": "target", + "type": 151, + "typeName": "::Source" + }, + { + "name": "judgement", + "type": 295, + "typeName": "Judgement>" + } + ], + "index": 9, + "docs": [ + "Provide a judgement for an account's identity.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must be the account", + "of the registrar whose index is `reg_index`.", + "", + "- `reg_index`: the index of the registrar whose judgement is being made.", + "- `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + "- `judgement`: the judgement of the registrar of index `reg_index` about `target`.", + "", + "Emits `JudgementGiven` if successful.", + "", + "# ", + "- `O(R + X)`.", + "- One balance-transfer operation.", + "- Up to one account-lookup operation.", + "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.", + "- One event.", + "# " + ] + }, + { + "name": "kill_identity", + "fields": [ + { + "name": "target", + "type": 151, + "typeName": "::Source" + } + ], + "index": 10, + "docs": [ + "Remove an account's identity and sub-account information and slash the deposits.", + "", + "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", + "`Slash`. Verification request deposits are not returned; they should be cancelled", + "manually using `cancel_request`.", + "", + "The dispatch origin for this call must match `T::ForceOrigin`.", + "", + "- `target`: the account whose identity the judgement is upon. This must be an account", + " with a registered identity.", + "", + "Emits `IdentityKilled` if successful.", + "", + "# ", + "- `O(R + S + X)`.", + "- One balance-reserve operation.", + "- `S + 2` storage mutations.", + "- One event.", + "# " + ] + }, + { + "name": "add_sub", + "fields": [ + { + "name": "sub", + "type": 151, + "typeName": "::Source" + }, + { + "name": "data", + "type": 260, + "typeName": "Data" + } + ], + "index": 11, + "docs": [ + "Add the given account to the sender's subs.", + "", + "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + "to the sender.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a registered", + "sub identity of `sub`." + ] + }, + { + "name": "rename_sub", + "fields": [ + { + "name": "sub", + "type": 151, + "typeName": "::Source" + }, + { + "name": "data", + "type": 260, + "typeName": "Data" + } + ], + "index": 12, + "docs": [ + "Alter the associated name of the given sub-account.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a registered", + "sub identity of `sub`." + ] + }, + { + "name": "remove_sub", + "fields": [ + { + "name": "sub", + "type": 151, + "typeName": "::Source" + } + ], + "index": 13, + "docs": [ + "Remove the given account from the sender's subs.", + "", + "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + "to the sender.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a registered", + "sub identity of `sub`." + ] + }, + { + "name": "quit_sub", + "index": 14, + "docs": [ + "Remove the sender as a sub-account.", + "", + "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", + "to the sender (*not* the original depositor).", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have a registered", + "super-identity.", + "", + "NOTE: This should not normally be used, but is provided in the case that the non-", + "controller of an account is maliciously registered as a sub-account." + ] + } + ] + } + }, + "docs": [ + "Identity pallet declaration." + ] + } + }, + { + "id": 257, + "type": { + "path": [ + "pallet_identity", + "types", + "IdentityInfo" + ], + "params": [ + { + "name": "FieldLimit", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "additional", + "type": 258, + "typeName": "BoundedVec<(Data, Data), FieldLimit>" + }, + { + "name": "display", + "type": 260, + "typeName": "Data" + }, + { + "name": "legal", + "type": 260, + "typeName": "Data" + }, + { + "name": "web", + "type": 260, + "typeName": "Data" + }, + { + "name": "riot", + "type": 260, + "typeName": "Data" + }, + { + "name": "email", + "type": 260, + "typeName": "Data" + }, + { + "name": "pgp_fingerprint", + "type": 290, + "typeName": "Option<[u8; 20]>" + }, + { + "name": "image", + "type": 260, + "typeName": "Data" + }, + { + "name": "twitter", + "type": 260, + "typeName": "Data" + } + ] + } + } + } + }, + { + "id": 258, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 259 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 289, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 259, + "type": { + "def": { + "tuple": [ + 260, + 260 + ] + } + } + }, + { + "id": 260, + "type": { + "path": [ + "pallet_identity", + "types", + "Data" + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Raw0", + "fields": [ + { + "type": 261 + } + ], + "index": 1 + }, + { + "name": "Raw1", + "fields": [ + { + "type": 262 + } + ], + "index": 2 + }, + { + "name": "Raw2", + "fields": [ + { + "type": 263 + } + ], + "index": 3 + }, + { + "name": "Raw3", + "fields": [ + { + "type": 264 + } + ], + "index": 4 + }, + { + "name": "Raw4", + "fields": [ + { + "type": 14 + } + ], + "index": 5 + }, + { + "name": "Raw5", + "fields": [ + { + "type": 265 + } + ], + "index": 6 + }, + { + "name": "Raw6", + "fields": [ + { + "type": 266 + } + ], + "index": 7 + }, + { + "name": "Raw7", + "fields": [ + { + "type": 267 + } + ], + "index": 8 + }, + { + "name": "Raw8", + "fields": [ + { + "type": 130 + } + ], + "index": 9 + }, + { + "name": "Raw9", + "fields": [ + { + "type": 268 + } + ], + "index": 10 + }, + { + "name": "Raw10", + "fields": [ + { + "type": 269 + } + ], + "index": 11 + }, + { + "name": "Raw11", + "fields": [ + { + "type": 270 + } + ], + "index": 12 + }, + { + "name": "Raw12", + "fields": [ + { + "type": 271 + } + ], + "index": 13 + }, + { + "name": "Raw13", + "fields": [ + { + "type": 272 + } + ], + "index": 14 + }, + { + "name": "Raw14", + "fields": [ + { + "type": 273 + } + ], + "index": 15 + }, + { + "name": "Raw15", + "fields": [ + { + "type": 274 + } + ], + "index": 16 + }, + { + "name": "Raw16", + "fields": [ + { + "type": 69 + } + ], + "index": 17 + }, + { + "name": "Raw17", + "fields": [ + { + "type": 275 + } + ], + "index": 18 + }, + { + "name": "Raw18", + "fields": [ + { + "type": 276 + } + ], + "index": 19 + }, + { + "name": "Raw19", + "fields": [ + { + "type": 277 + } + ], + "index": 20 + }, + { + "name": "Raw20", + "fields": [ + { + "type": 152 + } + ], + "index": 21 + }, + { + "name": "Raw21", + "fields": [ + { + "type": 278 + } + ], + "index": 22 + }, + { + "name": "Raw22", + "fields": [ + { + "type": 279 + } + ], + "index": 23 + }, + { + "name": "Raw23", + "fields": [ + { + "type": 280 + } + ], + "index": 24 + }, + { + "name": "Raw24", + "fields": [ + { + "type": 281 + } + ], + "index": 25 + }, + { + "name": "Raw25", + "fields": [ + { + "type": 282 + } + ], + "index": 26 + }, + { + "name": "Raw26", + "fields": [ + { + "type": 283 + } + ], + "index": 27 + }, + { + "name": "Raw27", + "fields": [ + { + "type": 284 + } + ], + "index": 28 + }, + { + "name": "Raw28", + "fields": [ + { + "type": 285 + } + ], + "index": 29 + }, + { + "name": "Raw29", + "fields": [ + { + "type": 286 + } + ], + "index": 30 + }, + { + "name": "Raw30", + "fields": [ + { + "type": 287 + } + ], + "index": 31 + }, + { + "name": "Raw31", + "fields": [ + { + "type": 288 + } + ], + "index": 32 + }, + { + "name": "Raw32", + "fields": [ + { + "type": 1 + } + ], + "index": 33 + }, + { + "name": "BlakeTwo256", + "fields": [ + { + "type": 1 + } + ], + "index": 34 + }, + { + "name": "Sha256", + "fields": [ + { + "type": 1 + } + ], + "index": 35 + }, + { + "name": "Keccak256", + "fields": [ + { + "type": 1 + } + ], + "index": 36 + }, + { + "name": "ShaThree256", + "fields": [ + { + "type": 1 + } + ], + "index": 37 + } + ] + } + } + } + }, + { + "id": 261, + "type": { + "def": { + "array": { + "len": 0, + "type": 2 + } + } + } + }, + { + "id": 262, + "type": { + "def": { + "array": { + "len": 1, + "type": 2 + } + } + } + }, + { + "id": 263, + "type": { + "def": { + "array": { + "len": 2, + "type": 2 + } + } + } + }, + { + "id": 264, + "type": { + "def": { + "array": { + "len": 3, + "type": 2 + } + } + } + }, + { + "id": 265, + "type": { + "def": { + "array": { + "len": 5, + "type": 2 + } + } + } + }, + { + "id": 266, + "type": { + "def": { + "array": { + "len": 6, + "type": 2 + } + } + } + }, + { + "id": 267, + "type": { + "def": { + "array": { + "len": 7, + "type": 2 + } + } + } + }, + { + "id": 268, + "type": { + "def": { + "array": { + "len": 9, + "type": 2 + } + } + } + }, + { + "id": 269, + "type": { + "def": { + "array": { + "len": 10, + "type": 2 + } + } + } + }, + { + "id": 270, + "type": { + "def": { + "array": { + "len": 11, + "type": 2 + } + } + } + }, + { + "id": 271, + "type": { + "def": { + "array": { + "len": 12, + "type": 2 + } + } + } + }, + { + "id": 272, + "type": { + "def": { + "array": { + "len": 13, + "type": 2 + } + } + } + }, + { + "id": 273, + "type": { + "def": { + "array": { + "len": 14, + "type": 2 + } + } + } + }, + { + "id": 274, + "type": { + "def": { + "array": { + "len": 15, + "type": 2 + } + } + } + }, + { + "id": 275, + "type": { + "def": { + "array": { + "len": 17, + "type": 2 + } + } + } + }, + { + "id": 276, + "type": { + "def": { + "array": { + "len": 18, + "type": 2 + } + } + } + }, + { + "id": 277, + "type": { + "def": { + "array": { + "len": 19, + "type": 2 + } + } + } + }, + { + "id": 278, + "type": { + "def": { + "array": { + "len": 21, + "type": 2 + } + } + } + }, + { + "id": 279, + "type": { + "def": { + "array": { + "len": 22, + "type": 2 + } + } + } + }, + { + "id": 280, + "type": { + "def": { + "array": { + "len": 23, + "type": 2 + } + } + } + }, + { + "id": 281, + "type": { + "def": { + "array": { + "len": 24, + "type": 2 + } + } + } + }, + { + "id": 282, + "type": { + "def": { + "array": { + "len": 25, + "type": 2 + } + } + } + }, + { + "id": 283, + "type": { + "def": { + "array": { + "len": 26, + "type": 2 + } + } + } + }, + { + "id": 284, + "type": { + "def": { + "array": { + "len": 27, + "type": 2 + } + } + } + }, + { + "id": 285, + "type": { + "def": { + "array": { + "len": 28, + "type": 2 + } + } + } + }, + { + "id": 286, + "type": { + "def": { + "array": { + "len": 29, + "type": 2 + } + } + } + }, + { + "id": 287, + "type": { + "def": { + "array": { + "len": 30, + "type": 2 + } + } + } + }, + { + "id": 288, + "type": { + "def": { + "array": { + "len": 31, + "type": 2 + } + } + } + }, + { + "id": 289, + "type": { + "def": { + "sequence": { + "type": 259 + } + } + } + }, + { + "id": 290, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 152 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 152 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 291, + "type": { + "def": { + "sequence": { + "type": 292 + } + } + } + }, + { + "id": 292, + "type": { + "def": { + "tuple": [ + 0, + 260 + ] + } + } + }, + { + "id": 293, + "type": { + "path": [ + "pallet_identity", + "types", + "BitFlags" + ], + "params": [ + { + "name": "T", + "type": 294 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 8, + "typeName": "IdentityField" + } + ] + } + } + } + }, + { + "id": 294, + "type": { + "path": [ + "pallet_identity", + "types", + "IdentityField" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Display", + "index": 1 + }, + { + "name": "Legal", + "index": 2 + }, + { + "name": "Web", + "index": 4 + }, + { + "name": "Riot", + "index": 8 + }, + { + "name": "Email", + "index": 16 + }, + { + "name": "PgpFingerprint", + "index": 32 + }, + { + "name": "Image", + "index": 64 + }, + { + "name": "Twitter", + "index": 128 + } + ] + } + } + } + }, + { + "id": 295, + "type": { + "path": [ + "pallet_identity", + "types", + "Judgement" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Unknown", + "index": 0 + }, + { + "name": "FeePaid", + "fields": [ + { + "type": 6, + "typeName": "Balance" + } + ], + "index": 1 + }, + { + "name": "Reasonable", + "index": 2 + }, + { + "name": "KnownGood", + "index": 3 + }, + { + "name": "OutOfDate", + "index": 4 + }, + { + "name": "LowQuality", + "index": 5 + }, + { + "name": "Erroneous", + "index": 6 + } + ] + } + } + } + }, + { + "id": 296, + "type": { + "path": [ + "pallet_society", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "bid", + "fields": [ + { + "name": "value", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 0, + "docs": [ + "A user outside of the society can make a bid for entry.", + "", + "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", + "when the bid becomes a member, or if the bid calls `unbid`.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `value`: A one time payment the bid would like to receive when joining the society.", + "", + "# ", + "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)", + "- Storage Reads:", + "\t- One storage read to check for suspended candidate. O(1)", + "\t- One storage read to check for suspended member. O(1)", + "\t- One storage read to retrieve all current bids. O(B)", + "\t- One storage read to retrieve all current candidates. O(C)", + "\t- One storage read to retrieve all members. O(M)", + "- Storage Writes:", + "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization", + " w/ read)", + "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + "- Notable Computation:", + "\t- O(B + C + log M) search to check user is not already a part of society.", + "\t- O(log B) search to insert the new bid sorted.", + "- External Pallet Operations:", + "\t- One balance reserve operation. O(X)", + "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + "- Events:", + "\t- One event for new bid.", + "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + "Total Complexity: O(M + B + C + logM + logB + X)", + "# " + ] + }, + { + "name": "unbid", + "fields": [ + { + "name": "pos", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "A bidder can remove their bid for entry into society.", + "By doing so, they will have their candidate deposit returned or", + "they will unvouch their voucher.", + "", + "Payment: The bid deposit is unreserved if the user made a bid.", + "", + "The dispatch origin for this call must be _Signed_ and a bidder.", + "", + "Parameters:", + "- `pos`: Position in the `Bids` vector of the bid who wants to unbid.", + "", + "# ", + "Key: B (len of bids), X (balance unreserve)", + "- One storage read and write to retrieve and update the bids. O(B)", + "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)", + "- One event.", + "", + "Total Complexity: O(B + X)", + "# " + ] + }, + { + "name": "vouch", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "value", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "tip", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "As a member, vouch for someone to join society by placing a bid on their behalf.", + "", + "There is no deposit required to vouch for a new bid, but a member can only vouch for", + "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by", + "the suspension judgement origin, the member will be banned from vouching again.", + "", + "As a vouching member, you can claim a tip if the candidate is accepted. This tip will", + "be paid as a portion of the reward the member will receive for joining the society.", + "", + "The dispatch origin for this call must be _Signed_ and a member.", + "", + "Parameters:", + "- `who`: The user who you would like to vouch for.", + "- `value`: The total reward to be paid between you and the candidate if they become", + "a member in the society.", + "- `tip`: Your cut of the total `value` payout when the candidate is inducted into", + "the society. Tips larger than `value` will be saturated upon payout.", + "", + "# ", + "Key: B (len of bids), C (len of candidates), M (len of members)", + "- Storage Reads:", + "\t- One storage read to retrieve all members. O(M)", + "\t- One storage read to check member is not already vouching. O(1)", + "\t- One storage read to check for suspended candidate. O(1)", + "\t- One storage read to check for suspended member. O(1)", + "\t- One storage read to retrieve all current bids. O(B)", + "\t- One storage read to retrieve all current candidates. O(C)", + "- Storage Writes:", + "\t- One storage write to insert vouching status to the member. O(1)", + "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization", + " w/ read)", + "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", + "- Notable Computation:", + "\t- O(log M) search to check sender is a member.", + "\t- O(B + C + log M) search to check user is not already a part of society.", + "\t- O(log B) search to insert the new bid sorted.", + "- External Pallet Operations:", + "\t- One balance reserve operation. O(X)", + "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", + "- Events:", + "\t- One event for vouch.", + "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", + "", + "Total Complexity: O(M + B + C + logM + logB + X)", + "# " + ] + }, + { + "name": "unvouch", + "fields": [ + { + "name": "pos", + "type": 4, + "typeName": "u32" + } + ], + "index": 3, + "docs": [ + "As a vouching member, unvouch a bid. This only works while vouched user is", + "only a bidder (and not a candidate).", + "", + "The dispatch origin for this call must be _Signed_ and a vouching member.", + "", + "Parameters:", + "- `pos`: Position in the `Bids` vector of the bid who should be unvouched.", + "", + "# ", + "Key: B (len of bids)", + "- One storage read O(1) to check the signer is a vouching member.", + "- One storage mutate to retrieve and update the bids. O(B)", + "- One vouching storage removal. O(1)", + "- One event.", + "", + "Total Complexity: O(B)", + "# " + ] + }, + { + "name": "vote", + "fields": [ + { + "name": "candidate", + "type": 151, + "typeName": "::Source" + }, + { + "name": "approve", + "type": 35, + "typeName": "bool" + } + ], + "index": 4, + "docs": [ + "As a member, vote on a candidate.", + "", + "The dispatch origin for this call must be _Signed_ and a member.", + "", + "Parameters:", + "- `candidate`: The candidate that the member would like to bid on.", + "- `approve`: A boolean which says if the candidate should be approved (`true`) or", + " rejected (`false`).", + "", + "# ", + "Key: C (len of candidates), M (len of members)", + "- One storage read O(M) and O(log M) search to check user is a member.", + "- One account lookup.", + "- One storage read O(C) and O(C) search to check that user is a candidate.", + "- One storage write to add vote to votes. O(1)", + "- One event.", + "", + "Total Complexity: O(M + logM + C)", + "# " + ] + }, + { + "name": "defender_vote", + "fields": [ + { + "name": "approve", + "type": 35, + "typeName": "bool" + } + ], + "index": 5, + "docs": [ + "As a member, vote on the defender.", + "", + "The dispatch origin for this call must be _Signed_ and a member.", + "", + "Parameters:", + "- `approve`: A boolean which says if the candidate should be", + "approved (`true`) or rejected (`false`).", + "", + "# ", + "- Key: M (len of members)", + "- One storage read O(M) and O(log M) search to check user is a member.", + "- One storage write to add vote to votes. O(1)", + "- One event.", + "", + "Total Complexity: O(M + logM)", + "# " + ] + }, + { + "name": "payout", + "index": 6, + "docs": [ + "Transfer the first matured payout for the sender and remove it from the records.", + "", + "NOTE: This extrinsic needs to be called multiple times to claim multiple matured", + "payouts.", + "", + "Payment: The member will receive a payment equal to their first matured", + "payout to their free balance.", + "", + "The dispatch origin for this call must be _Signed_ and a member with", + "payouts remaining.", + "", + "# ", + "Key: M (len of members), P (number of payouts for a particular member)", + "- One storage read O(M) and O(log M) search to check signer is a member.", + "- One storage read O(P) to get all payouts for a member.", + "- One storage read O(1) to get the current block number.", + "- One currency transfer call. O(X)", + "- One storage write or removal to update the member's payouts. O(P)", + "", + "Total Complexity: O(M + logM + P + X)", + "# " + ] + }, + { + "name": "found", + "fields": [ + { + "name": "founder", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "max_members", + "type": 4, + "typeName": "u32" + }, + { + "name": "rules", + "type": 10, + "typeName": "Vec" + } + ], + "index": 7, + "docs": [ + "Found the society.", + "", + "This is done as a discrete action in order to allow for the", + "pallet to be included into a running chain and can only be done once.", + "", + "The dispatch origin for this call must be from the _FounderSetOrigin_.", + "", + "Parameters:", + "- `founder` - The first member and head of the newly founded society.", + "- `max_members` - The initial max number of members for the society.", + "- `rules` - The rules of this society concerning membership.", + "", + "# ", + "- Two storage mutates to set `Head` and `Founder`. O(1)", + "- One storage write to add the first member to society. O(1)", + "- One event.", + "", + "Total Complexity: O(1)", + "# " + ] + }, + { + "name": "unfound", + "index": 8, + "docs": [ + "Annul the founding of the society.", + "", + "The dispatch origin for this call must be Signed, and the signing account must be both", + "the `Founder` and the `Head`. This implies that it may only be done when there is one", + "member.", + "", + "# ", + "- Two storage reads O(1).", + "- Four storage removals O(1).", + "- One event.", + "", + "Total Complexity: O(1)", + "# " + ] + }, + { + "name": "judge_suspended_member", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "forgive", + "type": 35, + "typeName": "bool" + } + ], + "index": 9, + "docs": [ + "Allow suspension judgement origin to make judgement on a suspended member.", + "", + "If a suspended member is forgiven, we simply add them back as a member, not affecting", + "any of the existing storage items for that member.", + "", + "If a suspended member is rejected, remove all associated storage items, including", + "their payouts, and remove any vouched bids they currently have.", + "", + "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + "Parameters:", + "- `who` - The suspended member to be judged.", + "- `forgive` - A boolean representing whether the suspension judgement origin forgives", + " (`true`) or rejects (`false`) a suspended member.", + "", + "# ", + "Key: B (len of bids), M (len of members)", + "- One storage read to check `who` is a suspended member. O(1)", + "- Up to one storage write O(M) with O(log M) binary search to add a member back to", + " society.", + "- Up to 3 storage removals O(1) to clean up a removed member.", + "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids.", + "- Up to one additional event if unvouch takes place.", + "- One storage removal. O(1)", + "- One event for the judgement.", + "", + "Total Complexity: O(M + logM + B)", + "# " + ] + }, + { + "name": "judge_suspended_candidate", + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "judgement", + "type": 297, + "typeName": "Judgement" + } + ], + "index": 10, + "docs": [ + "Allow suspended judgement origin to make judgement on a suspended candidate.", + "", + "If the judgement is `Approve`, we add them to society as a member with the appropriate", + "payment for joining society.", + "", + "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back", + "to the society treasury, or we ban the voucher from vouching again.", + "", + "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go", + "through the induction process again.", + "", + "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", + "", + "Parameters:", + "- `who` - The suspended candidate to be judged.", + "- `judgement` - `Approve`, `Reject`, or `Rebid`.", + "", + "# ", + "Key: B (len of bids), M (len of members), X (balance action)", + "- One storage read to check `who` is a suspended candidate.", + "- One storage removal of the suspended candidate.", + "- Approve Logic", + "\t- One storage read to get the available pot to pay users with. O(1)", + "\t- One storage write to update the available pot. O(1)", + "\t- One storage read to get the current block number. O(1)", + "\t- One storage read to get all members. O(M)", + "\t- Up to one unreserve currency action.", + "\t- Up to two new storage writes to payouts.", + "\t- Up to one storage write with O(log M) binary search to add a member to society.", + "- Reject Logic", + "\t- Up to one repatriate reserved currency action. O(X)", + "\t- Up to one storage write to ban the vouching member from vouching again.", + "- Rebid Logic", + "\t- Storage mutate with O(log B) binary search to place the user back into bids.", + "- Up to one additional event if unvouch takes place.", + "- One storage removal.", + "- One event for the judgement.", + "", + "Total Complexity: O(M + logM + B + X)", + "# " + ] + }, + { + "name": "set_max_members", + "fields": [ + { + "name": "max", + "type": 4, + "typeName": "u32" + } + ], + "index": 11, + "docs": [ + "Allows root origin to change the maximum number of members in society.", + "Max membership count must be greater than 1.", + "", + "The dispatch origin for this call must be from _ROOT_.", + "", + "Parameters:", + "- `max` - The maximum number of members for the society.", + "", + "# ", + "- One storage write to update the max. O(1)", + "- One event.", + "", + "Total Complexity: O(1)", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 297, + "type": { + "path": [ + "pallet_society", + "Judgement" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Rebid", + "index": 0 + }, + { + "name": "Reject", + "index": 1 + }, + { + "name": "Approve", + "index": 2 + } + ] + } + } + } + }, + { + "id": 298, + "type": { + "path": [ + "pallet_recovery", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "as_recovered", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 0, + "docs": [ + "Send a call through a recovered account.", + "", + "The dispatch origin for this call must be _Signed_ and registered to", + "be able to make calls on behalf of the recovered account.", + "", + "Parameters:", + "- `account`: The recovered account you want to make a call on-behalf-of.", + "- `call`: The call you want to make with the recovered account.", + "", + "# ", + "- The weight of the `call` + 10,000.", + "- One storage lookup to check account is recovered by `who`. O(1)", + "# " + ] + }, + { + "name": "set_recovered", + "fields": [ + { + "name": "lost", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "rescuer", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "Allow ROOT to bypass the recovery process and set an a rescuer account", + "for a lost account directly.", + "", + "The dispatch origin for this call must be _ROOT_.", + "", + "Parameters:", + "- `lost`: The \"lost account\" to be recovered.", + "- `rescuer`: The \"rescuer account\" which can call as the lost account.", + "", + "# ", + "- One storage write O(1)", + "- One event", + "# " + ] + }, + { + "name": "create_recovery", + "fields": [ + { + "name": "friends", + "type": 40, + "typeName": "Vec" + }, + { + "name": "threshold", + "type": 81, + "typeName": "u16" + }, + { + "name": "delay_period", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 2, + "docs": [ + "Create a recovery configuration for your account. This makes your account recoverable.", + "", + "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", + "will be reserved for storing the recovery configuration. This deposit is returned", + "in full when the user calls `remove_recovery`.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be", + " ordered and contain no duplicate values.", + "- `threshold`: The number of friends that must vouch for a recovery attempt before the", + " account can be recovered. Should be less than or equal to the length of the list of", + " friends.", + "- `delay_period`: The number of blocks after a recovery attempt is initialized that", + " needs to pass before the account can be recovered.", + "", + "# ", + "- Key: F (len of friends)", + "- One storage read to check that account is not already recoverable. O(1).", + "- A check that the friends list is sorted and unique. O(F)", + "- One currency reserve operation. O(X)", + "- One storage write. O(1). Codec O(F).", + "- One event.", + "", + "Total Complexity: O(F + X)", + "# " + ] + }, + { + "name": "initiate_recovery", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "Initiate the process for recovering a recoverable account.", + "", + "Payment: `RecoveryDeposit` balance will be reserved for initiating the", + "recovery process. This deposit will always be repatriated to the account", + "trying to be recovered. See `close_recovery`.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `account`: The lost account that you want to recover. This account needs to be", + " recoverable (i.e. have a recovery configuration).", + "", + "# ", + "- One storage read to check that account is recoverable. O(F)", + "- One storage read to check that this recovery process hasn't already started. O(1)", + "- One currency reserve operation. O(X)", + "- One storage read to get the current block number. O(1)", + "- One storage write. O(1).", + "- One event.", + "", + "Total Complexity: O(F + X)", + "# " + ] + }, + { + "name": "vouch_recovery", + "fields": [ + { + "name": "lost", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "rescuer", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 4, + "docs": [ + "Allow a \"friend\" of a recoverable account to vouch for an active recovery", + "process for that account.", + "", + "The dispatch origin for this call must be _Signed_ and must be a \"friend\"", + "for the recoverable account.", + "", + "Parameters:", + "- `lost`: The lost account that you want to recover.", + "- `rescuer`: The account trying to rescue the lost account that you want to vouch for.", + "", + "The combination of these two parameters must point to an active recovery", + "process.", + "", + "# ", + "Key: F (len of friends in config), V (len of vouching friends)", + "- One storage read to get the recovery configuration. O(1), Codec O(F)", + "- One storage read to get the active recovery process. O(1), Codec O(V)", + "- One binary search to confirm caller is a friend. O(logF)", + "- One binary search to confirm caller has not already vouched. O(logV)", + "- One storage write. O(1), Codec O(V).", + "- One event.", + "", + "Total Complexity: O(F + logF + V + logV)", + "# " + ] + }, + { + "name": "claim_recovery", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 5, + "docs": [ + "Allow a successful rescuer to claim their recovered account.", + "", + "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", + "who has successfully completed the account recovery process: collected", + "`threshold` or more vouches, waited `delay_period` blocks since initiation.", + "", + "Parameters:", + "- `account`: The lost account that you want to claim has been successfully recovered by", + " you.", + "", + "# ", + "Key: F (len of friends in config), V (len of vouching friends)", + "- One storage read to get the recovery configuration. O(1), Codec O(F)", + "- One storage read to get the active recovery process. O(1), Codec O(V)", + "- One storage read to get the current block number. O(1)", + "- One storage write. O(1), Codec O(V).", + "- One event.", + "", + "Total Complexity: O(F + V)", + "# " + ] + }, + { + "name": "close_recovery", + "fields": [ + { + "name": "rescuer", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 6, + "docs": [ + "As the controller of a recoverable account, close an active recovery", + "process for your account.", + "", + "Payment: By calling this function, the recoverable account will receive", + "the recovery deposit `RecoveryDeposit` placed by the rescuer.", + "", + "The dispatch origin for this call must be _Signed_ and must be a", + "recoverable account with an active recovery process for it.", + "", + "Parameters:", + "- `rescuer`: The account trying to rescue this recoverable account.", + "", + "# ", + "Key: V (len of vouching friends)", + "- One storage read/remove to get the active recovery process. O(1), Codec O(V)", + "- One balance call to repatriate reserved. O(X)", + "- One event.", + "", + "Total Complexity: O(V + X)", + "# " + ] + }, + { + "name": "remove_recovery", + "index": 7, + "docs": [ + "Remove the recovery process for your account. Recovered accounts are still accessible.", + "", + "NOTE: The user must make sure to call `close_recovery` on all active", + "recovery attempts before calling this function else it will fail.", + "", + "Payment: By calling this function the recoverable account will unreserve", + "their recovery configuration deposit.", + "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)", + "", + "The dispatch origin for this call must be _Signed_ and must be a", + "recoverable account (i.e. has a recovery configuration).", + "", + "# ", + "Key: F (len of friends)", + "- One storage read to get the prefix iterator for active recoveries. O(1)", + "- One storage read/remove to get the recovery configuration. O(1), Codec O(F)", + "- One balance call to unreserved. O(X)", + "- One event.", + "", + "Total Complexity: O(F + X)", + "# " + ] + }, + { + "name": "cancel_recovered", + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 8, + "docs": [ + "Cancel the ability to use `as_recovered` for `account`.", + "", + "The dispatch origin for this call must be _Signed_ and registered to", + "be able to make calls on behalf of the recovered account.", + "", + "Parameters:", + "- `account`: The recovered account you are able to call on-behalf-of.", + "", + "# ", + "- One storage mutation to check account is recovered by `who`. O(1)", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 299, + "type": { + "path": [ + "pallet_vesting", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "vest", + "index": 0, + "docs": [ + "Unlock any vested funds of the sender account.", + "", + "The dispatch origin for this call must be _Signed_ and the sender must have funds still", + "locked under this pallet.", + "", + "Emits either `VestingCompleted` or `VestingUpdated`.", + "", + "# ", + "- `O(1)`.", + "- DbWeight: 2 Reads, 2 Writes", + " - Reads: Vesting Storage, Balances Locks, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, [Sender Account]", + "# " + ] + }, + { + "name": "vest_other", + "fields": [ + { + "name": "target", + "type": 151, + "typeName": "::Source" + } + ], + "index": 1, + "docs": [ + "Unlock any vested funds of a `target` account.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `target`: The account whose vested funds should be unlocked. Must have funds still", + "locked under this pallet.", + "", + "Emits either `VestingCompleted` or `VestingUpdated`.", + "", + "# ", + "- `O(1)`.", + "- DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account", + " - Writes: Vesting Storage, Balances Locks, Target Account", + "# " + ] + }, + { + "name": "vested_transfer", + "fields": [ + { + "name": "target", + "type": 151, + "typeName": "::Source" + }, + { + "name": "schedule", + "type": 300, + "typeName": "VestingInfo, T::BlockNumber>" + } + ], + "index": 2, + "docs": [ + "Create a vested transfer.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `target`: The account receiving the vested funds.", + "- `schedule`: The vesting schedule attached to the transfer.", + "", + "Emits `VestingCreated`.", + "", + "NOTE: This will unlock all schedules through the current block.", + "", + "# ", + "- `O(1)`.", + "- DbWeight: 3 Reads, 3 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]", + "# " + ] + }, + { + "name": "force_vested_transfer", + "fields": [ + { + "name": "source", + "type": 151, + "typeName": "::Source" + }, + { + "name": "target", + "type": 151, + "typeName": "::Source" + }, + { + "name": "schedule", + "type": 300, + "typeName": "VestingInfo, T::BlockNumber>" + } + ], + "index": 3, + "docs": [ + "Force a vested transfer.", + "", + "The dispatch origin for this call must be _Root_.", + "", + "- `source`: The account whose funds should be transferred.", + "- `target`: The account that should be transferred the vested funds.", + "- `schedule`: The vesting schedule attached to the transfer.", + "", + "Emits `VestingCreated`.", + "", + "NOTE: This will unlock all schedules through the current block.", + "", + "# ", + "- `O(1)`.", + "- DbWeight: 4 Reads, 4 Writes", + " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account", + " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account", + "# " + ] + }, + { + "name": "merge_schedules", + "fields": [ + { + "name": "schedule1_index", + "type": 4, + "typeName": "u32" + }, + { + "name": "schedule2_index", + "type": 4, + "typeName": "u32" + } + ], + "index": 4, + "docs": [ + "Merge two vesting schedules together, creating a new vesting schedule that unlocks over", + "the highest possible start and end blocks. If both schedules have already started the", + "current block will be used as the schedule start; with the caveat that if one schedule", + "is finished by the current block, the other will be treated as the new merged schedule,", + "unmodified.", + "", + "NOTE: If `schedule1_index == schedule2_index` this is a no-op.", + "NOTE: This will unlock all schedules through the current block prior to merging.", + "NOTE: If both schedules have ended by the current block, no new schedule will be created", + "and both will be removed.", + "", + "Merged schedule attributes:", + "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,", + " current_block)`.", + "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.", + "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `schedule1_index`: index of the first schedule to merge.", + "- `schedule2_index`: index of the second schedule to merge." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 300, + "type": { + "path": [ + "pallet_vesting", + "vesting_info", + "VestingInfo" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "locked", + "type": 6, + "typeName": "Balance" + }, + { + "name": "per_block", + "type": 6, + "typeName": "Balance" + }, + { + "name": "starting_block", + "type": 4, + "typeName": "BlockNumber" + } + ] + } + } + } + }, + { + "id": 301, + "type": { + "path": [ + "pallet_scheduler", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "schedule", + "fields": [ + { + "name": "when", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "maybe_periodic", + "type": 302, + "typeName": "Option>" + }, + { + "name": "priority", + "type": 2, + "typeName": "schedule::Priority" + }, + { + "name": "call", + "type": 303, + "typeName": "Box>" + } + ], + "index": 0, + "docs": [ + "Anonymously schedule a task." + ] + }, + { + "name": "cancel", + "fields": [ + { + "name": "when", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Cancel an anonymously scheduled task." + ] + }, + { + "name": "schedule_named", + "fields": [ + { + "name": "id", + "type": 10, + "typeName": "Vec" + }, + { + "name": "when", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "maybe_periodic", + "type": 302, + "typeName": "Option>" + }, + { + "name": "priority", + "type": 2, + "typeName": "schedule::Priority" + }, + { + "name": "call", + "type": 303, + "typeName": "Box>" + } + ], + "index": 2, + "docs": [ + "Schedule a named task." + ] + }, + { + "name": "cancel_named", + "fields": [ + { + "name": "id", + "type": 10, + "typeName": "Vec" + } + ], + "index": 3, + "docs": [ + "Cancel a named scheduled task." + ] + }, + { + "name": "schedule_after", + "fields": [ + { + "name": "after", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "maybe_periodic", + "type": 302, + "typeName": "Option>" + }, + { + "name": "priority", + "type": 2, + "typeName": "schedule::Priority" + }, + { + "name": "call", + "type": 303, + "typeName": "Box>" + } + ], + "index": 4, + "docs": [ + "Anonymously schedule a task after a delay.", + "", + "# ", + "Same as [`schedule`].", + "# " + ] + }, + { + "name": "schedule_named_after", + "fields": [ + { + "name": "id", + "type": 10, + "typeName": "Vec" + }, + { + "name": "after", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "maybe_periodic", + "type": 302, + "typeName": "Option>" + }, + { + "name": "priority", + "type": 2, + "typeName": "schedule::Priority" + }, + { + "name": "call", + "type": 303, + "typeName": "Box>" + } + ], + "index": 5, + "docs": [ + "Schedule a named task after a delay.", + "", + "# ", + "Same as [`schedule_named`](Self::schedule_named).", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 302, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 75 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 75 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 303, + "type": { + "path": [ + "frame_support", + "traits", + "schedule", + "MaybeHashed" + ], + "params": [ + { + "name": "T", + "type": 134 + }, + { + "name": "Hash", + "type": 9 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Value", + "fields": [ + { + "type": 134, + "typeName": "T" + } + ], + "index": 0 + }, + { + "name": "Hash", + "fields": [ + { + "type": 9, + "typeName": "Hash" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 304, + "type": { + "path": [ + "pallet_preimage", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "note_preimage", + "fields": [ + { + "name": "bytes", + "type": 10, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Register a preimage on-chain.", + "", + "If the preimage was previously requested, no fees or deposits are taken for providing", + "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage." + ] + }, + { + "name": "unnote_preimage", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 1, + "docs": [ + "Clear an unrequested preimage from the runtime storage." + ] + }, + { + "name": "request_preimage", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 2, + "docs": [ + "Request a preimage be uploaded to the chain without paying any fees or deposits.", + "", + "If the preimage requests has already been provided on-chain, we unreserve any deposit", + "a user may have paid, and take the control of the preimage out of their hands." + ] + }, + { + "name": "unrequest_preimage", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 3, + "docs": [ + "Clear a previously made request for a preimage.", + "", + "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 305, + "type": { + "path": [ + "pallet_proxy", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "proxy", + "fields": [ + { + "name": "real", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "force_proxy_type", + "type": 306, + "typeName": "Option" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 0, + "docs": [ + "Dispatch the given `call` from an account that the sender is authorised for through", + "`add_proxy`.", + "", + "Removes any corresponding announcement(s).", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `real`: The account that the proxy will make a call on behalf of.", + "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + "- `call`: The call to be made by the `real` account.", + "", + "# ", + "Weight is a function of the number of proxies the user has (P).", + "# " + ] + }, + { + "name": "add_proxy", + "fields": [ + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 1, + "docs": [ + "Register a proxy account for the sender that is able to make calls on its behalf.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `proxy`: The account that the `caller` would like to make a proxy.", + "- `proxy_type`: The permissions allowed for this proxy account.", + "- `delay`: The announcement period required of the initial proxy. Will generally be", + "zero.", + "", + "# ", + "Weight is a function of the number of proxies the user has (P).", + "# " + ] + }, + { + "name": "remove_proxy", + "fields": [ + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + } + ], + "index": 2, + "docs": [ + "Unregister a proxy account for the sender.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `proxy`: The account that the `caller` would like to remove as a proxy.", + "- `proxy_type`: The permissions currently enabled for the removed proxy account.", + "", + "# ", + "Weight is a function of the number of proxies the user has (P).", + "# " + ] + }, + { + "name": "remove_proxies", + "index": 3, + "docs": [ + "Unregister all proxy accounts for the sender.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "WARNING: This may be called on accounts created by `anonymous`, however if done, then", + "the unreserved fees will be inaccessible. **All access to this account will be lost.**", + "", + "# ", + "Weight is a function of the number of proxies the user has (P).", + "# " + ] + }, + { + "name": "anonymous", + "fields": [ + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "index", + "type": 81, + "typeName": "u16" + } + ], + "index": 4, + "docs": [ + "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", + "initialize it with a proxy of `proxy_type` for `origin` sender.", + "", + "Requires a `Signed` origin.", + "", + "- `proxy_type`: The type of the proxy that the sender will be registered as over the", + "new account. This will almost always be the most permissive `ProxyType` possible to", + "allow for maximum flexibility.", + "- `index`: A disambiguation index, in case this is called multiple times in the same", + "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just", + "want to use `0`.", + "- `delay`: The announcement period required of the initial proxy. Will generally be", + "zero.", + "", + "Fails with `Duplicate` if this has already been called in this transaction, from the", + "same sender, with the same parameters.", + "", + "Fails if there are insufficient funds to pay for deposit.", + "", + "# ", + "Weight is a function of the number of proxies the user has (P).", + "# ", + "TODO: Might be over counting 1 read" + ] + }, + { + "name": "kill_anonymous", + "fields": [ + { + "name": "spawner", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "T::ProxyType" + }, + { + "name": "index", + "type": 81, + "typeName": "u16" + }, + { + "name": "height", + "type": 113, + "typeName": "T::BlockNumber" + }, + { + "name": "ext_index", + "type": 113, + "typeName": "u32" + } + ], + "index": 5, + "docs": [ + "Removes a previously spawned anonymous proxy.", + "", + "WARNING: **All access to this account will be lost.** Any funds held in it will be", + "inaccessible.", + "", + "Requires a `Signed` origin, and the sender account must have been created by a call to", + "`anonymous` with corresponding parameters.", + "", + "- `spawner`: The account that originally called `anonymous` to create this account.", + "- `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.", + "- `proxy_type`: The proxy type originally passed to `anonymous`.", + "- `height`: The height of the chain when the call to `anonymous` was processed.", + "- `ext_index`: The extrinsic index in which the call to `anonymous` was processed.", + "", + "Fails with `NoPermission` in case the caller is not a previously created anonymous", + "account whose `anonymous` call has corresponding parameters.", + "", + "# ", + "Weight is a function of the number of proxies the user has (P).", + "# " + ] + }, + { + "name": "announce", + "fields": [ + { + "name": "real", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 9, + "typeName": "CallHashOf" + } + ], + "index": 6, + "docs": [ + "Publish the hash of a proxy-call that will be made in the future.", + "", + "This must be called some number of blocks before the corresponding `proxy` is attempted", + "if the delay associated with the proxy relationship is greater than zero.", + "", + "No more than `MaxPending` announcements may be made at any one time.", + "", + "This will take a deposit of `AnnouncementDepositFactor` as well as", + "`AnnouncementDepositBase` if there are no other pending announcements.", + "", + "The dispatch origin for this call must be _Signed_ and a proxy of `real`.", + "", + "Parameters:", + "- `real`: The account that the proxy will make a call on behalf of.", + "- `call_hash`: The hash of the call to be made by the `real` account.", + "", + "# ", + "Weight is a function of:", + "- A: the number of announcements made.", + "- P: the number of proxies the user has.", + "# " + ] + }, + { + "name": "remove_announcement", + "fields": [ + { + "name": "real", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 9, + "typeName": "CallHashOf" + } + ], + "index": 7, + "docs": [ + "Remove a given announcement.", + "", + "May be called by a proxy account to remove a call they previously announced and return", + "the deposit.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `real`: The account that the proxy will make a call on behalf of.", + "- `call_hash`: The hash of the call to be made by the `real` account.", + "", + "# ", + "Weight is a function of:", + "- A: the number of announcements made.", + "- P: the number of proxies the user has.", + "# " + ] + }, + { + "name": "reject_announcement", + "fields": [ + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "call_hash", + "type": 9, + "typeName": "CallHashOf" + } + ], + "index": 8, + "docs": [ + "Remove the given announcement of a delegate.", + "", + "May be called by a target (proxied) account to remove a call that one of their delegates", + "(`delegate`) has announced they want to execute. The deposit is returned.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `delegate`: The account that previously announced the call.", + "- `call_hash`: The hash of the call to be made.", + "", + "# ", + "Weight is a function of:", + "- A: the number of announcements made.", + "- P: the number of proxies the user has.", + "# " + ] + }, + { + "name": "proxy_announced", + "fields": [ + { + "name": "delegate", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "real", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "force_proxy_type", + "type": 306, + "typeName": "Option" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 9, + "docs": [ + "Dispatch the given `call` from an account that the sender is authorized for through", + "`add_proxy`.", + "", + "Removes any corresponding announcement(s).", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Parameters:", + "- `real`: The account that the proxy will make a call on behalf of.", + "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", + "- `call`: The call to be made by the `real` account.", + "", + "# ", + "Weight is a function of:", + "- A: the number of announcements made.", + "- P: the number of proxies the user has.", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 306, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 80 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 80 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 307, + "type": { + "path": [ + "pallet_multisig", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "as_multi_threshold_1", + "fields": [ + { + "name": "other_signatories", + "type": 40, + "typeName": "Vec" + }, + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 0, + "docs": [ + "Immediately dispatch a multi-signature call using a single approval from the caller.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `other_signatories`: The accounts (other than the sender) who are part of the", + "multi-signature, but do not participate in the approval process.", + "- `call`: The call to be executed.", + "", + "Result is equivalent to the dispatched result.", + "", + "# ", + "O(Z + C) where Z is the length of the call and C its execution weight.", + "-------------------------------", + "- DB Weight: None", + "- Plus Call Weight", + "# " + ] + }, + { + "name": "as_multi", + "fields": [ + { + "name": "threshold", + "type": 81, + "typeName": "u16" + }, + { + "name": "other_signatories", + "type": 40, + "typeName": "Vec" + }, + { + "name": "maybe_timepoint", + "type": 308, + "typeName": "Option>" + }, + { + "name": "call", + "type": 309, + "typeName": "OpaqueCall" + }, + { + "name": "store_call", + "type": 35, + "typeName": "bool" + }, + { + "name": "max_weight", + "type": 8, + "typeName": "Weight" + } + ], + "index": 1, + "docs": [ + "Register approval for a dispatch to be made from a deterministic composite account if", + "approved by a total of `threshold - 1` of `other_signatories`.", + "", + "If there are enough, then dispatch the call.", + "", + "Payment: `DepositBase` will be reserved if this is the first approval, plus", + "`threshold` times `DepositFactor`. It is returned once this dispatch happens or", + "is cancelled.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `threshold`: The total number of approvals for this dispatch before it is executed.", + "- `other_signatories`: The accounts (other than the sender) who can approve this", + "dispatch. May not be empty.", + "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + "not the first approval, then it must be `Some`, with the timepoint (block number and", + "transaction index) of the first approval transaction.", + "- `call`: The call to be executed.", + "", + "NOTE: Unless this is the final approval, you will generally want to use", + "`approve_as_multi` instead, since it only requires a hash of the call.", + "", + "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise", + "on success, result is `Ok` and the result from the interior call, if it was executed,", + "may be found in the deposited `MultisigExecuted` event.", + "", + "# ", + "- `O(S + Z + Call)`.", + "- Up to one balance-reserve or unreserve operation.", + "- One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.", + "- One encode & hash, both of complexity `O(S)`.", + "- Up to one binary search and insert (`O(logS + S)`).", + "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + "- One event.", + "- The weight of the `call`.", + "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit", + " taken for its lifetime of `DepositBase + threshold * DepositFactor`.", + "-------------------------------", + "- DB Weight:", + " - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`)", + " - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`)", + "- Plus Call Weight", + "# " + ] + }, + { + "name": "approve_as_multi", + "fields": [ + { + "name": "threshold", + "type": 81, + "typeName": "u16" + }, + { + "name": "other_signatories", + "type": 40, + "typeName": "Vec" + }, + { + "name": "maybe_timepoint", + "type": 308, + "typeName": "Option>" + }, + { + "name": "call_hash", + "type": 1, + "typeName": "[u8; 32]" + }, + { + "name": "max_weight", + "type": 8, + "typeName": "Weight" + } + ], + "index": 2, + "docs": [ + "Register approval for a dispatch to be made from a deterministic composite account if", + "approved by a total of `threshold - 1` of `other_signatories`.", + "", + "Payment: `DepositBase` will be reserved if this is the first approval, plus", + "`threshold` times `DepositFactor`. It is returned once this dispatch happens or", + "is cancelled.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `threshold`: The total number of approvals for this dispatch before it is executed.", + "- `other_signatories`: The accounts (other than the sender) who can approve this", + "dispatch. May not be empty.", + "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", + "not the first approval, then it must be `Some`, with the timepoint (block number and", + "transaction index) of the first approval transaction.", + "- `call_hash`: The hash of the call to be executed.", + "", + "NOTE: If this is the final approval, you will want to use `as_multi` instead.", + "", + "# ", + "- `O(S)`.", + "- Up to one balance-reserve or unreserve operation.", + "- One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + "- One encode & hash, both of complexity `O(S)`.", + "- Up to one binary search and insert (`O(logS + S)`).", + "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", + "- One event.", + "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit", + " taken for its lifetime of `DepositBase + threshold * DepositFactor`.", + "----------------------------------", + "- DB Weight:", + " - Read: Multisig Storage, [Caller Account]", + " - Write: Multisig Storage, [Caller Account]", + "# " + ] + }, + { + "name": "cancel_as_multi", + "fields": [ + { + "name": "threshold", + "type": 81, + "typeName": "u16" + }, + { + "name": "other_signatories", + "type": 40, + "typeName": "Vec" + }, + { + "name": "timepoint", + "type": 83, + "typeName": "Timepoint" + }, + { + "name": "call_hash", + "type": 1, + "typeName": "[u8; 32]" + } + ], + "index": 3, + "docs": [ + "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", + "for this operation will be unreserved on success.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "- `threshold`: The total number of approvals for this dispatch before it is executed.", + "- `other_signatories`: The accounts (other than the sender) who can approve this", + "dispatch. May not be empty.", + "- `timepoint`: The timepoint (block number and transaction index) of the first approval", + "transaction for this dispatch.", + "- `call_hash`: The hash of the call to be executed.", + "", + "# ", + "- `O(S)`.", + "- Up to one balance-reserve or unreserve operation.", + "- One passthrough operation, one insert, both `O(S)` where `S` is the number of", + " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", + "- One encode & hash, both of complexity `O(S)`.", + "- One event.", + "- I/O: 1 read `O(S)`, one remove.", + "- Storage: removes one item.", + "----------------------------------", + "- DB Weight:", + " - Read: Multisig Storage, [Caller Account], Refund Account, Calls", + " - Write: Multisig Storage, [Caller Account], Refund Account, Calls", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 308, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 83 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 83 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 309, + "type": { + "path": [ + "frame_support", + "traits", + "misc", + "WrapperKeepOpaque" + ], + "params": [ + { + "name": "T", + "type": 134 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 113 + }, + { + "type": 134, + "typeName": "T" + } + ] + } + } + } + }, + { + "id": 310, + "type": { + "path": [ + "pallet_bounties", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "propose_bounty", + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "description", + "type": 10, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Propose a new bounty.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,", + "or slashed when rejected.", + "", + "- `curator`: The curator account whom will manage this bounty.", + "- `fee`: The curator fee.", + "- `value`: The total payment amount of this bounty, curator fee included.", + "- `description`: The description of this bounty." + ] + }, + { + "name": "approve_bounty", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 1, + "docs": [ + "Approve a bounty proposal. At a later time, the bounty will be funded and become active", + "and the original deposit will be returned.", + "", + "May only be called from `T::ApproveOrigin`.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "propose_curator", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "curator", + "type": 151, + "typeName": "::Source" + }, + { + "name": "fee", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "Assign a curator to a funded bounty.", + "", + "May only be called from `T::ApproveOrigin`.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "unassign_curator", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 3, + "docs": [ + "Unassign curator from a bounty.", + "", + "This function can only be called by the `RejectOrigin` a signed origin.", + "", + "If this function is called by the `RejectOrigin`, we assume that the curator is", + "malicious or inactive. As a result, we will slash the curator when possible.", + "", + "If the origin is the curator, we take this as a sign they are unable to do their job and", + "they willingly give up. We could slash them, but for now we allow them to recover their", + "deposit and exit without issue. (We may want to change this if it is abused.)", + "", + "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows", + "anyone in the community to call out that a curator is not doing their due diligence, and", + "we should pick a new curator. In this case the curator should also be slashed.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "accept_curator", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 4, + "docs": [ + "Accept the curator role for a bounty.", + "A deposit will be reserved from curator and refund upon successful payout.", + "", + "May only be called from the curator.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "award_bounty", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "beneficiary", + "type": 151, + "typeName": "::Source" + } + ], + "index": 5, + "docs": [ + "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds", + "after a delay.", + "", + "The dispatch origin for this call must be the curator of this bounty.", + "", + "- `bounty_id`: Bounty ID to award.", + "- `beneficiary`: The beneficiary account whom will receive the payout.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "claim_bounty", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 6, + "docs": [ + "Claim the payout from an awarded bounty after payout delay.", + "", + "The dispatch origin for this call must be the beneficiary of this bounty.", + "", + "- `bounty_id`: Bounty ID to claim.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "close_bounty", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 7, + "docs": [ + "Cancel a proposed or active bounty. All the funds will be sent to treasury and", + "the curator deposit will be unreserved if possible.", + "", + "Only `T::RejectOrigin` is able to cancel a bounty.", + "", + "- `bounty_id`: Bounty ID to cancel.", + "", + "# ", + "- O(1).", + "# " + ] + }, + { + "name": "extend_bounty_expiry", + "fields": [ + { + "name": "bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "remark", + "type": 10, + "typeName": "Vec" + } + ], + "index": 8, + "docs": [ + "Extend the expiry time of an active bounty.", + "", + "The dispatch origin for this call must be the curator of this bounty.", + "", + "- `bounty_id`: Bounty ID to extend.", + "- `remark`: additional information.", + "", + "# ", + "- O(1).", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 311, + "type": { + "path": [ + "pallet_tips", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "report_awesome", + "fields": [ + { + "name": "reason", + "type": 10, + "typeName": "Vec" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "Report something `reason` that deserves a tip and claim any eventual the finder's fee.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", + "`DataDepositPerByte` for each byte in `reason`.", + "", + "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + "- `who`: The account which should be credited for the tip.", + "", + "Emits `NewTip` if successful.", + "", + "# ", + "- Complexity: `O(R)` where `R` length of `reason`.", + " - encoding and hashing of 'reason'", + "- DbReads: `Reasons`, `Tips`", + "- DbWrites: `Reasons`, `Tips`", + "# " + ] + }, + { + "name": "retract_tip", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 1, + "docs": [ + "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", + "", + "If successful, the original deposit will be unreserved.", + "", + "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`", + "must have been reported by the signing account through `report_awesome` (and not", + "through `tip_new`).", + "", + "- `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + "Emits `TipRetracted` if successful.", + "", + "# ", + "- Complexity: `O(1)`", + " - Depends on the length of `T::Hash` which is fixed.", + "- DbReads: `Tips`, `origin account`", + "- DbWrites: `Reasons`, `Tips`, `origin account`", + "# " + ] + }, + { + "name": "tip_new", + "fields": [ + { + "name": "reason", + "type": 10, + "typeName": "Vec" + }, + { + "name": "who", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "tip_value", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 2, + "docs": [ + "Give a tip for something new; no finder's fee will be taken.", + "", + "The dispatch origin for this call must be _Signed_ and the signing account must be a", + "member of the `Tippers` set.", + "", + "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be", + " a UTF-8-encoded URL.", + "- `who`: The account which should be credited for the tip.", + "- `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + "Emits `NewTip` if successful.", + "", + "# ", + "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.", + " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by", + " `ContainsLengthBound`. The actual cost depends on the implementation of", + " `T::Tippers`.", + " - `O(R)`: hashing and encoding of reason of length `R`", + "- DbReads: `Tippers`, `Reasons`", + "- DbWrites: `Reasons`, `Tips`", + "# " + ] + }, + { + "name": "tip", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "tip_value", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 3, + "docs": [ + "Declare a tip value for an already-open tip.", + "", + "The dispatch origin for this call must be _Signed_ and the signing account must be a", + "member of the `Tippers` set.", + "", + "- `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary", + " account ID.", + "- `tip_value`: The amount of tip that the sender would like to give. The median tip", + " value of active tippers will be given to the `who`.", + "", + "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period", + "has started.", + "", + "# ", + "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length", + " `T`, insert tip and check closing, `T` is charged as upper bound given by", + " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`.", + "", + " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it", + " is weighted as if almost full i.e of length `T-1`.", + "- DbReads: `Tippers`, `Tips`", + "- DbWrites: `Tips`", + "# " + ] + }, + { + "name": "close_tip", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 4, + "docs": [ + "Close and payout a tip.", + "", + "The dispatch origin for this call must be _Signed_.", + "", + "The tip identified by `hash` must have finished its countdown period.", + "", + "- `hash`: The identity of the open tip for which a tip value is declared. This is formed", + " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", + "", + "# ", + "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length", + " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost", + " depends on the implementation of `T::Tippers`.", + "- DbReads: `Tips`, `Tippers`, `tip finder`", + "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`", + "# " + ] + }, + { + "name": "slash_tip", + "fields": [ + { + "name": "hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 5, + "docs": [ + "Remove and slash an already-open tip.", + "", + "May only be called from `T::RejectOrigin`.", + "", + "As a result, the finder is slashed and the deposits are lost.", + "", + "Emits `TipSlashed` if successful.", + "", + "# ", + " `T` is charged as upper bound given by `ContainsLengthBound`.", + " The actual cost depends on the implementation of `T::Tippers`.", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 312, + "type": { + "path": [ + "pallet_assets", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "create", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "admin", + "type": 151, + "typeName": "::Source" + }, + { + "name": "min_balance", + "type": 6, + "typeName": "T::Balance" + } + ], + "index": 0, + "docs": [ + "Issue a new class of fungible assets from a public origin.", + "", + "This new asset class has no assets initially and its owner is the origin.", + "", + "The origin must be Signed and the sender must have sufficient funds free.", + "", + "Funds of sender are reserved by `AssetDeposit`.", + "", + "Parameters:", + "- `id`: The identifier of the new asset. This must not be currently in use to identify", + "an existing asset.", + "- `admin`: The admin of this class of assets. The admin is the initial address of each", + "member of the asset class's admin team.", + "- `min_balance`: The minimum balance of this new asset that any single account must", + "have. If an account's balance is reduced below this, then it collapses to zero.", + "", + "Emits `Created` event when successful.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "force_create", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + }, + { + "name": "is_sufficient", + "type": 35, + "typeName": "bool" + }, + { + "name": "min_balance", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 1, + "docs": [ + "Issue a new class of fungible assets from a privileged origin.", + "", + "This new asset class has no assets initially.", + "", + "The origin must conform to `ForceOrigin`.", + "", + "Unlike `create`, no funds are reserved.", + "", + "- `id`: The identifier of the new asset. This must not be currently in use to identify", + "an existing asset.", + "- `owner`: The owner of this class of assets. The owner has full superuser permissions", + "over this asset, but may later change and configure the permissions using", + "`transfer_ownership` and `set_team`.", + "- `min_balance`: The minimum balance of this new asset that any single account must", + "have. If an account's balance is reduced below this, then it collapses to zero.", + "", + "Emits `ForceCreated` event when successful.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "destroy", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "witness", + "type": 313, + "typeName": "DestroyWitness" + } + ], + "index": 2, + "docs": [ + "Destroy a class of fungible assets.", + "", + "The origin must conform to `ForceOrigin` or must be Signed and the sender must be the", + "owner of the asset `id`.", + "", + "- `id`: The identifier of the asset to be destroyed. This must identify an existing", + "asset.", + "", + "Emits `Destroyed` event when successful.", + "", + "NOTE: It can be helpful to first freeze an asset before destroying it so that you", + "can provide accurate witness information and prevent users from manipulating state", + "in a way that can make it harder to destroy.", + "", + "Weight: `O(c + p + a)` where:", + "- `c = (witness.accounts - witness.sufficients)`", + "- `s = witness.sufficients`", + "- `a = witness.approvals`" + ] + }, + { + "name": "mint", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "beneficiary", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 3, + "docs": [ + "Mint assets of a particular class.", + "", + "The origin must be Signed and the sender must be the Issuer of the asset `id`.", + "", + "- `id`: The identifier of the asset to have some amount minted.", + "- `beneficiary`: The account to be credited with the minted assets.", + "- `amount`: The amount of the asset to be minted.", + "", + "Emits `Issued` event when successful.", + "", + "Weight: `O(1)`", + "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`." + ] + }, + { + "name": "burn", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "who", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 4, + "docs": [ + "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.", + "", + "Origin must be Signed and the sender should be the Manager of the asset `id`.", + "", + "Bails with `NoAccount` if the `who` is already dead.", + "", + "- `id`: The identifier of the asset to have some amount burned.", + "- `who`: The account to be debited from.", + "- `amount`: The maximum amount by which `who`'s balance should be reduced.", + "", + "Emits `Burned` with the actual amount burned. If this takes the balance to below the", + "minimum for the asset, then the amount burned is increased to take it to zero.", + "", + "Weight: `O(1)`", + "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`." + ] + }, + { + "name": "transfer", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "target", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 5, + "docs": [ + "Move some assets from the sender account to another.", + "", + "Origin must be Signed.", + "", + "- `id`: The identifier of the asset to have some amount transferred.", + "- `target`: The account to be credited.", + "- `amount`: The amount by which the sender's balance of assets should be reduced and", + "`target`'s balance increased. The amount actually transferred may be slightly greater in", + "the case that the transfer would otherwise take the sender balance above zero but below", + "the minimum balance. Must be greater than zero.", + "", + "Emits `Transferred` with the actual amount transferred. If this takes the source balance", + "to below the minimum for the asset, then the amount transferred is increased to take it", + "to zero.", + "", + "Weight: `O(1)`", + "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of", + "`target`." + ] + }, + { + "name": "transfer_keep_alive", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "target", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 6, + "docs": [ + "Move some assets from the sender account to another, keeping the sender account alive.", + "", + "Origin must be Signed.", + "", + "- `id`: The identifier of the asset to have some amount transferred.", + "- `target`: The account to be credited.", + "- `amount`: The amount by which the sender's balance of assets should be reduced and", + "`target`'s balance increased. The amount actually transferred may be slightly greater in", + "the case that the transfer would otherwise take the sender balance above zero but below", + "the minimum balance. Must be greater than zero.", + "", + "Emits `Transferred` with the actual amount transferred. If this takes the source balance", + "to below the minimum for the asset, then the amount transferred is increased to take it", + "to zero.", + "", + "Weight: `O(1)`", + "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of", + "`target`." + ] + }, + { + "name": "force_transfer", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "source", + "type": 151, + "typeName": "::Source" + }, + { + "name": "dest", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 7, + "docs": [ + "Move some assets from one account to another.", + "", + "Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + "- `id`: The identifier of the asset to have some amount transferred.", + "- `source`: The account to be debited.", + "- `dest`: The account to be credited.", + "- `amount`: The amount by which the `source`'s balance of assets should be reduced and", + "`dest`'s balance increased. The amount actually transferred may be slightly greater in", + "the case that the transfer would otherwise take the `source` balance above zero but", + "below the minimum balance. Must be greater than zero.", + "", + "Emits `Transferred` with the actual amount transferred. If this takes the source balance", + "to below the minimum for the asset, then the amount transferred is increased to take it", + "to zero.", + "", + "Weight: `O(1)`", + "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of", + "`dest`." + ] + }, + { + "name": "freeze", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "who", + "type": 151, + "typeName": "::Source" + } + ], + "index": 8, + "docs": [ + "Disallow further unprivileged transfers from an account.", + "", + "Origin must be Signed and the sender should be the Freezer of the asset `id`.", + "", + "- `id`: The identifier of the asset to be frozen.", + "- `who`: The account to be frozen.", + "", + "Emits `Frozen`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "thaw", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "who", + "type": 151, + "typeName": "::Source" + } + ], + "index": 9, + "docs": [ + "Allow unprivileged transfers from an account again.", + "", + "Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + "- `id`: The identifier of the asset to be frozen.", + "- `who`: The account to be unfrozen.", + "", + "Emits `Thawed`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "freeze_asset", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + } + ], + "index": 10, + "docs": [ + "Disallow further unprivileged transfers for the asset class.", + "", + "Origin must be Signed and the sender should be the Freezer of the asset `id`.", + "", + "- `id`: The identifier of the asset to be frozen.", + "", + "Emits `Frozen`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "thaw_asset", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + } + ], + "index": 11, + "docs": [ + "Allow unprivileged transfers for the asset again.", + "", + "Origin must be Signed and the sender should be the Admin of the asset `id`.", + "", + "- `id`: The identifier of the asset to be thawed.", + "", + "Emits `Thawed`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "transfer_ownership", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + } + ], + "index": 12, + "docs": [ + "Change the Owner of an asset.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + "- `id`: The identifier of the asset.", + "- `owner`: The new Owner of this asset.", + "", + "Emits `OwnerChanged`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_team", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "issuer", + "type": 151, + "typeName": "::Source" + }, + { + "name": "admin", + "type": 151, + "typeName": "::Source" + }, + { + "name": "freezer", + "type": 151, + "typeName": "::Source" + } + ], + "index": 13, + "docs": [ + "Change the Issuer, Admin and Freezer of an asset.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + "- `id`: The identifier of the asset to be frozen.", + "- `issuer`: The new Issuer of this asset.", + "- `admin`: The new Admin of this asset.", + "- `freezer`: The new Freezer of this asset.", + "", + "Emits `TeamChanged`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_metadata", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "name", + "type": 10, + "typeName": "Vec" + }, + { + "name": "symbol", + "type": 10, + "typeName": "Vec" + }, + { + "name": "decimals", + "type": 2, + "typeName": "u8" + } + ], + "index": 14, + "docs": [ + "Set the metadata for an asset.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + "Funds of sender are reserved according to the formula:", + "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into", + "account any already reserved funds.", + "", + "- `id`: The identifier of the asset to update.", + "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", + "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", + "- `decimals`: The number of decimals this asset uses to represent one unit.", + "", + "Emits `MetadataSet`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "clear_metadata", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + } + ], + "index": 15, + "docs": [ + "Clear the metadata for an asset.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `id`.", + "", + "Any deposit is freed for the asset owner.", + "", + "- `id`: The identifier of the asset to clear.", + "", + "Emits `MetadataCleared`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "force_set_metadata", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "name", + "type": 10, + "typeName": "Vec" + }, + { + "name": "symbol", + "type": 10, + "typeName": "Vec" + }, + { + "name": "decimals", + "type": 2, + "typeName": "u8" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 16, + "docs": [ + "Force the metadata for an asset to some value.", + "", + "Origin must be ForceOrigin.", + "", + "Any deposit is left alone.", + "", + "- `id`: The identifier of the asset to update.", + "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", + "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", + "- `decimals`: The number of decimals this asset uses to represent one unit.", + "", + "Emits `MetadataSet`.", + "", + "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively." + ] + }, + { + "name": "force_clear_metadata", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + } + ], + "index": 17, + "docs": [ + "Clear the metadata for an asset.", + "", + "Origin must be ForceOrigin.", + "", + "Any deposit is returned.", + "", + "- `id`: The identifier of the asset to clear.", + "", + "Emits `MetadataCleared`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "force_asset_status", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + }, + { + "name": "issuer", + "type": 151, + "typeName": "::Source" + }, + { + "name": "admin", + "type": 151, + "typeName": "::Source" + }, + { + "name": "freezer", + "type": 151, + "typeName": "::Source" + }, + { + "name": "min_balance", + "type": 65, + "typeName": "T::Balance" + }, + { + "name": "is_sufficient", + "type": 35, + "typeName": "bool" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 18, + "docs": [ + "Alter the attributes of a given asset.", + "", + "Origin must be `ForceOrigin`.", + "", + "- `id`: The identifier of the asset.", + "- `owner`: The new Owner of this asset.", + "- `issuer`: The new Issuer of this asset.", + "- `admin`: The new Admin of this asset.", + "- `freezer`: The new Freezer of this asset.", + "- `min_balance`: The minimum balance of this new asset that any single account must", + "have. If an account's balance is reduced below this, then it collapses to zero.", + "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient", + "value to account for the state bloat associated with its balance storage. If set to", + "`true`, then non-zero balances may be stored without a `consumer` reference (and thus", + "an ED in the Balances pallet or whatever else is used to control user-account state", + "growth).", + "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin", + "instructions.", + "", + "Emits `AssetStatusChanged` with the identity of the asset.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "approve_transfer", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "delegate", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 19, + "docs": [ + "Approve an amount of asset for transfer by a delegated third-party account.", + "", + "Origin must be Signed.", + "", + "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account", + "for the purpose of holding the approval. If some non-zero amount of assets is already", + "approved from signing account to `delegate`, then it is topped up or unreserved to", + "meet the right value.", + "", + "NOTE: The signing account does not need to own `amount` of assets at the point of", + "making this call.", + "", + "- `id`: The identifier of the asset.", + "- `delegate`: The account to delegate permission to transfer asset.", + "- `amount`: The amount of asset that may be transferred by `delegate`. If there is", + "already an approval in place, then this acts additively.", + "", + "Emits `ApprovedTransfer` on success.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "cancel_approval", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "delegate", + "type": 151, + "typeName": "::Source" + } + ], + "index": 20, + "docs": [ + "Cancel all of some asset approved for delegated transfer by a third-party account.", + "", + "Origin must be Signed and there must be an approval in place between signer and", + "`delegate`.", + "", + "Unreserves any deposit previously reserved by `approve_transfer` for the approval.", + "", + "- `id`: The identifier of the asset.", + "- `delegate`: The account delegated permission to transfer asset.", + "", + "Emits `ApprovalCancelled` on success.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "force_cancel_approval", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + }, + { + "name": "delegate", + "type": 151, + "typeName": "::Source" + } + ], + "index": 21, + "docs": [ + "Cancel all of some asset approved for delegated transfer by a third-party account.", + "", + "Origin must be either ForceOrigin or Signed origin with the signer being the Admin", + "account of the asset `id`.", + "", + "Unreserves any deposit previously reserved by `approve_transfer` for the approval.", + "", + "- `id`: The identifier of the asset.", + "- `delegate`: The account delegated permission to transfer asset.", + "", + "Emits `ApprovalCancelled` on success.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "transfer_approved", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + }, + { + "name": "destination", + "type": 151, + "typeName": "::Source" + }, + { + "name": "amount", + "type": 65, + "typeName": "T::Balance" + } + ], + "index": 22, + "docs": [ + "Transfer some asset balance from a previously delegated account to some third-party", + "account.", + "", + "Origin must be Signed and there must be an approval in place by the `owner` to the", + "signer.", + "", + "If the entire amount approved for transfer is transferred, then any deposit previously", + "reserved by `approve_transfer` is unreserved.", + "", + "- `id`: The identifier of the asset.", + "- `owner`: The account which previously approved for a transfer of at least `amount` and", + "from which the asset balance will be withdrawn.", + "- `destination`: The account to which the asset balance of `amount` will be transferred.", + "- `amount`: The amount of assets to transfer.", + "", + "Emits `TransferredApproved` on success.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "touch", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + } + ], + "index": 23, + "docs": [ + "Create an asset account for non-provider assets.", + "", + "A deposit will be taken from the signer account.", + "", + "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit", + " to be taken.", + "- `id`: The identifier of the asset for the account to be created.", + "", + "Emits `Touched` event when successful." + ] + }, + { + "name": "refund", + "fields": [ + { + "name": "id", + "type": 113, + "typeName": "T::AssetId" + }, + { + "name": "allow_burn", + "type": 35, + "typeName": "bool" + } + ], + "index": 24, + "docs": [ + "Return the deposit (if any) of an asset account.", + "", + "The origin must be Signed.", + "", + "- `id`: The identifier of the asset for the account to be created.", + "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.", + "", + "Emits `Refunded` event when successful." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 313, + "type": { + "path": [ + "pallet_assets", + "types", + "DestroyWitness" + ], + "def": { + "composite": { + "fields": [ + { + "name": "accounts", + "type": 113, + "typeName": "u32" + }, + { + "name": "sufficients", + "type": 113, + "typeName": "u32" + }, + { + "name": "approvals", + "type": 113, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 314, + "type": { + "path": [ + "pallet_lottery", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "buy_ticket", + "fields": [ + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 0, + "docs": [ + "Buy a ticket to enter the lottery.", + "", + "This extrinsic acts as a passthrough function for `call`. In all", + "situations where `call` alone would succeed, this extrinsic should", + "succeed.", + "", + "If `call` is successful, then we will attempt to purchase a ticket,", + "which may fail silently. To detect success of a ticket purchase, you", + "should listen for the `TicketBought` event.", + "", + "This extrinsic must be called by a signed origin." + ] + }, + { + "name": "set_calls", + "fields": [ + { + "name": "calls", + "type": 133, + "typeName": "Vec<::Call>" + } + ], + "index": 1, + "docs": [ + "Set calls in storage which can be used to purchase a lottery ticket.", + "", + "This function only matters if you use the `ValidateCall` implementation", + "provided by this pallet, which uses storage to determine the valid calls.", + "", + "This extrinsic must be called by the Manager origin." + ] + }, + { + "name": "start_lottery", + "fields": [ + { + "name": "price", + "type": 6, + "typeName": "BalanceOf" + }, + { + "name": "length", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "delay", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "repeat", + "type": 35, + "typeName": "bool" + } + ], + "index": 2, + "docs": [ + "Start a lottery using the provided configuration.", + "", + "This extrinsic must be called by the `ManagerOrigin`.", + "", + "Parameters:", + "", + "* `price`: The cost of a single ticket.", + "* `length`: How long the lottery should run for starting at the current block.", + "* `delay`: How long after the lottery end we should wait before picking a winner.", + "* `repeat`: If the lottery should repeat when completed." + ] + }, + { + "name": "stop_repeat", + "index": 3, + "docs": [ + "If a lottery is repeating, you can use this to stop the repeat.", + "The lottery will continue to run to completion.", + "", + "This extrinsic must be called by the `ManagerOrigin`." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 315, + "type": { + "path": [ + "pallet_gilt", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "place_bid", + "fields": [ + { + "name": "amount", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "duration", + "type": 4, + "typeName": "u32" + } + ], + "index": 0, + "docs": [ + "Place a bid for a gilt to be issued.", + "", + "Origin must be Signed, and account must have at least `amount` in free balance.", + "", + "- `amount`: The amount of the bid; these funds will be reserved. If the bid is", + "successfully elevated into an issued gilt, then these funds will continue to be", + "reserved until the gilt expires. Must be at least `MinFreeze`.", + "- `duration`: The number of periods for which the funds will be locked if the gilt is", + "issued. It will expire only after this period has elapsed after the point of issuance.", + "Must be greater than 1 and no more than `QueueCount`.", + "", + "Complexities:", + "- `Queues[duration].len()` (just take max)." + ] + }, + { + "name": "retract_bid", + "fields": [ + { + "name": "amount", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "duration", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Retract a previously placed bid.", + "", + "Origin must be Signed, and the account should have previously issued a still-active bid", + "of `amount` for `duration`.", + "", + "- `amount`: The amount of the previous bid.", + "- `duration`: The duration of the previous bid." + ] + }, + { + "name": "set_target", + "fields": [ + { + "name": "target", + "type": 316, + "typeName": "Perquintill" + } + ], + "index": 2, + "docs": [ + "Set target proportion of gilt-funds.", + "", + "Origin must be `AdminOrigin`.", + "", + "- `target`: The target proportion of effective issued funds that should be under gilts", + "at any one time." + ] + }, + { + "name": "thaw", + "fields": [ + { + "name": "index", + "type": 113, + "typeName": "ActiveIndex" + } + ], + "index": 3, + "docs": [ + "Remove an active but expired gilt. Reserved funds under gilt are freed and balance is", + "adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion", + "of effective total issued funds.", + "", + "Origin must be Signed and the account must be the owner of the gilt of the given index.", + "", + "- `index`: The index of the gilt to be thawed." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 316, + "type": { + "def": { + "compact": { + "type": 317 + } + } + } + }, + { + "id": 317, + "type": { + "path": [ + "sp_arithmetic", + "per_things", + "Perquintill" + ], + "def": { + "composite": { + "fields": [ + { + "type": 8, + "typeName": "u64" + } + ] + } + } + } + }, + { + "id": 318, + "type": { + "path": [ + "pallet_uniques", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "create", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "admin", + "type": 151, + "typeName": "::Source" + } + ], + "index": 0, + "docs": [ + "Issue a new class of non-fungible assets from a public origin.", + "", + "This new asset class has no assets initially and its owner is the origin.", + "", + "The origin must be Signed and the sender must have sufficient funds free.", + "", + "`AssetDeposit` funds of sender are reserved.", + "", + "Parameters:", + "- `class`: The identifier of the new asset class. This must not be currently in use.", + "- `admin`: The admin of this class of assets. The admin is the initial address of each", + "member of the asset class's admin team.", + "", + "Emits `Created` event when successful.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "force_create", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + }, + { + "name": "free_holding", + "type": 35, + "typeName": "bool" + } + ], + "index": 1, + "docs": [ + "Issue a new class of non-fungible assets from a privileged origin.", + "", + "This new asset class has no assets initially.", + "", + "The origin must conform to `ForceOrigin`.", + "", + "Unlike `create`, no funds are reserved.", + "", + "- `class`: The identifier of the new asset. This must not be currently in use.", + "- `owner`: The owner of this class of assets. The owner has full superuser permissions", + "over this asset, but may later change and configure the permissions using", + "`transfer_ownership` and `set_team`.", + "", + "Emits `ForceCreated` event when successful.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "destroy", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "witness", + "type": 319, + "typeName": "DestroyWitness" + } + ], + "index": 2, + "docs": [ + "Destroy a class of fungible assets.", + "", + "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the", + "owner of the asset `class`.", + "", + "- `class`: The identifier of the asset class to be destroyed.", + "- `witness`: Information on the instances minted in the asset class. This must be", + "correct.", + "", + "Emits `Destroyed` event when successful.", + "", + "Weight: `O(n + m)` where:", + "- `n = witness.instances`", + "- `m = witness.instance_metadatas`", + "- `a = witness.attributes`" + ] + }, + { + "name": "mint", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + } + ], + "index": 3, + "docs": [ + "Mint an asset instance of a particular class.", + "", + "The origin must be Signed and the sender must be the Issuer of the asset `class`.", + "", + "- `class`: The class of the asset to be minted.", + "- `instance`: The instance value of the asset to be minted.", + "- `beneficiary`: The initial owner of the minted asset.", + "", + "Emits `Issued` event when successful.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "burn", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "check_owner", + "type": 320, + "typeName": "Option<::Source>" + } + ], + "index": 4, + "docs": [ + "Destroy a single asset instance.", + "", + "Origin must be Signed and the sender should be the Admin of the asset `class`.", + "", + "- `class`: The class of the asset to be burned.", + "- `instance`: The instance of the asset to be burned.", + "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the", + " asset is owned by this value.", + "", + "Emits `Burned` with the actual amount burned.", + "", + "Weight: `O(1)`", + "Modes: `check_owner.is_some()`." + ] + }, + { + "name": "transfer", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "dest", + "type": 151, + "typeName": "::Source" + } + ], + "index": 5, + "docs": [ + "Move an asset from the sender account to another.", + "", + "Origin must be Signed and the signing account must be either:", + "- the Admin of the asset `class`;", + "- the Owner of the asset `instance`;", + "- the approved delegate for the asset `instance` (in this case, the approval is reset).", + "", + "Arguments:", + "- `class`: The class of the asset to be transferred.", + "- `instance`: The instance of the asset to be transferred.", + "- `dest`: The account to receive ownership of the asset.", + "", + "Emits `Transferred`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "redeposit", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instances", + "type": 92, + "typeName": "Vec" + } + ], + "index": 6, + "docs": [ + "Reevaluate the deposits on some assets.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `class`.", + "", + "- `class`: The class of the asset to be frozen.", + "- `instances`: The instances of the asset class whose deposits will be reevaluated.", + "", + "NOTE: This exists as a best-effort function. Any asset instances which are unknown or", + "in the case that the owner account does not have reservable funds to pay for a", + "deposit increase are ignored. Generally the owner isn't going to call this on instances", + "whose existing deposit is less than the refreshed deposit as it would only cost them,", + "so it's of little consequence.", + "", + "It will still return an error in the case that the class is unknown of the signer is", + "not permitted to call it.", + "", + "Weight: `O(instances.len())`" + ] + }, + { + "name": "freeze", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + } + ], + "index": 7, + "docs": [ + "Disallow further unprivileged transfer of an asset instance.", + "", + "Origin must be Signed and the sender should be the Freezer of the asset `class`.", + "", + "- `class`: The class of the asset to be frozen.", + "- `instance`: The instance of the asset to be frozen.", + "", + "Emits `Frozen`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "thaw", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + } + ], + "index": 8, + "docs": [ + "Re-allow unprivileged transfer of an asset instance.", + "", + "Origin must be Signed and the sender should be the Freezer of the asset `class`.", + "", + "- `class`: The class of the asset to be thawed.", + "- `instance`: The instance of the asset to be thawed.", + "", + "Emits `Thawed`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "freeze_class", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 9, + "docs": [ + "Disallow further unprivileged transfers for a whole asset class.", + "", + "Origin must be Signed and the sender should be the Freezer of the asset `class`.", + "", + "- `class`: The asset class to be frozen.", + "", + "Emits `ClassFrozen`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "thaw_class", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 10, + "docs": [ + "Re-allow unprivileged transfers for a whole asset class.", + "", + "Origin must be Signed and the sender should be the Admin of the asset `class`.", + "", + "- `class`: The class to be thawed.", + "", + "Emits `ClassThawed`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "transfer_ownership", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + } + ], + "index": 11, + "docs": [ + "Change the Owner of an asset class.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `class`.", + "", + "- `class`: The asset class whose owner should be changed.", + "- `owner`: The new Owner of this asset class. They must have called", + " `set_accept_ownership` with `class` in order for this operation to succeed.", + "", + "Emits `OwnerChanged`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_team", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "issuer", + "type": 151, + "typeName": "::Source" + }, + { + "name": "admin", + "type": 151, + "typeName": "::Source" + }, + { + "name": "freezer", + "type": 151, + "typeName": "::Source" + } + ], + "index": 12, + "docs": [ + "Change the Issuer, Admin and Freezer of an asset class.", + "", + "Origin must be Signed and the sender should be the Owner of the asset `class`.", + "", + "- `class`: The asset class whose team should be changed.", + "- `issuer`: The new Issuer of this asset class.", + "- `admin`: The new Admin of this asset class.", + "- `freezer`: The new Freezer of this asset class.", + "", + "Emits `TeamChanged`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "approve_transfer", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "delegate", + "type": 151, + "typeName": "::Source" + } + ], + "index": 13, + "docs": [ + "Approve an instance to be transferred by a delegated third-party account.", + "", + "Origin must be Signed and must be the owner of the asset `instance`.", + "", + "- `class`: The class of the asset to be approved for delegated transfer.", + "- `instance`: The instance of the asset to be approved for delegated transfer.", + "- `delegate`: The account to delegate permission to transfer the asset.", + "", + "Emits `ApprovedTransfer` on success.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "cancel_approval", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "maybe_check_delegate", + "type": 320, + "typeName": "Option<::Source>" + } + ], + "index": 14, + "docs": [ + "Cancel the prior approval for the transfer of an asset by a delegate.", + "", + "Origin must be either:", + "- the `Force` origin;", + "- `Signed` with the signer being the Admin of the asset `class`;", + "- `Signed` with the signer being the Owner of the asset `instance`;", + "", + "Arguments:", + "- `class`: The class of the asset of whose approval will be cancelled.", + "- `instance`: The instance of the asset of whose approval will be cancelled.", + "- `maybe_check_delegate`: If `Some` will ensure that the given account is the one to", + " which permission of transfer is delegated.", + "", + "Emits `ApprovalCancelled` on success.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "force_asset_status", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "owner", + "type": 151, + "typeName": "::Source" + }, + { + "name": "issuer", + "type": 151, + "typeName": "::Source" + }, + { + "name": "admin", + "type": 151, + "typeName": "::Source" + }, + { + "name": "freezer", + "type": 151, + "typeName": "::Source" + }, + { + "name": "free_holding", + "type": 35, + "typeName": "bool" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 15, + "docs": [ + "Alter the attributes of a given asset.", + "", + "Origin must be `ForceOrigin`.", + "", + "- `class`: The identifier of the asset.", + "- `owner`: The new Owner of this asset.", + "- `issuer`: The new Issuer of this asset.", + "- `admin`: The new Admin of this asset.", + "- `freezer`: The new Freezer of this asset.", + "- `free_holding`: Whether a deposit is taken for holding an instance of this asset", + " class.", + "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin", + "instructions.", + "", + "Emits `AssetStatusChanged` with the identity of the asset.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_attribute", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "maybe_instance", + "type": 93, + "typeName": "Option" + }, + { + "name": "key", + "type": 94, + "typeName": "BoundedVec" + }, + { + "name": "value", + "type": 95, + "typeName": "BoundedVec" + } + ], + "index": 16, + "docs": [ + "Set an attribute for an asset class or instance.", + "", + "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + "asset `class`.", + "", + "If the origin is Signed, then funds of signer are reserved according to the formula:", + "`MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into", + "account any already reserved funds.", + "", + "- `class`: The identifier of the asset class whose instance's metadata to set.", + "- `maybe_instance`: The identifier of the asset instance whose metadata to set.", + "- `key`: The key of the attribute.", + "- `value`: The value to which to set the attribute.", + "", + "Emits `AttributeSet`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "clear_attribute", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "maybe_instance", + "type": 93, + "typeName": "Option" + }, + { + "name": "key", + "type": 94, + "typeName": "BoundedVec" + } + ], + "index": 17, + "docs": [ + "Clear an attribute for an asset class or instance.", + "", + "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + "asset `class`.", + "", + "Any deposit is freed for the asset class owner.", + "", + "- `class`: The identifier of the asset class whose instance's metadata to clear.", + "- `maybe_instance`: The identifier of the asset instance whose metadata to clear.", + "- `key`: The key of the attribute.", + "", + "Emits `AttributeCleared`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_metadata", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + }, + { + "name": "data", + "type": 91, + "typeName": "BoundedVec" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 18, + "docs": [ + "Set the metadata for an asset instance.", + "", + "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + "asset `class`.", + "", + "If the origin is Signed, then funds of signer are reserved according to the formula:", + "`MetadataDepositBase + DepositPerByte * data.len` taking into", + "account any already reserved funds.", + "", + "- `class`: The identifier of the asset class whose instance's metadata to set.", + "- `instance`: The identifier of the asset instance whose metadata to set.", + "- `data`: The general information of this asset. Limited in length by `StringLimit`.", + "- `is_frozen`: Whether the metadata should be frozen against further changes.", + "", + "Emits `MetadataSet`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "clear_metadata", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "instance", + "type": 4, + "typeName": "T::InstanceId" + } + ], + "index": 19, + "docs": [ + "Clear the metadata for an asset instance.", + "", + "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", + "asset `instance`.", + "", + "Any deposit is freed for the asset class owner.", + "", + "- `class`: The identifier of the asset class whose instance's metadata to clear.", + "- `instance`: The identifier of the asset instance whose metadata to clear.", + "", + "Emits `MetadataCleared`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_class_metadata", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + }, + { + "name": "data", + "type": 91, + "typeName": "BoundedVec" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ], + "index": 20, + "docs": [ + "Set the metadata for an asset class.", + "", + "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", + "the asset `class`.", + "", + "If the origin is `Signed`, then funds of signer are reserved according to the formula:", + "`MetadataDepositBase + DepositPerByte * data.len` taking into", + "account any already reserved funds.", + "", + "- `class`: The identifier of the asset whose metadata to update.", + "- `data`: The general information of this asset. Limited in length by `StringLimit`.", + "- `is_frozen`: Whether the metadata should be frozen against further changes.", + "", + "Emits `ClassMetadataSet`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "clear_class_metadata", + "fields": [ + { + "name": "class", + "type": 4, + "typeName": "T::ClassId" + } + ], + "index": 21, + "docs": [ + "Clear the metadata for an asset class.", + "", + "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", + "the asset `class`.", + "", + "Any deposit is freed for the asset class owner.", + "", + "- `class`: The identifier of the asset class whose metadata to clear.", + "", + "Emits `ClassMetadataCleared`.", + "", + "Weight: `O(1)`" + ] + }, + { + "name": "set_accept_ownership", + "fields": [ + { + "name": "maybe_class", + "type": 93, + "typeName": "Option" + } + ], + "index": 22, + "docs": [ + "Set (or reset) the acceptance of ownership for a particular account.", + "", + "Origin must be `Signed` and if `maybe_class` is `Some`, then the signer must have a", + "provider reference.", + "", + "- `maybe_class`: The identifier of the asset class whose ownership the signer is willing", + " to accept, or if `None`, an indication that the signer is willing to accept no", + " ownership transferal.", + "", + "Emits `OwnershipAcceptanceChanged`." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 319, + "type": { + "path": [ + "pallet_uniques", + "types", + "DestroyWitness" + ], + "def": { + "composite": { + "fields": [ + { + "name": "instances", + "type": 113, + "typeName": "u32" + }, + { + "name": "instance_metadatas", + "type": 113, + "typeName": "u32" + }, + { + "name": "attributes", + "type": 113, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 320, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 151 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 151 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 321, + "type": { + "path": [ + "pallet_transaction_storage", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "store", + "fields": [ + { + "name": "data", + "type": 10, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Index and store data on chain. Minimum data size is 1 bytes, maximum is", + "`MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`", + "is called. # ", + "- n*log(n) of data size, as all data is pushed to an in-memory trie.", + "Additionally contains a DB write.", + "# " + ] + }, + { + "name": "renew", + "fields": [ + { + "name": "block", + "type": 4, + "typeName": "T::BlockNumber" + }, + { + "name": "index", + "type": 4, + "typeName": "u32" + } + ], + "index": 1, + "docs": [ + "Renew previously stored data. Parameters are the block number that contains", + "previous `store` or `renew` call and transaction index within that block.", + "Transaction index is emitted in the `Stored` or `Renewed` event.", + "Applies same fees as `store`.", + "# ", + "- Constant.", + "# " + ] + }, + { + "name": "check_proof", + "fields": [ + { + "name": "proof", + "type": 322, + "typeName": "TransactionStorageProof" + } + ], + "index": 2, + "docs": [ + "Check storage proof for block number `block_number() - StoragePeriod`.", + "If such block does not exist the proof is expected to be `None`.", + "# ", + "- Linear w.r.t the number of indexed transactions in the proved block for random", + " probing.", + "There's a DB read for each transaction.", + "Here we assume a maximum of 100 probed transactions.", + "# " + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 322, + "type": { + "path": [ + "sp_transaction_storage_proof", + "TransactionStorageProof" + ], + "def": { + "composite": { + "fields": [ + { + "name": "chunk", + "type": 10, + "typeName": "Vec" + }, + { + "name": "proof", + "type": 119, + "typeName": "Vec>" + } + ] + } + } + } + }, + { + "id": 323, + "type": { + "path": [ + "pallet_bags_list", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "rebag", + "fields": [ + { + "name": "dislocated", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 0, + "docs": [ + "Declare that some `dislocated` account has, through rewards or penalties, sufficiently", + "changed its score that it should properly fall into a different bag than its current", + "one.", + "", + "Anyone can call this function about any potentially dislocated account.", + "", + "Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then", + "it is a noop and fees are still collected from `origin`." + ] + }, + { + "name": "put_in_front_of", + "fields": [ + { + "name": "lighter", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 1, + "docs": [ + "Move the caller's Id directly in front of `lighter`.", + "", + "The dispatch origin for this call must be _Signed_ and can only be called by the Id of", + "the account going in front of `lighter`.", + "", + "Only works if", + "- both nodes are within the same bag,", + "- and `origin` has a greater `Score` than `lighter`." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 324, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "control_auto_migration", + "fields": [ + { + "name": "maybe_config", + "type": 325, + "typeName": "Option" + } + ], + "index": 0, + "docs": [ + "Control the automatic migration.", + "", + "The dispatch origin of this call must be [`Config::ControlOrigin`]." + ] + }, + { + "name": "continue_migrate", + "fields": [ + { + "name": "limits", + "type": 326, + "typeName": "MigrationLimits" + }, + { + "name": "real_size_upper", + "type": 4, + "typeName": "u32" + }, + { + "name": "witness_task", + "type": 327, + "typeName": "MigrationTask" + } + ], + "index": 1, + "docs": [ + "Continue the migration for the given `limits`.", + "", + "The dispatch origin of this call can be any signed account.", + "", + "This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,", + "Upon successful execution, the transaction fee is returned.", + "", + "The (potentially over-estimated) of the byte length of all the data read must be", + "provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing", + "that executing the current `MigrationTask` with the given `limits` will not exceed", + "`real_size_upper` bytes of read data.", + "", + "The `witness_task` is merely a helper to prevent the caller from being slashed or", + "generally trigger a migration that they do not intend. This parameter is just a message", + "from caller, saying that they believed `witness_task` was the last state of the", + "migration, and they only wish for their transaction to do anything, if this assumption", + "holds. In case `witness_task` does not match, the transaction fails.", + "", + "Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the", + "recommended way of doing this is to pass a `limit` that only bounds `count`, as the", + "`size` limit can always be overwritten." + ] + }, + { + "name": "migrate_custom_top", + "fields": [ + { + "name": "keys", + "type": 119, + "typeName": "Vec>" + }, + { + "name": "witness_size", + "type": 4, + "typeName": "u32" + } + ], + "index": 2, + "docs": [ + "Migrate the list of top keys by iterating each of them one by one.", + "", + "This does not affect the global migration process tracker ([`MigrationProcess`]), and", + "should only be used in case any keys are leftover due to a bug." + ] + }, + { + "name": "migrate_custom_child", + "fields": [ + { + "name": "root", + "type": 10, + "typeName": "Vec" + }, + { + "name": "child_keys", + "type": 119, + "typeName": "Vec>" + }, + { + "name": "total_size", + "type": 4, + "typeName": "u32" + } + ], + "index": 3, + "docs": [ + "Migrate the list of child keys by iterating each of them one by one.", + "", + "All of the given child keys must be present under one `child_root`.", + "", + "This does not affect the global migration process tracker ([`MigrationProcess`]), and", + "should only be used in case any keys are leftover due to a bug." + ] + }, + { + "name": "set_signed_max_limits", + "fields": [ + { + "name": "limits", + "type": 326, + "typeName": "MigrationLimits" + } + ], + "index": 4, + "docs": [ + "Set the maximum limit of the signed migration." + ] + }, + { + "name": "force_set_progress", + "fields": [ + { + "name": "progress_top", + "type": 328, + "typeName": "Progress" + }, + { + "name": "progress_child", + "type": 328, + "typeName": "Progress" + } + ], + "index": 5, + "docs": [ + "Forcefully set the progress the running migration.", + "", + "This is only useful in one case: the next key to migrate is too big to be migrated with", + "a signed account, in a parachain context, and we simply want to skip it. A reasonable", + "example of this would be `:code:`, which is both very expensive to migrate, and commonly", + "used, so probably it is already migrated.", + "", + "In case you mess things up, you can also, in principle, use this to reset the migration", + "process." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 325, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 326 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 326 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 326, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "MigrationLimits" + ], + "def": { + "composite": { + "fields": [ + { + "name": "size", + "type": 4, + "typeName": "u32" + }, + { + "name": "item", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 327, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "MigrationTask" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "progress_top", + "type": 328, + "typeName": "Progress" + }, + { + "name": "progress_child", + "type": 328, + "typeName": "Progress" + }, + { + "name": "size", + "type": 4, + "typeName": "u32" + }, + { + "name": "top_items", + "type": 4, + "typeName": "u32" + }, + { + "name": "child_items", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 328, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "Progress" + ], + "def": { + "variant": { + "variants": [ + { + "name": "ToStart", + "index": 0 + }, + { + "name": "LastKey", + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ], + "index": 1 + }, + { + "name": "Complete", + "index": 2 + } + ] + } + } + } + }, + { + "id": 329, + "type": { + "path": [ + "pallet_child_bounties", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "add_child_bounty", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "value", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "description", + "type": 10, + "typeName": "Vec" + } + ], + "index": 0, + "docs": [ + "Add a new child-bounty.", + "", + "The dispatch origin for this call must be the curator of parent", + "bounty and the parent bounty must be in \"active\" state.", + "", + "Child-bounty gets added successfully & fund gets transferred from", + "parent bounty to child-bounty account, if parent bounty has enough", + "funds, else the call fails.", + "", + "Upper bound to maximum number of active child-bounties that can be", + "added are managed via runtime trait config", + "[`Config::MaxActiveChildBountyCount`].", + "", + "If the call is success, the status of child-bounty is updated to", + "\"Added\".", + "", + "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added.", + "- `value`: Value for executing the proposal.", + "- `description`: Text description for the child-bounty." + ] + }, + { + "name": "propose_curator", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "child_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "curator", + "type": 151, + "typeName": "::Source" + }, + { + "name": "fee", + "type": 65, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "Propose curator for funded child-bounty.", + "", + "The dispatch origin for this call must be curator of parent bounty.", + "", + "Parent bounty must be in active state, for this child-bounty call to", + "work.", + "", + "Child-bounty must be in \"Added\" state, for processing the call. And", + "state of child-bounty is moved to \"CuratorProposed\" on successful", + "call completion.", + "", + "- `parent_bounty_id`: Index of parent bounty.", + "- `child_bounty_id`: Index of child bounty.", + "- `curator`: Address of child-bounty curator.", + "- `fee`: payment fee to child-bounty curator for execution." + ] + }, + { + "name": "accept_curator", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "child_bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 2, + "docs": [ + "Accept the curator role for the child-bounty.", + "", + "The dispatch origin for this call must be the curator of this", + "child-bounty.", + "", + "A deposit will be reserved from the curator and refund upon", + "successful payout or cancellation.", + "", + "Fee for curator is deducted from curator fee of parent bounty.", + "", + "Parent bounty must be in active state, for this child-bounty call to", + "work.", + "", + "Child-bounty must be in \"CuratorProposed\" state, for processing the", + "call. And state of child-bounty is moved to \"Active\" on successful", + "call completion.", + "", + "- `parent_bounty_id`: Index of parent bounty.", + "- `child_bounty_id`: Index of child bounty." + ] + }, + { + "name": "unassign_curator", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "child_bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 3, + "docs": [ + "Unassign curator from a child-bounty.", + "", + "The dispatch origin for this call can be either `RejectOrigin`, or", + "the curator of the parent bounty, or any signed origin.", + "", + "For the origin other than T::RejectOrigin and the child-bounty", + "curator, parent-bounty must be in active state, for this call to", + "work. We allow child-bounty curator and T::RejectOrigin to execute", + "this call irrespective of the parent-bounty state.", + "", + "If this function is called by the `RejectOrigin` or the", + "parent-bounty curator, we assume that the child-bounty curator is", + "malicious or inactive. As a result, child-bounty curator deposit is", + "slashed.", + "", + "If the origin is the child-bounty curator, we take this as a sign", + "that they are unable to do their job, and are willingly giving up.", + "We could slash the deposit, but for now we allow them to unreserve", + "their deposit and exit without issue. (We may want to change this if", + "it is abused.)", + "", + "Finally, the origin can be anyone iff the child-bounty curator is", + "\"inactive\". Expiry update due of parent bounty is used to estimate", + "inactive state of child-bounty curator.", + "", + "This allows anyone in the community to call out that a child-bounty", + "curator is not doing their due diligence, and we should pick a new", + "one. In this case the child-bounty curator deposit is slashed.", + "", + "State of child-bounty is moved to Added state on successful call", + "completion.", + "", + "- `parent_bounty_id`: Index of parent bounty.", + "- `child_bounty_id`: Index of child bounty." + ] + }, + { + "name": "award_child_bounty", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "child_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "beneficiary", + "type": 151, + "typeName": "::Source" + } + ], + "index": 4, + "docs": [ + "Award child-bounty to a beneficiary.", + "", + "The beneficiary will be able to claim the funds after a delay.", + "", + "The dispatch origin for this call must be the master curator or", + "curator of this child-bounty.", + "", + "Parent bounty must be in active state, for this child-bounty call to", + "work.", + "", + "Child-bounty must be in active state, for processing the call. And", + "state of child-bounty is moved to \"PendingPayout\" on successful call", + "completion.", + "", + "- `parent_bounty_id`: Index of parent bounty.", + "- `child_bounty_id`: Index of child bounty.", + "- `beneficiary`: Beneficiary account." + ] + }, + { + "name": "claim_child_bounty", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "child_bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 5, + "docs": [ + "Claim the payout from an awarded child-bounty after payout delay.", + "", + "The dispatch origin for this call may be any signed origin.", + "", + "Call works independent of parent bounty state, No need for parent", + "bounty to be in active state.", + "", + "The Beneficiary is paid out with agreed bounty value. Curator fee is", + "paid & curator deposit is unreserved.", + "", + "Child-bounty must be in \"PendingPayout\" state, for processing the", + "call. And instance of child-bounty is removed from the state on", + "successful call completion.", + "", + "- `parent_bounty_id`: Index of parent bounty.", + "- `child_bounty_id`: Index of child bounty." + ] + }, + { + "name": "close_child_bounty", + "fields": [ + { + "name": "parent_bounty_id", + "type": 113, + "typeName": "BountyIndex" + }, + { + "name": "child_bounty_id", + "type": 113, + "typeName": "BountyIndex" + } + ], + "index": 6, + "docs": [ + "Cancel a proposed or active child-bounty. Child-bounty account funds", + "are transferred to parent bounty account. The child-bounty curator", + "deposit may be unreserved if possible.", + "", + "The dispatch origin for this call must be either parent curator or", + "`T::RejectOrigin`.", + "", + "If the state of child-bounty is `Active`, curator deposit is", + "unreserved.", + "", + "If the state of child-bounty is `PendingPayout`, call fails &", + "returns `PendingPayout` error.", + "", + "For the origin other than T::RejectOrigin, parent bounty must be in", + "active state, for this child-bounty call to work. For origin", + "T::RejectOrigin execution is forced.", + "", + "Instance of child-bounty is removed from the state on successful", + "call completion.", + "", + "- `parent_bounty_id`: Index of parent bounty.", + "- `child_bounty_id`: Index of child bounty." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 330, + "type": { + "path": [ + "pallet_referenda", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "submit", + "fields": [ + { + "name": "proposal_origin", + "type": 331, + "typeName": "PalletsOriginOf" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "enactment_moment", + "type": 336, + "typeName": "DispatchTime" + } + ], + "index": 0, + "docs": [ + "Propose a referendum on a privileged action.", + "", + "- `origin`: must be `Signed` and the account must have `SubmissionDeposit` funds", + " available.", + "- `proposal_origin`: The origin from which the proposal should be executed.", + "- `proposal_hash`: The hash of the proposal preimage.", + "- `enactment_moment`: The moment that the proposal should be enacted.", + "", + "Emits `Submitted`." + ] + }, + { + "name": "place_decision_deposit", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 1, + "docs": [ + "Post the Decision Deposit for a referendum.", + "", + "- `origin`: must be `Signed` and the account must have funds available for the", + " referendum's track's Decision Deposit.", + "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be", + " posted.", + "", + "Emits `DecisionDepositPlaced`." + ] + }, + { + "name": "refund_decision_deposit", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 2, + "docs": [ + "Refund the Decision Deposit for a closed referendum back to the depositor.", + "", + "- `origin`: must be `Signed` or `Root`.", + "- `index`: The index of a closed referendum whose Decision Deposit has not yet been", + " refunded.", + "", + "Emits `DecisionDepositRefunded`." + ] + }, + { + "name": "cancel", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 3, + "docs": [ + "Cancel an ongoing referendum.", + "", + "- `origin`: must be the `CancelOrigin`.", + "- `index`: The index of the referendum to be cancelled.", + "", + "Emits `Cancelled`." + ] + }, + { + "name": "kill", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 4, + "docs": [ + "Cancel an ongoing referendum and slash the deposits.", + "", + "- `origin`: must be the `KillOrigin`.", + "- `index`: The index of the referendum to be cancelled.", + "", + "Emits `Killed` and `DepositSlashed`." + ] + }, + { + "name": "nudge_referendum", + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ReferendumIndex" + } + ], + "index": 5, + "docs": [ + "Advance a referendum onto its next logical state. Only used internally.", + "", + "- `origin`: must be `Root`.", + "- `index`: the referendum to be advanced." + ] + }, + { + "name": "one_fewer_deciding", + "fields": [ + { + "name": "track", + "type": 2, + "typeName": "TrackIdOf" + } + ], + "index": 6, + "docs": [ + "Advance a track onto its next logical state. Only used internally.", + "", + "- `origin`: must be `Root`.", + "- `track`: the track to be advanced.", + "", + "Action item for when there is now one fewer referendum in the deciding phase and the", + "`DecidingCount` is not yet updated. This means that we should either:", + "- begin deciding another referendum (and leave `DecidingCount` alone); or", + "- decrement `DecidingCount`." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 331, + "type": { + "path": [ + "node_runtime", + "OriginCaller" + ], + "def": { + "variant": { + "variants": [ + { + "name": "system", + "fields": [ + { + "type": 332, + "typeName": "frame_system::Origin" + } + ], + "index": 0 + }, + { + "name": "Council", + "fields": [ + { + "type": 333, + "typeName": "pallet_collective::Origin" + } + ], + "index": 13 + }, + { + "name": "TechnicalCommittee", + "fields": [ + { + "type": 334, + "typeName": "pallet_collective::Origin" + } + ], + "index": 14 + }, + { + "name": "Void", + "fields": [ + { + "type": 335, + "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::Void" + } + ], + "index": 3 + } + ] + } + } + } + }, + { + "id": 332, + "type": { + "path": [ + "frame_support", + "dispatch", + "RawOrigin" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Root", + "index": 0 + }, + { + "name": "Signed", + "fields": [ + { + "type": 0, + "typeName": "AccountId" + } + ], + "index": 1 + }, + { + "name": "None", + "index": 2 + } + ] + } + } + } + }, + { + "id": 333, + "type": { + "path": [ + "pallet_collective", + "RawOrigin" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Members", + "fields": [ + { + "type": 4, + "typeName": "MemberCount" + }, + { + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 0 + }, + { + "name": "Member", + "fields": [ + { + "type": 0, + "typeName": "AccountId" + } + ], + "index": 1 + }, + { + "name": "_Phantom", + "index": 2 + } + ] + } + } + } + }, + { + "id": 334, + "type": { + "path": [ + "pallet_collective", + "RawOrigin" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Members", + "fields": [ + { + "type": 4, + "typeName": "MemberCount" + }, + { + "type": 4, + "typeName": "MemberCount" + } + ], + "index": 0 + }, + { + "name": "Member", + "fields": [ + { + "type": 0, + "typeName": "AccountId" + } + ], + "index": 1 + }, + { + "name": "_Phantom", + "index": 2 + } + ] + } + } + } + }, + { + "id": 335, + "type": { + "path": [ + "sp_core", + "Void" + ], + "def": { + "variant": {} + } + } + }, + { + "id": 336, + "type": { + "path": [ + "frame_support", + "traits", + "schedule", + "DispatchTime" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "At", + "fields": [ + { + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 0 + }, + { + "name": "After", + "fields": [ + { + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 337, + "type": { + "path": [ + "pallet_conviction_voting", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "vote", + "fields": [ + { + "name": "poll_index", + "type": 113, + "typeName": "PollIndexOf" + }, + { + "name": "vote", + "type": 338, + "typeName": "AccountVote>" + } + ], + "index": 0, + "docs": [ + "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;", + "otherwise it is a vote to keep the status quo.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `poll_index`: The index of the poll to vote for.", + "- `vote`: The vote configuration.", + "", + "Weight: `O(R)` where R is the number of polls the voter has voted on." + ] + }, + { + "name": "delegate", + "fields": [ + { + "name": "class", + "type": 2, + "typeName": "ClassOf" + }, + { + "name": "to", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "conviction", + "type": 340, + "typeName": "Conviction" + }, + { + "name": "balance", + "type": 6, + "typeName": "BalanceOf" + } + ], + "index": 1, + "docs": [ + "Delegate the voting power (with some given conviction) of the sending account for a", + "particular class of polls.", + "", + "The balance delegated is locked for as long as it's delegated, and thereafter for the", + "time appropriate for the conviction's lock period.", + "", + "The dispatch origin of this call must be _Signed_, and the signing account must either:", + " - be delegating already; or", + " - have no voting activity (if there is, then it will need to be removed/consolidated", + " through `reap_vote` or `unvote`).", + "", + "- `to`: The account whose voting the `target` account's voting power will follow.", + "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls", + " to this function are required.", + "- `conviction`: The conviction that will be attached to the delegated votes. When the", + " account is undelegated, the funds will be locked for the corresponding period.", + "- `balance`: The amount of the account's balance to be used in delegating. This must not", + " be more than the account's current balance.", + "", + "Emits `Delegated`.", + "", + "Weight: `O(R)` where R is the number of polls the voter delegating to has", + " voted on. Weight is initially charged as if maximum votes, but is refunded later." + ] + }, + { + "name": "undelegate", + "fields": [ + { + "name": "class", + "type": 2, + "typeName": "ClassOf" + } + ], + "index": 2, + "docs": [ + "Undelegate the voting power of the sending account for a particular class of polls.", + "", + "Tokens may be unlocked following once an amount of time consistent with the lock period", + "of the conviction with which the delegation was issued.", + "", + "The dispatch origin of this call must be _Signed_ and the signing account must be", + "currently delegating.", + "", + "- `class`: The class of polls to remove the delegation from.", + "", + "Emits `Undelegated`.", + "", + "Weight: `O(R)` where R is the number of polls the voter delegating to has", + " voted on. Weight is initially charged as if maximum votes, but is refunded later." + ] + }, + { + "name": "unlock", + "fields": [ + { + "name": "class", + "type": 2, + "typeName": "ClassOf" + }, + { + "name": "target", + "type": 0, + "typeName": "T::AccountId" + } + ], + "index": 3, + "docs": [ + "Remove the lock caused prior voting/delegating which has expired within a particluar", + "class.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `class`: The class of polls to unlock.", + "- `target`: The account to remove the lock on.", + "", + "Weight: `O(R)` with R number of vote of target." + ] + }, + { + "name": "remove_vote", + "fields": [ + { + "name": "class", + "type": 341, + "typeName": "Option>" + }, + { + "name": "index", + "type": 4, + "typeName": "PollIndexOf" + } + ], + "index": 4, + "docs": [ + "Remove a vote for a poll.", + "", + "If:", + "- the poll was cancelled, or", + "- the poll is ongoing, or", + "- the poll has ended such that", + " - the vote of the account was in opposition to the result; or", + " - there was no conviction to the account's vote; or", + " - the account made a split vote", + "...then the vote is removed cleanly and a following call to `unlock` may result in more", + "funds being available.", + "", + "If, however, the poll has ended and:", + "- it finished corresponding to the vote of the account, and", + "- the account made a standard vote with conviction, and", + "- the lock period of the conviction is not over", + "...then the lock will be aggregated into the overall account's lock, which may involve", + "*overlocking* (where the two locks are combined into a single lock that is the maximum", + "of both the amount locked and the time is it locked for).", + "", + "The dispatch origin of this call must be _Signed_, and the signer must have a vote", + "registered for poll `index`.", + "", + "- `index`: The index of poll of the vote to be removed.", + "- `class`: Optional parameter, if given it indicates the class of the poll. For polls", + " which have finished or are cancelled, this must be `Some`.", + "", + "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + }, + { + "name": "remove_other_vote", + "fields": [ + { + "name": "target", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "class", + "type": 2, + "typeName": "ClassOf" + }, + { + "name": "index", + "type": 4, + "typeName": "PollIndexOf" + } + ], + "index": 5, + "docs": [ + "Remove a vote for a poll.", + "", + "If the `target` is equal to the signer, then this function is exactly equivalent to", + "`remove_vote`. If not equal to the signer, then the vote must have expired,", + "either because the poll was cancelled, because the voter lost the poll or", + "because the conviction period is over.", + "", + "The dispatch origin of this call must be _Signed_.", + "", + "- `target`: The account of the vote to be removed; this account must have voted for poll", + " `index`.", + "- `index`: The index of poll of the vote to be removed.", + "- `class`: The class of the poll.", + "", + "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.", + " Weight is calculated for the maximum number of vote." + ] + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 338, + "type": { + "path": [ + "pallet_conviction_voting", + "vote", + "AccountVote" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Standard", + "fields": [ + { + "name": "vote", + "type": 339, + "typeName": "Vote" + }, + { + "name": "balance", + "type": 6, + "typeName": "Balance" + } + ], + "index": 0 + }, + { + "name": "Split", + "fields": [ + { + "name": "aye", + "type": 6, + "typeName": "Balance" + }, + { + "name": "nay", + "type": 6, + "typeName": "Balance" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 339, + "type": { + "path": [ + "pallet_conviction_voting", + "vote", + "Vote" + ], + "def": { + "composite": { + "fields": [ + { + "type": 2 + } + ] + } + } + } + }, + { + "id": 340, + "type": { + "path": [ + "pallet_conviction_voting", + "conviction", + "Conviction" + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Locked1x", + "index": 1 + }, + { + "name": "Locked2x", + "index": 2 + }, + { + "name": "Locked3x", + "index": 3 + }, + { + "name": "Locked4x", + "index": 4 + }, + { + "name": "Locked5x", + "index": 5 + }, + { + "name": "Locked6x", + "index": 6 + } + ] + } + } + } + }, + { + "id": 341, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 2 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 2 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 342, + "type": { + "path": [ + "pallet_whitelist", + "pallet", + "Call" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "whitelist_call", + "fields": [ + { + "name": "call_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 0 + }, + { + "name": "remove_whitelisted_call", + "fields": [ + { + "name": "call_hash", + "type": 9, + "typeName": "T::Hash" + } + ], + "index": 1 + }, + { + "name": "dispatch_whitelisted_call", + "fields": [ + { + "name": "call_hash", + "type": 9, + "typeName": "T::Hash" + }, + { + "name": "call_weight_witness", + "type": 8, + "typeName": "Weight" + } + ], + "index": 2 + }, + { + "name": "dispatch_whitelisted_call_with_preimage", + "fields": [ + { + "name": "call", + "type": 134, + "typeName": "Box<::Call>" + } + ], + "index": 3 + } + ] + } + }, + "docs": [ + "Contains one variant per dispatchable that can be called by an extrinsic." + ] + } + }, + { + "id": 343, + "type": { + "path": [ + "pallet_utility", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "TooManyCalls", + "index": 0, + "docs": [ + "Too many calls batched." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 344, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 345 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 346, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 345, + "type": { + "def": { + "tuple": [ + 139, + 8 + ] + } + } + }, + { + "id": 346, + "type": { + "def": { + "sequence": { + "type": 345 + } + } + } + }, + { + "id": 347, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 1 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 348, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 348, + "type": { + "def": { + "sequence": { + "type": 1 + } + } + } + }, + { + "id": 349, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 1 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 1 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 350, + "type": { + "path": [ + "sp_consensus_babe", + "BabeEpochConfiguration" + ], + "def": { + "composite": { + "fields": [ + { + "name": "c", + "type": 143, + "typeName": "(u64, u64)" + }, + { + "name": "allowed_slots", + "type": 144, + "typeName": "AllowedSlots" + } + ] + } + } + } + }, + { + "id": 351, + "type": { + "path": [ + "pallet_babe", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InvalidEquivocationProof", + "index": 0, + "docs": [ + "An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "index": 1, + "docs": [ + "A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "index": 2, + "docs": [ + "A given equivocation report is valid but already previously reported." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 352, + "type": { + "def": { + "sequence": { + "type": 353 + } + } + } + }, + { + "id": 353, + "type": { + "path": [ + "pallet_authorship", + "UncleEntryItem" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Hash", + "type": 9 + }, + { + "name": "Author", + "type": 0 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InclusionHeight", + "fields": [ + { + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 0 + }, + { + "name": "Uncle", + "fields": [ + { + "type": 9, + "typeName": "Hash" + }, + { + "type": 58, + "typeName": "Option" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 354, + "type": { + "path": [ + "pallet_authorship", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InvalidUncleParent", + "index": 0, + "docs": [ + "The uncle parent not in the chain." + ] + }, + { + "name": "UnclesAlreadySet", + "index": 1, + "docs": [ + "Uncles already set in the block." + ] + }, + { + "name": "TooManyUncles", + "index": 2, + "docs": [ + "Too many uncles." + ] + }, + { + "name": "GenesisUncle", + "index": 3, + "docs": [ + "The uncle is genesis." + ] + }, + { + "name": "TooHighUncle", + "index": 4, + "docs": [ + "The uncle is too high in chain." + ] + }, + { + "name": "UncleAlreadyIncluded", + "index": 5, + "docs": [ + "The uncle is already included." + ] + }, + { + "name": "OldUncle", + "index": 6, + "docs": [ + "The uncle isn't recent enough to be included." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 355, + "type": { + "def": { + "tuple": [ + 0, + 6, + 35 + ] + } + } + }, + { + "id": 356, + "type": { + "path": [ + "pallet_indices", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotAssigned", + "index": 0, + "docs": [ + "The index was not already assigned." + ] + }, + { + "name": "NotOwner", + "index": 1, + "docs": [ + "The index is assigned to another account." + ] + }, + { + "name": "InUse", + "index": 2, + "docs": [ + "The index was not available." + ] + }, + { + "name": "NotTransfer", + "index": 3, + "docs": [ + "The source and destination accounts are identical." + ] + }, + { + "name": "Permanent", + "index": 4, + "docs": [ + "The index is permanent and may not be freed/changed." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 357, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 358 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 360, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 358, + "type": { + "path": [ + "pallet_balances", + "BalanceLock" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "id", + "type": 130, + "typeName": "LockIdentifier" + }, + { + "name": "amount", + "type": 6, + "typeName": "Balance" + }, + { + "name": "reasons", + "type": 359, + "typeName": "Reasons" + } + ] + } + } + } + }, + { + "id": 359, + "type": { + "path": [ + "pallet_balances", + "Reasons" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Fee", + "index": 0 + }, + { + "name": "Misc", + "index": 1 + }, + { + "name": "All", + "index": 2 + } + ] + } + } + } + }, + { + "id": 360, + "type": { + "def": { + "sequence": { + "type": 358 + } + } + } + }, + { + "id": 361, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 362 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 363, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 362, + "type": { + "path": [ + "pallet_balances", + "ReserveData" + ], + "params": [ + { + "name": "ReserveIdentifier", + "type": 130 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "id", + "type": 130, + "typeName": "ReserveIdentifier" + }, + { + "name": "amount", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 363, + "type": { + "def": { + "sequence": { + "type": 362 + } + } + } + }, + { + "id": 364, + "type": { + "path": [ + "pallet_balances", + "Releases" + ], + "def": { + "variant": { + "variants": [ + { + "name": "V1_0_0", + "index": 0 + }, + { + "name": "V2_0_0", + "index": 1 + } + ] + } + } + } + }, + { + "id": 365, + "type": { + "path": [ + "pallet_balances", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "VestingBalance", + "index": 0, + "docs": [ + "Vesting balance too high to send value" + ] + }, + { + "name": "LiquidityRestrictions", + "index": 1, + "docs": [ + "Account liquidity restrictions prevent withdrawal" + ] + }, + { + "name": "InsufficientBalance", + "index": 2, + "docs": [ + "Balance too low to send value" + ] + }, + { + "name": "ExistentialDeposit", + "index": 3, + "docs": [ + "Value too low to create account due to existential deposit" + ] + }, + { + "name": "KeepAlive", + "index": 4, + "docs": [ + "Transfer/payment would kill account" + ] + }, + { + "name": "ExistingVestingSchedule", + "index": 5, + "docs": [ + "A vesting schedule already exists for this account" + ] + }, + { + "name": "DeadAccount", + "index": 6, + "docs": [ + "Beneficiary account must pre-exist" + ] + }, + { + "name": "TooManyReserves", + "index": 7, + "docs": [ + "Number of named reserves exceed MaxReserves" + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 366, + "type": { + "path": [ + "sp_arithmetic", + "fixed_point", + "FixedU128" + ], + "def": { + "composite": { + "fields": [ + { + "type": 6, + "typeName": "u128" + } + ] + } + } + } + }, + { + "id": 367, + "type": { + "path": [ + "pallet_transaction_payment", + "Releases" + ], + "def": { + "variant": { + "variants": [ + { + "name": "V1Ancient", + "index": 0 + }, + { + "name": "V2", + "index": 1 + } + ] + } + } + } + }, + { + "id": 368, + "type": { + "def": { + "sequence": { + "type": 369 + } + } + } + }, + { + "id": 369, + "type": { + "path": [ + "frame_support", + "weights", + "WeightToFeeCoefficient" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "coeff_integer", + "type": 6, + "typeName": "Balance" + }, + { + "name": "coeff_frac", + "type": 116, + "typeName": "Perbill" + }, + { + "name": "negative", + "type": 35, + "typeName": "bool" + }, + { + "name": "degree", + "type": 2, + "typeName": "u8" + } + ] + } + } + } + }, + { + "id": 370, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "Phase" + ], + "params": [ + { + "name": "Bn", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Off", + "index": 0 + }, + { + "name": "Signed", + "index": 1 + }, + { + "name": "Unsigned", + "fields": [ + { + "type": 371, + "typeName": "(bool, Bn)" + } + ], + "index": 2 + }, + { + "name": "Emergency", + "index": 3 + } + ] + } + } + } + }, + { + "id": 371, + "type": { + "def": { + "tuple": [ + 35, + 4 + ] + } + } + }, + { + "id": 372, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "ReadySolution" + ], + "params": [ + { + "name": "A", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "supports", + "type": 209, + "typeName": "Supports" + }, + { + "name": "score", + "type": 206, + "typeName": "ElectionScore" + }, + { + "name": "compute", + "type": 34, + "typeName": "ElectionCompute" + } + ] + } + } + } + }, + { + "id": 373, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "RoundSnapshot" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "voters", + "type": 374, + "typeName": "Vec>" + }, + { + "name": "targets", + "type": 40, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 374, + "type": { + "def": { + "sequence": { + "type": 375 + } + } + } + }, + { + "id": 375, + "type": { + "def": { + "tuple": [ + 0, + 8, + 376 + ] + } + } + }, + { + "id": 376, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 0 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 40, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 377, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_btree_map", + "BoundedBTreeMap" + ], + "params": [ + { + "name": "K", + "type": 206 + }, + { + "name": "V", + "type": 4 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 378, + "typeName": "BTreeMap" + } + ] + } + } + } + }, + { + "id": 378, + "type": { + "path": [ + "BTreeMap" + ], + "params": [ + { + "name": "K", + "type": 206 + }, + { + "name": "V", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 379 + } + ] + } + } + } + }, + { + "id": 379, + "type": { + "def": { + "sequence": { + "type": 380 + } + } + } + }, + { + "id": 380, + "type": { + "def": { + "tuple": [ + 206, + 4 + ] + } + } + }, + { + "id": 381, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "signed", + "SignedSubmission" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "Solution", + "type": 155 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "raw_solution", + "type": 154, + "typeName": "RawSolution" + }, + { + "name": "reward", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 382, + "type": { + "path": [ + "pallet_election_provider_multi_phase", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "PreDispatchEarlySubmission", + "index": 0, + "docs": [ + "Submission was too early." + ] + }, + { + "name": "PreDispatchWrongWinnerCount", + "index": 1, + "docs": [ + "Wrong number of winners presented." + ] + }, + { + "name": "PreDispatchWeakSubmission", + "index": 2, + "docs": [ + "Submission was too weak, score-wise." + ] + }, + { + "name": "SignedQueueFull", + "index": 3, + "docs": [ + "The queue was full, and the solution was not better than any of the existing ones." + ] + }, + { + "name": "SignedCannotPayDeposit", + "index": 4, + "docs": [ + "The origin failed to pay the deposit." + ] + }, + { + "name": "SignedInvalidWitness", + "index": 5, + "docs": [ + "Witness data to dispatchable is invalid." + ] + }, + { + "name": "SignedTooMuchWeight", + "index": 6, + "docs": [ + "The signed submission consumes too much weight" + ] + }, + { + "name": "OcwCallWrongEra", + "index": 7, + "docs": [ + "OCW submitted solution for wrong round" + ] + }, + { + "name": "MissingSnapshotMetadata", + "index": 8, + "docs": [ + "Snapshot metadata should exist but didn't." + ] + }, + { + "name": "InvalidSubmissionIndex", + "index": 9, + "docs": [ + "`Self::insert_submission` returned an invalid index." + ] + }, + { + "name": "CallNotAllowed", + "index": 10, + "docs": [ + "The call is not allowed at this point." + ] + }, + { + "name": "FallbackFailed", + "index": 11, + "docs": [ + "The fallback failed" + ] + } + ] + } + }, + "docs": [ + "Error of the pallet that can be returned in response to dispatches." + ] + } + }, + { + "id": 383, + "type": { + "path": [ + "pallet_staking", + "StakingLedger" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "stash", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "total", + "type": 65, + "typeName": "Balance" + }, + { + "name": "active", + "type": 65, + "typeName": "Balance" + }, + { + "name": "unlocking", + "type": 384, + "typeName": "BoundedVec, MaxUnlockingChunks>" + }, + { + "name": "claimed_rewards", + "type": 92, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 384, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 385 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 386, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 385, + "type": { + "path": [ + "pallet_staking", + "UnlockChunk" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 65, + "typeName": "Balance" + }, + { + "name": "era", + "type": 113, + "typeName": "EraIndex" + } + ] + } + } + } + }, + { + "id": 386, + "type": { + "def": { + "sequence": { + "type": 385 + } + } + } + }, + { + "id": 387, + "type": { + "path": [ + "pallet_staking", + "Nominations" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "targets", + "type": 376, + "typeName": "BoundedVec" + }, + { + "name": "submitted_in", + "type": 4, + "typeName": "EraIndex" + }, + { + "name": "suppressed", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 388, + "type": { + "path": [ + "pallet_staking", + "ActiveEraInfo" + ], + "def": { + "composite": { + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "EraIndex" + }, + { + "name": "start", + "type": 107, + "typeName": "Option" + } + ] + } + } + } + }, + { + "id": 389, + "type": { + "def": { + "tuple": [ + 4, + 0 + ] + } + } + }, + { + "id": 390, + "type": { + "path": [ + "pallet_staking", + "EraRewardPoints" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "total", + "type": 4, + "typeName": "RewardPoint" + }, + { + "name": "individual", + "type": 391, + "typeName": "BTreeMap" + } + ] + } + } + } + }, + { + "id": 391, + "type": { + "path": [ + "BTreeMap" + ], + "params": [ + { + "name": "K", + "type": 0 + }, + { + "name": "V", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 392 + } + ] + } + } + } + }, + { + "id": 392, + "type": { + "def": { + "sequence": { + "type": 393 + } + } + } + }, + { + "id": 393, + "type": { + "def": { + "tuple": [ + 0, + 4 + ] + } + } + }, + { + "id": 394, + "type": { + "path": [ + "pallet_staking", + "Forcing" + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotForcing", + "index": 0 + }, + { + "name": "ForceNew", + "index": 1 + }, + { + "name": "ForceNone", + "index": 2 + }, + { + "name": "ForceAlways", + "index": 3 + } + ] + } + } + } + }, + { + "id": 395, + "type": { + "def": { + "sequence": { + "type": 396 + } + } + } + }, + { + "id": 396, + "type": { + "path": [ + "pallet_staking", + "UnappliedSlash" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "validator", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "own", + "type": 6, + "typeName": "Balance" + }, + { + "name": "others", + "type": 47, + "typeName": "Vec<(AccountId, Balance)>" + }, + { + "name": "reporters", + "type": 40, + "typeName": "Vec" + }, + { + "name": "payout", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 397, + "type": { + "def": { + "tuple": [ + 116, + 6 + ] + } + } + }, + { + "id": 398, + "type": { + "path": [ + "pallet_staking", + "slashing", + "SlashingSpans" + ], + "def": { + "composite": { + "fields": [ + { + "name": "span_index", + "type": 4, + "typeName": "SpanIndex" + }, + { + "name": "last_start", + "type": 4, + "typeName": "EraIndex" + }, + { + "name": "last_nonzero_slash", + "type": 4, + "typeName": "EraIndex" + }, + { + "name": "prior", + "type": 92, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 399, + "type": { + "path": [ + "pallet_staking", + "slashing", + "SpanRecord" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "slashed", + "type": 6, + "typeName": "Balance" + }, + { + "name": "paid_out", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 400, + "type": { + "def": { + "sequence": { + "type": 401 + } + } + } + }, + { + "id": 401, + "type": { + "def": { + "tuple": [ + 4, + 35 + ] + } + } + }, + { + "id": 402, + "type": { + "path": [ + "pallet_staking", + "Releases" + ], + "def": { + "variant": { + "variants": [ + { + "name": "V1_0_0Ancient", + "index": 0 + }, + { + "name": "V2_0_0", + "index": 1 + }, + { + "name": "V3_0_0", + "index": 2 + }, + { + "name": "V4_0_0", + "index": 3 + }, + { + "name": "V5_0_0", + "index": 4 + }, + { + "name": "V6_0_0", + "index": 5 + }, + { + "name": "V7_0_0", + "index": 6 + }, + { + "name": "V8_0_0", + "index": 7 + }, + { + "name": "V9_0_0", + "index": 8 + } + ] + } + } + } + }, + { + "id": 403, + "type": { + "path": [ + "pallet_staking", + "pallet", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotController", + "index": 0, + "docs": [ + "Not a controller account." + ] + }, + { + "name": "NotStash", + "index": 1, + "docs": [ + "Not a stash account." + ] + }, + { + "name": "AlreadyBonded", + "index": 2, + "docs": [ + "Stash is already bonded." + ] + }, + { + "name": "AlreadyPaired", + "index": 3, + "docs": [ + "Controller is already paired." + ] + }, + { + "name": "EmptyTargets", + "index": 4, + "docs": [ + "Targets cannot be empty." + ] + }, + { + "name": "DuplicateIndex", + "index": 5, + "docs": [ + "Duplicate index." + ] + }, + { + "name": "InvalidSlashIndex", + "index": 6, + "docs": [ + "Slash record index out of bounds." + ] + }, + { + "name": "InsufficientBond", + "index": 7, + "docs": [ + "Cannot have a validator or nominator role, with value less than the minimum defined by", + "governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the", + "intention, `chill` first to remove one's role as validator/nominator." + ] + }, + { + "name": "NoMoreChunks", + "index": 8, + "docs": [ + "Can not schedule more unlock chunks." + ] + }, + { + "name": "NoUnlockChunk", + "index": 9, + "docs": [ + "Can not rebond without unlocking chunks." + ] + }, + { + "name": "FundedTarget", + "index": 10, + "docs": [ + "Attempting to target a stash that still has funds." + ] + }, + { + "name": "InvalidEraToReward", + "index": 11, + "docs": [ + "Invalid era to reward." + ] + }, + { + "name": "InvalidNumberOfNominations", + "index": 12, + "docs": [ + "Invalid number of nominations." + ] + }, + { + "name": "NotSortedAndUnique", + "index": 13, + "docs": [ + "Items are not sorted and unique." + ] + }, + { + "name": "AlreadyClaimed", + "index": 14, + "docs": [ + "Rewards for this era have already been claimed for this validator." + ] + }, + { + "name": "IncorrectHistoryDepth", + "index": 15, + "docs": [ + "Incorrect previous history depth input provided." + ] + }, + { + "name": "IncorrectSlashingSpans", + "index": 16, + "docs": [ + "Incorrect number of slashing spans provided." + ] + }, + { + "name": "BadState", + "index": 17, + "docs": [ + "Internal state has become somehow corrupted and the operation cannot continue." + ] + }, + { + "name": "TooManyTargets", + "index": 18, + "docs": [ + "Too many nomination targets supplied." + ] + }, + { + "name": "BadTarget", + "index": 19, + "docs": [ + "A nomination target was supplied that was blocked or otherwise not a validator." + ] + }, + { + "name": "CannotChillOther", + "index": 20, + "docs": [ + "The user has enough bond and thus cannot be chilled forcefully by an external person." + ] + }, + { + "name": "TooManyNominators", + "index": 21, + "docs": [ + "There are too many nominators in the system. Governance needs to adjust the staking", + "settings to keep things safe for the runtime." + ] + }, + { + "name": "TooManyValidators", + "index": 22, + "docs": [ + "There are too many validators in the system. Governance needs to adjust the staking", + "settings to keep things safe for the runtime." + ] + }, + { + "name": "CommissionTooLow", + "index": 23, + "docs": [ + "Commission is too low. Must be at least `MinCommission`." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 404, + "type": { + "def": { + "sequence": { + "type": 405 + } + } + } + }, + { + "id": 405, + "type": { + "def": { + "tuple": [ + 0, + 223 + ] + } + } + }, + { + "id": 406, + "type": { + "def": { + "tuple": [ + 407, + 10 + ] + } + } + }, + { + "id": 407, + "type": { + "path": [ + "sp_core", + "crypto", + "KeyTypeId" + ], + "def": { + "composite": { + "fields": [ + { + "type": 14, + "typeName": "[u8; 4]" + } + ] + } + } + } + }, + { + "id": 408, + "type": { + "path": [ + "pallet_session", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InvalidProof", + "index": 0, + "docs": [ + "Invalid ownership proof." + ] + }, + { + "name": "NoAssociatedValidatorId", + "index": 1, + "docs": [ + "No associated validator ID for account." + ] + }, + { + "name": "DuplicatedKey", + "index": 2, + "docs": [ + "Registered duplicate key." + ] + }, + { + "name": "NoKeys", + "index": 3, + "docs": [ + "No keys are associated with this account." + ] + }, + { + "name": "NoAccount", + "index": 4, + "docs": [ + "Key setting account is not live, so it's impossible to associate keys." + ] + } + ] + } + }, + "docs": [ + "Error for the session pallet." + ] + } + }, + { + "id": 409, + "type": { + "def": { + "sequence": { + "type": 410 + } + } + } + }, + { + "id": 410, + "type": { + "def": { + "tuple": [ + 4, + 9, + 0 + ] + } + } + }, + { + "id": 411, + "type": { + "def": { + "tuple": [ + 40, + 6 + ] + } + } + }, + { + "id": 412, + "type": { + "path": [ + "pallet_democracy", + "PreimageStatus" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Missing", + "fields": [ + { + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 0 + }, + { + "name": "Available", + "fields": [ + { + "name": "data", + "type": 10, + "typeName": "Vec" + }, + { + "name": "provider", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "since", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "expiry", + "type": 93, + "typeName": "Option" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 413, + "type": { + "path": [ + "pallet_democracy", + "types", + "ReferendumInfo" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Hash", + "type": 9 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Ongoing", + "fields": [ + { + "type": 414, + "typeName": "ReferendumStatus" + } + ], + "index": 0 + }, + { + "name": "Finished", + "fields": [ + { + "name": "approved", + "type": 35, + "typeName": "bool" + }, + { + "name": "end", + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 414, + "type": { + "path": [ + "pallet_democracy", + "types", + "ReferendumStatus" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Hash", + "type": 9 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "end", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "Hash" + }, + { + "name": "threshold", + "type": 41, + "typeName": "VoteThreshold" + }, + { + "name": "delay", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "tally", + "type": 415, + "typeName": "Tally" + } + ] + } + } + } + }, + { + "id": 415, + "type": { + "path": [ + "pallet_democracy", + "types", + "Tally" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "ayes", + "type": 6, + "typeName": "Balance" + }, + { + "name": "nays", + "type": 6, + "typeName": "Balance" + }, + { + "name": "turnout", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 416, + "type": { + "path": [ + "pallet_democracy", + "vote", + "Voting" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Direct", + "fields": [ + { + "name": "votes", + "type": 417, + "typeName": "Vec<(ReferendumIndex, AccountVote)>" + }, + { + "name": "delegations", + "type": 419, + "typeName": "Delegations" + }, + { + "name": "prior", + "type": 420, + "typeName": "PriorLock" + } + ], + "index": 0 + }, + { + "name": "Delegating", + "fields": [ + { + "name": "balance", + "type": 6, + "typeName": "Balance" + }, + { + "name": "target", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "conviction", + "type": 226, + "typeName": "Conviction" + }, + { + "name": "delegations", + "type": 419, + "typeName": "Delegations" + }, + { + "name": "prior", + "type": 420, + "typeName": "PriorLock" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 417, + "type": { + "def": { + "sequence": { + "type": 418 + } + } + } + }, + { + "id": 418, + "type": { + "def": { + "tuple": [ + 4, + 42 + ] + } + } + }, + { + "id": 419, + "type": { + "path": [ + "pallet_democracy", + "types", + "Delegations" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "votes", + "type": 6, + "typeName": "Balance" + }, + { + "name": "capital", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 420, + "type": { + "path": [ + "pallet_democracy", + "vote", + "PriorLock" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 4, + "typeName": "BlockNumber" + }, + { + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 421, + "type": { + "def": { + "tuple": [ + 9, + 41 + ] + } + } + }, + { + "id": 422, + "type": { + "def": { + "tuple": [ + 4, + 40 + ] + } + } + }, + { + "id": 423, + "type": { + "path": [ + "pallet_democracy", + "Releases" + ], + "def": { + "variant": { + "variants": [ + { + "name": "V1", + "index": 0 + } + ] + } + } + } + }, + { + "id": 424, + "type": { + "path": [ + "pallet_democracy", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "ValueLow", + "index": 0, + "docs": [ + "Value too low" + ] + }, + { + "name": "ProposalMissing", + "index": 1, + "docs": [ + "Proposal does not exist" + ] + }, + { + "name": "AlreadyCanceled", + "index": 2, + "docs": [ + "Cannot cancel the same proposal twice" + ] + }, + { + "name": "DuplicateProposal", + "index": 3, + "docs": [ + "Proposal already made" + ] + }, + { + "name": "ProposalBlacklisted", + "index": 4, + "docs": [ + "Proposal still blacklisted" + ] + }, + { + "name": "NotSimpleMajority", + "index": 5, + "docs": [ + "Next external proposal not simple majority" + ] + }, + { + "name": "InvalidHash", + "index": 6, + "docs": [ + "Invalid hash" + ] + }, + { + "name": "NoProposal", + "index": 7, + "docs": [ + "No external proposal" + ] + }, + { + "name": "AlreadyVetoed", + "index": 8, + "docs": [ + "Identity may not veto a proposal twice" + ] + }, + { + "name": "DuplicatePreimage", + "index": 9, + "docs": [ + "Preimage already noted" + ] + }, + { + "name": "NotImminent", + "index": 10, + "docs": [ + "Not imminent" + ] + }, + { + "name": "TooEarly", + "index": 11, + "docs": [ + "Too early" + ] + }, + { + "name": "Imminent", + "index": 12, + "docs": [ + "Imminent" + ] + }, + { + "name": "PreimageMissing", + "index": 13, + "docs": [ + "Preimage not found" + ] + }, + { + "name": "ReferendumInvalid", + "index": 14, + "docs": [ + "Vote given for invalid referendum" + ] + }, + { + "name": "PreimageInvalid", + "index": 15, + "docs": [ + "Invalid preimage" + ] + }, + { + "name": "NoneWaiting", + "index": 16, + "docs": [ + "No proposals waiting" + ] + }, + { + "name": "NotVoter", + "index": 17, + "docs": [ + "The given account did not vote on the referendum." + ] + }, + { + "name": "NoPermission", + "index": 18, + "docs": [ + "The actor has no permission to conduct the action." + ] + }, + { + "name": "AlreadyDelegating", + "index": 19, + "docs": [ + "The account is already delegating." + ] + }, + { + "name": "InsufficientFunds", + "index": 20, + "docs": [ + "Too high a balance was provided that the account cannot afford." + ] + }, + { + "name": "NotDelegating", + "index": 21, + "docs": [ + "The account is not currently delegating." + ] + }, + { + "name": "VotesExist", + "index": 22, + "docs": [ + "The account currently has votes attached to it and the operation cannot succeed until", + "these are removed, either through `unvote` or `reap_vote`." + ] + }, + { + "name": "InstantNotAllowed", + "index": 23, + "docs": [ + "The instant referendum origin is currently disallowed." + ] + }, + { + "name": "Nonsense", + "index": 24, + "docs": [ + "Delegation to oneself makes no sense." + ] + }, + { + "name": "WrongUpperBound", + "index": 25, + "docs": [ + "Invalid upper bound." + ] + }, + { + "name": "MaxVotesReached", + "index": 26, + "docs": [ + "Maximum number of votes reached." + ] + }, + { + "name": "TooManyProposals", + "index": 27, + "docs": [ + "Maximum number of proposals reached." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 425, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 9 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 110, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 426, + "type": { + "path": [ + "pallet_collective", + "Votes" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "index", + "type": 4, + "typeName": "ProposalIndex" + }, + { + "name": "threshold", + "type": 4, + "typeName": "MemberCount" + }, + { + "name": "ayes", + "type": 40, + "typeName": "Vec" + }, + { + "name": "nays", + "type": 40, + "typeName": "Vec" + }, + { + "name": "end", + "type": 4, + "typeName": "BlockNumber" + } + ] + } + } + } + }, + { + "id": 427, + "type": { + "path": [ + "pallet_collective", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotMember", + "index": 0, + "docs": [ + "Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "index": 1, + "docs": [ + "Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "index": 2, + "docs": [ + "Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "index": 3, + "docs": [ + "Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "index": 4, + "docs": [ + "Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "index": 5, + "docs": [ + "Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "index": 6, + "docs": [ + "The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "index": 7, + "docs": [ + "There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "index": 8, + "docs": [ + "The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "index": 9, + "docs": [ + "The given length bound for the proposal was too low." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 428, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 9 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 110, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 429, + "type": { + "path": [ + "pallet_collective", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotMember", + "index": 0, + "docs": [ + "Account is not a member" + ] + }, + { + "name": "DuplicateProposal", + "index": 1, + "docs": [ + "Duplicate proposals not allowed" + ] + }, + { + "name": "ProposalMissing", + "index": 2, + "docs": [ + "Proposal must exist" + ] + }, + { + "name": "WrongIndex", + "index": 3, + "docs": [ + "Mismatched index" + ] + }, + { + "name": "DuplicateVote", + "index": 4, + "docs": [ + "Duplicate vote ignored" + ] + }, + { + "name": "AlreadyInitialized", + "index": 5, + "docs": [ + "Members are already initialized!" + ] + }, + { + "name": "TooEarly", + "index": 6, + "docs": [ + "The close call was made too early, before the end of the voting." + ] + }, + { + "name": "TooManyProposals", + "index": 7, + "docs": [ + "There can only be a maximum of `MaxProposals` active proposals." + ] + }, + { + "name": "WrongProposalWeight", + "index": 8, + "docs": [ + "The given weight bound for the proposal was too low." + ] + }, + { + "name": "WrongProposalLength", + "index": 9, + "docs": [ + "The given length bound for the proposal was too low." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 430, + "type": { + "def": { + "sequence": { + "type": 431 + } + } + } + }, + { + "id": 431, + "type": { + "path": [ + "pallet_elections_phragmen", + "SeatHolder" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "stake", + "type": 6, + "typeName": "Balance" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 432, + "type": { + "path": [ + "pallet_elections_phragmen", + "Voter" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "votes", + "type": 40, + "typeName": "Vec" + }, + { + "name": "stake", + "type": 6, + "typeName": "Balance" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 433, + "type": { + "path": [ + "pallet_elections_phragmen", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "UnableToVote", + "index": 0, + "docs": [ + "Cannot vote when no candidates or members exist." + ] + }, + { + "name": "NoVotes", + "index": 1, + "docs": [ + "Must vote for at least one candidate." + ] + }, + { + "name": "TooManyVotes", + "index": 2, + "docs": [ + "Cannot vote more than candidates." + ] + }, + { + "name": "MaximumVotesExceeded", + "index": 3, + "docs": [ + "Cannot vote more than maximum allowed." + ] + }, + { + "name": "LowBalance", + "index": 4, + "docs": [ + "Cannot vote with stake less than minimum balance." + ] + }, + { + "name": "UnableToPayBond", + "index": 5, + "docs": [ + "Voter can not pay voting bond." + ] + }, + { + "name": "MustBeVoter", + "index": 6, + "docs": [ + "Must be a voter." + ] + }, + { + "name": "ReportSelf", + "index": 7, + "docs": [ + "Cannot report self." + ] + }, + { + "name": "DuplicatedCandidate", + "index": 8, + "docs": [ + "Duplicated candidate submission." + ] + }, + { + "name": "MemberSubmit", + "index": 9, + "docs": [ + "Member cannot re-submit candidacy." + ] + }, + { + "name": "RunnerUpSubmit", + "index": 10, + "docs": [ + "Runner cannot re-submit candidacy." + ] + }, + { + "name": "InsufficientCandidateFunds", + "index": 11, + "docs": [ + "Candidate does not have enough funds." + ] + }, + { + "name": "NotMember", + "index": 12, + "docs": [ + "Not a member." + ] + }, + { + "name": "InvalidWitnessData", + "index": 13, + "docs": [ + "The provided count of number of candidates is incorrect." + ] + }, + { + "name": "InvalidVoteCount", + "index": 14, + "docs": [ + "The provided count of number of votes is incorrect." + ] + }, + { + "name": "InvalidRenouncing", + "index": 15, + "docs": [ + "The renouncing origin presented a wrong `Renouncing` parameter." + ] + }, + { + "name": "InvalidReplacement", + "index": 16, + "docs": [ + "Prediction regarding replacement after member removal is wrong." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 434, + "type": { + "path": [ + "pallet_membership", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "AlreadyMember", + "index": 0, + "docs": [ + "Already a member." + ] + }, + { + "name": "NotMember", + "index": 1, + "docs": [ + "Not a member." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 435, + "type": { + "path": [ + "pallet_grandpa", + "StoredState" + ], + "params": [ + { + "name": "N", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Live", + "index": 0 + }, + { + "name": "PendingPause", + "fields": [ + { + "name": "scheduled_at", + "type": 4, + "typeName": "N" + }, + { + "name": "delay", + "type": 4, + "typeName": "N" + } + ], + "index": 1 + }, + { + "name": "Paused", + "index": 2 + }, + { + "name": "PendingResume", + "fields": [ + { + "name": "scheduled_at", + "type": 4, + "typeName": "N" + }, + { + "name": "delay", + "type": 4, + "typeName": "N" + } + ], + "index": 3 + } + ] + } + } + } + }, + { + "id": 436, + "type": { + "path": [ + "pallet_grandpa", + "StoredPendingChange" + ], + "params": [ + { + "name": "N", + "type": 4 + }, + { + "name": "Limit", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "scheduled_at", + "type": 4, + "typeName": "N" + }, + { + "name": "delay", + "type": 4, + "typeName": "N" + }, + { + "name": "next_authorities", + "type": 437, + "typeName": "BoundedAuthorityList" + }, + { + "name": "forced", + "type": 93, + "typeName": "Option" + } + ] + } + } + } + }, + { + "id": 437, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 52 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 51, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 438, + "type": { + "path": [ + "pallet_grandpa", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "PauseFailed", + "index": 0, + "docs": [ + "Attempt to signal GRANDPA pause when the authority set isn't live", + "(either paused or already pending pause)." + ] + }, + { + "name": "ResumeFailed", + "index": 1, + "docs": [ + "Attempt to signal GRANDPA resume when the authority set isn't paused", + "(either live or already pending resume)." + ] + }, + { + "name": "ChangePending", + "index": 2, + "docs": [ + "Attempt to signal GRANDPA change with one already pending." + ] + }, + { + "name": "TooSoon", + "index": 3, + "docs": [ + "Cannot signal forced change so soon after last." + ] + }, + { + "name": "InvalidKeyOwnershipProof", + "index": 4, + "docs": [ + "A key ownership proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "InvalidEquivocationProof", + "index": 5, + "docs": [ + "An equivocation proof provided as part of an equivocation report is invalid." + ] + }, + { + "name": "DuplicateOffenceReport", + "index": 6, + "docs": [ + "A given equivocation report is valid but already previously reported." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 439, + "type": { + "path": [ + "pallet_treasury", + "Proposal" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "proposer", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "value", + "type": 6, + "typeName": "Balance" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "bond", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 440, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 4 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 92, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 441, + "type": { + "path": [ + "sp_arithmetic", + "per_things", + "Permill" + ], + "def": { + "composite": { + "fields": [ + { + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 442, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 6 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 443, + "type": { + "path": [ + "frame_support", + "PalletId" + ], + "def": { + "composite": { + "fields": [ + { + "type": 130, + "typeName": "[u8; 8]" + } + ] + } + } + } + }, + { + "id": 444, + "type": { + "path": [ + "pallet_treasury", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InsufficientProposersBalance", + "index": 0, + "docs": [ + "Proposer's balance is too low." + ] + }, + { + "name": "InvalidIndex", + "index": 1, + "docs": [ + "No proposal or bounty at that index." + ] + }, + { + "name": "TooManyApprovals", + "index": 2, + "docs": [ + "Too many approvals in the queue." + ] + } + ] + } + }, + "docs": [ + "Error for the treasury pallet." + ] + } + }, + { + "id": 445, + "type": { + "path": [ + "pallet_contracts", + "wasm", + "PrefabWasmModule" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "instruction_weights_version", + "type": 113, + "typeName": "u32" + }, + { + "name": "initial", + "type": 113, + "typeName": "u32" + }, + { + "name": "maximum", + "type": 113, + "typeName": "u32" + }, + { + "name": "code", + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 446, + "type": { + "path": [ + "pallet_contracts", + "wasm", + "OwnerInfo" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "owner", + "type": 0, + "typeName": "AccountIdOf" + }, + { + "name": "deposit", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "refcount", + "type": 146, + "typeName": "u64" + } + ] + } + } + } + }, + { + "id": 447, + "type": { + "path": [ + "pallet_contracts", + "storage", + "RawContractInfo" + ], + "params": [ + { + "name": "CodeHash", + "type": 9 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "trie_id", + "type": 10, + "typeName": "TrieId" + }, + { + "name": "code_hash", + "type": 9, + "typeName": "CodeHash" + }, + { + "name": "storage_deposit", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 448, + "type": { + "def": { + "sequence": { + "type": 449 + } + } + } + }, + { + "id": 449, + "type": { + "path": [ + "pallet_contracts", + "storage", + "DeletedContract" + ], + "def": { + "composite": { + "fields": [ + { + "name": "trie_id", + "type": 10, + "typeName": "TrieId" + } + ] + } + } + } + }, + { + "id": 450, + "type": { + "path": [ + "pallet_contracts", + "schedule", + "Schedule" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "limits", + "type": 451, + "typeName": "Limits" + }, + { + "name": "instruction_weights", + "type": 452, + "typeName": "InstructionWeights" + }, + { + "name": "host_fn_weights", + "type": 453, + "typeName": "HostFnWeights" + } + ] + } + } + } + }, + { + "id": 451, + "type": { + "path": [ + "pallet_contracts", + "schedule", + "Limits" + ], + "def": { + "composite": { + "fields": [ + { + "name": "event_topics", + "type": 4, + "typeName": "u32" + }, + { + "name": "stack_height", + "type": 93, + "typeName": "Option" + }, + { + "name": "globals", + "type": 4, + "typeName": "u32" + }, + { + "name": "parameters", + "type": 4, + "typeName": "u32" + }, + { + "name": "memory_pages", + "type": 4, + "typeName": "u32" + }, + { + "name": "table_size", + "type": 4, + "typeName": "u32" + }, + { + "name": "br_table_size", + "type": 4, + "typeName": "u32" + }, + { + "name": "subject_len", + "type": 4, + "typeName": "u32" + }, + { + "name": "call_depth", + "type": 4, + "typeName": "u32" + }, + { + "name": "payload_len", + "type": 4, + "typeName": "u32" + }, + { + "name": "code_len", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 452, + "type": { + "path": [ + "pallet_contracts", + "schedule", + "InstructionWeights" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "version", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64const", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64load", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64store", + "type": 4, + "typeName": "u32" + }, + { + "name": "select", + "type": 4, + "typeName": "u32" + }, + { + "name": "r#if", + "type": 4, + "typeName": "u32" + }, + { + "name": "br", + "type": 4, + "typeName": "u32" + }, + { + "name": "br_if", + "type": 4, + "typeName": "u32" + }, + { + "name": "br_table", + "type": 4, + "typeName": "u32" + }, + { + "name": "br_table_per_entry", + "type": 4, + "typeName": "u32" + }, + { + "name": "call", + "type": 4, + "typeName": "u32" + }, + { + "name": "call_indirect", + "type": 4, + "typeName": "u32" + }, + { + "name": "call_indirect_per_param", + "type": 4, + "typeName": "u32" + }, + { + "name": "local_get", + "type": 4, + "typeName": "u32" + }, + { + "name": "local_set", + "type": 4, + "typeName": "u32" + }, + { + "name": "local_tee", + "type": 4, + "typeName": "u32" + }, + { + "name": "global_get", + "type": 4, + "typeName": "u32" + }, + { + "name": "global_set", + "type": 4, + "typeName": "u32" + }, + { + "name": "memory_current", + "type": 4, + "typeName": "u32" + }, + { + "name": "memory_grow", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64clz", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64ctz", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64popcnt", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64eqz", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64extendsi32", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64extendui32", + "type": 4, + "typeName": "u32" + }, + { + "name": "i32wrapi64", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64eq", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64ne", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64lts", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64ltu", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64gts", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64gtu", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64les", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64leu", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64ges", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64geu", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64add", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64sub", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64mul", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64divs", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64divu", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64rems", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64remu", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64and", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64or", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64xor", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64shl", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64shrs", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64shru", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64rotl", + "type": 4, + "typeName": "u32" + }, + { + "name": "i64rotr", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 453, + "type": { + "path": [ + "pallet_contracts", + "schedule", + "HostFnWeights" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "caller", + "type": 8, + "typeName": "Weight" + }, + { + "name": "is_contract", + "type": 8, + "typeName": "Weight" + }, + { + "name": "code_hash", + "type": 8, + "typeName": "Weight" + }, + { + "name": "own_code_hash", + "type": 8, + "typeName": "Weight" + }, + { + "name": "caller_is_origin", + "type": 8, + "typeName": "Weight" + }, + { + "name": "address", + "type": 8, + "typeName": "Weight" + }, + { + "name": "gas_left", + "type": 8, + "typeName": "Weight" + }, + { + "name": "balance", + "type": 8, + "typeName": "Weight" + }, + { + "name": "value_transferred", + "type": 8, + "typeName": "Weight" + }, + { + "name": "minimum_balance", + "type": 8, + "typeName": "Weight" + }, + { + "name": "block_number", + "type": 8, + "typeName": "Weight" + }, + { + "name": "now", + "type": 8, + "typeName": "Weight" + }, + { + "name": "weight_to_fee", + "type": 8, + "typeName": "Weight" + }, + { + "name": "gas", + "type": 8, + "typeName": "Weight" + }, + { + "name": "input", + "type": 8, + "typeName": "Weight" + }, + { + "name": "input_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "r#return", + "type": 8, + "typeName": "Weight" + }, + { + "name": "return_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "terminate", + "type": 8, + "typeName": "Weight" + }, + { + "name": "random", + "type": 8, + "typeName": "Weight" + }, + { + "name": "deposit_event", + "type": 8, + "typeName": "Weight" + }, + { + "name": "deposit_event_per_topic", + "type": 8, + "typeName": "Weight" + }, + { + "name": "deposit_event_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "debug_message", + "type": 8, + "typeName": "Weight" + }, + { + "name": "set_storage", + "type": 8, + "typeName": "Weight" + }, + { + "name": "set_storage_per_new_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "set_storage_per_old_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "set_code_hash", + "type": 8, + "typeName": "Weight" + }, + { + "name": "clear_storage", + "type": 8, + "typeName": "Weight" + }, + { + "name": "clear_storage_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "contains_storage", + "type": 8, + "typeName": "Weight" + }, + { + "name": "contains_storage_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "get_storage", + "type": 8, + "typeName": "Weight" + }, + { + "name": "get_storage_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "take_storage", + "type": 8, + "typeName": "Weight" + }, + { + "name": "take_storage_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "transfer", + "type": 8, + "typeName": "Weight" + }, + { + "name": "call", + "type": 8, + "typeName": "Weight" + }, + { + "name": "delegate_call", + "type": 8, + "typeName": "Weight" + }, + { + "name": "call_transfer_surcharge", + "type": 8, + "typeName": "Weight" + }, + { + "name": "call_per_cloned_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "instantiate", + "type": 8, + "typeName": "Weight" + }, + { + "name": "instantiate_transfer_surcharge", + "type": 8, + "typeName": "Weight" + }, + { + "name": "instantiate_per_salt_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_sha2_256", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_sha2_256_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_keccak_256", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_keccak_256_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_blake2_256", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_blake2_256_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_blake2_128", + "type": 8, + "typeName": "Weight" + }, + { + "name": "hash_blake2_128_per_byte", + "type": 8, + "typeName": "Weight" + }, + { + "name": "ecdsa_recover", + "type": 8, + "typeName": "Weight" + } + ] + } + } + } + }, + { + "id": 454, + "type": { + "path": [ + "pallet_contracts", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InvalidScheduleVersion", + "index": 0, + "docs": [ + "A new schedule must have a greater version than the current one." + ] + }, + { + "name": "InvalidCallFlags", + "index": 1, + "docs": [ + "Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`." + ] + }, + { + "name": "OutOfGas", + "index": 2, + "docs": [ + "The executed contract exhausted its gas limit." + ] + }, + { + "name": "OutputBufferTooSmall", + "index": 3, + "docs": [ + "The output buffer supplied to a contract API call was too small." + ] + }, + { + "name": "TransferFailed", + "index": 4, + "docs": [ + "Performing the requested transfer failed. Probably because there isn't enough", + "free balance in the sender's account." + ] + }, + { + "name": "MaxCallDepthReached", + "index": 5, + "docs": [ + "Performing a call was denied because the calling depth reached the limit", + "of what is specified in the schedule." + ] + }, + { + "name": "ContractNotFound", + "index": 6, + "docs": [ + "No contract was found at the specified address." + ] + }, + { + "name": "CodeTooLarge", + "index": 7, + "docs": [ + "The code supplied to `instantiate_with_code` exceeds the limit specified in the", + "current schedule." + ] + }, + { + "name": "CodeNotFound", + "index": 8, + "docs": [ + "No code could be found at the supplied code hash." + ] + }, + { + "name": "OutOfBounds", + "index": 9, + "docs": [ + "A buffer outside of sandbox memory was passed to a contract API function." + ] + }, + { + "name": "DecodingFailed", + "index": 10, + "docs": [ + "Input passed to a contract API function failed to decode as expected type." + ] + }, + { + "name": "ContractTrapped", + "index": 11, + "docs": [ + "Contract trapped during execution." + ] + }, + { + "name": "ValueTooLarge", + "index": 12, + "docs": [ + "The size defined in `T::MaxValueSize` was exceeded." + ] + }, + { + "name": "TerminatedWhileReentrant", + "index": 13, + "docs": [ + "Termination of a contract is not allowed while the contract is already", + "on the call stack. Can be triggered by `seal_terminate`." + ] + }, + { + "name": "InputForwarded", + "index": 14, + "docs": [ + "`seal_call` forwarded this contracts input. It therefore is no longer available." + ] + }, + { + "name": "RandomSubjectTooLong", + "index": 15, + "docs": [ + "The subject passed to `seal_random` exceeds the limit." + ] + }, + { + "name": "TooManyTopics", + "index": 16, + "docs": [ + "The amount of topics passed to `seal_deposit_events` exceeds the limit." + ] + }, + { + "name": "DuplicateTopics", + "index": 17, + "docs": [ + "The topics passed to `seal_deposit_events` contains at least one duplicate." + ] + }, + { + "name": "NoChainExtension", + "index": 18, + "docs": [ + "The chain does not provide a chain extension. Calling the chain extension results", + "in this error. Note that this usually shouldn't happen as deploying such contracts", + "is rejected." + ] + }, + { + "name": "DeletionQueueFull", + "index": 19, + "docs": [ + "Removal of a contract failed because the deletion queue is full.", + "", + "This can happen when calling `seal_terminate`.", + "The queue is filled by deleting contracts and emptied by a fixed amount each block.", + "Trying again during another block is the only way to resolve this issue." + ] + }, + { + "name": "DuplicateContract", + "index": 20, + "docs": [ + "A contract with the same AccountId already exists." + ] + }, + { + "name": "TerminatedInConstructor", + "index": 21, + "docs": [ + "A contract self destructed in its constructor.", + "", + "This can be triggered by a call to `seal_terminate`." + ] + }, + { + "name": "DebugMessageInvalidUTF8", + "index": 22, + "docs": [ + "The debug message specified to `seal_debug_message` does contain invalid UTF-8." + ] + }, + { + "name": "ReentranceDenied", + "index": 23, + "docs": [ + "A call tried to invoke a contract that is flagged as non-reentrant." + ] + }, + { + "name": "StorageDepositNotEnoughFunds", + "index": 24, + "docs": [ + "Origin doesn't have enough balance to pay the required storage deposits." + ] + }, + { + "name": "StorageDepositLimitExhausted", + "index": 25, + "docs": [ + "More storage was created than allowed by the storage deposit limit." + ] + }, + { + "name": "CodeInUse", + "index": 26, + "docs": [ + "Code removal was denied because the code is still in use by at least one contract." + ] + }, + { + "name": "ContractReverted", + "index": 27, + "docs": [ + "The contract ran to completion but decided to revert its storage changes.", + "Please note that this error is only returned from extrinsics. When called directly", + "or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags", + "to determine whether a reversion has taken place." + ] + }, + { + "name": "CodeRejected", + "index": 28, + "docs": [ + "The contract's code was found to be invalid during validation or instrumentation.", + "A more detailed error can be found on the node console if debug messages are enabled", + "or in the debug buffer which is returned to RPC clients." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 455, + "type": { + "path": [ + "pallet_sudo", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "RequireSudo", + "index": 0, + "docs": [ + "Sender must be the Sudo account" + ] + } + ] + } + }, + "docs": [ + "Error for the Sudo pallet" + ] + } + }, + { + "id": 456, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 60 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 457, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 457, + "type": { + "def": { + "sequence": { + "type": 60 + } + } + } + }, + { + "id": 458, + "type": { + "path": [ + "frame_support", + "traits", + "misc", + "WrapperOpaque" + ], + "params": [ + { + "name": "T", + "type": 459 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 113 + }, + { + "type": 459, + "typeName": "T" + } + ] + } + } + } + }, + { + "id": 459, + "type": { + "path": [ + "pallet_im_online", + "BoundedOpaqueNetworkState" + ], + "params": [ + { + "name": "PeerIdEncodingLimit", + "type": null + }, + { + "name": "MultiAddrEncodingLimit", + "type": null + }, + { + "name": "AddressesLimit", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "peer_id", + "type": 460, + "typeName": "WeakBoundedVec" + }, + { + "name": "external_addresses", + "type": 461, + "typeName": "WeakBoundedVec, AddressesLimit\n>" + } + ] + } + } + } + }, + { + "id": 460, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 2 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 461, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 460 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 462, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 462, + "type": { + "def": { + "sequence": { + "type": 460 + } + } + } + }, + { + "id": 463, + "type": { + "path": [ + "pallet_im_online", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InvalidKey", + "index": 0, + "docs": [ + "Non existent public key." + ] + }, + { + "name": "DuplicatedHeartbeat", + "index": 1, + "docs": [ + "Duplicated heartbeat." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 464, + "type": { + "path": [ + "frame_support", + "storage", + "weak_bounded_vec", + "WeakBoundedVec" + ], + "params": [ + { + "name": "T", + "type": 224 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 465, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 465, + "type": { + "def": { + "sequence": { + "type": 224 + } + } + } + }, + { + "id": 466, + "type": { + "path": [ + "sp_staking", + "offence", + "OffenceDetails" + ], + "params": [ + { + "name": "Reporter", + "type": 0 + }, + { + "name": "Offender", + "type": 63 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "offender", + "type": 63, + "typeName": "Offender" + }, + { + "name": "reporters", + "type": 40, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 467, + "type": { + "def": { + "tuple": [ + 69, + 10 + ] + } + } + }, + { + "id": 468, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 9 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 110, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 469, + "type": { + "path": [ + "pallet_identity", + "types", + "Registration" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "MaxJudgements", + "type": null + }, + { + "name": "MaxAdditionalFields", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "judgements", + "type": 470, + "typeName": "BoundedVec<(RegistrarIndex, Judgement), MaxJudgements>" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "info", + "type": 257, + "typeName": "IdentityInfo" + } + ] + } + } + } + }, + { + "id": 470, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 471 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 472, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 471, + "type": { + "def": { + "tuple": [ + 4, + 295 + ] + } + } + }, + { + "id": 472, + "type": { + "def": { + "sequence": { + "type": 471 + } + } + } + }, + { + "id": 473, + "type": { + "def": { + "tuple": [ + 6, + 474 + ] + } + } + }, + { + "id": 474, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 0 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 40, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 475, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 476 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 478, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 476, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 477 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 477 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 477, + "type": { + "path": [ + "pallet_identity", + "types", + "RegistrarInfo" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "account", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "fee", + "type": 6, + "typeName": "Balance" + }, + { + "name": "fields", + "type": 293, + "typeName": "IdentityFields" + } + ] + } + } + } + }, + { + "id": 478, + "type": { + "def": { + "sequence": { + "type": 476 + } + } + } + }, + { + "id": 479, + "type": { + "path": [ + "pallet_identity", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "TooManySubAccounts", + "index": 0, + "docs": [ + "Too many subs-accounts." + ] + }, + { + "name": "NotFound", + "index": 1, + "docs": [ + "Account isn't found." + ] + }, + { + "name": "NotNamed", + "index": 2, + "docs": [ + "Account isn't named." + ] + }, + { + "name": "EmptyIndex", + "index": 3, + "docs": [ + "Empty index." + ] + }, + { + "name": "FeeChanged", + "index": 4, + "docs": [ + "Fee is changed." + ] + }, + { + "name": "NoIdentity", + "index": 5, + "docs": [ + "No identity found." + ] + }, + { + "name": "StickyJudgement", + "index": 6, + "docs": [ + "Sticky judgement." + ] + }, + { + "name": "JudgementGiven", + "index": 7, + "docs": [ + "Judgement given." + ] + }, + { + "name": "InvalidJudgement", + "index": 8, + "docs": [ + "Invalid judgement." + ] + }, + { + "name": "InvalidIndex", + "index": 9, + "docs": [ + "The index is invalid." + ] + }, + { + "name": "InvalidTarget", + "index": 10, + "docs": [ + "The target is invalid." + ] + }, + { + "name": "TooManyFields", + "index": 11, + "docs": [ + "Too many additional fields." + ] + }, + { + "name": "TooManyRegistrars", + "index": 12, + "docs": [ + "Maximum amount of registrars reached. Cannot add any more." + ] + }, + { + "name": "AlreadyClaimed", + "index": 13, + "docs": [ + "Account ID is already named." + ] + }, + { + "name": "NotSub", + "index": 14, + "docs": [ + "Sender is not a sub-account." + ] + }, + { + "name": "NotOwned", + "index": 15, + "docs": [ + "Sub-account isn't owned by sender." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 480, + "type": { + "def": { + "sequence": { + "type": 481 + } + } + } + }, + { + "id": 481, + "type": { + "path": [ + "pallet_society", + "Bid" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "kind", + "type": 482, + "typeName": "BidKind" + }, + { + "name": "value", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 482, + "type": { + "path": [ + "pallet_society", + "BidKind" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Deposit", + "fields": [ + { + "type": 6, + "typeName": "Balance" + } + ], + "index": 0 + }, + { + "name": "Vouch", + "fields": [ + { + "type": 0, + "typeName": "AccountId" + }, + { + "type": 6, + "typeName": "Balance" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 483, + "type": { + "def": { + "tuple": [ + 6, + 482 + ] + } + } + }, + { + "id": 484, + "type": { + "path": [ + "pallet_society", + "VouchingStatus" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Vouching", + "index": 0 + }, + { + "name": "Banned", + "index": 1 + } + ] + } + } + } + }, + { + "id": 485, + "type": { + "def": { + "sequence": { + "type": 486 + } + } + } + }, + { + "id": 486, + "type": { + "def": { + "tuple": [ + 4, + 6 + ] + } + } + }, + { + "id": 487, + "type": { + "def": { + "tuple": [ + 0, + 0 + ] + } + } + }, + { + "id": 488, + "type": { + "path": [ + "pallet_society", + "Vote" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Skeptic", + "index": 0 + }, + { + "name": "Reject", + "index": 1 + }, + { + "name": "Approve", + "index": 2 + } + ] + } + } + } + }, + { + "id": 489, + "type": { + "path": [ + "pallet_society", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "BadPosition", + "index": 0, + "docs": [ + "An incorrect position was provided." + ] + }, + { + "name": "NotMember", + "index": 1, + "docs": [ + "User is not a member." + ] + }, + { + "name": "AlreadyMember", + "index": 2, + "docs": [ + "User is already a member." + ] + }, + { + "name": "Suspended", + "index": 3, + "docs": [ + "User is suspended." + ] + }, + { + "name": "NotSuspended", + "index": 4, + "docs": [ + "User is not suspended." + ] + }, + { + "name": "NoPayout", + "index": 5, + "docs": [ + "Nothing to payout." + ] + }, + { + "name": "AlreadyFounded", + "index": 6, + "docs": [ + "Society already founded." + ] + }, + { + "name": "InsufficientPot", + "index": 7, + "docs": [ + "Not enough in pot to accept candidate." + ] + }, + { + "name": "AlreadyVouching", + "index": 8, + "docs": [ + "Member is already vouching or banned from vouching again." + ] + }, + { + "name": "NotVouching", + "index": 9, + "docs": [ + "Member is not vouching." + ] + }, + { + "name": "Head", + "index": 10, + "docs": [ + "Cannot remove the head of the chain." + ] + }, + { + "name": "Founder", + "index": 11, + "docs": [ + "Cannot remove the founder." + ] + }, + { + "name": "AlreadyBid", + "index": 12, + "docs": [ + "User has already made a bid." + ] + }, + { + "name": "AlreadyCandidate", + "index": 13, + "docs": [ + "User is already a candidate." + ] + }, + { + "name": "NotCandidate", + "index": 14, + "docs": [ + "User is not a candidate." + ] + }, + { + "name": "MaxMembers", + "index": 15, + "docs": [ + "Too many members in the society." + ] + }, + { + "name": "NotFounder", + "index": 16, + "docs": [ + "The caller is not the founder." + ] + }, + { + "name": "NotHead", + "index": 17, + "docs": [ + "The caller is not the head." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 490, + "type": { + "path": [ + "pallet_recovery", + "RecoveryConfig" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "Friends", + "type": 491 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "delay_period", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "friends", + "type": 491, + "typeName": "Friends" + }, + { + "name": "threshold", + "type": 81, + "typeName": "u16" + } + ] + } + } + } + }, + { + "id": 491, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 0 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 40, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 492, + "type": { + "path": [ + "pallet_recovery", + "ActiveRecovery" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "Friends", + "type": 491 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "created", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "friends", + "type": 491, + "typeName": "Friends" + } + ] + } + } + } + }, + { + "id": 493, + "type": { + "path": [ + "pallet_recovery", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotAllowed", + "index": 0, + "docs": [ + "User is not allowed to make a call on behalf of this account" + ] + }, + { + "name": "ZeroThreshold", + "index": 1, + "docs": [ + "Threshold must be greater than zero" + ] + }, + { + "name": "NotEnoughFriends", + "index": 2, + "docs": [ + "Friends list must be greater than zero and threshold" + ] + }, + { + "name": "MaxFriends", + "index": 3, + "docs": [ + "Friends list must be less than max friends" + ] + }, + { + "name": "NotSorted", + "index": 4, + "docs": [ + "Friends list must be sorted and free of duplicates" + ] + }, + { + "name": "NotRecoverable", + "index": 5, + "docs": [ + "This account is not set up for recovery" + ] + }, + { + "name": "AlreadyRecoverable", + "index": 6, + "docs": [ + "This account is already set up for recovery" + ] + }, + { + "name": "AlreadyStarted", + "index": 7, + "docs": [ + "A recovery process has already started for this account" + ] + }, + { + "name": "NotStarted", + "index": 8, + "docs": [ + "A recovery process has not started for this rescuer" + ] + }, + { + "name": "NotFriend", + "index": 9, + "docs": [ + "This account is not a friend who can vouch" + ] + }, + { + "name": "DelayPeriod", + "index": 10, + "docs": [ + "The friend must wait until the delay period to vouch for this recovery" + ] + }, + { + "name": "AlreadyVouched", + "index": 11, + "docs": [ + "This user has already vouched for this recovery" + ] + }, + { + "name": "Threshold", + "index": 12, + "docs": [ + "The threshold for recovering this account has not been met" + ] + }, + { + "name": "StillActive", + "index": 13, + "docs": [ + "There are still active recovery attempts that need to be closed" + ] + }, + { + "name": "AlreadyProxy", + "index": 14, + "docs": [ + "This account is already set up for recovery" + ] + }, + { + "name": "BadState", + "index": 15, + "docs": [ + "Some internal state is broken." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 494, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 300 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 495, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 495, + "type": { + "def": { + "sequence": { + "type": 300 + } + } + } + }, + { + "id": 496, + "type": { + "path": [ + "pallet_vesting", + "Releases" + ], + "def": { + "variant": { + "variants": [ + { + "name": "V0", + "index": 0 + }, + { + "name": "V1", + "index": 1 + } + ] + } + } + } + }, + { + "id": 497, + "type": { + "path": [ + "pallet_vesting", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotVesting", + "index": 0, + "docs": [ + "The account given is not vesting." + ] + }, + { + "name": "AtMaxVestingSchedules", + "index": 1, + "docs": [ + "The account already has `MaxVestingSchedules` count of schedules and thus", + "cannot add another one. Consider merging existing schedules in order to add another." + ] + }, + { + "name": "AmountLow", + "index": 2, + "docs": [ + "Amount being transferred is too low to create a vesting schedule." + ] + }, + { + "name": "ScheduleIndexOutOfBounds", + "index": 3, + "docs": [ + "An index was out of bounds of the vesting schedules." + ] + }, + { + "name": "InvalidScheduleParams", + "index": 4, + "docs": [ + "Failed to create a new schedule because some parameter was invalid." + ] + } + ] + } + }, + "docs": [ + "Error for the vesting pallet." + ] + } + }, + { + "id": 498, + "type": { + "def": { + "sequence": { + "type": 499 + } + } + } + }, + { + "id": 499, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 500 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 500 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 500, + "type": { + "path": [ + "pallet_scheduler", + "ScheduledV3" + ], + "params": [ + { + "name": "Call", + "type": 303 + }, + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "PalletsOrigin", + "type": 331 + }, + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "maybe_id", + "type": 76, + "typeName": "Option>" + }, + { + "name": "priority", + "type": 2, + "typeName": "schedule::Priority" + }, + { + "name": "call", + "type": 303, + "typeName": "Call" + }, + { + "name": "maybe_periodic", + "type": 302, + "typeName": "Option>" + }, + { + "name": "origin", + "type": 331, + "typeName": "PalletsOrigin" + } + ] + } + } + } + }, + { + "id": 501, + "type": { + "path": [ + "pallet_scheduler", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "FailedToSchedule", + "index": 0, + "docs": [ + "Failed to schedule a call" + ] + }, + { + "name": "NotFound", + "index": 1, + "docs": [ + "Cannot find the scheduled call." + ] + }, + { + "name": "TargetBlockNumberInPast", + "index": 2, + "docs": [ + "Given target block number is in the past." + ] + }, + { + "name": "RescheduleNoChange", + "index": 3, + "docs": [ + "Reschedule failed because it does not change scheduled time." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 502, + "type": { + "path": [ + "pallet_preimage", + "RequestStatus" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Unrequested", + "fields": [ + { + "type": 503, + "typeName": "Option<(AccountId, Balance)>" + } + ], + "index": 0 + }, + { + "name": "Requested", + "fields": [ + { + "type": 4, + "typeName": "u32" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 503, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 48 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 48 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 504, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 2 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 505, + "type": { + "path": [ + "pallet_preimage", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "TooLarge", + "index": 0, + "docs": [ + "Preimage is too large to store on-chain." + ] + }, + { + "name": "AlreadyNoted", + "index": 1, + "docs": [ + "Preimage has already been noted on-chain." + ] + }, + { + "name": "NotAuthorized", + "index": 2, + "docs": [ + "The user is not authorized to perform this action." + ] + }, + { + "name": "NotNoted", + "index": 3, + "docs": [ + "The preimage cannot be removed since it has not yet been noted." + ] + }, + { + "name": "Requested", + "index": 4, + "docs": [ + "A preimage may not be removed when there are outstanding requests." + ] + }, + { + "name": "NotRequested", + "index": 5, + "docs": [ + "The preimage request cannot be removed since no outstanding requests exist." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 506, + "type": { + "def": { + "tuple": [ + 507, + 6 + ] + } + } + }, + { + "id": 507, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 508 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 509, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 508, + "type": { + "path": [ + "pallet_proxy", + "ProxyDefinition" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "ProxyType", + "type": 80 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "delegate", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "proxy_type", + "type": 80, + "typeName": "ProxyType" + }, + { + "name": "delay", + "type": 4, + "typeName": "BlockNumber" + } + ] + } + } + } + }, + { + "id": 509, + "type": { + "def": { + "sequence": { + "type": 508 + } + } + } + }, + { + "id": 510, + "type": { + "def": { + "tuple": [ + 511, + 6 + ] + } + } + }, + { + "id": 511, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 512 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 513, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 512, + "type": { + "path": [ + "pallet_proxy", + "Announcement" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Hash", + "type": 9 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "real", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "call_hash", + "type": 9, + "typeName": "Hash" + }, + { + "name": "height", + "type": 4, + "typeName": "BlockNumber" + } + ] + } + } + } + }, + { + "id": 513, + "type": { + "def": { + "sequence": { + "type": 512 + } + } + } + }, + { + "id": 514, + "type": { + "path": [ + "pallet_proxy", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "TooMany", + "index": 0, + "docs": [ + "There are too many proxies registered or too many announcements pending." + ] + }, + { + "name": "NotFound", + "index": 1, + "docs": [ + "Proxy registration not found." + ] + }, + { + "name": "NotProxy", + "index": 2, + "docs": [ + "Sender is not a proxy of the account to be proxied." + ] + }, + { + "name": "Unproxyable", + "index": 3, + "docs": [ + "A call which is incompatible with the proxy type's filter was attempted." + ] + }, + { + "name": "Duplicate", + "index": 4, + "docs": [ + "Account is already a proxy." + ] + }, + { + "name": "NoPermission", + "index": 5, + "docs": [ + "Call may not be made by proxy because it may escalate its privileges." + ] + }, + { + "name": "Unannounced", + "index": 6, + "docs": [ + "Announcement, if made at all, was made too recently." + ] + }, + { + "name": "NoSelfProxy", + "index": 7, + "docs": [ + "Cannot add self as proxy." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 515, + "type": { + "def": { + "tuple": [ + 0, + 1 + ] + } + } + }, + { + "id": 516, + "type": { + "path": [ + "pallet_multisig", + "Multisig" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "when", + "type": 83, + "typeName": "Timepoint" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "depositor", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "approvals", + "type": 40, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 517, + "type": { + "def": { + "tuple": [ + 309, + 0, + 6 + ] + } + } + }, + { + "id": 518, + "type": { + "path": [ + "pallet_multisig", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "MinimumThreshold", + "index": 0, + "docs": [ + "Threshold must be 2 or greater." + ] + }, + { + "name": "AlreadyApproved", + "index": 1, + "docs": [ + "Call is already approved by this signatory." + ] + }, + { + "name": "NoApprovalsNeeded", + "index": 2, + "docs": [ + "Call doesn't need any (more) approvals." + ] + }, + { + "name": "TooFewSignatories", + "index": 3, + "docs": [ + "There are too few signatories in the list." + ] + }, + { + "name": "TooManySignatories", + "index": 4, + "docs": [ + "There are too many signatories in the list." + ] + }, + { + "name": "SignatoriesOutOfOrder", + "index": 5, + "docs": [ + "The signatories were provided out of order; they should be ordered." + ] + }, + { + "name": "SenderInSignatories", + "index": 6, + "docs": [ + "The sender was contained in the other signatories; it shouldn't be." + ] + }, + { + "name": "NotFound", + "index": 7, + "docs": [ + "Multisig operation not found when attempting to cancel." + ] + }, + { + "name": "NotOwner", + "index": 8, + "docs": [ + "Only the account that originally created the multisig is able to cancel it." + ] + }, + { + "name": "NoTimepoint", + "index": 9, + "docs": [ + "No timepoint was given, yet the multisig operation is already underway." + ] + }, + { + "name": "WrongTimepoint", + "index": 10, + "docs": [ + "A different timepoint was given to the multisig operation that is underway." + ] + }, + { + "name": "UnexpectedTimepoint", + "index": 11, + "docs": [ + "A timepoint was given, yet no multisig operation is underway." + ] + }, + { + "name": "MaxWeightTooLow", + "index": 12, + "docs": [ + "The maximum weight information provided was too low." + ] + }, + { + "name": "AlreadyStored", + "index": 13, + "docs": [ + "The data to be stored is already stored." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 519, + "type": { + "path": [ + "pallet_bounties", + "Bounty" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "proposer", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "value", + "type": 6, + "typeName": "Balance" + }, + { + "name": "fee", + "type": 6, + "typeName": "Balance" + }, + { + "name": "curator_deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "bond", + "type": 6, + "typeName": "Balance" + }, + { + "name": "status", + "type": 520, + "typeName": "BountyStatus" + } + ] + } + } + } + }, + { + "id": 520, + "type": { + "path": [ + "pallet_bounties", + "BountyStatus" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Proposed", + "index": 0 + }, + { + "name": "Approved", + "index": 1 + }, + { + "name": "Funded", + "index": 2 + }, + { + "name": "CuratorProposed", + "fields": [ + { + "name": "curator", + "type": 0, + "typeName": "AccountId" + } + ], + "index": 3 + }, + { + "name": "Active", + "fields": [ + { + "name": "curator", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "update_due", + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 4 + }, + { + "name": "PendingPayout", + "fields": [ + { + "name": "curator", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "unlock_at", + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 5 + } + ] + } + } + } + }, + { + "id": 521, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 2 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 522, + "type": { + "path": [ + "pallet_bounties", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InsufficientProposersBalance", + "index": 0, + "docs": [ + "Proposer's balance is too low." + ] + }, + { + "name": "InvalidIndex", + "index": 1, + "docs": [ + "No proposal or bounty at that index." + ] + }, + { + "name": "ReasonTooBig", + "index": 2, + "docs": [ + "The reason given is just too big." + ] + }, + { + "name": "UnexpectedStatus", + "index": 3, + "docs": [ + "The bounty status is unexpected." + ] + }, + { + "name": "RequireCurator", + "index": 4, + "docs": [ + "Require bounty curator." + ] + }, + { + "name": "InvalidValue", + "index": 5, + "docs": [ + "Invalid bounty value." + ] + }, + { + "name": "InvalidFee", + "index": 6, + "docs": [ + "Invalid bounty fee." + ] + }, + { + "name": "PendingPayout", + "index": 7, + "docs": [ + "A bounty payout is pending.", + "To cancel the bounty, you must unassign and slash the curator." + ] + }, + { + "name": "Premature", + "index": 8, + "docs": [ + "The bounties cannot be claimed/closed because it's still in the countdown period." + ] + }, + { + "name": "HasActiveChildBounty", + "index": 9, + "docs": [ + "The bounty cannot be closed because it has active child-bounties." + ] + }, + { + "name": "TooManyQueued", + "index": 10, + "docs": [ + "Too many approvals are already queued." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 523, + "type": { + "path": [ + "pallet_tips", + "OpenTip" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Hash", + "type": 9 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "reason", + "type": 9, + "typeName": "Hash" + }, + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "finder", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "closes", + "type": 93, + "typeName": "Option" + }, + { + "name": "tips", + "type": 47, + "typeName": "Vec<(AccountId, Balance)>" + }, + { + "name": "finders_fee", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 524, + "type": { + "path": [ + "pallet_tips", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "ReasonTooBig", + "index": 0, + "docs": [ + "The reason given is just too big." + ] + }, + { + "name": "AlreadyKnown", + "index": 1, + "docs": [ + "The tip was already found/started." + ] + }, + { + "name": "UnknownTip", + "index": 2, + "docs": [ + "The tip hash is unknown." + ] + }, + { + "name": "NotFinder", + "index": 3, + "docs": [ + "The account attempting to retract the tip is not the finder of the tip." + ] + }, + { + "name": "StillOpen", + "index": 4, + "docs": [ + "The tip cannot be claimed/closed because there are not enough tippers yet." + ] + }, + { + "name": "Premature", + "index": 5, + "docs": [ + "The tip cannot be claimed/closed because it's still in the countdown period." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 525, + "type": { + "path": [ + "pallet_assets", + "types", + "AssetDetails" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "DepositBalance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "owner", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "issuer", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "admin", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "freezer", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "supply", + "type": 6, + "typeName": "Balance" + }, + { + "name": "deposit", + "type": 6, + "typeName": "DepositBalance" + }, + { + "name": "min_balance", + "type": 6, + "typeName": "Balance" + }, + { + "name": "is_sufficient", + "type": 35, + "typeName": "bool" + }, + { + "name": "accounts", + "type": 4, + "typeName": "u32" + }, + { + "name": "sufficients", + "type": 4, + "typeName": "u32" + }, + { + "name": "approvals", + "type": 4, + "typeName": "u32" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 526, + "type": { + "path": [ + "pallet_assets", + "types", + "AssetAccount" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "DepositBalance", + "type": 6 + }, + { + "name": "Extra", + "type": 29 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "balance", + "type": 6, + "typeName": "Balance" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + }, + { + "name": "reason", + "type": 527, + "typeName": "ExistenceReason" + }, + { + "name": "extra", + "type": 29, + "typeName": "Extra" + } + ] + } + } + } + }, + { + "id": 527, + "type": { + "path": [ + "pallet_assets", + "types", + "ExistenceReason" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Consumer", + "index": 0 + }, + { + "name": "Sufficient", + "index": 1 + }, + { + "name": "DepositHeld", + "fields": [ + { + "type": 6, + "typeName": "Balance" + } + ], + "index": 2 + }, + { + "name": "DepositRefunded", + "index": 3 + } + ] + } + } + } + }, + { + "id": 528, + "type": { + "def": { + "tuple": [ + 4, + 0, + 0 + ] + } + } + }, + { + "id": 529, + "type": { + "path": [ + "pallet_assets", + "types", + "Approval" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "DepositBalance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "amount", + "type": 6, + "typeName": "Balance" + }, + { + "name": "deposit", + "type": 6, + "typeName": "DepositBalance" + } + ] + } + } + } + }, + { + "id": 530, + "type": { + "path": [ + "pallet_assets", + "types", + "AssetMetadata" + ], + "params": [ + { + "name": "DepositBalance", + "type": 6 + }, + { + "name": "BoundedString", + "type": 91 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "deposit", + "type": 6, + "typeName": "DepositBalance" + }, + { + "name": "name", + "type": 91, + "typeName": "BoundedString" + }, + { + "name": "symbol", + "type": 91, + "typeName": "BoundedString" + }, + { + "name": "decimals", + "type": 2, + "typeName": "u8" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 531, + "type": { + "path": [ + "pallet_assets", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "BalanceLow", + "index": 0, + "docs": [ + "Account balance must be greater than or equal to the transfer amount." + ] + }, + { + "name": "NoAccount", + "index": 1, + "docs": [ + "The account to alter does not exist." + ] + }, + { + "name": "NoPermission", + "index": 2, + "docs": [ + "The signing account has no permission to do the operation." + ] + }, + { + "name": "Unknown", + "index": 3, + "docs": [ + "The given asset ID is unknown." + ] + }, + { + "name": "Frozen", + "index": 4, + "docs": [ + "The origin account is frozen." + ] + }, + { + "name": "InUse", + "index": 5, + "docs": [ + "The asset ID is already taken." + ] + }, + { + "name": "BadWitness", + "index": 6, + "docs": [ + "Invalid witness data given." + ] + }, + { + "name": "MinBalanceZero", + "index": 7, + "docs": [ + "Minimum balance should be non-zero." + ] + }, + { + "name": "NoProvider", + "index": 8, + "docs": [ + "Unable to increment the consumer reference counters on the account. Either no provider", + "reference exists to allow a non-zero balance of a non-self-sufficient asset, or the", + "maximum number of consumers has been reached." + ] + }, + { + "name": "BadMetadata", + "index": 9, + "docs": [ + "Invalid metadata given." + ] + }, + { + "name": "Unapproved", + "index": 10, + "docs": [ + "No approval exists that would allow the transfer." + ] + }, + { + "name": "WouldDie", + "index": 11, + "docs": [ + "The source account would not survive the transfer and it needs to stay alive." + ] + }, + { + "name": "AlreadyExists", + "index": 12, + "docs": [ + "The asset-account already exists." + ] + }, + { + "name": "NoDeposit", + "index": 13, + "docs": [ + "The asset-account doesn't have an associated deposit." + ] + }, + { + "name": "WouldBurn", + "index": 14, + "docs": [ + "The operation would result in funds being burned." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 532, + "type": { + "path": [ + "pallet_lottery", + "LotteryConfig" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "price", + "type": 6, + "typeName": "Balance" + }, + { + "name": "start", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "length", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "delay", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "repeat", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 533, + "type": { + "def": { + "tuple": [ + 4, + 534 + ] + } + } + }, + { + "id": 534, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 88 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 535, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 535, + "type": { + "def": { + "sequence": { + "type": 88 + } + } + } + }, + { + "id": 536, + "type": { + "path": [ + "pallet_lottery", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotConfigured", + "index": 0, + "docs": [ + "A lottery has not been configured." + ] + }, + { + "name": "InProgress", + "index": 1, + "docs": [ + "A lottery is already in progress." + ] + }, + { + "name": "AlreadyEnded", + "index": 2, + "docs": [ + "A lottery has already ended." + ] + }, + { + "name": "InvalidCall", + "index": 3, + "docs": [ + "The call is not valid for an open lottery." + ] + }, + { + "name": "AlreadyParticipating", + "index": 4, + "docs": [ + "You are already participating in the lottery with this call." + ] + }, + { + "name": "TooManyCalls", + "index": 5, + "docs": [ + "Too many calls for a single lottery." + ] + }, + { + "name": "EncodingFailed", + "index": 6, + "docs": [ + "Failed to encode calls" + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 537, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 486 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 485, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 538, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 539 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 540, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 539, + "type": { + "path": [ + "pallet_gilt", + "pallet", + "GiltBid" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "amount", + "type": 6, + "typeName": "Balance" + }, + { + "name": "who", + "type": 0, + "typeName": "AccountId" + } + ] + } + } + } + }, + { + "id": 540, + "type": { + "def": { + "sequence": { + "type": 539 + } + } + } + }, + { + "id": 541, + "type": { + "path": [ + "pallet_gilt", + "pallet", + "ActiveGiltsTotal" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "frozen", + "type": 6, + "typeName": "Balance" + }, + { + "name": "proportion", + "type": 317, + "typeName": "Perquintill" + }, + { + "name": "index", + "type": 4, + "typeName": "ActiveIndex" + }, + { + "name": "target", + "type": 317, + "typeName": "Perquintill" + } + ] + } + } + } + }, + { + "id": 542, + "type": { + "path": [ + "pallet_gilt", + "pallet", + "ActiveGilt" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "proportion", + "type": 317, + "typeName": "Perquintill" + }, + { + "name": "amount", + "type": 6, + "typeName": "Balance" + }, + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "expiry", + "type": 4, + "typeName": "BlockNumber" + } + ] + } + } + } + }, + { + "id": 543, + "type": { + "path": [ + "pallet_gilt", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "DurationTooSmall", + "index": 0, + "docs": [ + "The duration of the bid is less than one." + ] + }, + { + "name": "DurationTooBig", + "index": 1, + "docs": [ + "The duration is the bid is greater than the number of queues." + ] + }, + { + "name": "AmountTooSmall", + "index": 2, + "docs": [ + "The amount of the bid is less than the minimum allowed." + ] + }, + { + "name": "BidTooLow", + "index": 3, + "docs": [ + "The queue for the bid's duration is full and the amount bid is too low to get in", + "through replacing an existing bid." + ] + }, + { + "name": "Unknown", + "index": 4, + "docs": [ + "Gilt index is unknown." + ] + }, + { + "name": "NotOwner", + "index": 5, + "docs": [ + "Not the owner of the gilt." + ] + }, + { + "name": "NotExpired", + "index": 6, + "docs": [ + "Gilt not yet at expiry date." + ] + }, + { + "name": "NotFound", + "index": 7, + "docs": [ + "The given bid for retraction is not found." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 544, + "type": { + "path": [ + "pallet_uniques", + "types", + "ClassDetails" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "DepositBalance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "owner", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "issuer", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "admin", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "freezer", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "total_deposit", + "type": 6, + "typeName": "DepositBalance" + }, + { + "name": "free_holding", + "type": 35, + "typeName": "bool" + }, + { + "name": "instances", + "type": 4, + "typeName": "u32" + }, + { + "name": "instance_metadatas", + "type": 4, + "typeName": "u32" + }, + { + "name": "attributes", + "type": 4, + "typeName": "u32" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 545, + "type": { + "def": { + "tuple": [ + 0, + 4, + 4 + ] + } + } + }, + { + "id": 546, + "type": { + "path": [ + "pallet_uniques", + "types", + "InstanceDetails" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "DepositBalance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "owner", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "approved", + "type": 58, + "typeName": "Option" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + }, + { + "name": "deposit", + "type": 6, + "typeName": "DepositBalance" + } + ] + } + } + } + }, + { + "id": 547, + "type": { + "path": [ + "pallet_uniques", + "types", + "ClassMetadata" + ], + "params": [ + { + "name": "DepositBalance", + "type": 6 + }, + { + "name": "StringLimit", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "deposit", + "type": 6, + "typeName": "DepositBalance" + }, + { + "name": "data", + "type": 91, + "typeName": "BoundedVec" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 548, + "type": { + "path": [ + "pallet_uniques", + "types", + "InstanceMetadata" + ], + "params": [ + { + "name": "DepositBalance", + "type": 6 + }, + { + "name": "StringLimit", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "deposit", + "type": 6, + "typeName": "DepositBalance" + }, + { + "name": "data", + "type": 91, + "typeName": "BoundedVec" + }, + { + "name": "is_frozen", + "type": 35, + "typeName": "bool" + } + ] + } + } + } + }, + { + "id": 549, + "type": { + "def": { + "tuple": [ + 4, + 93, + 94 + ] + } + } + }, + { + "id": 550, + "type": { + "def": { + "tuple": [ + 95, + 6 + ] + } + } + }, + { + "id": 551, + "type": { + "path": [ + "pallet_uniques", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NoPermission", + "index": 0, + "docs": [ + "The signing account has no permission to do the operation." + ] + }, + { + "name": "UnknownClass", + "index": 1, + "docs": [ + "The given asset ID is unknown." + ] + }, + { + "name": "AlreadyExists", + "index": 2, + "docs": [ + "The asset instance ID has already been used for an asset." + ] + }, + { + "name": "WrongOwner", + "index": 3, + "docs": [ + "The owner turned out to be different to what was expected." + ] + }, + { + "name": "BadWitness", + "index": 4, + "docs": [ + "Invalid witness data given." + ] + }, + { + "name": "InUse", + "index": 5, + "docs": [ + "The asset ID is already taken." + ] + }, + { + "name": "Frozen", + "index": 6, + "docs": [ + "The asset instance or class is frozen." + ] + }, + { + "name": "WrongDelegate", + "index": 7, + "docs": [ + "The delegate turned out to be different to what was expected." + ] + }, + { + "name": "NoDelegate", + "index": 8, + "docs": [ + "There is no delegate approved." + ] + }, + { + "name": "Unapproved", + "index": 9, + "docs": [ + "No approval exists that would allow the transfer." + ] + }, + { + "name": "Unaccepted", + "index": 10, + "docs": [ + "The named owner has not signed ownership of the class is acceptable." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 552, + "type": { + "def": { + "sequence": { + "type": 553 + } + } + } + }, + { + "id": 553, + "type": { + "path": [ + "pallet_transaction_storage", + "TransactionInfo" + ], + "def": { + "composite": { + "fields": [ + { + "name": "chunk_root", + "type": 9, + "typeName": "::Output" + }, + { + "name": "content_hash", + "type": 9, + "typeName": "::Output" + }, + { + "name": "size", + "type": 4, + "typeName": "u32" + }, + { + "name": "block_chunks", + "type": 4, + "typeName": "u32" + } + ] + } + } + } + }, + { + "id": 554, + "type": { + "path": [ + "pallet_transaction_storage", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "InsufficientFunds", + "index": 0, + "docs": [ + "Insufficient account balance." + ] + }, + { + "name": "NotConfigured", + "index": 1, + "docs": [ + "Invalid configuration." + ] + }, + { + "name": "RenewedNotFound", + "index": 2, + "docs": [ + "Renewed extrinsic is not found." + ] + }, + { + "name": "EmptyTransaction", + "index": 3, + "docs": [ + "Attempting to store empty transaction" + ] + }, + { + "name": "UnexpectedProof", + "index": 4, + "docs": [ + "Proof was not expected in this block." + ] + }, + { + "name": "InvalidProof", + "index": 5, + "docs": [ + "Proof failed verification." + ] + }, + { + "name": "MissingProof", + "index": 6, + "docs": [ + "Missing storage proof." + ] + }, + { + "name": "MissingStateData", + "index": 7, + "docs": [ + "Unable to verify proof becasue state data is missing." + ] + }, + { + "name": "DoubleCheck", + "index": 8, + "docs": [ + "Double proof check in the block." + ] + }, + { + "name": "ProofNotChecked", + "index": 9, + "docs": [ + "Storage proof was not checked in the block." + ] + }, + { + "name": "TransactionTooLarge", + "index": 10, + "docs": [ + "Transaction is too large." + ] + }, + { + "name": "TooManyTransactions", + "index": 11, + "docs": [ + "Too many transactions in the block." + ] + }, + { + "name": "BadContext", + "index": 12, + "docs": [ + "Attempted to call `store` outside of block execution." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 555, + "type": { + "path": [ + "pallet_bags_list", + "list", + "Node" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "id", + "type": 0, + "typeName": "T::AccountId" + }, + { + "name": "prev", + "type": 58, + "typeName": "Option" + }, + { + "name": "next", + "type": 58, + "typeName": "Option" + }, + { + "name": "bag_upper", + "type": 8, + "typeName": "T::Score" + } + ] + } + } + } + }, + { + "id": 556, + "type": { + "path": [ + "pallet_bags_list", + "list", + "Bag" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "head", + "type": 58, + "typeName": "Option" + }, + { + "name": "tail", + "type": 58, + "typeName": "Option" + } + ] + } + } + } + }, + { + "id": 557, + "type": { + "def": { + "sequence": { + "type": 8 + } + } + } + }, + { + "id": 558, + "type": { + "path": [ + "pallet_bags_list", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotInSameBag", + "index": 0, + "docs": [ + "Attempted to place node in front of a node in another bag." + ] + }, + { + "name": "IdNotFound", + "index": 1, + "docs": [ + "Id not found in list." + ] + }, + { + "name": "NotHeavier", + "index": 2, + "docs": [ + "An Id does not have a greater score than another Id." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 559, + "type": { + "path": [ + "pallet_state_trie_migration", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "MaxSignedLimits", + "index": 0, + "docs": [ + "max signed limits not respected." + ] + }, + { + "name": "NotEnoughFunds", + "index": 1, + "docs": [ + "submitter does not have enough funds." + ] + }, + { + "name": "BadWitness", + "index": 2, + "docs": [ + "bad witness data provided." + ] + }, + { + "name": "SizeUpperBoundExceeded", + "index": 3, + "docs": [ + "upper bound of size is exceeded," + ] + }, + { + "name": "SignedMigrationNotAllowed", + "index": 4, + "docs": [ + "Signed migration is not allowed because the maximum limit is not set yet." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 560, + "type": { + "path": [ + "pallet_child_bounties", + "ChildBounty" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "parent_bounty", + "type": 4, + "typeName": "BountyIndex" + }, + { + "name": "value", + "type": 6, + "typeName": "Balance" + }, + { + "name": "fee", + "type": 6, + "typeName": "Balance" + }, + { + "name": "curator_deposit", + "type": 6, + "typeName": "Balance" + }, + { + "name": "status", + "type": 561, + "typeName": "ChildBountyStatus" + } + ] + } + } + } + }, + { + "id": 561, + "type": { + "path": [ + "pallet_child_bounties", + "ChildBountyStatus" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Added", + "index": 0 + }, + { + "name": "CuratorProposed", + "fields": [ + { + "name": "curator", + "type": 0, + "typeName": "AccountId" + } + ], + "index": 1 + }, + { + "name": "Active", + "fields": [ + { + "name": "curator", + "type": 0, + "typeName": "AccountId" + } + ], + "index": 2 + }, + { + "name": "PendingPayout", + "fields": [ + { + "name": "curator", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "beneficiary", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "unlock_at", + "type": 4, + "typeName": "BlockNumber" + } + ], + "index": 3 + } + ] + } + } + } + }, + { + "id": 562, + "type": { + "path": [ + "pallet_child_bounties", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "ParentBountyNotActive", + "index": 0, + "docs": [ + "The parent bounty is not in active state." + ] + }, + { + "name": "InsufficientBountyBalance", + "index": 1, + "docs": [ + "The bounty balance is not enough to add new child-bounty." + ] + }, + { + "name": "TooManyChildBounties", + "index": 2, + "docs": [ + "Number of child-bounties exceeds limit `MaxActiveChildBountyCount`." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 563, + "type": { + "path": [ + "pallet_referenda", + "types", + "ReferendumInfo" + ], + "params": [ + { + "name": "TrackId", + "type": 2 + }, + { + "name": "Origin", + "type": 331 + }, + { + "name": "Moment", + "type": 4 + }, + { + "name": "Hash", + "type": 9 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "Tally", + "type": 102 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "ScheduleAddress", + "type": 75 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Ongoing", + "fields": [ + { + "type": 564, + "typeName": "ReferendumStatus" + } + ], + "index": 0 + }, + { + "name": "Approved", + "fields": [ + { + "type": 4, + "typeName": "Moment" + }, + { + "type": 565, + "typeName": "Deposit" + }, + { + "type": 566, + "typeName": "Option>" + } + ], + "index": 1 + }, + { + "name": "Rejected", + "fields": [ + { + "type": 4, + "typeName": "Moment" + }, + { + "type": 565, + "typeName": "Deposit" + }, + { + "type": 566, + "typeName": "Option>" + } + ], + "index": 2 + }, + { + "name": "Cancelled", + "fields": [ + { + "type": 4, + "typeName": "Moment" + }, + { + "type": 565, + "typeName": "Deposit" + }, + { + "type": 566, + "typeName": "Option>" + } + ], + "index": 3 + }, + { + "name": "TimedOut", + "fields": [ + { + "type": 4, + "typeName": "Moment" + }, + { + "type": 565, + "typeName": "Deposit" + }, + { + "type": 566, + "typeName": "Option>" + } + ], + "index": 4 + }, + { + "name": "Killed", + "fields": [ + { + "type": 4, + "typeName": "Moment" + } + ], + "index": 5 + } + ] + } + } + } + }, + { + "id": 564, + "type": { + "path": [ + "pallet_referenda", + "types", + "ReferendumStatus" + ], + "params": [ + { + "name": "TrackId", + "type": 2 + }, + { + "name": "Origin", + "type": 331 + }, + { + "name": "Moment", + "type": 4 + }, + { + "name": "Hash", + "type": 9 + }, + { + "name": "Balance", + "type": 6 + }, + { + "name": "Tally", + "type": 102 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "ScheduleAddress", + "type": 75 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "track", + "type": 2, + "typeName": "TrackId" + }, + { + "name": "origin", + "type": 331, + "typeName": "Origin" + }, + { + "name": "proposal_hash", + "type": 9, + "typeName": "Hash" + }, + { + "name": "enactment", + "type": 336, + "typeName": "DispatchTime" + }, + { + "name": "submitted", + "type": 4, + "typeName": "Moment" + }, + { + "name": "submission_deposit", + "type": 565, + "typeName": "Deposit" + }, + { + "name": "decision_deposit", + "type": 566, + "typeName": "Option>" + }, + { + "name": "deciding", + "type": 567, + "typeName": "Option>" + }, + { + "name": "tally", + "type": 102, + "typeName": "Tally" + }, + { + "name": "in_queue", + "type": 35, + "typeName": "bool" + }, + { + "name": "alarm", + "type": 569, + "typeName": "Option<(Moment, ScheduleAddress)>" + } + ] + } + } + } + }, + { + "id": 565, + "type": { + "path": [ + "pallet_referenda", + "types", + "Deposit" + ], + "params": [ + { + "name": "AccountId", + "type": 0 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "who", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "amount", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 566, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 565 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 565 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 567, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 568 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 568 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 568, + "type": { + "path": [ + "pallet_referenda", + "types", + "DecidingStatus" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "since", + "type": 4, + "typeName": "BlockNumber" + }, + { + "name": "confirming", + "type": 93, + "typeName": "Option" + } + ] + } + } + } + }, + { + "id": 569, + "type": { + "path": [ + "Option" + ], + "params": [ + { + "name": "T", + "type": 570 + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "None", + "index": 0 + }, + { + "name": "Some", + "fields": [ + { + "type": 570 + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 570, + "type": { + "def": { + "tuple": [ + 4, + 75 + ] + } + } + }, + { + "id": 571, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 486 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 485, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 572, + "type": { + "path": [ + "pallet_referenda", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotOngoing", + "index": 0, + "docs": [ + "Referendum is not ongoing." + ] + }, + { + "name": "HasDeposit", + "index": 1, + "docs": [ + "Referendum's decision deposit is already paid." + ] + }, + { + "name": "BadTrack", + "index": 2, + "docs": [ + "The track identifier given was invalid." + ] + }, + { + "name": "Full", + "index": 3, + "docs": [ + "There are already a full complement of referendums in progress for this track." + ] + }, + { + "name": "QueueEmpty", + "index": 4, + "docs": [ + "The queue of the track is empty." + ] + }, + { + "name": "BadReferendum", + "index": 5, + "docs": [ + "The referendum index provided is invalid in this context." + ] + }, + { + "name": "NothingToDo", + "index": 6, + "docs": [ + "There was nothing to do in the advancement." + ] + }, + { + "name": "NoTrack", + "index": 7, + "docs": [ + "No track exists for the proposal origin." + ] + }, + { + "name": "Unfinished", + "index": 8, + "docs": [ + "Any deposit cannot be refunded until after the decision is over." + ] + }, + { + "name": "NoPermission", + "index": 9, + "docs": [ + "The deposit refunder is not the depositor." + ] + }, + { + "name": "NoDeposit", + "index": 10, + "docs": [ + "The deposit cannot be refunded since none was made." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 573, + "type": { + "def": { + "tuple": [ + 0, + 2 + ] + } + } + }, + { + "id": 574, + "type": { + "path": [ + "pallet_conviction_voting", + "vote", + "Voting" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "PollIndex", + "type": 4 + }, + { + "name": "MaxVotes", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "Casting", + "fields": [ + { + "type": 575, + "typeName": "Casting" + } + ], + "index": 0 + }, + { + "name": "Delegating", + "fields": [ + { + "type": 581, + "typeName": "Delegating" + } + ], + "index": 1 + } + ] + } + } + } + }, + { + "id": 575, + "type": { + "path": [ + "pallet_conviction_voting", + "vote", + "Casting" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "PollIndex", + "type": 4 + }, + { + "name": "MaxVotes", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "votes", + "type": 576, + "typeName": "BoundedVec<(PollIndex, AccountVote), MaxVotes>" + }, + { + "name": "delegations", + "type": 579, + "typeName": "Delegations" + }, + { + "name": "prior", + "type": 580, + "typeName": "PriorLock" + } + ] + } + } + } + }, + { + "id": 576, + "type": { + "path": [ + "frame_support", + "storage", + "bounded_vec", + "BoundedVec" + ], + "params": [ + { + "name": "T", + "type": 577 + }, + { + "name": "S", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 578, + "typeName": "Vec" + } + ] + } + } + } + }, + { + "id": 577, + "type": { + "def": { + "tuple": [ + 4, + 338 + ] + } + } + }, + { + "id": 578, + "type": { + "def": { + "sequence": { + "type": 577 + } + } + } + }, + { + "id": 579, + "type": { + "path": [ + "pallet_conviction_voting", + "types", + "Delegations" + ], + "params": [ + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "votes", + "type": 6, + "typeName": "Balance" + }, + { + "name": "capital", + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 580, + "type": { + "path": [ + "pallet_conviction_voting", + "vote", + "PriorLock" + ], + "params": [ + { + "name": "BlockNumber", + "type": 4 + }, + { + "name": "Balance", + "type": 6 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 4, + "typeName": "BlockNumber" + }, + { + "type": 6, + "typeName": "Balance" + } + ] + } + } + } + }, + { + "id": 581, + "type": { + "path": [ + "pallet_conviction_voting", + "vote", + "Delegating" + ], + "params": [ + { + "name": "Balance", + "type": 6 + }, + { + "name": "AccountId", + "type": 0 + }, + { + "name": "BlockNumber", + "type": 4 + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "balance", + "type": 6, + "typeName": "Balance" + }, + { + "name": "target", + "type": 0, + "typeName": "AccountId" + }, + { + "name": "conviction", + "type": 340, + "typeName": "Conviction" + }, + { + "name": "delegations", + "type": 579, + "typeName": "Delegations" + }, + { + "name": "prior", + "type": 580, + "typeName": "PriorLock" + } + ] + } + } + } + }, + { + "id": 582, + "type": { + "def": { + "sequence": { + "type": 583 + } + } + } + }, + { + "id": 583, + "type": { + "def": { + "tuple": [ + 2, + 6 + ] + } + } + }, + { + "id": 584, + "type": { + "path": [ + "pallet_conviction_voting", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + }, + { + "name": "I", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "NotOngoing", + "index": 0, + "docs": [ + "Poll is not ongoing." + ] + }, + { + "name": "NotVoter", + "index": 1, + "docs": [ + "The given account did not vote on the poll." + ] + }, + { + "name": "NoPermission", + "index": 2, + "docs": [ + "The actor has no permission to conduct the action." + ] + }, + { + "name": "NoPermissionYet", + "index": 3, + "docs": [ + "The actor has no permission to conduct the action right now but will do in the future." + ] + }, + { + "name": "AlreadyDelegating", + "index": 4, + "docs": [ + "The account is already delegating." + ] + }, + { + "name": "AlreadyVoting", + "index": 5, + "docs": [ + "The account currently has votes attached to it and the operation cannot succeed until", + "these are removed, either through `unvote` or `reap_vote`." + ] + }, + { + "name": "InsufficientFunds", + "index": 6, + "docs": [ + "Too high a balance was provided that the account cannot afford." + ] + }, + { + "name": "NotDelegating", + "index": 7, + "docs": [ + "The account is not currently delegating." + ] + }, + { + "name": "Nonsense", + "index": 8, + "docs": [ + "Delegation to oneself makes no sense." + ] + }, + { + "name": "MaxVotesReached", + "index": 9, + "docs": [ + "Maximum number of votes reached." + ] + }, + { + "name": "ClassNeeded", + "index": 10, + "docs": [ + "The class must be supplied since it is not easily determinable from the state." + ] + }, + { + "name": "BadClass", + "index": 11, + "docs": [ + "The class ID supplied is invalid." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 585, + "type": { + "path": [ + "pallet_whitelist", + "pallet", + "Error" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "variant": { + "variants": [ + { + "name": "UnavailablePreImage", + "index": 0, + "docs": [ + "The preimage of the call hash could not be loaded." + ] + }, + { + "name": "UndecodableCall", + "index": 1, + "docs": [ + "The call could not be decoded." + ] + }, + { + "name": "InvalidCallWeightWitness", + "index": 2, + "docs": [ + "The weight of the decoded call was higher than the witness." + ] + }, + { + "name": "CallIsNotWhitelisted", + "index": 3, + "docs": [ + "The call was not whitelisted." + ] + }, + { + "name": "CallAlreadyWhitelisted", + "index": 4, + "docs": [ + "The call was already whitelisted; No-Op." + ] + } + ] + } + }, + "docs": [ + "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" + ] + } + }, + { + "id": 586, + "type": { + "path": [ + "sp_runtime", + "generic", + "unchecked_extrinsic", + "UncheckedExtrinsic" + ], + "params": [ + { + "name": "Address", + "type": 151 + }, + { + "name": "Call", + "type": 134 + }, + { + "name": "Signature", + "type": 587 + }, + { + "name": "Extra", + "type": 590 + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 10 + } + ] + } + } + } + }, + { + "id": 587, + "type": { + "path": [ + "sp_runtime", + "MultiSignature" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Ed25519", + "fields": [ + { + "type": 238, + "typeName": "ed25519::Signature" + } + ], + "index": 0 + }, + { + "name": "Sr25519", + "fields": [ + { + "type": 255, + "typeName": "sr25519::Signature" + } + ], + "index": 1 + }, + { + "name": "Ecdsa", + "fields": [ + { + "type": 588, + "typeName": "ecdsa::Signature" + } + ], + "index": 2 + } + ] + } + } + } + }, + { + "id": 588, + "type": { + "path": [ + "sp_core", + "ecdsa", + "Signature" + ], + "def": { + "composite": { + "fields": [ + { + "type": 589, + "typeName": "[u8; 65]" + } + ] + } + } + } + }, + { + "id": 589, + "type": { + "def": { + "array": { + "len": 65, + "type": 2 + } + } + } + }, + { + "id": 590, + "type": { + "def": { + "tuple": [ + 591, + 592, + 593, + 594, + 595, + 597, + 598, + 599 + ] + } + } + }, + { + "id": 591, + "type": { + "path": [ + "frame_system", + "extensions", + "check_non_zero_sender", + "CheckNonZeroSender" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": {} + } + } + }, + { + "id": 592, + "type": { + "path": [ + "frame_system", + "extensions", + "check_spec_version", + "CheckSpecVersion" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": {} + } + } + }, + { + "id": 593, + "type": { + "path": [ + "frame_system", + "extensions", + "check_tx_version", + "CheckTxVersion" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": {} + } + } + }, + { + "id": 594, + "type": { + "path": [ + "frame_system", + "extensions", + "check_genesis", + "CheckGenesis" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": {} + } + } + }, + { + "id": 595, + "type": { + "path": [ + "frame_system", + "extensions", + "check_mortality", + "CheckMortality" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 596, + "typeName": "Era" + } + ] + } + } + } + }, + { + "id": 596, + "type": { + "path": [ + "sp_runtime", + "generic", + "era", + "Era" + ], + "def": { + "variant": { + "variants": [ + { + "name": "Immortal", + "index": 0 + }, + { + "name": "Mortal1", + "fields": [ + { + "type": 2 + } + ], + "index": 1 + }, + { + "name": "Mortal2", + "fields": [ + { + "type": 2 + } + ], + "index": 2 + }, + { + "name": "Mortal3", + "fields": [ + { + "type": 2 + } + ], + "index": 3 + }, + { + "name": "Mortal4", + "fields": [ + { + "type": 2 + } + ], + "index": 4 + }, + { + "name": "Mortal5", + "fields": [ + { + "type": 2 + } + ], + "index": 5 + }, + { + "name": "Mortal6", + "fields": [ + { + "type": 2 + } + ], + "index": 6 + }, + { + "name": "Mortal7", + "fields": [ + { + "type": 2 + } + ], + "index": 7 + }, + { + "name": "Mortal8", + "fields": [ + { + "type": 2 + } + ], + "index": 8 + }, + { + "name": "Mortal9", + "fields": [ + { + "type": 2 + } + ], + "index": 9 + }, + { + "name": "Mortal10", + "fields": [ + { + "type": 2 + } + ], + "index": 10 + }, + { + "name": "Mortal11", + "fields": [ + { + "type": 2 + } + ], + "index": 11 + }, + { + "name": "Mortal12", + "fields": [ + { + "type": 2 + } + ], + "index": 12 + }, + { + "name": "Mortal13", + "fields": [ + { + "type": 2 + } + ], + "index": 13 + }, + { + "name": "Mortal14", + "fields": [ + { + "type": 2 + } + ], + "index": 14 + }, + { + "name": "Mortal15", + "fields": [ + { + "type": 2 + } + ], + "index": 15 + }, + { + "name": "Mortal16", + "fields": [ + { + "type": 2 + } + ], + "index": 16 + }, + { + "name": "Mortal17", + "fields": [ + { + "type": 2 + } + ], + "index": 17 + }, + { + "name": "Mortal18", + "fields": [ + { + "type": 2 + } + ], + "index": 18 + }, + { + "name": "Mortal19", + "fields": [ + { + "type": 2 + } + ], + "index": 19 + }, + { + "name": "Mortal20", + "fields": [ + { + "type": 2 + } + ], + "index": 20 + }, + { + "name": "Mortal21", + "fields": [ + { + "type": 2 + } + ], + "index": 21 + }, + { + "name": "Mortal22", + "fields": [ + { + "type": 2 + } + ], + "index": 22 + }, + { + "name": "Mortal23", + "fields": [ + { + "type": 2 + } + ], + "index": 23 + }, + { + "name": "Mortal24", + "fields": [ + { + "type": 2 + } + ], + "index": 24 + }, + { + "name": "Mortal25", + "fields": [ + { + "type": 2 + } + ], + "index": 25 + }, + { + "name": "Mortal26", + "fields": [ + { + "type": 2 + } + ], + "index": 26 + }, + { + "name": "Mortal27", + "fields": [ + { + "type": 2 + } + ], + "index": 27 + }, + { + "name": "Mortal28", + "fields": [ + { + "type": 2 + } + ], + "index": 28 + }, + { + "name": "Mortal29", + "fields": [ + { + "type": 2 + } + ], + "index": 29 + }, + { + "name": "Mortal30", + "fields": [ + { + "type": 2 + } + ], + "index": 30 + }, + { + "name": "Mortal31", + "fields": [ + { + "type": 2 + } + ], + "index": 31 + }, + { + "name": "Mortal32", + "fields": [ + { + "type": 2 + } + ], + "index": 32 + }, + { + "name": "Mortal33", + "fields": [ + { + "type": 2 + } + ], + "index": 33 + }, + { + "name": "Mortal34", + "fields": [ + { + "type": 2 + } + ], + "index": 34 + }, + { + "name": "Mortal35", + "fields": [ + { + "type": 2 + } + ], + "index": 35 + }, + { + "name": "Mortal36", + "fields": [ + { + "type": 2 + } + ], + "index": 36 + }, + { + "name": "Mortal37", + "fields": [ + { + "type": 2 + } + ], + "index": 37 + }, + { + "name": "Mortal38", + "fields": [ + { + "type": 2 + } + ], + "index": 38 + }, + { + "name": "Mortal39", + "fields": [ + { + "type": 2 + } + ], + "index": 39 + }, + { + "name": "Mortal40", + "fields": [ + { + "type": 2 + } + ], + "index": 40 + }, + { + "name": "Mortal41", + "fields": [ + { + "type": 2 + } + ], + "index": 41 + }, + { + "name": "Mortal42", + "fields": [ + { + "type": 2 + } + ], + "index": 42 + }, + { + "name": "Mortal43", + "fields": [ + { + "type": 2 + } + ], + "index": 43 + }, + { + "name": "Mortal44", + "fields": [ + { + "type": 2 + } + ], + "index": 44 + }, + { + "name": "Mortal45", + "fields": [ + { + "type": 2 + } + ], + "index": 45 + }, + { + "name": "Mortal46", + "fields": [ + { + "type": 2 + } + ], + "index": 46 + }, + { + "name": "Mortal47", + "fields": [ + { + "type": 2 + } + ], + "index": 47 + }, + { + "name": "Mortal48", + "fields": [ + { + "type": 2 + } + ], + "index": 48 + }, + { + "name": "Mortal49", + "fields": [ + { + "type": 2 + } + ], + "index": 49 + }, + { + "name": "Mortal50", + "fields": [ + { + "type": 2 + } + ], + "index": 50 + }, + { + "name": "Mortal51", + "fields": [ + { + "type": 2 + } + ], + "index": 51 + }, + { + "name": "Mortal52", + "fields": [ + { + "type": 2 + } + ], + "index": 52 + }, + { + "name": "Mortal53", + "fields": [ + { + "type": 2 + } + ], + "index": 53 + }, + { + "name": "Mortal54", + "fields": [ + { + "type": 2 + } + ], + "index": 54 + }, + { + "name": "Mortal55", + "fields": [ + { + "type": 2 + } + ], + "index": 55 + }, + { + "name": "Mortal56", + "fields": [ + { + "type": 2 + } + ], + "index": 56 + }, + { + "name": "Mortal57", + "fields": [ + { + "type": 2 + } + ], + "index": 57 + }, + { + "name": "Mortal58", + "fields": [ + { + "type": 2 + } + ], + "index": 58 + }, + { + "name": "Mortal59", + "fields": [ + { + "type": 2 + } + ], + "index": 59 + }, + { + "name": "Mortal60", + "fields": [ + { + "type": 2 + } + ], + "index": 60 + }, + { + "name": "Mortal61", + "fields": [ + { + "type": 2 + } + ], + "index": 61 + }, + { + "name": "Mortal62", + "fields": [ + { + "type": 2 + } + ], + "index": 62 + }, + { + "name": "Mortal63", + "fields": [ + { + "type": 2 + } + ], + "index": 63 + }, + { + "name": "Mortal64", + "fields": [ + { + "type": 2 + } + ], + "index": 64 + }, + { + "name": "Mortal65", + "fields": [ + { + "type": 2 + } + ], + "index": 65 + }, + { + "name": "Mortal66", + "fields": [ + { + "type": 2 + } + ], + "index": 66 + }, + { + "name": "Mortal67", + "fields": [ + { + "type": 2 + } + ], + "index": 67 + }, + { + "name": "Mortal68", + "fields": [ + { + "type": 2 + } + ], + "index": 68 + }, + { + "name": "Mortal69", + "fields": [ + { + "type": 2 + } + ], + "index": 69 + }, + { + "name": "Mortal70", + "fields": [ + { + "type": 2 + } + ], + "index": 70 + }, + { + "name": "Mortal71", + "fields": [ + { + "type": 2 + } + ], + "index": 71 + }, + { + "name": "Mortal72", + "fields": [ + { + "type": 2 + } + ], + "index": 72 + }, + { + "name": "Mortal73", + "fields": [ + { + "type": 2 + } + ], + "index": 73 + }, + { + "name": "Mortal74", + "fields": [ + { + "type": 2 + } + ], + "index": 74 + }, + { + "name": "Mortal75", + "fields": [ + { + "type": 2 + } + ], + "index": 75 + }, + { + "name": "Mortal76", + "fields": [ + { + "type": 2 + } + ], + "index": 76 + }, + { + "name": "Mortal77", + "fields": [ + { + "type": 2 + } + ], + "index": 77 + }, + { + "name": "Mortal78", + "fields": [ + { + "type": 2 + } + ], + "index": 78 + }, + { + "name": "Mortal79", + "fields": [ + { + "type": 2 + } + ], + "index": 79 + }, + { + "name": "Mortal80", + "fields": [ + { + "type": 2 + } + ], + "index": 80 + }, + { + "name": "Mortal81", + "fields": [ + { + "type": 2 + } + ], + "index": 81 + }, + { + "name": "Mortal82", + "fields": [ + { + "type": 2 + } + ], + "index": 82 + }, + { + "name": "Mortal83", + "fields": [ + { + "type": 2 + } + ], + "index": 83 + }, + { + "name": "Mortal84", + "fields": [ + { + "type": 2 + } + ], + "index": 84 + }, + { + "name": "Mortal85", + "fields": [ + { + "type": 2 + } + ], + "index": 85 + }, + { + "name": "Mortal86", + "fields": [ + { + "type": 2 + } + ], + "index": 86 + }, + { + "name": "Mortal87", + "fields": [ + { + "type": 2 + } + ], + "index": 87 + }, + { + "name": "Mortal88", + "fields": [ + { + "type": 2 + } + ], + "index": 88 + }, + { + "name": "Mortal89", + "fields": [ + { + "type": 2 + } + ], + "index": 89 + }, + { + "name": "Mortal90", + "fields": [ + { + "type": 2 + } + ], + "index": 90 + }, + { + "name": "Mortal91", + "fields": [ + { + "type": 2 + } + ], + "index": 91 + }, + { + "name": "Mortal92", + "fields": [ + { + "type": 2 + } + ], + "index": 92 + }, + { + "name": "Mortal93", + "fields": [ + { + "type": 2 + } + ], + "index": 93 + }, + { + "name": "Mortal94", + "fields": [ + { + "type": 2 + } + ], + "index": 94 + }, + { + "name": "Mortal95", + "fields": [ + { + "type": 2 + } + ], + "index": 95 + }, + { + "name": "Mortal96", + "fields": [ + { + "type": 2 + } + ], + "index": 96 + }, + { + "name": "Mortal97", + "fields": [ + { + "type": 2 + } + ], + "index": 97 + }, + { + "name": "Mortal98", + "fields": [ + { + "type": 2 + } + ], + "index": 98 + }, + { + "name": "Mortal99", + "fields": [ + { + "type": 2 + } + ], + "index": 99 + }, + { + "name": "Mortal100", + "fields": [ + { + "type": 2 + } + ], + "index": 100 + }, + { + "name": "Mortal101", + "fields": [ + { + "type": 2 + } + ], + "index": 101 + }, + { + "name": "Mortal102", + "fields": [ + { + "type": 2 + } + ], + "index": 102 + }, + { + "name": "Mortal103", + "fields": [ + { + "type": 2 + } + ], + "index": 103 + }, + { + "name": "Mortal104", + "fields": [ + { + "type": 2 + } + ], + "index": 104 + }, + { + "name": "Mortal105", + "fields": [ + { + "type": 2 + } + ], + "index": 105 + }, + { + "name": "Mortal106", + "fields": [ + { + "type": 2 + } + ], + "index": 106 + }, + { + "name": "Mortal107", + "fields": [ + { + "type": 2 + } + ], + "index": 107 + }, + { + "name": "Mortal108", + "fields": [ + { + "type": 2 + } + ], + "index": 108 + }, + { + "name": "Mortal109", + "fields": [ + { + "type": 2 + } + ], + "index": 109 + }, + { + "name": "Mortal110", + "fields": [ + { + "type": 2 + } + ], + "index": 110 + }, + { + "name": "Mortal111", + "fields": [ + { + "type": 2 + } + ], + "index": 111 + }, + { + "name": "Mortal112", + "fields": [ + { + "type": 2 + } + ], + "index": 112 + }, + { + "name": "Mortal113", + "fields": [ + { + "type": 2 + } + ], + "index": 113 + }, + { + "name": "Mortal114", + "fields": [ + { + "type": 2 + } + ], + "index": 114 + }, + { + "name": "Mortal115", + "fields": [ + { + "type": 2 + } + ], + "index": 115 + }, + { + "name": "Mortal116", + "fields": [ + { + "type": 2 + } + ], + "index": 116 + }, + { + "name": "Mortal117", + "fields": [ + { + "type": 2 + } + ], + "index": 117 + }, + { + "name": "Mortal118", + "fields": [ + { + "type": 2 + } + ], + "index": 118 + }, + { + "name": "Mortal119", + "fields": [ + { + "type": 2 + } + ], + "index": 119 + }, + { + "name": "Mortal120", + "fields": [ + { + "type": 2 + } + ], + "index": 120 + }, + { + "name": "Mortal121", + "fields": [ + { + "type": 2 + } + ], + "index": 121 + }, + { + "name": "Mortal122", + "fields": [ + { + "type": 2 + } + ], + "index": 122 + }, + { + "name": "Mortal123", + "fields": [ + { + "type": 2 + } + ], + "index": 123 + }, + { + "name": "Mortal124", + "fields": [ + { + "type": 2 + } + ], + "index": 124 + }, + { + "name": "Mortal125", + "fields": [ + { + "type": 2 + } + ], + "index": 125 + }, + { + "name": "Mortal126", + "fields": [ + { + "type": 2 + } + ], + "index": 126 + }, + { + "name": "Mortal127", + "fields": [ + { + "type": 2 + } + ], + "index": 127 + }, + { + "name": "Mortal128", + "fields": [ + { + "type": 2 + } + ], + "index": 128 + }, + { + "name": "Mortal129", + "fields": [ + { + "type": 2 + } + ], + "index": 129 + }, + { + "name": "Mortal130", + "fields": [ + { + "type": 2 + } + ], + "index": 130 + }, + { + "name": "Mortal131", + "fields": [ + { + "type": 2 + } + ], + "index": 131 + }, + { + "name": "Mortal132", + "fields": [ + { + "type": 2 + } + ], + "index": 132 + }, + { + "name": "Mortal133", + "fields": [ + { + "type": 2 + } + ], + "index": 133 + }, + { + "name": "Mortal134", + "fields": [ + { + "type": 2 + } + ], + "index": 134 + }, + { + "name": "Mortal135", + "fields": [ + { + "type": 2 + } + ], + "index": 135 + }, + { + "name": "Mortal136", + "fields": [ + { + "type": 2 + } + ], + "index": 136 + }, + { + "name": "Mortal137", + "fields": [ + { + "type": 2 + } + ], + "index": 137 + }, + { + "name": "Mortal138", + "fields": [ + { + "type": 2 + } + ], + "index": 138 + }, + { + "name": "Mortal139", + "fields": [ + { + "type": 2 + } + ], + "index": 139 + }, + { + "name": "Mortal140", + "fields": [ + { + "type": 2 + } + ], + "index": 140 + }, + { + "name": "Mortal141", + "fields": [ + { + "type": 2 + } + ], + "index": 141 + }, + { + "name": "Mortal142", + "fields": [ + { + "type": 2 + } + ], + "index": 142 + }, + { + "name": "Mortal143", + "fields": [ + { + "type": 2 + } + ], + "index": 143 + }, + { + "name": "Mortal144", + "fields": [ + { + "type": 2 + } + ], + "index": 144 + }, + { + "name": "Mortal145", + "fields": [ + { + "type": 2 + } + ], + "index": 145 + }, + { + "name": "Mortal146", + "fields": [ + { + "type": 2 + } + ], + "index": 146 + }, + { + "name": "Mortal147", + "fields": [ + { + "type": 2 + } + ], + "index": 147 + }, + { + "name": "Mortal148", + "fields": [ + { + "type": 2 + } + ], + "index": 148 + }, + { + "name": "Mortal149", + "fields": [ + { + "type": 2 + } + ], + "index": 149 + }, + { + "name": "Mortal150", + "fields": [ + { + "type": 2 + } + ], + "index": 150 + }, + { + "name": "Mortal151", + "fields": [ + { + "type": 2 + } + ], + "index": 151 + }, + { + "name": "Mortal152", + "fields": [ + { + "type": 2 + } + ], + "index": 152 + }, + { + "name": "Mortal153", + "fields": [ + { + "type": 2 + } + ], + "index": 153 + }, + { + "name": "Mortal154", + "fields": [ + { + "type": 2 + } + ], + "index": 154 + }, + { + "name": "Mortal155", + "fields": [ + { + "type": 2 + } + ], + "index": 155 + }, + { + "name": "Mortal156", + "fields": [ + { + "type": 2 + } + ], + "index": 156 + }, + { + "name": "Mortal157", + "fields": [ + { + "type": 2 + } + ], + "index": 157 + }, + { + "name": "Mortal158", + "fields": [ + { + "type": 2 + } + ], + "index": 158 + }, + { + "name": "Mortal159", + "fields": [ + { + "type": 2 + } + ], + "index": 159 + }, + { + "name": "Mortal160", + "fields": [ + { + "type": 2 + } + ], + "index": 160 + }, + { + "name": "Mortal161", + "fields": [ + { + "type": 2 + } + ], + "index": 161 + }, + { + "name": "Mortal162", + "fields": [ + { + "type": 2 + } + ], + "index": 162 + }, + { + "name": "Mortal163", + "fields": [ + { + "type": 2 + } + ], + "index": 163 + }, + { + "name": "Mortal164", + "fields": [ + { + "type": 2 + } + ], + "index": 164 + }, + { + "name": "Mortal165", + "fields": [ + { + "type": 2 + } + ], + "index": 165 + }, + { + "name": "Mortal166", + "fields": [ + { + "type": 2 + } + ], + "index": 166 + }, + { + "name": "Mortal167", + "fields": [ + { + "type": 2 + } + ], + "index": 167 + }, + { + "name": "Mortal168", + "fields": [ + { + "type": 2 + } + ], + "index": 168 + }, + { + "name": "Mortal169", + "fields": [ + { + "type": 2 + } + ], + "index": 169 + }, + { + "name": "Mortal170", + "fields": [ + { + "type": 2 + } + ], + "index": 170 + }, + { + "name": "Mortal171", + "fields": [ + { + "type": 2 + } + ], + "index": 171 + }, + { + "name": "Mortal172", + "fields": [ + { + "type": 2 + } + ], + "index": 172 + }, + { + "name": "Mortal173", + "fields": [ + { + "type": 2 + } + ], + "index": 173 + }, + { + "name": "Mortal174", + "fields": [ + { + "type": 2 + } + ], + "index": 174 + }, + { + "name": "Mortal175", + "fields": [ + { + "type": 2 + } + ], + "index": 175 + }, + { + "name": "Mortal176", + "fields": [ + { + "type": 2 + } + ], + "index": 176 + }, + { + "name": "Mortal177", + "fields": [ + { + "type": 2 + } + ], + "index": 177 + }, + { + "name": "Mortal178", + "fields": [ + { + "type": 2 + } + ], + "index": 178 + }, + { + "name": "Mortal179", + "fields": [ + { + "type": 2 + } + ], + "index": 179 + }, + { + "name": "Mortal180", + "fields": [ + { + "type": 2 + } + ], + "index": 180 + }, + { + "name": "Mortal181", + "fields": [ + { + "type": 2 + } + ], + "index": 181 + }, + { + "name": "Mortal182", + "fields": [ + { + "type": 2 + } + ], + "index": 182 + }, + { + "name": "Mortal183", + "fields": [ + { + "type": 2 + } + ], + "index": 183 + }, + { + "name": "Mortal184", + "fields": [ + { + "type": 2 + } + ], + "index": 184 + }, + { + "name": "Mortal185", + "fields": [ + { + "type": 2 + } + ], + "index": 185 + }, + { + "name": "Mortal186", + "fields": [ + { + "type": 2 + } + ], + "index": 186 + }, + { + "name": "Mortal187", + "fields": [ + { + "type": 2 + } + ], + "index": 187 + }, + { + "name": "Mortal188", + "fields": [ + { + "type": 2 + } + ], + "index": 188 + }, + { + "name": "Mortal189", + "fields": [ + { + "type": 2 + } + ], + "index": 189 + }, + { + "name": "Mortal190", + "fields": [ + { + "type": 2 + } + ], + "index": 190 + }, + { + "name": "Mortal191", + "fields": [ + { + "type": 2 + } + ], + "index": 191 + }, + { + "name": "Mortal192", + "fields": [ + { + "type": 2 + } + ], + "index": 192 + }, + { + "name": "Mortal193", + "fields": [ + { + "type": 2 + } + ], + "index": 193 + }, + { + "name": "Mortal194", + "fields": [ + { + "type": 2 + } + ], + "index": 194 + }, + { + "name": "Mortal195", + "fields": [ + { + "type": 2 + } + ], + "index": 195 + }, + { + "name": "Mortal196", + "fields": [ + { + "type": 2 + } + ], + "index": 196 + }, + { + "name": "Mortal197", + "fields": [ + { + "type": 2 + } + ], + "index": 197 + }, + { + "name": "Mortal198", + "fields": [ + { + "type": 2 + } + ], + "index": 198 + }, + { + "name": "Mortal199", + "fields": [ + { + "type": 2 + } + ], + "index": 199 + }, + { + "name": "Mortal200", + "fields": [ + { + "type": 2 + } + ], + "index": 200 + }, + { + "name": "Mortal201", + "fields": [ + { + "type": 2 + } + ], + "index": 201 + }, + { + "name": "Mortal202", + "fields": [ + { + "type": 2 + } + ], + "index": 202 + }, + { + "name": "Mortal203", + "fields": [ + { + "type": 2 + } + ], + "index": 203 + }, + { + "name": "Mortal204", + "fields": [ + { + "type": 2 + } + ], + "index": 204 + }, + { + "name": "Mortal205", + "fields": [ + { + "type": 2 + } + ], + "index": 205 + }, + { + "name": "Mortal206", + "fields": [ + { + "type": 2 + } + ], + "index": 206 + }, + { + "name": "Mortal207", + "fields": [ + { + "type": 2 + } + ], + "index": 207 + }, + { + "name": "Mortal208", + "fields": [ + { + "type": 2 + } + ], + "index": 208 + }, + { + "name": "Mortal209", + "fields": [ + { + "type": 2 + } + ], + "index": 209 + }, + { + "name": "Mortal210", + "fields": [ + { + "type": 2 + } + ], + "index": 210 + }, + { + "name": "Mortal211", + "fields": [ + { + "type": 2 + } + ], + "index": 211 + }, + { + "name": "Mortal212", + "fields": [ + { + "type": 2 + } + ], + "index": 212 + }, + { + "name": "Mortal213", + "fields": [ + { + "type": 2 + } + ], + "index": 213 + }, + { + "name": "Mortal214", + "fields": [ + { + "type": 2 + } + ], + "index": 214 + }, + { + "name": "Mortal215", + "fields": [ + { + "type": 2 + } + ], + "index": 215 + }, + { + "name": "Mortal216", + "fields": [ + { + "type": 2 + } + ], + "index": 216 + }, + { + "name": "Mortal217", + "fields": [ + { + "type": 2 + } + ], + "index": 217 + }, + { + "name": "Mortal218", + "fields": [ + { + "type": 2 + } + ], + "index": 218 + }, + { + "name": "Mortal219", + "fields": [ + { + "type": 2 + } + ], + "index": 219 + }, + { + "name": "Mortal220", + "fields": [ + { + "type": 2 + } + ], + "index": 220 + }, + { + "name": "Mortal221", + "fields": [ + { + "type": 2 + } + ], + "index": 221 + }, + { + "name": "Mortal222", + "fields": [ + { + "type": 2 + } + ], + "index": 222 + }, + { + "name": "Mortal223", + "fields": [ + { + "type": 2 + } + ], + "index": 223 + }, + { + "name": "Mortal224", + "fields": [ + { + "type": 2 + } + ], + "index": 224 + }, + { + "name": "Mortal225", + "fields": [ + { + "type": 2 + } + ], + "index": 225 + }, + { + "name": "Mortal226", + "fields": [ + { + "type": 2 + } + ], + "index": 226 + }, + { + "name": "Mortal227", + "fields": [ + { + "type": 2 + } + ], + "index": 227 + }, + { + "name": "Mortal228", + "fields": [ + { + "type": 2 + } + ], + "index": 228 + }, + { + "name": "Mortal229", + "fields": [ + { + "type": 2 + } + ], + "index": 229 + }, + { + "name": "Mortal230", + "fields": [ + { + "type": 2 + } + ], + "index": 230 + }, + { + "name": "Mortal231", + "fields": [ + { + "type": 2 + } + ], + "index": 231 + }, + { + "name": "Mortal232", + "fields": [ + { + "type": 2 + } + ], + "index": 232 + }, + { + "name": "Mortal233", + "fields": [ + { + "type": 2 + } + ], + "index": 233 + }, + { + "name": "Mortal234", + "fields": [ + { + "type": 2 + } + ], + "index": 234 + }, + { + "name": "Mortal235", + "fields": [ + { + "type": 2 + } + ], + "index": 235 + }, + { + "name": "Mortal236", + "fields": [ + { + "type": 2 + } + ], + "index": 236 + }, + { + "name": "Mortal237", + "fields": [ + { + "type": 2 + } + ], + "index": 237 + }, + { + "name": "Mortal238", + "fields": [ + { + "type": 2 + } + ], + "index": 238 + }, + { + "name": "Mortal239", + "fields": [ + { + "type": 2 + } + ], + "index": 239 + }, + { + "name": "Mortal240", + "fields": [ + { + "type": 2 + } + ], + "index": 240 + }, + { + "name": "Mortal241", + "fields": [ + { + "type": 2 + } + ], + "index": 241 + }, + { + "name": "Mortal242", + "fields": [ + { + "type": 2 + } + ], + "index": 242 + }, + { + "name": "Mortal243", + "fields": [ + { + "type": 2 + } + ], + "index": 243 + }, + { + "name": "Mortal244", + "fields": [ + { + "type": 2 + } + ], + "index": 244 + }, + { + "name": "Mortal245", + "fields": [ + { + "type": 2 + } + ], + "index": 245 + }, + { + "name": "Mortal246", + "fields": [ + { + "type": 2 + } + ], + "index": 246 + }, + { + "name": "Mortal247", + "fields": [ + { + "type": 2 + } + ], + "index": 247 + }, + { + "name": "Mortal248", + "fields": [ + { + "type": 2 + } + ], + "index": 248 + }, + { + "name": "Mortal249", + "fields": [ + { + "type": 2 + } + ], + "index": 249 + }, + { + "name": "Mortal250", + "fields": [ + { + "type": 2 + } + ], + "index": 250 + }, + { + "name": "Mortal251", + "fields": [ + { + "type": 2 + } + ], + "index": 251 + }, + { + "name": "Mortal252", + "fields": [ + { + "type": 2 + } + ], + "index": 252 + }, + { + "name": "Mortal253", + "fields": [ + { + "type": 2 + } + ], + "index": 253 + }, + { + "name": "Mortal254", + "fields": [ + { + "type": 2 + } + ], + "index": 254 + }, + { + "name": "Mortal255", + "fields": [ + { + "type": 2 + } + ], + "index": 255 + } + ] + } + } + } + }, + { + "id": 597, + "type": { + "path": [ + "frame_system", + "extensions", + "check_nonce", + "CheckNonce" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "type": 113, + "typeName": "T::Index" + } + ] + } + } + } + }, + { + "id": 598, + "type": { + "path": [ + "frame_system", + "extensions", + "check_weight", + "CheckWeight" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": {} + } + } + }, + { + "id": 599, + "type": { + "path": [ + "pallet_asset_tx_payment", + "ChargeAssetTxPayment" + ], + "params": [ + { + "name": "T", + "type": null + } + ], + "def": { + "composite": { + "fields": [ + { + "name": "tip", + "type": 65, + "typeName": "BalanceOf" + }, + { + "name": "asset_id", + "type": 93, + "typeName": "Option>" + } + ] + } + } + } + }, + { + "id": 600, + "type": { + "path": [ + "node_runtime", + "Runtime" + ], + "def": { + "composite": {} + } + } + } + ] + }, + "pallets": [ + { + "name": "System", + "storage": { + "prefix": "System", + "entries": [ + { + "name": "Account", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 3 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The full account information for a particular account ID." + ] + }, + { + "name": "ExtrinsicCount", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " Total extrinsics count for the current block." + ] + }, + { + "name": "BlockWeight", + "modifier": "Default", + "ty": { + "Plain": 7 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The current weight for the block." + ] + }, + { + "name": "AllExtrinsicsLen", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " Total length (in bytes) for all extrinsics put together, for the current block." + ] + }, + { + "name": "BlockHash", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 9 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Map of block numbers to block hashes." + ] + }, + { + "name": "ExtrinsicData", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 10 + } + }, + "default": [ + 0 + ], + "docs": [ + " Extrinsics data for the current block (maps an extrinsic's index to its data)." + ] + }, + { + "name": "Number", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": "Default", + "ty": { + "Plain": 9 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Hash of the previous block." + ] + }, + { + "name": "Digest", + "modifier": "Default", + "ty": { + "Plain": 11 + }, + "default": [ + 0 + ], + "docs": [ + " Digest of the current block, also part of the block header." + ] + }, + { + "name": "Events", + "modifier": "Default", + "ty": { + "Plain": 15 + }, + "default": [ + 0 + ], + "docs": [ + " Events deposited for the current block.", + "", + " NOTE: This storage item is explicitly unbounded since it is never intended to be read", + " from within the runtime." + ] + }, + { + "name": "EventCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The number of events in the `Events` list." + ] + }, + { + "name": "EventTopics", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 9, + "value": 111 + } + }, + "default": [ + 0 + ], + "docs": [ + " Mapping between a topic (represented by T::Hash) and a vector of indexes", + " of events in the `>` list.", + "", + " All topic vectors have deterministic storage locations depending on the topic. This", + " allows light-clients to leverage the changes trie storage tracking mechanism and", + " in case of changes fetch the list of events of interest.", + "", + " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", + " the `EventIndex` then in case if the topic has the same contents on the next block", + " no notification will be triggered thus the event might be lost." + ] + }, + { + "name": "LastRuntimeUpgrade", + "modifier": "Optional", + "ty": { + "Plain": 112 + }, + "default": [ + 0 + ], + "docs": [ + " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." + ] + }, + { + "name": "UpgradedToU32RefCount", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not." + ] + }, + { + "name": "UpgradedToTripleRefCount", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False", + " (default) if not." + ] + }, + { + "name": "ExecutionPhase", + "modifier": "Optional", + "ty": { + "Plain": 109 + }, + "default": [ + 0 + ], + "docs": [ + " The execution phase of the block." + ] + } + ] + }, + "calls": { + "ty": 115 + }, + "event": { + "ty": 18 + }, + "constants": [ + { + "name": "BlockWeights", + "ty": 120, + "value": [ + 0, + 242, + 5, + 42, + 1, + 0, + 0, + 0, + 0, + 32, + 74, + 169, + 209, + 1, + 0, + 0, + 64, + 89, + 115, + 7, + 0, + 0, + 0, + 0, + 1, + 192, + 110, + 150, + 166, + 46, + 1, + 0, + 0, + 1, + 0, + 152, + 247, + 62, + 93, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 64, + 89, + 115, + 7, + 0, + 0, + 0, + 0, + 1, + 192, + 246, + 232, + 16, + 163, + 1, + 0, + 0, + 1, + 0, + 32, + 74, + 169, + 209, + 1, + 0, + 0, + 1, + 0, + 136, + 82, + 106, + 116, + 0, + 0, + 0, + 64, + 89, + 115, + 7, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Block & extrinsics weights: base values and limits." + ] + }, + { + "name": "BlockLength", + "ty": 123, + "value": [ + 0, + 0, + 60, + 0, + 0, + 0, + 80, + 0, + 0, + 0, + 80, + 0 + ], + "docs": [ + " The maximum length of a block (in bytes)." + ] + }, + { + "name": "BlockHashCount", + "ty": 4, + "value": [ + 96, + 9, + 0, + 0 + ], + "docs": [ + " Maximum number of block number to block hash mappings to keep (oldest pruned first)." + ] + }, + { + "name": "DbWeight", + "ty": 125, + "value": [ + 64, + 120, + 125, + 1, + 0, + 0, + 0, + 0, + 0, + 225, + 245, + 5, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The weight of runtime database operations the runtime can invoke." + ] + }, + { + "name": "Version", + "ty": 126, + "value": [ + 16, + 110, + 111, + 100, + 101, + 56, + 115, + 117, + 98, + 115, + 116, + 114, + 97, + 116, + 101, + 45, + 110, + 111, + 100, + 101, + 10, + 0, + 0, + 0, + 12, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 52, + 223, + 106, + 203, + 104, + 153, + 7, + 96, + 155, + 4, + 0, + 0, + 0, + 55, + 227, + 151, + 252, + 124, + 145, + 245, + 228, + 1, + 0, + 0, + 0, + 64, + 254, + 58, + 212, + 1, + 248, + 149, + 154, + 6, + 0, + 0, + 0, + 210, + 188, + 152, + 151, + 238, + 208, + 143, + 21, + 3, + 0, + 0, + 0, + 247, + 139, + 39, + 139, + 229, + 63, + 69, + 76, + 2, + 0, + 0, + 0, + 237, + 153, + 197, + 172, + 178, + 94, + 237, + 245, + 3, + 0, + 0, + 0, + 203, + 202, + 37, + 227, + 159, + 20, + 35, + 135, + 2, + 0, + 0, + 0, + 104, + 122, + 212, + 74, + 211, + 127, + 3, + 194, + 1, + 0, + 0, + 0, + 188, + 157, + 137, + 144, + 79, + 91, + 146, + 63, + 1, + 0, + 0, + 0, + 104, + 182, + 107, + 161, + 34, + 201, + 63, + 167, + 1, + 0, + 0, + 0, + 55, + 200, + 187, + 19, + 80, + 169, + 162, + 168, + 1, + 0, + 0, + 0, + 145, + 213, + 223, + 24, + 176, + 210, + 207, + 88, + 1, + 0, + 0, + 0, + 171, + 60, + 5, + 114, + 41, + 31, + 235, + 139, + 1, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 1 + ], + "docs": [ + " Get the chain's current version." + ] + }, + { + "name": "SS58Prefix", + "ty": 81, + "value": [ + 42, + 0 + ], + "docs": [ + " The designated SS85 prefix of this chain.", + "", + " This replaces the \"ss58Format\" property declared in the chain spec. Reason is", + " that the runtime should know about the prefix in order to make use of it as", + " an identifier of the chain." + ] + } + ], + "error": { + "ty": 131 + }, + "index": 0 + }, + { + "name": "Utility", + "storage": null, + "calls": { + "ty": 132 + }, + "event": { + "ty": 27 + }, + "constants": [ + { + "name": "batched_calls_limit", + "ty": 4, + "value": [ + 170, + 42, + 0, + 0 + ], + "docs": [ + " The limit on the number of batched calls." + ] + } + ], + "error": { + "ty": 343 + }, + "index": 1 + }, + { + "name": "Babe", + "storage": { + "prefix": "Babe", + "entries": [ + { + "name": "EpochIndex", + "modifier": "Default", + "ty": { + "Plain": 8 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Current epoch index." + ] + }, + { + "name": "Authorities", + "modifier": "Default", + "ty": { + "Plain": 344 + }, + "default": [ + 0 + ], + "docs": [ + " Current epoch authorities." + ] + }, + { + "name": "GenesisSlot", + "modifier": "Default", + "ty": { + "Plain": 140 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The slot at which the first epoch actually started. This is 0", + " until the first block of the chain." + ] + }, + { + "name": "CurrentSlot", + "modifier": "Default", + "ty": { + "Plain": 140 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Current slot number." + ] + }, + { + "name": "Randomness", + "modifier": "Default", + "ty": { + "Plain": 1 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The epoch randomness for the *current* epoch.", + "", + " # Security", + "", + " This MUST NOT be used for gambling, as it can be influenced by a", + " malicious validator in the short term. It MAY be used in many", + " cryptographic protocols, however, so long as one remembers that this", + " (like everything else on-chain) it is public. For example, it can be", + " used where a number is needed that cannot have been chosen by an", + " adversary, for purposes such as public-coin zero-knowledge proofs." + ] + }, + { + "name": "PendingEpochConfigChange", + "modifier": "Optional", + "ty": { + "Plain": 142 + }, + "default": [ + 0 + ], + "docs": [ + " Pending epoch configuration change that will be applied when the next epoch is enacted." + ] + }, + { + "name": "NextRandomness", + "modifier": "Default", + "ty": { + "Plain": 1 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Next epoch randomness." + ] + }, + { + "name": "NextAuthorities", + "modifier": "Default", + "ty": { + "Plain": 344 + }, + "default": [ + 0 + ], + "docs": [ + " Next epoch authorities." + ] + }, + { + "name": "SegmentIndex", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Randomness under construction.", + "", + " We make a trade-off between storage accesses and list length.", + " We store the under-construction randomness in segments of up to", + " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", + "", + " Once a segment reaches this length, we begin the next one.", + " We reset all segments and return to `0` at the beginning of every", + " epoch." + ] + }, + { + "name": "UnderConstruction", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 347 + } + }, + "default": [ + 0 + ], + "docs": [ + " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." + ] + }, + { + "name": "Initialized", + "modifier": "Optional", + "ty": { + "Plain": 349 + }, + "default": [ + 0 + ], + "docs": [ + " Temporary value (cleared at block finalization) which is `Some`", + " if per-block initialization has already been called for current block." + ] + }, + { + "name": "AuthorVrfRandomness", + "modifier": "Default", + "ty": { + "Plain": 349 + }, + "default": [ + 0 + ], + "docs": [ + " This field should always be populated during block processing unless", + " secondary plain slots are enabled (which don't contain a VRF output).", + "", + " It is set in `on_initialize`, before it will contain the value from the last block." + ] + }, + { + "name": "EpochStart", + "modifier": "Default", + "ty": { + "Plain": 75 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The block numbers when the last and current epoch have started, respectively `N-1` and", + " `N`.", + " NOTE: We track this is in order to annotate the block number when a given pool of", + " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in", + " slots, which may be skipped, the block numbers may not line up with the slot numbers." + ] + }, + { + "name": "Lateness", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " How late the current block is compared to its parent.", + "", + " This entry is populated as part of block execution and is cleaned up", + " on block finalization. Querying this storage entry outside of block", + " execution context should always yield zero." + ] + }, + { + "name": "EpochConfig", + "modifier": "Optional", + "ty": { + "Plain": 350 + }, + "default": [ + 0 + ], + "docs": [ + " The configuration for the current epoch. Should never be `None` as it is initialized in", + " genesis." + ] + }, + { + "name": "NextEpochConfig", + "modifier": "Optional", + "ty": { + "Plain": 350 + }, + "default": [ + 0 + ], + "docs": [ + " The configuration for the next epoch, `None` if the config will not change", + " (you can fallback to `EpochConfig` instead in that case)." + ] + } + ] + }, + "calls": { + "ty": 135 + }, + "event": null, + "constants": [ + { + "name": "EpochDuration", + "ty": 8, + "value": [ + 200, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of time, in slots, that each epoch should last.", + " NOTE: Currently it is not possible to change the epoch duration after", + " the chain has started. Attempting to do so will brick block production." + ] + }, + { + "name": "ExpectedBlockTime", + "ty": 8, + "value": [ + 184, + 11, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The expected average block time at which BABE should be creating", + " blocks. Since BABE is probabilistic it is not trivial to figure out", + " what the expected average block time should be based on the slot", + " duration and the security parameter `c` (where `1 - c` represents", + " the probability of a slot being empty)." + ] + }, + { + "name": "MaxAuthorities", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " Max number of authorities allowed" + ] + } + ], + "error": { + "ty": 351 + }, + "index": 2 + }, + { + "name": "Timestamp", + "storage": { + "prefix": "Timestamp", + "entries": [ + { + "name": "Now", + "modifier": "Default", + "ty": { + "Plain": 8 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Current time for the current block." + ] + }, + { + "name": "DidUpdate", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": { + "ty": 145 + }, + "event": null, + "constants": [ + { + "name": "MinimumPeriod", + "ty": 8, + "value": [ + 220, + 5, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum period between blocks. Beware that this is different to the *expected*", + " period that the block production apparatus provides. Your chosen consensus system will", + " generally work with this to determine a sensible block time. e.g. For Aura, it will be", + " double this period on default settings." + ] + } + ], + "error": null, + "index": 3 + }, + { + "name": "Authorship", + "storage": { + "prefix": "Authorship", + "entries": [ + { + "name": "Uncles", + "modifier": "Default", + "ty": { + "Plain": 352 + }, + "default": [ + 0 + ], + "docs": [ + " Uncles" + ] + }, + { + "name": "Author", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " Author of current block." + ] + }, + { + "name": "DidSetUncles", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " Whether uncles were already set in this block." + ] + } + ] + }, + "calls": { + "ty": 147 + }, + "event": null, + "constants": [ + { + "name": "UncleGenerations", + "ty": 4, + "value": [ + 5, + 0, + 0, + 0 + ], + "docs": [ + " The number of blocks back we should accept uncles.", + " This means that we will deal with uncle-parents that are", + " `UncleGenerations + 1` before `now`." + ] + } + ], + "error": { + "ty": 354 + }, + "index": 4 + }, + { + "name": "Indices", + "storage": { + "prefix": "Indices", + "entries": [ + { + "name": "Accounts", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 355 + } + }, + "default": [ + 0 + ], + "docs": [ + " The lookup from index to account." + ] + } + ] + }, + "calls": { + "ty": 149 + }, + "event": { + "ty": 30 + }, + "constants": [ + { + "name": "Deposit", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The deposit needed for reserving an index." + ] + } + ], + "error": { + "ty": 356 + }, + "index": 5 + }, + { + "name": "Balances", + "storage": { + "prefix": "Balances", + "entries": [ + { + "name": "TotalIssuance", + "modifier": "Default", + "ty": { + "Plain": 6 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The total units issued in the system." + ] + }, + { + "name": "Account", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 5 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The Balances pallet example of storing the balance of an account.", + "", + " # Example", + "", + " ```nocompile", + " impl pallet_balances::Config for Runtime {", + " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>", + " }", + " ```", + "", + " You can also store the balance of an account in the `System` pallet.", + "", + " # Example", + "", + " ```nocompile", + " impl pallet_balances::Config for Runtime {", + " type AccountStore = System", + " }", + " ```", + "", + " But this comes with tradeoffs, storing account balances in the system pallet stores", + " `frame_system` data alongside the account data contrary to storing account balances in the", + " `Balances` pallet, which uses a `StorageMap` to store balances data only.", + " NOTE: This is only used in the case that this pallet is used to store balances." + ] + }, + { + "name": "Locks", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 357 + } + }, + "default": [ + 0 + ], + "docs": [ + " Any liquidity locks on some account balances.", + " NOTE: Should only be accessed when setting, changing and freeing a lock." + ] + }, + { + "name": "Reserves", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 361 + } + }, + "default": [ + 0 + ], + "docs": [ + " Named reserves on some account balances." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "ty": { + "Plain": 364 + }, + "default": [ + 0 + ], + "docs": [ + " Storage version of the pallet.", + "", + " This is set to v2.0.0 for new networks." + ] + } + ] + }, + "calls": { + "ty": 150 + }, + "event": { + "ty": 31 + }, + "constants": [ + { + "name": "ExistentialDeposit", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount required to keep an account open." + ] + }, + { + "name": "MaxLocks", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of locks that should exist on an account.", + " Not strictly enforced, but used for weight estimation." + ] + }, + { + "name": "MaxReserves", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of named reserves that can exist on an account." + ] + } + ], + "error": { + "ty": 365 + }, + "index": 6 + }, + { + "name": "TransactionPayment", + "storage": { + "prefix": "TransactionPayment", + "entries": [ + { + "name": "NextFeeMultiplier", + "modifier": "Default", + "ty": { + "Plain": 366 + }, + "default": [ + 0, + 0, + 100, + 167, + 179, + 182, + 224, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "ty": { + "Plain": 367 + }, + "default": [ + 0 + ], + "docs": [] + } + ] + }, + "calls": null, + "event": null, + "constants": [ + { + "name": "OperationalFeeMultiplier", + "ty": 2, + "value": [ + 5 + ], + "docs": [ + " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their", + " `priority`", + "", + " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later", + " added to a tip component in regular `priority` calculations.", + " It means that a `Normal` transaction can front-run a similarly-sized `Operational`", + " extrinsic (with no tip), by including a tip value greater than the virtual tip.", + "", + " ```rust,ignore", + " // For `Normal`", + " let priority = priority_calc(tip);", + "", + " // For `Operational`", + " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;", + " let priority = priority_calc(tip + virtual_tip);", + " ```", + "", + " Note that since we use `final_fee` the multiplier applies also to the regular `tip`", + " sent with the transaction. So, not only does the transaction get a priority bump based", + " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`", + " transactions." + ] + }, + { + "name": "WeightToFee", + "ty": 368, + "value": [ + 4, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "docs": [ + " The polynomial that is applied in order to derive fee from weight." + ] + }, + { + "name": "LengthToFee", + "ty": 368, + "value": [ + 4, + 0, + 228, + 11, + 84, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "docs": [ + " The polynomial that is applied in order to derive fee from length." + ] + } + ], + "error": null, + "index": 7 + }, + { + "name": "AssetTxPayment", + "storage": null, + "calls": null, + "event": null, + "constants": [], + "error": null, + "index": 8 + }, + { + "name": "ElectionProviderMultiPhase", + "storage": { + "prefix": "ElectionProviderMultiPhase", + "entries": [ + { + "name": "Round", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 1, + 0, + 0, + 0 + ], + "docs": [ + " Internal counter for the number of rounds.", + "", + " This is useful for de-duplication of transactions submitted to the pool, and general", + " diagnostics of the pallet.", + "", + " This is merely incremented once per every time that an upstream `elect` is called." + ] + }, + { + "name": "CurrentPhase", + "modifier": "Default", + "ty": { + "Plain": 370 + }, + "default": [ + 0 + ], + "docs": [ + " Current phase." + ] + }, + { + "name": "QueuedSolution", + "modifier": "Optional", + "ty": { + "Plain": 372 + }, + "default": [ + 0 + ], + "docs": [ + " Current best solution, signed or unsigned, queued to be returned upon `elect`." + ] + }, + { + "name": "Snapshot", + "modifier": "Optional", + "ty": { + "Plain": 373 + }, + "default": [ + 0 + ], + "docs": [ + " Snapshot data of the round.", + "", + " This is created at the beginning of the signed phase and cleared upon calling `elect`." + ] + }, + { + "name": "DesiredTargets", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " Desired number of targets to elect for this round.", + "", + " Only exists when [`Snapshot`] is present." + ] + }, + { + "name": "SnapshotMetadata", + "modifier": "Optional", + "ty": { + "Plain": 207 + }, + "default": [ + 0 + ], + "docs": [ + " The metadata of the [`RoundSnapshot`]", + "", + " Only exists when [`Snapshot`] is present." + ] + }, + { + "name": "SignedSubmissionNextIndex", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The next index to be assigned to an incoming signed submission.", + "", + " Every accepted submission is assigned a unique index; that index is bound to that particular", + " submission for the duration of the election. On election finalization, the next index is", + " reset to 0.", + "", + " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its", + " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,", + " because iteration is slow. Instead, we store the value here." + ] + }, + { + "name": "SignedSubmissionIndices", + "modifier": "Default", + "ty": { + "Plain": 377 + }, + "default": [ + 0 + ], + "docs": [ + " A sorted, bounded set of `(score, index)`, where each `index` points to a value in", + " `SignedSubmissions`.", + "", + " We never need to process more than a single signed submission at a time. Signed submissions", + " can be quite large, so we're willing to pay the cost of multiple database accesses to access", + " them one at a time instead of reading and decoding all of them at once." + ] + }, + { + "name": "SignedSubmissionsMap", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 381 + } + }, + "default": [ + 0 + ], + "docs": [ + " Unchecked, signed solutions.", + "", + " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while", + " allowing us to keep only a single one in memory at a time.", + "", + " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or", + " affect; we shouldn't need a cryptographically secure hasher." + ] + }, + { + "name": "MinimumUntrustedScore", + "modifier": "Optional", + "ty": { + "Plain": 206 + }, + "default": [ + 0 + ], + "docs": [ + " The minimum score that each 'untrusted' solution must attain in order to be considered", + " feasible.", + "", + " Can be set via `set_minimum_untrusted_score`." + ] + } + ] + }, + "calls": { + "ty": 153 + }, + "event": { + "ty": 33 + }, + "constants": [ + { + "name": "UnsignedPhase", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " Duration of the unsigned phase." + ] + }, + { + "name": "SignedPhase", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " Duration of the signed phase." + ] + }, + { + "name": "SolutionImprovementThreshold", + "ty": 116, + "value": [ + 160, + 134, + 1, + 0 + ], + "docs": [ + " The minimum amount of improvement to the solution score that defines a solution as", + " \"better\" (in any phase)." + ] + }, + { + "name": "OffchainRepeat", + "ty": 4, + "value": [ + 5, + 0, + 0, + 0 + ], + "docs": [ + " The repeat threshold of the offchain worker.", + "", + " For example, if it is 5, that means that at least 5 blocks will elapse between attempts", + " to submit the worker's solution." + ] + }, + { + "name": "MinerTxPriority", + "ty": 8, + "value": [ + 254, + 255, + 255, + 255, + 255, + 255, + 255, + 127 + ], + "docs": [ + " The priority of the unsigned transaction submitted in the unsigned-phase" + ] + }, + { + "name": "MinerMaxWeight", + "ty": 8, + "value": [ + 192, + 124, + 144, + 124, + 45, + 1, + 0, + 0 + ], + "docs": [ + " Maximum weight that the miner should consume.", + "", + " The miner will ensure that the total weight of the unsigned solution will not exceed", + " this value, based on [`WeightInfo::submit_unsigned`]." + ] + }, + { + "name": "SignedMaxSubmissions", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " Maximum number of signed submissions that can be queued.", + "", + " It is best to avoid adjusting this during an election, as it impacts downstream data", + " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you", + " update this value during an election, you _must_ ensure that", + " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,", + " attempts to submit new solutions may cause a runtime panic." + ] + }, + { + "name": "SignedMaxWeight", + "ty": 8, + "value": [ + 192, + 124, + 144, + 124, + 45, + 1, + 0, + 0 + ], + "docs": [ + " Maximum weight of a signed solution.", + "", + " This should probably be similar to [`Config::MinerMaxWeight`]." + ] + }, + { + "name": "SignedRewardBase", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Base reward for a signed solution" + ] + }, + { + "name": "SignedDepositBase", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Base deposit for a signed solution." + ] + }, + { + "name": "SignedDepositByte", + "ty": 6, + "value": [ + 0, + 16, + 165, + 212, + 232, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Per-byte deposit for a signed solution." + ] + }, + { + "name": "SignedDepositWeight", + "ty": 6, + "value": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Per-weight deposit for a signed solution." + ] + }, + { + "name": "MaxElectingVoters", + "ty": 4, + "value": [ + 16, + 39, + 0, + 0 + ], + "docs": [ + " The maximum number of electing voters to put in the snapshot. At the moment, snapshots", + " are only over a single block, but once multi-block elections are introduced they will", + " take place over multiple blocks." + ] + }, + { + "name": "MaxElectableTargets", + "ty": 81, + "value": [ + 255, + 255 + ], + "docs": [ + " The maximum number of electable targets to put in the snapshot." + ] + }, + { + "name": "MinerMaxLength", + "ty": 4, + "value": [ + 0, + 0, + 54, + 0 + ], + "docs": [ + " Maximum length (bytes) that the mined solution should consume.", + "", + " The miner will ensure that the total length of the unsigned solution will not exceed", + " this value." + ] + } + ], + "error": { + "ty": 382 + }, + "index": 9 + }, + { + "name": "Staking", + "storage": { + "prefix": "Staking", + "entries": [ + { + "name": "HistoryDepth", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 84, + 0, + 0, + 0 + ], + "docs": [ + " Number of eras to keep in history.", + "", + " Information is kept for eras in `[current_era - history_depth; current_era]`.", + "", + " Must be more than the number of eras delayed by session otherwise. I.e. active era must", + " always be in history. I.e. `active_era > current_era - history_depth` must be", + " guaranteed." + ] + }, + { + "name": "ValidatorCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "Invulnerables", + "modifier": "Default", + "ty": { + "Plain": 40 + }, + "default": [ + 0 + ], + "docs": [ + " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", + " easy to initialize and the performance hit is minimal (we expect no more than four", + " invulnerables) and restricted to testnets." + ] + }, + { + "name": "Bonded", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 0 + } + }, + "default": [ + 0 + ], + "docs": [ + " Map from all locked \"stash\" accounts to the controller account." + ] + }, + { + "name": "MinNominatorBond", + "modifier": "Default", + "ty": { + "Plain": 6 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum active bond to become and maintain the role of a nominator." + ] + }, + { + "name": "MinValidatorBond", + "modifier": "Default", + "ty": { + "Plain": 6 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum active bond to become and maintain the role of a validator." + ] + }, + { + "name": "MinCommission", + "modifier": "Default", + "ty": { + "Plain": 116 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount of commission that validators can set.", + "", + " If set to `0`, no limit exists." + ] + }, + { + "name": "Ledger", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 383 + } + }, + "default": [ + 0 + ], + "docs": [ + " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." + ] + }, + { + "name": "Payee", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 213 + } + }, + "default": [ + 0 + ], + "docs": [ + " Where the reward payment should be made. Keyed by stash." + ] + }, + { + "name": "Validators", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 214 + } + }, + "default": [ + 0, + 0 + ], + "docs": [ + " The map from (wannabe) validator stash key to the preferences of that validator." + ] + }, + { + "name": "CounterForValidators", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + "Counter for the related counted storage map" + ] + }, + { + "name": "MaxValidatorsCount", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " The maximum validator count before we stop allowing new validators to join.", + "", + " When this value is not set, no limits are enforced." + ] + }, + { + "name": "Nominators", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 387 + } + }, + "default": [ + 0 + ], + "docs": [ + " The map from nominator stash key to their nomination preferences, namely the validators that", + " they wish to support.", + "", + " Note that the keys of this storage map might become non-decodable in case the", + " [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators", + " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`", + " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable", + " nominators will effectively not-exist, until they re-submit their preferences such that it", + " is within the bounds of the newly set `Config::MaxNominations`.", + "", + " This implies that `::iter_keys().count()` and `::iter().count()` might return different", + " values for this map. Moreover, the main `::count()` is aligned with the former, namely the", + " number of keys that exist.", + "", + " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via", + " [`Call::chill_other`] dispatchable by anyone." + ] + }, + { + "name": "CounterForNominators", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + "Counter for the related counted storage map" + ] + }, + { + "name": "MaxNominatorsCount", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " The maximum nominator count before we stop allowing new validators to join.", + "", + " When this value is not set, no limits are enforced." + ] + }, + { + "name": "CurrentEra", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " The current era index.", + "", + " This is the latest planned era, depending on how the Session pallet queues the validator", + " set, it might be active or not." + ] + }, + { + "name": "ActiveEra", + "modifier": "Optional", + "ty": { + "Plain": 388 + }, + "default": [ + 0 + ], + "docs": [ + " The active era information, it holds index and start.", + "", + " The active era is the era being currently rewarded. Validator set of this era must be", + " equal to [`SessionInterface::validators`]." + ] + }, + { + "name": "ErasStartSessionIndex", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 4 + } + }, + "default": [ + 0 + ], + "docs": [ + " The session index at which the era start for the last `HISTORY_DEPTH` eras.", + "", + " Note: This tracks the starting session (i.e. session index when era start being active)", + " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`." + ] + }, + { + "name": "ErasStakers", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 389, + "value": 64 + } + }, + "default": [ + 0, + 0, + 0 + ], + "docs": [ + " Exposure of validator at era.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasStakersClipped", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 389, + "value": 64 + } + }, + "default": [ + 0, + 0, + 0 + ], + "docs": [ + " Clipped Exposure of validator at era.", + "", + " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", + " `T::MaxNominatorRewardedPerValidator` biggest stakers.", + " (Note: the field `total` and `own` of the exposure remains unchanged).", + " This is used to limit the i/o cost for the nominator payout.", + "", + " This is keyed fist by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras.", + " If stakers hasn't been set or has been removed then empty exposure is returned." + ] + }, + { + "name": "ErasValidatorPrefs", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 389, + "value": 214 + } + }, + "default": [ + 0, + 0 + ], + "docs": [ + " Similar to `ErasStakers`, this holds the preferences of validators.", + "", + " This is keyed first by the era index to allow bulk deletion and then the stash account.", + "", + " Is it removed after `HISTORY_DEPTH` eras." + ] + }, + { + "name": "ErasValidatorReward", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 6 + } + }, + "default": [ + 0 + ], + "docs": [ + " The total validator era payout for the last `HISTORY_DEPTH` eras.", + "", + " Eras that haven't finished yet or has been removed doesn't have reward." + ] + }, + { + "name": "ErasRewardPoints", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 390 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Rewards for the last `HISTORY_DEPTH` eras.", + " If reward hasn't been set or has been removed then 0 reward is returned." + ] + }, + { + "name": "ErasTotalStake", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 6 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The total amount staked for the last `HISTORY_DEPTH` eras.", + " If total hasn't been set or has been removed then 0 stake is returned." + ] + }, + { + "name": "ForceEra", + "modifier": "Default", + "ty": { + "Plain": 394 + }, + "default": [ + 0 + ], + "docs": [ + " Mode of era forcing." + ] + }, + { + "name": "SlashRewardFraction", + "modifier": "Default", + "ty": { + "Plain": 116 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The percentage of the slash that is distributed to reporters.", + "", + " The rest of the slashed value is handled by the `Slash`." + ] + }, + { + "name": "CanceledSlashPayout", + "modifier": "Default", + "ty": { + "Plain": 6 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of currency given to reporters of a slash event which was", + " canceled by extraordinary circumstances (e.g. governance)." + ] + }, + { + "name": "UnappliedSlashes", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 395 + } + }, + "default": [ + 0 + ], + "docs": [ + " All unapplied slashes that are queued for later." + ] + }, + { + "name": "BondedEras", + "modifier": "Default", + "ty": { + "Plain": 111 + }, + "default": [ + 0 + ], + "docs": [ + " A mapping from still-bonded eras to the first session index of that era.", + "", + " Must contains information for eras for the range:", + " `[active_era - bounding_duration; active_era]`" + ] + }, + { + "name": "ValidatorSlashInEra", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 389, + "value": 397 + } + }, + "default": [ + 0 + ], + "docs": [ + " All slashing events on validators, mapped by era to the highest slash proportion", + " and slash value of the era." + ] + }, + { + "name": "NominatorSlashInEra", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 389, + "value": 6 + } + }, + "default": [ + 0 + ], + "docs": [ + " All slashing events on nominators, mapped by era to the highest slash value of the era." + ] + }, + { + "name": "SlashingSpans", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 398 + } + }, + "default": [ + 0 + ], + "docs": [ + " Slashing spans for stash accounts." + ] + }, + { + "name": "SpanSlash", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 393, + "value": 399 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Records information about the maximum slash of a stash within a slashing span,", + " as well as how much reward has been paid out." + ] + }, + { + "name": "EarliestUnappliedSlash", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " The earliest era for which we have a pending, unapplied slash." + ] + }, + { + "name": "CurrentPlannedSession", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The last planned session scheduled by the session pallet.", + "", + " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]." + ] + }, + { + "name": "OffendingValidators", + "modifier": "Default", + "ty": { + "Plain": 400 + }, + "default": [ + 0 + ], + "docs": [ + " Indices of validators that have offended in the active era and whether they are currently", + " disabled.", + "", + " This value should be a superset of disabled validators since not all offences lead to the", + " validator being disabled (if there was no slash). This is needed to track the percentage of", + " validators that have offended in the current era, ensuring a new era is forced if", + " `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find", + " whether a given validator has previously offended using binary search. It gets cleared when", + " the era ends." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "ty": { + "Plain": 402 + }, + "default": [ + 7 + ], + "docs": [ + " True if network has been upgraded to this version.", + " Storage version of the pallet.", + "", + " This is set to v7.0.0 for new networks." + ] + }, + { + "name": "ChillThreshold", + "modifier": "Optional", + "ty": { + "Plain": 217 + }, + "default": [ + 0 + ], + "docs": [ + " The threshold for when users can start calling `chill_other` for other validators /", + " nominators. The threshold is compared to the actual number of validators / nominators", + " (`CountFor*`) in the system compared to the configured max (`Max*Count`)." + ] + } + ] + }, + "calls": { + "ty": 212 + }, + "event": { + "ty": 37 + }, + "constants": [ + { + "name": "MaxNominations", + "ty": 4, + "value": [ + 16, + 0, + 0, + 0 + ], + "docs": [ + " Maximum number of nominations per nominator." + ] + }, + { + "name": "SessionsPerEra", + "ty": 4, + "value": [ + 6, + 0, + 0, + 0 + ], + "docs": [ + " Number of sessions per era." + ] + }, + { + "name": "BondingDuration", + "ty": 4, + "value": [ + 160, + 2, + 0, + 0 + ], + "docs": [ + " Number of eras that staked funds must remain bonded for." + ] + }, + { + "name": "SlashDeferDuration", + "ty": 4, + "value": [ + 168, + 0, + 0, + 0 + ], + "docs": [ + " Number of eras that slashes are deferred by, after computation.", + "", + " This should be less than the bonding duration. Set to 0 if slashes", + " should be applied immediately, without opportunity for intervention." + ] + }, + { + "name": "MaxNominatorRewardedPerValidator", + "ty": 4, + "value": [ + 0, + 1, + 0, + 0 + ], + "docs": [ + " The maximum number of nominators rewarded for each validator.", + "", + " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can", + " claim their reward. This used to limit the i/o cost for the nominator payout." + ] + }, + { + "name": "MaxUnlockingChunks", + "ty": 4, + "value": [ + 32, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively", + " determines how many unique eras a staker may be unbonding in." + ] + } + ], + "error": { + "ty": 403 + }, + "index": 10 + }, + { + "name": "Session", + "storage": { + "prefix": "Session", + "entries": [ + { + "name": "Validators", + "modifier": "Default", + "ty": { + "Plain": 40 + }, + "default": [ + 0 + ], + "docs": [ + " The current set of validators." + ] + }, + { + "name": "CurrentIndex", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Current index of the session." + ] + }, + { + "name": "QueuedChanged", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " True if the underlying economic identities or weighting behind the validators", + " has changed in the queued validator set." + ] + }, + { + "name": "QueuedKeys", + "modifier": "Default", + "ty": { + "Plain": 404 + }, + "default": [ + 0 + ], + "docs": [ + " The queued keys for the next session. When the next session begins, these keys", + " will be used to determine the validator's session keys." + ] + }, + { + "name": "DisabledValidators", + "modifier": "Default", + "ty": { + "Plain": 92 + }, + "default": [ + 0 + ], + "docs": [ + " Indices of disabled validators.", + "", + " The vec is always kept sorted so that we can find whether a given validator is", + " disabled using binary search. It gets cleared when `on_session_ending` returns", + " a new set of identities." + ] + }, + { + "name": "NextKeys", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 223 + } + }, + "default": [ + 0 + ], + "docs": [ + " The next session keys for a validator." + ] + }, + { + "name": "KeyOwner", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 406, + "value": 0 + } + }, + "default": [ + 0 + ], + "docs": [ + " The owner of a key. The key is the `KeyTypeId` + the encoded key." + ] + } + ] + }, + "calls": { + "ty": 222 + }, + "event": { + "ty": 38 + }, + "constants": [], + "error": { + "ty": 408 + }, + "index": 11 + }, + { + "name": "Democracy", + "storage": { + "prefix": "Democracy", + "entries": [ + { + "name": "PublicPropCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": "Default", + "ty": { + "Plain": 409 + }, + "default": [ + 0 + ], + "docs": [ + " The public proposals. Unsorted. The second item is the proposal's hash." + ] + }, + { + "name": "DepositOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 411 + } + }, + "default": [ + 0 + ], + "docs": [ + " Those who have locked a deposit.", + "", + " TWOX-NOTE: Safe, as increasing integer keys are safe." + ] + }, + { + "name": "Preimages", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 412 + } + }, + "default": [ + 0 + ], + "docs": [ + " Map of hashes to the proposal preimage, along with who registered it and their deposit.", + " The block number is the block at which it was deposited." + ] + }, + { + "name": "ReferendumCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "LowestUnbaked", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The lowest referendum index representing an unbaked referendum. Equal to", + " `ReferendumCount` if there isn't a unbaked referendum." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 413 + } + }, + "default": [ + 0 + ], + "docs": [ + " Information concerning any given referendum.", + "", + " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." + ] + }, + { + "name": "VotingOf", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 416 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " All votes for a particular voter. We store the balance for the number of votes that we", + " have recorded. The second item is the total amount of delegations, that will be added.", + "", + " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway." + ] + }, + { + "name": "LastTabledWasExternal", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " True if the last referendum tabled was submitted externally. False if it was a public", + " proposal." + ] + }, + { + "name": "NextExternal", + "modifier": "Optional", + "ty": { + "Plain": 421 + }, + "default": [ + 0 + ], + "docs": [ + " The referendum to be tabled whenever it would be valid to table an external proposal.", + " This happens when a referendum needs to be tabled and one of two conditions are met:", + " - `LastTabledWasExternal` is `false`; or", + " - `PublicProps` is empty." + ] + }, + { + "name": "Blacklist", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 422 + } + }, + "default": [ + 0 + ], + "docs": [ + " A record of who vetoed what. Maps proposal hash to a possible existent block number", + " (until when it may not be resubmitted) and who vetoed it." + ] + }, + { + "name": "Cancellations", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 35 + } + }, + "default": [ + 0 + ], + "docs": [ + " Record of all proposals that have been subject to emergency cancellation." + ] + }, + { + "name": "StorageVersion", + "modifier": "Optional", + "ty": { + "Plain": 423 + }, + "default": [ + 0 + ], + "docs": [ + " Storage version of the pallet.", + "", + " New networks start with last version." + ] + } + ] + }, + "calls": { + "ty": 225 + }, + "event": { + "ty": 39 + }, + "constants": [ + { + "name": "EnactmentPeriod", + "ty": 4, + "value": [ + 0, + 47, + 13, + 0 + ], + "docs": [ + " The period between a proposal being approved and enacted.", + "", + " It should generally be a little more than the unstake period to ensure that", + " voting stakers have an opportunity to remove themselves from the system in the case", + " where they are on the losing side of a vote." + ] + }, + { + "name": "LaunchPeriod", + "ty": 4, + "value": [ + 0, + 78, + 12, + 0 + ], + "docs": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "VotingPeriod", + "ty": 4, + "value": [ + 0, + 78, + 12, + 0 + ], + "docs": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "VoteLockingPeriod", + "ty": 4, + "value": [ + 0, + 47, + 13, + 0 + ], + "docs": [ + " The minimum period of vote locking.", + "", + " It should be no shorter than enactment period to ensure that in the case of an approval,", + " those successful voters are locked into the consequences that their votes entail." + ] + }, + { + "name": "MinimumDeposit", + "ty": 6, + "value": [ + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "InstantAllowed", + "ty": 35, + "value": [ + 1 + ], + "docs": [ + " Indicator for whether an emergency origin is even allowed to happen. Some chains may", + " want to set this permanently to `false`, others may want to condition it on things such", + " as an upgrade having happened recently." + ] + }, + { + "name": "FastTrackVotingPeriod", + "ty": 4, + "value": [ + 128, + 81, + 1, + 0 + ], + "docs": [ + " Minimum voting period allowed for a fast-track referendum." + ] + }, + { + "name": "CooloffPeriod", + "ty": 4, + "value": [ + 0, + 78, + 12, + 0 + ], + "docs": [ + " Period in blocks where an external proposal may not be re-submitted after being vetoed." + ] + }, + { + "name": "PreimageByteDeposit", + "ty": 6, + "value": [ + 0, + 16, + 165, + 212, + 232, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of balance that must be deposited per byte of preimage stored." + ] + }, + { + "name": "MaxVotes", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of votes for an account.", + "", + " Also used to compute weight, an overly big value can", + " lead to extrinsic with very big weight: see `delegate` for instance." + ] + }, + { + "name": "MaxProposals", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of public proposals that can exist at any time." + ] + } + ], + "error": { + "ty": 424 + }, + "index": 12 + }, + { + "name": "Council", + "storage": { + "prefix": "Council", + "entries": [ + { + "name": "Proposals", + "modifier": "Default", + "ty": { + "Plain": 425 + }, + "default": [ + 0 + ], + "docs": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 134 + } + }, + "default": [ + 0 + ], + "docs": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 426 + } + }, + "default": [ + 0 + ], + "docs": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "ty": { + "Plain": 40 + }, + "default": [ + 0 + ], + "docs": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The prime member that helps determine the default vote behavior in case of absentations." + ] + } + ] + }, + "calls": { + "ty": 227 + }, + "event": { + "ty": 44 + }, + "constants": [], + "error": { + "ty": 427 + }, + "index": 13 + }, + { + "name": "TechnicalCommittee", + "storage": { + "prefix": "TechnicalCommittee", + "entries": [ + { + "name": "Proposals", + "modifier": "Default", + "ty": { + "Plain": 428 + }, + "default": [ + 0 + ], + "docs": [ + " The hashes of the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 134 + } + }, + "default": [ + 0 + ], + "docs": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 426 + } + }, + "default": [ + 0 + ], + "docs": [ + " Votes on a given proposal, if it is ongoing." + ] + }, + { + "name": "ProposalCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Proposals so far." + ] + }, + { + "name": "Members", + "modifier": "Default", + "ty": { + "Plain": 40 + }, + "default": [ + 0 + ], + "docs": [ + " The current members of the collective. This is stored sorted (just by value)." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The prime member that helps determine the default vote behavior in case of absentations." + ] + } + ] + }, + "calls": { + "ty": 228 + }, + "event": { + "ty": 45 + }, + "constants": [], + "error": { + "ty": 429 + }, + "index": 14 + }, + { + "name": "Elections", + "storage": { + "prefix": "Elections", + "entries": [ + { + "name": "Members", + "modifier": "Default", + "ty": { + "Plain": 430 + }, + "default": [ + 0 + ], + "docs": [ + " The current elected members.", + "", + " Invariant: Always sorted based on account id." + ] + }, + { + "name": "RunnersUp", + "modifier": "Default", + "ty": { + "Plain": 430 + }, + "default": [ + 0 + ], + "docs": [ + " The current reserved runners-up.", + "", + " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the", + " last (i.e. _best_) runner-up will be replaced." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "ty": { + "Plain": 47 + }, + "default": [ + 0 + ], + "docs": [ + " The present candidate list. A current member or runner-up can never enter this vector", + " and is always implicitly assumed to be a candidate.", + "", + " Second element is the deposit.", + "", + " Invariant: Always sorted based on account id." + ] + }, + { + "name": "ElectionRounds", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The total number of vote rounds that have happened, excluding the upcoming one." + ] + }, + { + "name": "Voting", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 432 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Votes and locked stake of a particular voter.", + "", + " TWOX-NOTE: SAFE as `AccountId` is a crypto hash." + ] + } + ] + }, + "calls": { + "ty": 229 + }, + "event": { + "ty": 46 + }, + "constants": [ + { + "name": "PalletId", + "ty": 130, + "value": [ + 112, + 104, + 114, + 101, + 108, + 101, + 99, + 116 + ], + "docs": [ + " Identifier for the elections-phragmen pallet's lock" + ] + }, + { + "name": "CandidacyBond", + "ty": 6, + "value": [ + 0, + 128, + 198, + 164, + 126, + 141, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " How much should be locked up in order to submit one's candidacy." + ] + }, + { + "name": "VotingBondBase", + "ty": 6, + "value": [ + 0, + 240, + 67, + 109, + 227, + 106, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Base deposit associated with voting.", + "", + " This should be sensibly high to economically ensure the pallet cannot be attacked by", + " creating a gigantic number of votes." + ] + }, + { + "name": "VotingBondFactor", + "ty": 6, + "value": [ + 0, + 0, + 204, + 123, + 159, + 174, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of bond that need to be locked for each vote (32 bytes)." + ] + }, + { + "name": "DesiredMembers", + "ty": 4, + "value": [ + 13, + 0, + 0, + 0 + ], + "docs": [ + " Number of members to elect." + ] + }, + { + "name": "DesiredRunnersUp", + "ty": 4, + "value": [ + 7, + 0, + 0, + 0 + ], + "docs": [ + " Number of runners_up to keep." + ] + }, + { + "name": "TermDuration", + "ty": 4, + "value": [ + 128, + 19, + 3, + 0 + ], + "docs": [ + " How long each seat is kept. This defines the next block number at which an election", + " round will happen. If set to zero, no elections are ever triggered and the module will", + " be in passive mode." + ] + } + ], + "error": { + "ty": 433 + }, + "index": 15 + }, + { + "name": "TechnicalMembership", + "storage": { + "prefix": "TechnicalMembership", + "entries": [ + { + "name": "Members", + "modifier": "Default", + "ty": { + "Plain": 40 + }, + "default": [ + 0 + ], + "docs": [ + " The current membership, stored as an ordered Vec." + ] + }, + { + "name": "Prime", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The current prime member, if one exists." + ] + } + ] + }, + "calls": { + "ty": 231 + }, + "event": { + "ty": 49 + }, + "constants": [], + "error": { + "ty": 434 + }, + "index": 16 + }, + { + "name": "Grandpa", + "storage": { + "prefix": "Grandpa", + "entries": [ + { + "name": "State", + "modifier": "Default", + "ty": { + "Plain": 435 + }, + "default": [ + 0 + ], + "docs": [ + " State of the current authority set." + ] + }, + { + "name": "PendingChange", + "modifier": "Optional", + "ty": { + "Plain": 436 + }, + "default": [ + 0 + ], + "docs": [ + " Pending change: (signaled at, scheduled change)." + ] + }, + { + "name": "NextForced", + "modifier": "Optional", + "ty": { + "Plain": 4 + }, + "default": [ + 0 + ], + "docs": [ + " next block number where we can force a change." + ] + }, + { + "name": "Stalled", + "modifier": "Optional", + "ty": { + "Plain": 75 + }, + "default": [ + 0 + ], + "docs": [ + " `true` if we are currently stalled." + ] + }, + { + "name": "CurrentSetId", + "modifier": "Default", + "ty": { + "Plain": 8 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The number of changes (both in terms of keys and underlying economic responsibilities)", + " in the \"set\" of Grandpa validators from genesis." + ] + }, + { + "name": "SetIdSession", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 8, + "value": 4 + } + }, + "default": [ + 0 + ], + "docs": [ + " A mapping from grandpa set ID to the index of the *most recent* session for which its", + " members were responsible.", + "", + " TWOX-NOTE: `SetId` is not under user control." + ] + } + ] + }, + "calls": { + "ty": 232 + }, + "event": { + "ty": 50 + }, + "constants": [ + { + "name": "MaxAuthorities", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " Max Authorities in use" + ] + } + ], + "error": { + "ty": 438 + }, + "index": 17 + }, + { + "name": "Treasury", + "storage": { + "prefix": "Treasury", + "entries": [ + { + "name": "ProposalCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 439 + } + }, + "default": [ + 0 + ], + "docs": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": "Default", + "ty": { + "Plain": 440 + }, + "default": [ + 0 + ], + "docs": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + }, + "calls": { + "ty": 244 + }, + "event": { + "ty": 55 + }, + "constants": [ + { + "name": "ProposalBond", + "ty": 441, + "value": [ + 80, + 195, + 0, + 0 + ], + "docs": [ + " Fraction of a proposal's value that should be bonded in order to place the proposal.", + " An accepted proposal gets these back. A rejected proposal does not." + ] + }, + { + "name": "ProposalBondMinimum", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "ProposalBondMaximum", + "ty": 442, + "value": [ + 0 + ], + "docs": [ + " Maximum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "ty": 4, + "value": [ + 128, + 112, + 0, + 0 + ], + "docs": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "ty": 441, + "value": [ + 32, + 161, + 7, + 0 + ], + "docs": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "PalletId", + "ty": 443, + "value": [ + 112, + 121, + 47, + 116, + 114, + 115, + 114, + 121 + ], + "docs": [ + " The treasury's pallet id, used for deriving its sovereign account ID." + ] + }, + { + "name": "MaxApprovals", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of approvals that can wait in the spending queue.", + "", + " NOTE: This parameter is also used within the Bounties Pallet extension if enabled." + ] + } + ], + "error": { + "ty": 444 + }, + "index": 18 + }, + { + "name": "Contracts", + "storage": { + "prefix": "Contracts", + "entries": [ + { + "name": "PristineCode", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 10 + } + }, + "default": [ + 0 + ], + "docs": [ + " A mapping from an original code hash to the original code, untouched by instrumentation." + ] + }, + { + "name": "CodeStorage", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 445 + } + }, + "default": [ + 0 + ], + "docs": [ + " A mapping between an original code hash and instrumented wasm code, ready for execution." + ] + }, + { + "name": "OwnerInfoOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 446 + } + }, + "default": [ + 0 + ], + "docs": [ + " A mapping between an original code hash and its owner information." + ] + }, + { + "name": "Nonce", + "modifier": "Default", + "ty": { + "Plain": 8 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " This is a **monotonic** counter incremented on contract instantiation.", + "", + " This is used in order to generate unique trie ids for contracts.", + " The trie id of a new contract is calculated from hash(account_id, nonce).", + " The nonce is required because otherwise the following sequence would lead to", + " a possible collision of storage:", + "", + " 1. Create a new contract.", + " 2. Terminate the contract.", + " 3. Immediately recreate the contract with the same account_id.", + "", + " This is bad because the contents of a trie are deleted lazily and there might be", + " storage of the old instantiation still in it when the new contract is created. Please", + " note that we can't replace the counter by the block number because the sequence above", + " can happen in the same block. We also can't keep the account counter in memory only", + " because storage is the only way to communicate across different extrinsics in the", + " same block.", + "", + " # Note", + "", + " Do not use it to determine the number of contracts. It won't be decremented if", + " a contract is destroyed." + ] + }, + { + "name": "ContractInfoOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 447 + } + }, + "default": [ + 0 + ], + "docs": [ + " The code associated with a given account.", + "", + " TWOX-NOTE: SAFE since `AccountId` is a secure hash." + ] + }, + { + "name": "DeletionQueue", + "modifier": "Default", + "ty": { + "Plain": 448 + }, + "default": [ + 0 + ], + "docs": [ + " Evicted contracts that await child trie deletion.", + "", + " Child trie deletion is a heavy operation depending on the amount of storage items", + " stored in said trie. Therefore this operation is performed lazily in `on_initialize`." + ] + } + ] + }, + "calls": { + "ty": 245 + }, + "event": { + "ty": 56 + }, + "constants": [ + { + "name": "Schedule", + "ty": 450, + "value": [ + 4, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 128, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 0, + 16, + 0, + 0, + 0, + 1, + 0, + 0, + 32, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 0, + 64, + 0, + 0, + 0, + 0, + 2, + 0, + 2, + 0, + 0, + 0, + 144, + 11, + 0, + 0, + 112, + 28, + 0, + 0, + 168, + 32, + 0, + 0, + 92, + 23, + 0, + 0, + 6, + 39, + 0, + 0, + 244, + 11, + 0, + 0, + 138, + 22, + 0, + 0, + 2, + 28, + 0, + 0, + 40, + 0, + 0, + 0, + 188, + 11, + 1, + 0, + 188, + 76, + 1, + 0, + 224, + 6, + 0, + 0, + 234, + 11, + 0, + 0, + 60, + 15, + 0, + 0, + 214, + 11, + 0, + 0, + 90, + 35, + 0, + 0, + 132, + 43, + 0, + 0, + 56, + 14, + 0, + 0, + 145, + 24, + 176, + 0, + 68, + 12, + 0, + 0, + 224, + 11, + 0, + 0, + 154, + 11, + 0, + 0, + 88, + 12, + 0, + 0, + 74, + 11, + 0, + 0, + 14, + 11, + 0, + 0, + 68, + 12, + 0, + 0, + 132, + 18, + 0, + 0, + 112, + 18, + 0, + 0, + 72, + 18, + 0, + 0, + 82, + 18, + 0, + 0, + 112, + 18, + 0, + 0, + 232, + 18, + 0, + 0, + 122, + 18, + 0, + 0, + 102, + 18, + 0, + 0, + 52, + 18, + 0, + 0, + 82, + 18, + 0, + 0, + 98, + 17, + 0, + 0, + 168, + 17, + 0, + 0, + 168, + 17, + 0, + 0, + 62, + 43, + 0, + 0, + 100, + 45, + 0, + 0, + 82, + 43, + 0, + 0, + 210, + 45, + 0, + 0, + 148, + 17, + 0, + 0, + 128, + 17, + 0, + 0, + 218, + 17, + 0, + 0, + 132, + 18, + 0, + 0, + 72, + 18, + 0, + 0, + 92, + 18, + 0, + 0, + 82, + 18, + 0, + 0, + 92, + 18, + 0, + 0, + 150, + 78, + 7, + 0, + 0, + 0, + 0, + 0, + 76, + 31, + 182, + 1, + 0, + 0, + 0, + 0, + 254, + 101, + 194, + 1, + 0, + 0, + 0, + 0, + 46, + 16, + 8, + 0, + 0, + 0, + 0, + 0, + 54, + 53, + 3, + 0, + 0, + 0, + 0, + 0, + 48, + 85, + 7, + 0, + 0, + 0, + 0, + 0, + 162, + 56, + 7, + 0, + 0, + 0, + 0, + 0, + 188, + 191, + 21, + 0, + 0, + 0, + 0, + 0, + 80, + 98, + 7, + 0, + 0, + 0, + 0, + 0, + 154, + 84, + 7, + 0, + 0, + 0, + 0, + 0, + 158, + 85, + 7, + 0, + 0, + 0, + 0, + 0, + 214, + 74, + 7, + 0, + 0, + 0, + 0, + 0, + 40, + 157, + 18, + 0, + 0, + 0, + 0, + 0, + 32, + 170, + 3, + 0, + 0, + 0, + 0, + 0, + 160, + 38, + 7, + 0, + 0, + 0, + 0, + 0, + 116, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 196, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 136, + 39, + 227, + 38, + 0, + 0, + 0, + 0, + 82, + 9, + 24, + 0, + 0, + 0, + 0, + 0, + 130, + 80, + 45, + 0, + 0, + 0, + 0, + 0, + 56, + 67, + 160, + 7, + 0, + 0, + 0, + 0, + 33, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 22, + 253, + 5, + 0, + 0, + 0, + 0, + 0, + 234, + 233, + 176, + 7, + 0, + 0, + 0, + 0, + 20, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 78, + 8, + 237, + 7, + 0, + 0, + 0, + 0, + 70, + 150, + 173, + 7, + 0, + 0, + 0, + 0, + 100, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 70, + 220, + 169, + 1, + 0, + 0, + 0, + 0, + 99, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 176, + 8, + 175, + 1, + 0, + 0, + 0, + 0, + 111, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 44, + 251, + 178, + 7, + 0, + 0, + 0, + 0, + 128, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 106, + 127, + 134, + 8, + 0, + 0, + 0, + 0, + 186, + 177, + 83, + 19, + 0, + 0, + 0, + 0, + 18, + 26, + 98, + 13, + 0, + 0, + 0, + 0, + 132, + 248, + 127, + 8, + 0, + 0, + 0, + 0, + 2, + 212, + 1, + 0, + 0, + 0, + 0, + 0, + 36, + 30, + 108, + 46, + 0, + 0, + 0, + 0, + 92, + 38, + 0, + 0, + 0, + 0, + 0, + 0, + 245, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 8, + 241, + 11, + 0, + 0, + 0, + 0, + 0, + 203, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 206, + 201, + 13, + 0, + 0, + 0, + 0, + 0, + 182, + 11, + 0, + 0, + 0, + 0, + 0, + 0, + 138, + 128, + 9, + 0, + 0, + 0, + 0, + 0, + 143, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 125, + 9, + 0, + 0, + 0, + 0, + 0, + 144, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 60, + 162, + 71, + 2, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Cost schedule and limits." + ] + }, + { + "name": "DeletionQueueDepth", + "ty": 4, + "value": [ + 12, + 87, + 0, + 0 + ], + "docs": [ + " The maximum number of contracts that can be pending for deletion.", + "", + " When a contract is deleted by calling `seal_terminate` it becomes inaccessible", + " immediately, but the deletion of the storage items it has accumulated is performed", + " later. The contract is put into the deletion queue. This defines how many", + " contracts can be queued up at the same time. If that limit is reached `seal_terminate`", + " will fail. The action must be retried in a later block in that case.", + "", + " The reasons for limiting the queue depth are:", + "", + " 1. The queue is in storage in order to be persistent between blocks. We want to limit", + " \tthe amount of storage that can be consumed.", + " 2. The queue is stored in a vector and needs to be decoded as a whole when reading", + "\t\tit at the end of each block. Longer queues take more weight to decode and hence", + "\t\tlimit the amount of items that can be deleted per block." + ] + }, + { + "name": "DeletionWeightLimit", + "ty": 8, + "value": [ + 0, + 208, + 237, + 144, + 46, + 0, + 0, + 0 + ], + "docs": [ + " The maximum amount of weight that can be consumed per block for lazy trie removal.", + "", + " The amount of weight that is dedicated per block to work on the deletion queue. Larger", + " values allow more trie keys to be deleted in each block but reduce the amount of", + " weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more", + " information about the deletion queue." + ] + }, + { + "name": "DepositPerByte", + "ty": 6, + "value": [ + 0, + 96, + 222, + 251, + 116, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of balance a caller has to pay for each byte of storage.", + "", + " # Note", + "", + " Changing this value for an existing chain might need a storage migration." + ] + }, + { + "name": "DepositPerItem", + "ty": 6, + "value": [ + 0, + 240, + 171, + 117, + 164, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of balance a caller has to pay for each storage item.", + "", + " # Note", + "", + " Changing this value for an existing chain might need a storage migration." + ] + } + ], + "error": { + "ty": 454 + }, + "index": 19 + }, + { + "name": "Sudo", + "storage": { + "prefix": "Sudo", + "entries": [ + { + "name": "Key", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The `AccountId` of the sudo key." + ] + } + ] + }, + "calls": { + "ty": 247 + }, + "event": { + "ty": 57 + }, + "constants": [], + "error": { + "ty": 455 + }, + "index": 20 + }, + { + "name": "ImOnline", + "storage": { + "prefix": "ImOnline", + "entries": [ + { + "name": "HeartbeatAfter", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The block number after which it's ok to send heartbeats in the current", + " session.", + "", + " At the beginning of each session we set this to a value that should fall", + " roughly in the middle of the session duration. The idea is to first wait for", + " the validators to produce a block in the current session, so that the", + " heartbeat later on will not be necessary.", + "", + " This value will only be used as a fallback if we fail to get a proper session", + " progress estimate from `NextSessionRotation`, as those estimates should be", + " more accurate then the value we calculate for `HeartbeatAfter`." + ] + }, + { + "name": "Keys", + "modifier": "Default", + "ty": { + "Plain": 456 + }, + "default": [ + 0 + ], + "docs": [ + " The current set of keys that may issue a heartbeat." + ] + }, + { + "name": "ReceivedHeartbeats", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 75, + "value": 458 + } + }, + "default": [ + 0 + ], + "docs": [ + " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to", + " `WrapperOpaque`." + ] + }, + { + "name": "AuthoredBlocks", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 389, + "value": 4 + } + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " For each session index, we keep a mapping of `ValidatorId` to the", + " number of blocks authored by the given authority." + ] + } + ] + }, + "calls": { + "ty": 248 + }, + "event": { + "ty": 59 + }, + "constants": [ + { + "name": "UnsignedPriority", + "ty": 8, + "value": [ + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255 + ], + "docs": [ + " A configuration for base priority of unsigned transactions.", + "", + " This is exposed so that it can be tuned for particular runtime, when", + " multiple pallets send unsigned transactions." + ] + } + ], + "error": { + "ty": 463 + }, + "index": 21 + }, + { + "name": "AuthorityDiscovery", + "storage": { + "prefix": "AuthorityDiscovery", + "entries": [ + { + "name": "Keys", + "modifier": "Default", + "ty": { + "Plain": 464 + }, + "default": [ + 0 + ], + "docs": [ + " Keys of the current authority set." + ] + }, + { + "name": "NextKeys", + "modifier": "Default", + "ty": { + "Plain": 464 + }, + "default": [ + 0 + ], + "docs": [ + " Keys of the next authority set." + ] + } + ] + }, + "calls": null, + "event": null, + "constants": [], + "error": null, + "index": 22 + }, + { + "name": "Offences", + "storage": { + "prefix": "Offences", + "entries": [ + { + "name": "Reports", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 9, + "value": 466 + } + }, + "default": [ + 0 + ], + "docs": [ + " The primary structure that holds all offence records keyed by report identifiers." + ] + }, + { + "name": "ConcurrentReportsIndex", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 467, + "value": 110 + } + }, + "default": [ + 0 + ], + "docs": [ + " A vector of reports of the same kind that happened at the same time slot." + ] + }, + { + "name": "ReportsByKindIndex", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 69, + "value": 10 + } + }, + "default": [ + 0 + ], + "docs": [ + " Enumerates all reports of a kind along with the time they happened.", + "", + " All reports are sorted by the time of offence.", + "", + " Note that the actual type of this mapping is `Vec`, this is because values of", + " different types are not supported at the moment so we are doing the manual serialization." + ] + } + ] + }, + "calls": null, + "event": { + "ty": 68 + }, + "constants": [], + "error": null, + "index": 23 + }, + { + "name": "Historical", + "storage": null, + "calls": null, + "event": null, + "constants": [], + "error": null, + "index": 24 + }, + { + "name": "RandomnessCollectiveFlip", + "storage": { + "prefix": "RandomnessCollectiveFlip", + "entries": [ + { + "name": "RandomMaterial", + "modifier": "Default", + "ty": { + "Plain": 468 + }, + "default": [ + 0 + ], + "docs": [ + " Series of block headers from the last 81 blocks that acts as random seed material. This", + " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", + " the oldest hash." + ] + } + ] + }, + "calls": null, + "event": null, + "constants": [], + "error": null, + "index": 25 + }, + { + "name": "Identity", + "storage": { + "prefix": "Identity", + "entries": [ + { + "name": "IdentityOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 469 + } + }, + "default": [ + 0 + ], + "docs": [ + " Information that is pertinent to identify the entity behind an account.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "SuperOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 292 + } + }, + "default": [ + 0 + ], + "docs": [ + " The super-identity of an alternative \"sub\" identity together with its name, within that", + " context. If the account is not some other account's sub-identity, then just `None`." + ] + }, + { + "name": "SubsOf", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 473 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Alternative \"sub\" identities of this account.", + "", + " The first item is the deposit, the second is a vector of the accounts.", + "", + " TWOX-NOTE: OK ― `AccountId` is a secure hash." + ] + }, + { + "name": "Registrars", + "modifier": "Default", + "ty": { + "Plain": 475 + }, + "default": [ + 0 + ], + "docs": [ + " The set of registrars. Not expected to get very big as can only be added through a", + " special origin (likely a council motion).", + "", + " The index into this can be cast to `RegistrarIndex` to get a valid value." + ] + } + ] + }, + "calls": { + "ty": 256 + }, + "event": { + "ty": 70 + }, + "constants": [ + { + "name": "BasicDeposit", + "ty": 6, + "value": [ + 0, + 128, + 198, + 164, + 126, + 141, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit for a registered identity" + ] + }, + { + "name": "FieldDeposit", + "ty": 6, + "value": [ + 0, + 160, + 49, + 169, + 95, + 227, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit per additional field for a registered identity." + ] + }, + { + "name": "SubAccountDeposit", + "ty": 6, + "value": [ + 0, + 128, + 244, + 32, + 230, + 181, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit for a registered subaccount. This should account for the fact", + " that one storage item's value will increase by the size of an account ID, and there will", + " be another trie item whose value is the size of an account ID plus 32 bytes." + ] + }, + { + "name": "MaxSubAccounts", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of sub-accounts allowed per identified account." + ] + }, + { + "name": "MaxAdditionalFields", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", + " required to access an identity, but can be pretty high." + ] + }, + { + "name": "MaxRegistrars", + "ty": 4, + "value": [ + 20, + 0, + 0, + 0 + ], + "docs": [ + " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", + " of, e.g., updating judgements." + ] + } + ], + "error": { + "ty": 479 + }, + "index": 26 + }, + { + "name": "Society", + "storage": { + "prefix": "Society", + "entries": [ + { + "name": "Founder", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The first member." + ] + }, + { + "name": "Rules", + "modifier": "Optional", + "ty": { + "Plain": 9 + }, + "default": [ + 0 + ], + "docs": [ + " A hash of the rules of this society concerning membership. Can only be set once and", + " only by the founder." + ] + }, + { + "name": "Candidates", + "modifier": "Default", + "ty": { + "Plain": 480 + }, + "default": [ + 0 + ], + "docs": [ + " The current set of candidates; bidders that are attempting to become members." + ] + }, + { + "name": "SuspendedCandidates", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 483 + } + }, + "default": [ + 0 + ], + "docs": [ + " The set of suspended candidates." + ] + }, + { + "name": "Pot", + "modifier": "Default", + "ty": { + "Plain": 6 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Amount of our account balance that is specifically for the next round's bid(s)." + ] + }, + { + "name": "Head", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The most primary from the most recently approved members." + ] + }, + { + "name": "Members", + "modifier": "Default", + "ty": { + "Plain": 40 + }, + "default": [ + 0 + ], + "docs": [ + " The current set of members, ordered." + ] + }, + { + "name": "SuspendedMembers", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 35 + } + }, + "default": [ + 0 + ], + "docs": [ + " The set of suspended members." + ] + }, + { + "name": "Bids", + "modifier": "Default", + "ty": { + "Plain": 480 + }, + "default": [ + 0 + ], + "docs": [ + " The current bids, stored ordered by the value of the bid." + ] + }, + { + "name": "Vouching", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 484 + } + }, + "default": [ + 0 + ], + "docs": [ + " Members currently vouching or banned from vouching again" + ] + }, + { + "name": "Payouts", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 485 + } + }, + "default": [ + 0 + ], + "docs": [ + " Pending payouts; ordered by block number, with the amount that should be paid out." + ] + }, + { + "name": "Strikes", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 4 + } + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The ongoing number of losing votes cast by the member." + ] + }, + { + "name": "Votes", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 487, + "value": 488 + } + }, + "default": [ + 0 + ], + "docs": [ + " Double map from Candidate -> Voter -> (Maybe) Vote." + ] + }, + { + "name": "Defender", + "modifier": "Optional", + "ty": { + "Plain": 0 + }, + "default": [ + 0 + ], + "docs": [ + " The defending member currently being challenged." + ] + }, + { + "name": "DefenderVotes", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 488 + } + }, + "default": [ + 0 + ], + "docs": [ + " Votes for the defender." + ] + }, + { + "name": "MaxMembers", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The max number of members for the society at one time." + ] + } + ] + }, + "calls": { + "ty": 296 + }, + "event": { + "ty": 71 + }, + "constants": [ + { + "name": "PalletId", + "ty": 443, + "value": [ + 112, + 121, + 47, + 115, + 111, + 99, + 105, + 101 + ], + "docs": [ + " The societies's pallet id" + ] + }, + { + "name": "CandidateDeposit", + "ty": 6, + "value": [ + 0, + 128, + 198, + 164, + 126, + 141, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount of a deposit required for a bid to be made." + ] + }, + { + "name": "WrongSideDeduction", + "ty": 6, + "value": [ + 0, + 128, + 244, + 32, + 230, + 181, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of the unpaid reward that gets deducted in the case that either a skeptic", + " doesn't vote or someone votes in the wrong way." + ] + }, + { + "name": "MaxStrikes", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " The number of times a member may vote the wrong way (or not at all, when they are a", + " skeptic) before they become suspended." + ] + }, + { + "name": "PeriodSpend", + "ty": 6, + "value": [ + 0, + 0, + 197, + 46, + 188, + 162, + 177, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of incentive paid within each period. Doesn't include VoterTip." + ] + }, + { + "name": "RotationPeriod", + "ty": 4, + "value": [ + 0, + 119, + 1, + 0 + ], + "docs": [ + " The number of blocks between candidate/membership rotation periods." + ] + }, + { + "name": "MaxLockDuration", + "ty": 4, + "value": [ + 0, + 156, + 218, + 1 + ], + "docs": [ + " The maximum duration of the payout lock." + ] + }, + { + "name": "ChallengePeriod", + "ty": 4, + "value": [ + 128, + 19, + 3, + 0 + ], + "docs": [ + " The number of blocks between membership challenges." + ] + }, + { + "name": "MaxCandidateIntake", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of candidates that we accept per round." + ] + } + ], + "error": { + "ty": 489 + }, + "index": 27 + }, + { + "name": "Recovery", + "storage": { + "prefix": "Recovery", + "entries": [ + { + "name": "Recoverable", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 490 + } + }, + "default": [ + 0 + ], + "docs": [ + " The set of recoverable accounts and their recovery configuration." + ] + }, + { + "name": "ActiveRecoveries", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 487, + "value": 492 + } + }, + "default": [ + 0 + ], + "docs": [ + " Active recovery attempts.", + "", + " First account is the account to be recovered, and the second account", + " is the user trying to recover the account." + ] + }, + { + "name": "Proxy", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 0 + } + }, + "default": [ + 0 + ], + "docs": [ + " The list of allowed proxy accounts.", + "", + " Map from the user who can access it to the recovered account." + ] + } + ] + }, + "calls": { + "ty": 298 + }, + "event": { + "ty": 72 + }, + "constants": [ + { + "name": "ConfigDepositBase", + "ty": 6, + "value": [ + 0, + 64, + 99, + 82, + 191, + 198, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The base amount of currency needed to reserve for creating a recovery configuration.", + "", + " This is held for an additional storage item whose value size is", + " `2 + sizeof(BlockNumber, Balance)` bytes." + ] + }, + { + "name": "FriendDepositFactor", + "ty": 6, + "value": [ + 0, + 32, + 61, + 136, + 121, + 45, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of currency needed per additional user when creating a recovery", + " configuration.", + "", + " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage", + " value." + ] + }, + { + "name": "MaxFriends", + "ty": 4, + "value": [ + 9, + 0, + 0, + 0 + ], + "docs": [ + " The maximum amount of friends allowed in a recovery configuration.", + "", + " NOTE: The threshold programmed in this Pallet uses u16, so it does", + " not really make sense to have a limit here greater than u16::MAX.", + " But also, that is a lot more than you should probably set this value", + " to anyway..." + ] + }, + { + "name": "RecoveryDeposit", + "ty": 6, + "value": [ + 0, + 64, + 99, + 82, + 191, + 198, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The base amount of currency needed to reserve for starting a recovery.", + "", + " This is primarily held for deterring malicious recovery attempts, and should", + " have a value large enough that a bad actor would choose not to place this", + " deposit. It also acts to fund additional storage item whose value size is", + " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable", + " threshold." + ] + } + ], + "error": { + "ty": 493 + }, + "index": 28 + }, + { + "name": "Vesting", + "storage": { + "prefix": "Vesting", + "entries": [ + { + "name": "Vesting", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 494 + } + }, + "default": [ + 0 + ], + "docs": [ + " Information regarding the vesting of a given account." + ] + }, + { + "name": "StorageVersion", + "modifier": "Default", + "ty": { + "Plain": 496 + }, + "default": [ + 0 + ], + "docs": [ + " Storage version of the pallet.", + "", + " New networks start with latest version, as determined by the genesis build." + ] + } + ] + }, + "calls": { + "ty": 299 + }, + "event": { + "ty": 73 + }, + "constants": [ + { + "name": "MinVestedTransfer", + "ty": 6, + "value": [ + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount transferred to call `vested_transfer`." + ] + }, + { + "name": "MaxVestingSchedules", + "ty": 4, + "value": [ + 28, + 0, + 0, + 0 + ], + "docs": [] + } + ], + "error": { + "ty": 497 + }, + "index": 29 + }, + { + "name": "Scheduler", + "storage": { + "prefix": "Scheduler", + "entries": [ + { + "name": "Agenda", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 498 + } + }, + "default": [ + 0 + ], + "docs": [ + " Items to be executed, indexed by the block number that they should be executed on." + ] + }, + { + "name": "Lookup", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 10, + "value": 75 + } + }, + "default": [ + 0 + ], + "docs": [ + " Lookup from identity to the block number and index of the task." + ] + } + ] + }, + "calls": { + "ty": 301 + }, + "event": { + "ty": 74 + }, + "constants": [ + { + "name": "MaximumWeight", + "ty": 8, + "value": [ + 0, + 128, + 110, + 135, + 116, + 1, + 0, + 0 + ], + "docs": [ + " The maximum weight that may be scheduled per block for any dispatchables of less", + " priority than `schedule::HARD_DEADLINE`." + ] + }, + { + "name": "MaxScheduledPerBlock", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " The maximum number of scheduled calls in the queue for a single block.", + " Not strictly enforced, but used for weight estimation." + ] + } + ], + "error": { + "ty": 501 + }, + "index": 30 + }, + { + "name": "Preimage", + "storage": { + "prefix": "Preimage", + "entries": [ + { + "name": "StatusFor", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 502 + } + }, + "default": [ + 0 + ], + "docs": [ + " The request status of a given hash." + ] + }, + { + "name": "PreimageFor", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 504 + } + }, + "default": [ + 0 + ], + "docs": [ + " The preimages stored by this pallet." + ] + } + ] + }, + "calls": { + "ty": 304 + }, + "event": { + "ty": 78 + }, + "constants": [], + "error": { + "ty": 505 + }, + "index": 31 + }, + { + "name": "Proxy", + "storage": { + "prefix": "Proxy", + "entries": [ + { + "name": "Proxies", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 506 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The set of account proxies. Maps the account which has delegated to the accounts", + " which are being delegated to, together with the amount held on deposit." + ] + }, + { + "name": "Announcements", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 510 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The announcements made by the proxy (key)." + ] + } + ] + }, + "calls": { + "ty": 305 + }, + "event": { + "ty": 79 + }, + "constants": [ + { + "name": "ProxyDepositBase", + "ty": 6, + "value": [ + 0, + 240, + 158, + 84, + 76, + 57, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The base amount of currency needed to reserve for creating a proxy.", + "", + " This is held for an additional storage item whose value size is", + " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes." + ] + }, + { + "name": "ProxyDepositFactor", + "ty": 6, + "value": [ + 0, + 96, + 170, + 119, + 20, + 180, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of currency needed per proxy added.", + "", + " This is held for adding 32 bytes plus an instance of `ProxyType` more into a", + " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take", + " into account `32 + proxy_type.encode().len()` bytes of data." + ] + }, + { + "name": "MaxProxies", + "ty": 4, + "value": [ + 32, + 0, + 0, + 0 + ], + "docs": [ + " The maximum amount of proxies allowed for a single account." + ] + }, + { + "name": "MaxPending", + "ty": 4, + "value": [ + 32, + 0, + 0, + 0 + ], + "docs": [ + " The maximum amount of time-delayed announcements that are allowed to be pending." + ] + }, + { + "name": "AnnouncementDepositBase", + "ty": 6, + "value": [ + 0, + 240, + 158, + 84, + 76, + 57, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The base amount of currency needed to reserve for creating an announcement.", + "", + " This is held when a new storage item holding a `Balance` is created (typically 16", + " bytes)." + ] + }, + { + "name": "AnnouncementDepositFactor", + "ty": 6, + "value": [ + 0, + 192, + 84, + 239, + 40, + 104, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of currency needed per announcement made.", + "", + " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)", + " into a pre-existing storage value." + ] + } + ], + "error": { + "ty": 514 + }, + "index": 32 + }, + { + "name": "Multisig", + "storage": { + "prefix": "Multisig", + "entries": [ + { + "name": "Multisigs", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Blake2_128Concat" + ], + "key": 515, + "value": 516 + } + }, + "default": [ + 0 + ], + "docs": [ + " The set of open multisig operations." + ] + }, + { + "name": "Calls", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 1, + "value": 517 + } + }, + "default": [ + 0 + ], + "docs": [] + } + ] + }, + "calls": { + "ty": 307 + }, + "event": { + "ty": 82 + }, + "constants": [ + { + "name": "DepositBase", + "ty": 6, + "value": [ + 0, + 240, + 28, + 10, + 219, + 237, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The base amount of currency needed to reserve for creating a multisig execution or to", + " store a dispatch call for later.", + "", + " This is held for an additional storage item whose value size is", + " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is", + " `32 + sizeof(AccountId)` bytes." + ] + }, + { + "name": "DepositFactor", + "ty": 6, + "value": [ + 0, + 0, + 204, + 123, + 159, + 174, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of currency needed per unit threshold when creating a multisig execution.", + "", + " This is held for adding 32 bytes more into a pre-existing storage value." + ] + }, + { + "name": "MaxSignatories", + "ty": 81, + "value": [ + 100, + 0 + ], + "docs": [ + " The maximum amount of signatories allowed in the multisig." + ] + } + ], + "error": { + "ty": 518 + }, + "index": 33 + }, + { + "name": "Bounties", + "storage": { + "prefix": "Bounties", + "entries": [ + { + "name": "BountyCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Number of bounty proposals that have been made." + ] + }, + { + "name": "Bounties", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 519 + } + }, + "default": [ + 0 + ], + "docs": [ + " Bounties that have been made." + ] + }, + { + "name": "BountyDescriptions", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 521 + } + }, + "default": [ + 0 + ], + "docs": [ + " The description of each bounty." + ] + }, + { + "name": "BountyApprovals", + "modifier": "Default", + "ty": { + "Plain": 440 + }, + "default": [ + 0 + ], + "docs": [ + " Bounty indices that have been approved but not yet funded." + ] + } + ] + }, + "calls": { + "ty": 310 + }, + "event": { + "ty": 84 + }, + "constants": [ + { + "name": "BountyDepositBase", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit for placing a bounty proposal." + ] + }, + { + "name": "BountyDepositPayoutDelay", + "ty": 4, + "value": [ + 128, + 112, + 0, + 0 + ], + "docs": [ + " The delay period for which a bounty beneficiary need to wait before claim the payout." + ] + }, + { + "name": "BountyUpdatePeriod", + "ty": 4, + "value": [ + 0, + 39, + 6, + 0 + ], + "docs": [ + " Bounty duration in blocks." + ] + }, + { + "name": "CuratorDepositMultiplier", + "ty": 441, + "value": [ + 32, + 161, + 7, + 0 + ], + "docs": [ + " The curator deposit is calculated as a percentage of the curator fee.", + "", + " This deposit has optional upper and lower bounds with `CuratorDepositMax` and", + " `CuratorDepositMin`." + ] + }, + { + "name": "CuratorDepositMax", + "ty": 442, + "value": [ + 1, + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Maximum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "CuratorDepositMin", + "ty": 442, + "value": [ + 1, + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "BountyValueMinimum", + "ty": 6, + "value": [ + 0, + 64, + 99, + 82, + 191, + 198, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Minimum value for a bounty." + ] + }, + { + "name": "DataDepositPerByte", + "ty": 6, + "value": [ + 0, + 16, + 165, + 212, + 232, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit per byte within the tip report reason or bounty description." + ] + }, + { + "name": "MaximumReasonLength", + "ty": 4, + "value": [ + 44, + 1, + 0, + 0 + ], + "docs": [ + " Maximum acceptable reason length.", + "", + " Benchmarks depend on this value, be sure to update weights file when changing this value" + ] + } + ], + "error": { + "ty": 522 + }, + "index": 34 + }, + { + "name": "Tips", + "storage": { + "prefix": "Tips", + "entries": [ + { + "name": "Tips", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 9, + "value": 523 + } + }, + "default": [ + 0 + ], + "docs": [ + " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", + " This has the insecure enumerable hash function since the key itself is already", + " guaranteed to be a secure hash." + ] + }, + { + "name": "Reasons", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 9, + "value": 10 + } + }, + "default": [ + 0 + ], + "docs": [ + " Simple preimage lookup from the reason's hash to the original data. Again, has an", + " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." + ] + } + ] + }, + "calls": { + "ty": 311 + }, + "event": { + "ty": 85 + }, + "constants": [ + { + "name": "MaximumReasonLength", + "ty": 4, + "value": [ + 44, + 1, + 0, + 0 + ], + "docs": [ + " Maximum acceptable reason length.", + "", + " Benchmarks depend on this value, be sure to update weights file when changing this value" + ] + }, + { + "name": "DataDepositPerByte", + "ty": 6, + "value": [ + 0, + 16, + 165, + 212, + 232, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit per byte within the tip report reason or bounty description." + ] + }, + { + "name": "TipCountdown", + "ty": 4, + "value": [ + 128, + 112, + 0, + 0 + ], + "docs": [ + " The period for which a tip remains open after is has achieved threshold tippers." + ] + }, + { + "name": "TipFindersFee", + "ty": 217, + "value": [ + 20 + ], + "docs": [ + " The percent of the final tip which goes to the original reporter of the tip." + ] + }, + { + "name": "TipReportDepositBase", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount held on deposit for placing a tip report." + ] + } + ], + "error": { + "ty": 524 + }, + "index": 35 + }, + { + "name": "Assets", + "storage": { + "prefix": "Assets", + "entries": [ + { + "name": "Asset", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 525 + } + }, + "default": [ + 0 + ], + "docs": [ + " Details of an asset." + ] + }, + { + "name": "Account", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 389, + "value": 526 + } + }, + "default": [ + 0 + ], + "docs": [ + " The holdings of a specific account for a specific asset." + ] + }, + { + "name": "Approvals", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 528, + "value": 529 + } + }, + "default": [ + 0 + ], + "docs": [ + " Approved balance transfers. First balance is the amount approved for transfer. Second", + " is the amount of `T::Currency` reserved for storing this.", + " First key is the asset ID, second key is the owner and third key is the delegate." + ] + }, + { + "name": "Metadata", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 530 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Metadata of an asset." + ] + } + ] + }, + "calls": { + "ty": 312 + }, + "event": { + "ty": 86 + }, + "constants": [ + { + "name": "AssetDeposit", + "ty": 6, + "value": [ + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The basic amount of funds that must be reserved for an asset." + ] + }, + { + "name": "AssetAccountDeposit", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of funds that must be reserved for a non-provider asset account to be", + " maintained." + ] + }, + { + "name": "MetadataDepositBase", + "ty": 6, + "value": [ + 0, + 128, + 198, + 164, + 126, + 141, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The basic amount of funds that must be reserved when adding metadata to your asset." + ] + }, + { + "name": "MetadataDepositPerByte", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The additional funds that must be reserved for the number of bytes you store in your", + " metadata." + ] + }, + { + "name": "ApprovalDeposit", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The amount of funds that must be reserved when creating a new approval." + ] + }, + { + "name": "StringLimit", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " The maximum length of a name or symbol stored on-chain." + ] + } + ], + "error": { + "ty": 531 + }, + "index": 36 + }, + { + "name": "Mmr", + "storage": { + "prefix": "Mmr", + "entries": [ + { + "name": "RootHash", + "modifier": "Default", + "ty": { + "Plain": 9 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Latest MMR Root hash." + ] + }, + { + "name": "NumberOfLeaves", + "modifier": "Default", + "ty": { + "Plain": 8 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Current size of the MMR (number of leaves)." + ] + }, + { + "name": "Nodes", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Identity" + ], + "key": 8, + "value": 9 + } + }, + "default": [ + 0 + ], + "docs": [ + " Hashes of the nodes in the MMR.", + "", + " Note this collection only contains MMR peaks, the inner nodes (and leaves)", + " are pruned and only stored in the Offchain DB." + ] + } + ] + }, + "calls": null, + "event": null, + "constants": [], + "error": null, + "index": 37 + }, + { + "name": "Lottery", + "storage": { + "prefix": "Lottery", + "entries": [ + { + "name": "LotteryIndex", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [] + }, + { + "name": "Lottery", + "modifier": "Optional", + "ty": { + "Plain": 532 + }, + "default": [ + 0 + ], + "docs": [ + " The configuration for the current lottery." + ] + }, + { + "name": "Participants", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 533 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)" + ] + }, + { + "name": "TicketsCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Total number of tickets sold." + ] + }, + { + "name": "Tickets", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 0 + } + }, + "default": [ + 0 + ], + "docs": [ + " Each ticket's owner.", + "", + " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones", + " are actually valid ticket mappings." + ] + }, + { + "name": "CallIndices", + "modifier": "Default", + "ty": { + "Plain": 534 + }, + "default": [ + 0 + ], + "docs": [ + " The calls stored in this pallet to be used in an active lottery if configured", + " by `Config::ValidateCall`." + ] + } + ] + }, + "calls": { + "ty": 314 + }, + "event": { + "ty": 87 + }, + "constants": [ + { + "name": "PalletId", + "ty": 443, + "value": [ + 112, + 121, + 47, + 108, + 111, + 116, + 116, + 111 + ], + "docs": [ + " The Lottery's pallet id" + ] + }, + { + "name": "MaxCalls", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " The max number of calls available in a single lottery." + ] + }, + { + "name": "MaxGenerateRandom", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " Number of time we should try to generate a random number that has no modulo bias.", + " The larger this number, the more potential computation is used for picking the winner,", + " but also the more likely that the chosen winner is done fairly." + ] + } + ], + "error": { + "ty": 536 + }, + "index": 38 + }, + { + "name": "Gilt", + "storage": { + "prefix": "Gilt", + "entries": [ + { + "name": "QueueTotals", + "modifier": "Default", + "ty": { + "Plain": 537 + }, + "default": [ + 0 + ], + "docs": [ + " The totals of items and balances within each queue. Saves a lot of storage reads in the", + " case of sparsely packed queues.", + "", + " The vector is indexed by duration in `Period`s, offset by one, so information on the queue", + " whose duration is one `Period` would be storage `0`." + ] + }, + { + "name": "Queues", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 538 + } + }, + "default": [ + 0 + ], + "docs": [ + " The queues of bids ready to become gilts. Indexed by duration (in `Period`s)." + ] + }, + { + "name": "ActiveTotal", + "modifier": "Default", + "ty": { + "Plain": 541 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Information relating to the gilts currently active." + ] + }, + { + "name": "Active", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 542 + } + }, + "default": [ + 0 + ], + "docs": [ + " The currently active gilts, indexed according to the order of creation." + ] + } + ] + }, + "calls": { + "ty": 315 + }, + "event": { + "ty": 89 + }, + "constants": [ + { + "name": "QueueCount", + "ty": 4, + "value": [ + 44, + 1, + 0, + 0 + ], + "docs": [ + " Number of duration queues in total. This sets the maximum duration supported, which is", + " this value multiplied by `Period`." + ] + }, + { + "name": "MaxQueueLen", + "ty": 4, + "value": [ + 232, + 3, + 0, + 0 + ], + "docs": [ + " Maximum number of items that may be in each duration queue." + ] + }, + { + "name": "FifoQueueLen", + "ty": 4, + "value": [ + 244, + 1, + 0, + 0 + ], + "docs": [ + " Portion of the queue which is free from ordering and just a FIFO.", + "", + " Must be no greater than `MaxQueueLen`." + ] + }, + { + "name": "Period", + "ty": 4, + "value": [ + 0, + 47, + 13, + 0 + ], + "docs": [ + " The base period for the duration queues. This is the common multiple across all", + " supported freezing durations that can be bid upon." + ] + }, + { + "name": "MinFreeze", + "ty": 6, + "value": [ + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount of funds that may be offered to freeze for a gilt. Note that this", + " does not actually limit the amount which may be frozen in a gilt since gilts may be", + " split up in order to satisfy the desired amount of funds under gilts.", + "", + " It should be at least big enough to ensure that there is no possible storage spam attack", + " or queue-filling attack." + ] + }, + { + "name": "IntakePeriod", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " The number of blocks between consecutive attempts to issue more gilts in an effort to", + " get to the target amount to be frozen.", + "", + " A larger value results in fewer storage hits each block, but a slower period to get to", + " the target." + ] + }, + { + "name": "MaxIntakeBids", + "ty": 4, + "value": [ + 10, + 0, + 0, + 0 + ], + "docs": [ + " The maximum amount of bids that can be turned into issued gilts each block. A larger", + " value here means less of the block available for transactions should there be a glut of", + " bids to make into gilts to reach the target." + ] + } + ], + "error": { + "ty": 543 + }, + "index": 39 + }, + { + "name": "Uniques", + "storage": { + "prefix": "Uniques", + "entries": [ + { + "name": "Class", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 544 + } + }, + "default": [ + 0 + ], + "docs": [ + " Details of an asset class." + ] + }, + { + "name": "OwnershipAcceptance", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 0, + "value": 4 + } + }, + "default": [ + 0 + ], + "docs": [ + " The class, if any, of which an account is willing to take ownership." + ] + }, + { + "name": "Account", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 545, + "value": 29 + } + }, + "default": [ + 0 + ], + "docs": [ + " The assets held by any given account; set out this way so that assets owned by a single", + " account can be enumerated." + ] + }, + { + "name": "ClassAccount", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 393, + "value": 29 + } + }, + "default": [ + 0 + ], + "docs": [ + " The classes owned by any given account; set out this way so that classes owned by a single", + " account can be enumerated." + ] + }, + { + "name": "Asset", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 75, + "value": 546 + } + }, + "default": [ + 0 + ], + "docs": [ + " The assets in existence and their ownership details." + ] + }, + { + "name": "ClassMetadataOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 547 + } + }, + "default": [ + 0 + ], + "docs": [ + " Metadata of an asset class." + ] + }, + { + "name": "InstanceMetadataOf", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 75, + "value": 548 + } + }, + "default": [ + 0 + ], + "docs": [ + " Metadata of an asset instance." + ] + }, + { + "name": "Attribute", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat", + "Blake2_128Concat", + "Blake2_128Concat" + ], + "key": 549, + "value": 550 + } + }, + "default": [ + 0 + ], + "docs": [ + " Metadata of an asset class." + ] + } + ] + }, + "calls": { + "ty": 318 + }, + "event": { + "ty": 90 + }, + "constants": [ + { + "name": "ClassDeposit", + "ty": 6, + "value": [ + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The basic amount of funds that must be reserved for an asset class." + ] + }, + { + "name": "InstanceDeposit", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The basic amount of funds that must be reserved for an asset instance." + ] + }, + { + "name": "MetadataDepositBase", + "ty": 6, + "value": [ + 0, + 128, + 198, + 164, + 126, + 141, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The basic amount of funds that must be reserved when adding metadata to your asset." + ] + }, + { + "name": "AttributeDepositBase", + "ty": 6, + "value": [ + 0, + 128, + 198, + 164, + 126, + 141, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The basic amount of funds that must be reserved when adding an attribute to an asset." + ] + }, + { + "name": "DepositPerByte", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The additional funds that must be reserved for the number of bytes store in metadata,", + " either \"normal\" metadata or attribute metadata." + ] + }, + { + "name": "StringLimit", + "ty": 4, + "value": [ + 50, + 0, + 0, + 0 + ], + "docs": [ + " The maximum length of data stored on-chain." + ] + }, + { + "name": "KeyLimit", + "ty": 4, + "value": [ + 32, + 0, + 0, + 0 + ], + "docs": [ + " The maximum length of an attribute key." + ] + }, + { + "name": "ValueLimit", + "ty": 4, + "value": [ + 0, + 1, + 0, + 0 + ], + "docs": [ + " The maximum length of an attribute value." + ] + } + ], + "error": { + "ty": 551 + }, + "index": 40 + }, + { + "name": "TransactionStorage", + "storage": { + "prefix": "TransactionStorage", + "entries": [ + { + "name": "Transactions", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 552 + } + }, + "default": [ + 0 + ], + "docs": [ + " Collection of transaction metadata by block number." + ] + }, + { + "name": "ChunkCount", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 4 + } + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Count indexed chunks for each block." + ] + }, + { + "name": "ByteFee", + "modifier": "Optional", + "ty": { + "Plain": 6 + }, + "default": [ + 0 + ], + "docs": [ + " Storage fee per byte." + ] + }, + { + "name": "EntryFee", + "modifier": "Optional", + "ty": { + "Plain": 6 + }, + "default": [ + 0 + ], + "docs": [ + " Storage fee per transaction." + ] + }, + { + "name": "MaxTransactionSize", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Maximum data set in a single transaction in bytes." + ] + }, + { + "name": "MaxBlockTransactions", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Maximum number of indexed transactions in the block." + ] + }, + { + "name": "StoragePeriod", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`", + " for block authoring." + ] + }, + { + "name": "BlockTransactions", + "modifier": "Default", + "ty": { + "Plain": 552 + }, + "default": [ + 0 + ], + "docs": [] + }, + { + "name": "ProofChecked", + "modifier": "Default", + "ty": { + "Plain": 35 + }, + "default": [ + 0 + ], + "docs": [ + " Was the proof checked in this block?" + ] + } + ] + }, + "calls": { + "ty": 321 + }, + "event": { + "ty": 96 + }, + "constants": [], + "error": { + "ty": 554 + }, + "index": 41 + }, + { + "name": "BagsList", + "storage": { + "prefix": "BagsList", + "entries": [ + { + "name": "ListNodes", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 555 + } + }, + "default": [ + 0 + ], + "docs": [ + " A single node, within some bag.", + "", + " Nodes store links forward and back within their respective bags." + ] + }, + { + "name": "CounterForListNodes", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + "Counter for the related counted storage map" + ] + }, + { + "name": "ListBags", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 8, + "value": 556 + } + }, + "default": [ + 0 + ], + "docs": [ + " A bag stored in storage.", + "", + " Stores a `Bag` struct, which stores head and tail pointers to itself." + ] + } + ] + }, + "calls": { + "ty": 323 + }, + "event": { + "ty": 97 + }, + "constants": [ + { + "name": "BagThresholds", + "ty": 557, + "value": [ + 33, + 3, + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 106, + 112, + 204, + 212, + 169, + 96, + 0, + 0, + 158, + 243, + 57, + 127, + 188, + 102, + 0, + 0, + 169, + 7, + 204, + 213, + 48, + 109, + 0, + 0, + 61, + 154, + 103, + 251, + 12, + 116, + 0, + 0, + 169, + 191, + 162, + 117, + 87, + 123, + 0, + 0, + 166, + 253, + 247, + 50, + 23, + 131, + 0, + 0, + 3, + 79, + 93, + 145, + 83, + 139, + 0, + 0, + 19, + 36, + 69, + 101, + 20, + 148, + 0, + 0, + 120, + 8, + 16, + 1, + 98, + 157, + 0, + 0, + 3, + 2, + 246, + 60, + 69, + 167, + 0, + 0, + 57, + 46, + 111, + 127, + 199, + 177, + 0, + 0, + 245, + 156, + 35, + 198, + 242, + 188, + 0, + 0, + 74, + 231, + 106, + 175, + 209, + 200, + 0, + 0, + 89, + 138, + 100, + 132, + 111, + 213, + 0, + 0, + 18, + 159, + 178, + 67, + 216, + 226, + 0, + 0, + 63, + 34, + 225, + 172, + 24, + 241, + 0, + 0, + 51, + 164, + 132, + 76, + 62, + 0, + 1, + 0, + 226, + 229, + 27, + 137, + 87, + 16, + 1, + 0, + 118, + 162, + 192, + 176, + 115, + 33, + 1, + 0, + 103, + 137, + 180, + 7, + 163, + 51, + 1, + 0, + 121, + 62, + 216, + 215, + 246, + 70, + 1, + 0, + 120, + 19, + 27, + 129, + 129, + 91, + 1, + 0, + 12, + 28, + 243, + 138, + 86, + 113, + 1, + 0, + 68, + 55, + 238, + 182, + 138, + 136, + 1, + 0, + 158, + 181, + 109, + 20, + 52, + 161, + 1, + 0, + 51, + 94, + 159, + 21, + 106, + 187, + 1, + 0, + 103, + 195, + 199, + 165, + 69, + 215, + 1, + 0, + 50, + 24, + 243, + 64, + 225, + 244, + 1, + 0, + 222, + 11, + 35, + 13, + 89, + 20, + 2, + 0, + 105, + 156, + 17, + 245, + 202, + 53, + 2, + 0, + 173, + 80, + 162, + 196, + 86, + 89, + 2, + 0, + 154, + 228, + 28, + 71, + 30, + 127, + 2, + 0, + 208, + 36, + 78, + 103, + 69, + 167, + 2, + 0, + 249, + 132, + 173, + 81, + 242, + 209, + 2, + 0, + 172, + 231, + 167, + 152, + 77, + 255, + 2, + 0, + 161, + 24, + 50, + 91, + 130, + 47, + 3, + 0, + 255, + 164, + 199, + 109, + 190, + 98, + 3, + 0, + 88, + 11, + 253, + 133, + 50, + 153, + 3, + 0, + 169, + 175, + 206, + 104, + 18, + 211, + 3, + 0, + 16, + 154, + 216, + 27, + 149, + 16, + 4, + 0, + 217, + 202, + 165, + 25, + 245, + 81, + 4, + 0, + 56, + 223, + 72, + 137, + 112, + 151, + 4, + 0, + 190, + 225, + 114, + 121, + 73, + 225, + 4, + 0, + 204, + 115, + 64, + 31, + 198, + 47, + 5, + 0, + 179, + 4, + 249, + 24, + 49, + 131, + 5, + 0, + 130, + 139, + 255, + 180, + 217, + 219, + 5, + 0, + 18, + 53, + 56, + 61, + 20, + 58, + 6, + 0, + 165, + 180, + 42, + 71, + 58, + 158, + 6, + 0, + 54, + 102, + 45, + 9, + 171, + 8, + 7, + 0, + 247, + 58, + 234, + 180, + 203, + 121, + 7, + 0, + 184, + 126, + 147, + 215, + 7, + 242, + 7, + 0, + 255, + 236, + 35, + 192, + 209, + 113, + 8, + 0, + 184, + 75, + 11, + 236, + 162, + 249, + 8, + 0, + 201, + 220, + 174, + 122, + 252, + 137, + 9, + 0, + 145, + 117, + 43, + 168, + 103, + 35, + 10, + 0, + 100, + 241, + 205, + 79, + 118, + 198, + 10, + 0, + 54, + 9, + 190, + 118, + 195, + 115, + 11, + 0, + 120, + 101, + 95, + 223, + 243, + 43, + 12, + 0, + 164, + 7, + 245, + 165, + 182, + 239, + 12, + 0, + 82, + 246, + 27, + 231, + 197, + 191, + 13, + 0, + 218, + 113, + 187, + 112, + 231, + 156, + 14, + 0, + 13, + 233, + 18, + 126, + 237, + 135, + 15, + 0, + 20, + 119, + 152, + 127, + 183, + 129, + 16, + 0, + 235, + 238, + 101, + 239, + 50, + 139, + 17, + 0, + 18, + 105, + 254, + 50, + 92, + 165, + 18, + 0, + 51, + 248, + 66, + 139, + 63, + 209, + 19, + 0, + 139, + 165, + 122, + 19, + 250, + 15, + 21, + 0, + 27, + 43, + 96, + 208, + 186, + 98, + 22, + 0, + 13, + 29, + 55, + 208, + 195, + 202, + 23, + 0, + 108, + 100, + 250, + 92, + 107, + 73, + 25, + 0, + 38, + 34, + 199, + 65, + 29, + 224, + 26, + 0, + 4, + 91, + 185, + 36, + 92, + 144, + 28, + 0, + 35, + 61, + 131, + 246, + 194, + 91, + 30, + 0, + 200, + 119, + 28, + 121, + 6, + 68, + 32, + 0, + 48, + 19, + 253, + 222, + 246, + 74, + 34, + 0, + 170, + 139, + 110, + 132, + 129, + 114, + 36, + 0, + 130, + 192, + 150, + 196, + 178, + 188, + 38, + 0, + 22, + 163, + 250, + 235, + 183, + 43, + 41, + 0, + 130, + 150, + 82, + 74, + 225, + 193, + 43, + 0, + 166, + 54, + 168, + 101, + 164, + 129, + 46, + 0, + 208, + 226, + 212, + 80, + 158, + 109, + 49, + 0, + 156, + 10, + 154, + 39, + 150, + 136, + 52, + 0, + 228, + 250, + 175, + 178, + 127, + 213, + 55, + 0, + 230, + 230, + 77, + 54, + 126, + 87, + 59, + 0, + 14, + 75, + 214, + 109, + 231, + 17, + 63, + 0, + 136, + 177, + 125, + 183, + 70, + 8, + 67, + 0, + 176, + 125, + 239, + 114, + 96, + 62, + 71, + 0, + 52, + 222, + 36, + 150, + 53, + 184, + 75, + 0, + 212, + 139, + 213, + 123, + 7, + 122, + 80, + 0, + 208, + 189, + 32, + 239, + 91, + 136, + 85, + 0, + 184, + 240, + 70, + 120, + 1, + 232, + 90, + 0, + 16, + 248, + 138, + 238, + 19, + 158, + 96, + 0, + 56, + 146, + 146, + 83, + 1, + 176, + 102, + 0, + 156, + 149, + 228, + 252, + 142, + 35, + 109, + 0, + 180, + 18, + 109, + 16, + 223, + 254, + 115, + 0, + 40, + 180, + 62, + 89, + 118, + 72, + 123, + 0, + 160, + 138, + 28, + 122, + 66, + 7, + 131, + 0, + 176, + 154, + 176, + 131, + 160, + 66, + 139, + 0, + 40, + 70, + 178, + 244, + 99, + 2, + 148, + 0, + 200, + 97, + 164, + 42, + 222, + 78, + 157, + 0, + 80, + 210, + 61, + 74, + 230, + 48, + 167, + 0, + 128, + 81, + 1, + 167, + 225, + 177, + 177, + 0, + 56, + 229, + 1, + 178, + 204, + 219, + 188, + 0, + 32, + 22, + 82, + 120, + 68, + 185, + 200, + 0, + 56, + 137, + 36, + 186, + 144, + 85, + 213, + 0, + 112, + 202, + 53, + 164, + 174, + 188, + 226, + 0, + 128, + 95, + 177, + 53, + 92, + 251, + 240, + 0, + 128, + 53, + 104, + 93, + 36, + 31, + 0, + 1, + 160, + 195, + 220, + 217, + 107, + 54, + 16, + 1, + 208, + 120, + 98, + 232, + 126, + 80, + 33, + 1, + 96, + 232, + 82, + 208, + 159, + 125, + 51, + 1, + 144, + 102, + 44, + 88, + 22, + 207, + 70, + 1, + 16, + 39, + 76, + 51, + 64, + 87, + 91, + 1, + 128, + 75, + 226, + 119, + 162, + 41, + 113, + 1, + 48, + 130, + 185, + 45, + 252, + 90, + 136, + 1, + 128, + 210, + 118, + 7, + 90, + 1, + 161, + 1, + 176, + 245, + 17, + 89, + 43, + 52, + 187, + 1, + 64, + 49, + 116, + 95, + 88, + 12, + 215, + 1, + 128, + 47, + 108, + 238, + 89, + 164, + 244, + 1, + 64, + 255, + 121, + 155, + 82, + 24, + 20, + 2, + 96, + 117, + 96, + 125, + 41, + 134, + 53, + 2, + 96, + 253, + 233, + 153, + 166, + 13, + 89, + 2, + 0, + 229, + 231, + 28, + 145, + 208, + 126, + 2, + 192, + 223, + 37, + 117, + 207, + 242, + 166, + 2, + 160, + 127, + 217, + 117, + 137, + 154, + 209, + 2, + 160, + 103, + 0, + 157, + 76, + 240, + 254, + 2, + 32, + 220, + 41, + 161, + 50, + 31, + 47, + 3, + 32, + 255, + 82, + 107, + 10, + 85, + 98, + 3, + 128, + 136, + 202, + 163, + 131, + 194, + 152, + 3, + 224, + 86, + 131, + 251, + 92, + 155, + 210, + 3, + 64, + 29, + 215, + 93, + 149, + 22, + 16, + 4, + 0, + 49, + 126, + 57, + 160, + 110, + 81, + 4, + 192, + 176, + 113, + 18, + 157, + 225, + 150, + 4, + 128, + 180, + 140, + 145, + 146, + 177, + 224, + 4, + 128, + 232, + 18, + 74, + 173, + 36, + 47, + 5, + 192, + 7, + 202, + 112, + 130, + 133, + 130, + 5, + 0, + 124, + 19, + 196, + 86, + 35, + 219, + 5, + 64, + 131, + 111, + 232, + 105, + 82, + 57, + 6, + 192, + 112, + 15, + 129, + 70, + 108, + 157, + 6, + 64, + 240, + 156, + 80, + 23, + 208, + 7, + 7, + 192, + 230, + 36, + 179, + 1, + 227, + 120, + 7, + 192, + 51, + 42, + 199, + 133, + 16, + 241, + 7, + 128, + 7, + 76, + 161, + 228, + 202, + 112, + 8, + 0, + 213, + 169, + 235, + 140, + 139, + 248, + 8, + 0, + 168, + 73, + 88, + 142, + 211, + 136, + 9, + 0, + 128, + 66, + 84, + 20, + 44, + 34, + 10, + 128, + 162, + 81, + 112, + 232, + 38, + 197, + 10, + 0, + 232, + 213, + 250, + 252, + 94, + 114, + 11, + 128, + 29, + 246, + 78, + 0, + 121, + 42, + 12, + 128, + 212, + 254, + 100, + 249, + 35, + 238, + 12, + 0, + 109, + 208, + 56, + 238, + 25, + 190, + 13, + 0, + 30, + 144, + 164, + 148, + 32, + 155, + 14, + 0, + 16, + 191, + 87, + 14, + 10, + 134, + 15, + 0, + 218, + 106, + 157, + 176, + 181, + 127, + 16, + 0, + 191, + 100, + 175, + 216, + 16, + 137, + 17, + 0, + 187, + 91, + 96, + 205, + 23, + 163, + 18, + 0, + 249, + 99, + 243, + 174, + 214, + 206, + 19, + 0, + 213, + 240, + 4, + 118, + 106, + 13, + 21, + 0, + 224, + 153, + 119, + 2, + 2, + 96, + 22, + 0, + 16, + 61, + 102, + 59, + 223, + 199, + 23, + 0, + 222, + 62, + 45, + 65, + 88, + 70, + 25, + 0, + 236, + 219, + 173, + 178, + 216, + 220, + 26, + 0, + 69, + 199, + 0, + 7, + 227, + 140, + 28, + 0, + 184, + 189, + 224, + 252, + 17, + 88, + 30, + 0, + 186, + 92, + 42, + 33, + 26, + 64, + 32, + 0, + 64, + 125, + 228, + 109, + 203, + 70, + 34, + 0, + 222, + 165, + 91, + 3, + 19, + 110, + 36, + 0, + 170, + 241, + 243, + 252, + 252, + 183, + 38, + 0, + 20, + 34, + 111, + 99, + 182, + 38, + 41, + 0, + 100, + 146, + 128, + 62, + 143, + 188, + 43, + 0, + 132, + 134, + 166, + 199, + 252, + 123, + 46, + 0, + 44, + 240, + 95, + 192, + 155, + 103, + 49, + 0, + 218, + 99, + 247, + 237, + 50, + 130, + 52, + 0, + 240, + 177, + 63, + 189, + 181, + 206, + 55, + 0, + 242, + 145, + 196, + 16, + 71, + 80, + 59, + 0, + 66, + 42, + 26, + 60, + 60, + 10, + 63, + 0, + 44, + 36, + 33, + 47, + 32, + 0, + 67, + 0, + 172, + 147, + 66, + 212, + 182, + 53, + 71, + 0, + 204, + 110, + 215, + 164, + 0, + 175, + 75, + 0, + 196, + 208, + 34, + 119, + 62, + 112, + 80, + 0, + 32, + 1, + 125, + 137, + 245, + 125, + 85, + 0, + 248, + 99, + 135, + 206, + 243, + 220, + 90, + 0, + 140, + 76, + 127, + 126, + 84, + 146, + 96, + 0, + 32, + 98, + 7, + 242, + 132, + 163, + 102, + 0, + 204, + 30, + 5, + 203, + 73, + 22, + 109, + 0, + 180, + 42, + 122, + 112, + 196, + 240, + 115, + 0, + 212, + 58, + 144, + 226, + 120, + 57, + 123, + 0, + 56, + 244, + 97, + 236, + 83, + 247, + 130, + 0, + 160, + 114, + 100, + 185, + 177, + 49, + 139, + 0, + 72, + 201, + 179, + 212, + 100, + 240, + 147, + 0, + 0, + 127, + 233, + 152, + 189, + 59, + 157, + 0, + 16, + 5, + 143, + 23, + 146, + 28, + 167, + 0, + 0, + 223, + 175, + 127, + 70, + 156, + 177, + 0, + 232, + 12, + 136, + 11, + 214, + 196, + 188, + 0, + 88, + 189, + 203, + 125, + 220, + 160, + 200, + 0, + 56, + 209, + 141, + 55, + 160, + 59, + 213, + 0, + 48, + 213, + 91, + 240, + 28, + 161, + 226, + 0, + 112, + 74, + 192, + 26, + 15, + 222, + 240, + 255, + 255, + 255, + 255, + 255, + 255, + 255, + 255 + ], + "docs": [ + " The list of thresholds separating the various bags.", + "", + " Ids are separated into unsorted bags according to their score. This specifies the", + " thresholds separating the bags. An id's bag is the largest bag for which the id's score", + " is less than or equal to its upper threshold.", + "", + " When ids are iterated, higher bags are iterated completely before lower bags. This means", + " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower", + " score, but peer ids within a particular bag are sorted in insertion order.", + "", + " # Expressing the constant", + "", + " This constant must be sorted in strictly increasing order. Duplicate items are not", + " permitted.", + "", + " There is an implied upper limit of `Score::MAX`; that value does not need to be", + " specified within the bag. For any two threshold lists, if one ends with", + " `Score::MAX`, the other one does not, and they are otherwise equal, the two", + " lists will behave identically.", + "", + " # Calculation", + "", + " It is recommended to generate the set of thresholds in a geometric series, such that", + " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *", + " constant_ratio).max(threshold[k] + 1)` for all `k`.", + "", + " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.", + "", + " # Examples", + "", + " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and", + " iteration is strictly in insertion order.", + " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to", + " the procedure given above, then the constant ratio is equal to 2.", + " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to", + " the procedure given above, then the constant ratio is approximately equal to 1.248.", + " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall", + " into bag 0, an id with score 2 will fall into bag 1, etc.", + "", + " # Migration", + "", + " In the event that this list ever changes, a copy of the old bags list must be retained.", + " With that `List::migrate` can be called, which will perform the appropriate migration." + ] + } + ], + "error": { + "ty": 558 + }, + "index": 42 + }, + { + "name": "StateTrieMigration", + "storage": { + "prefix": "StateTrieMigration", + "entries": [ + { + "name": "MigrationProcess", + "modifier": "Default", + "ty": { + "Plain": 327 + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Migration progress.", + "", + " This stores the snapshot of the last migrated keys. It can be set into motion and move", + " forward by any of the means provided by this pallet." + ] + }, + { + "name": "AutoLimits", + "modifier": "Default", + "ty": { + "Plain": 325 + }, + "default": [ + 0 + ], + "docs": [ + " The limits that are imposed on automatic migrations.", + "", + " If set to None, then no automatic migration happens." + ] + }, + { + "name": "SignedMigrationMaxLimits", + "modifier": "Optional", + "ty": { + "Plain": 326 + }, + "default": [ + 0 + ], + "docs": [ + " The maximum limits that the signed migration could use.", + "", + " If not set, no signed submission is allowed." + ] + } + ] + }, + "calls": { + "ty": 324 + }, + "event": { + "ty": 98 + }, + "constants": [], + "error": { + "ty": 559 + }, + "index": 43 + }, + { + "name": "ChildBounties", + "storage": { + "prefix": "ChildBounties", + "entries": [ + { + "name": "ChildBountyCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Number of total child bounties." + ] + }, + { + "name": "ParentChildBounties", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 4 + } + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " Number of child-bounties per parent bounty.", + " Map of parent bounty index to number of child bounties." + ] + }, + { + "name": "ChildBounties", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 75, + "value": 560 + } + }, + "default": [ + 0 + ], + "docs": [ + " Child-bounties that have been added." + ] + }, + { + "name": "ChildBountyDescriptions", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 521 + } + }, + "default": [ + 0 + ], + "docs": [ + " The description of each child-bounty." + ] + }, + { + "name": "ChildrenCuratorFees", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 4, + "value": 6 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The cumulative child-bounty curator fee for each parent bounty." + ] + } + ] + }, + "calls": { + "ty": 329 + }, + "event": { + "ty": 100 + }, + "constants": [ + { + "name": "MaxActiveChildBountyCount", + "ty": 4, + "value": [ + 5, + 0, + 0, + 0 + ], + "docs": [ + " Maximum number of child-bounties that can be added to a parent bounty." + ] + }, + { + "name": "ChildBountyValueMinimum", + "ty": 6, + "value": [ + 0, + 64, + 122, + 16, + 243, + 90, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " Minimum value for a child-bounty." + ] + } + ], + "error": { + "ty": 562 + }, + "index": 44 + }, + { + "name": "Referenda", + "storage": { + "prefix": "Referenda", + "entries": [ + { + "name": "ReferendumCount", + "modifier": "Default", + "ty": { + "Plain": 4 + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The next free referendum index, aka the number of referenda started so far." + ] + }, + { + "name": "ReferendumInfoFor", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Blake2_128Concat" + ], + "key": 4, + "value": 563 + } + }, + "default": [ + 0 + ], + "docs": [ + " Information concerning any given referendum." + ] + }, + { + "name": "TrackQueue", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 2, + "value": 571 + } + }, + "default": [ + 0 + ], + "docs": [ + " The sorted list of referenda ready to be decided but not yet being decided, ordered by", + " conviction-weighted approvals.", + "", + " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`." + ] + }, + { + "name": "DecidingCount", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 2, + "value": 4 + } + }, + "default": [ + 0, + 0, + 0, + 0 + ], + "docs": [ + " The number of referenda being decided currently." + ] + } + ] + }, + "calls": { + "ty": 330 + }, + "event": { + "ty": 101 + }, + "constants": [ + { + "name": "SubmissionDeposit", + "ty": 6, + "value": [ + 0, + 0, + 193, + 111, + 242, + 134, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "MaxQueued", + "ty": 4, + "value": [ + 100, + 0, + 0, + 0 + ], + "docs": [ + " Maximum size of the referendum queue for a single track." + ] + }, + { + "name": "UndecidingTimeout", + "ty": 4, + "value": [ + 0, + 78, + 12, + 0 + ], + "docs": [ + " The number of blocks after submission that a referendum must begin being decided by.", + " Once this passes, then anyone may cancel the referendum." + ] + }, + { + "name": "AlarmInterval", + "ty": 4, + "value": [ + 1, + 0, + 0, + 0 + ], + "docs": [ + " Quantization level for the referendum wakeup scheduler. A higher number will result in", + " fewer storage reads/writes needed for smaller voters, but also result in delays to the", + " automatic referendum status changes. Explicit servicing instructions are unaffected." + ] + } + ], + "error": { + "ty": 572 + }, + "index": 45 + }, + { + "name": "ConvictionVoting", + "storage": { + "prefix": "ConvictionVoting", + "entries": [ + { + "name": "VotingFor", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat", + "Twox64Concat" + ], + "key": 573, + "value": 574 + } + }, + "default": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "docs": [ + " All voting for a particular voter in a particular voting class. We store the balance for the", + " number of votes that we have recorded." + ] + }, + { + "name": "ClassLocksFor", + "modifier": "Default", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 0, + "value": 582 + } + }, + "default": [ + 0 + ], + "docs": [ + " The voting classes which have a non-zero lock requirement and the lock amounts which they", + " require. The actual amount locked on behalf of this pallet should always be the maximum of", + " this list." + ] + } + ] + }, + "calls": { + "ty": 337 + }, + "event": { + "ty": 103 + }, + "constants": [ + { + "name": "MaxVotes", + "ty": 4, + "value": [ + 0, + 2, + 0, + 0 + ], + "docs": [ + " The maximum number of concurrent votes an account may have.", + "", + " Also used to compute weight, an overly large value can", + " lead to extrinsic with large weight estimation: see `delegate` for instance." + ] + }, + { + "name": "VoteLockingPeriod", + "ty": 4, + "value": [ + 0, + 47, + 13, + 0 + ], + "docs": [ + " The minimum period of vote locking.", + "", + " It should be no shorter than enactment period to ensure that in the case of an approval,", + " those successful voters are locked into the consequences that their votes entail." + ] + } + ], + "error": { + "ty": 584 + }, + "index": 46 + }, + { + "name": "Whitelist", + "storage": { + "prefix": "Whitelist", + "entries": [ + { + "name": "WhitelistedCall", + "modifier": "Optional", + "ty": { + "Map": { + "hashers": [ + "Twox64Concat" + ], + "key": 9, + "value": 29 + } + }, + "default": [ + 0 + ], + "docs": [] + } + ] + }, + "calls": { + "ty": 342 + }, + "event": { + "ty": 104 + }, + "constants": [], + "error": { + "ty": 585 + }, + "index": 47 + } + ], + "extrinsic": { + "ty": 586, + "version": 4, + "signed_extensions": [ + { + "identifier": "CheckNonZeroSender", + "ty": 591, + "additional_signed": 29 + }, + { + "identifier": "CheckSpecVersion", + "ty": 592, + "additional_signed": 4 + }, + { + "identifier": "CheckTxVersion", + "ty": 593, + "additional_signed": 4 + }, + { + "identifier": "CheckGenesis", + "ty": 594, + "additional_signed": 9 + }, + { + "identifier": "CheckMortality", + "ty": 595, + "additional_signed": 9 + }, + { + "identifier": "CheckNonce", + "ty": 597, + "additional_signed": 29 + }, + { + "identifier": "CheckWeight", + "ty": 598, + "additional_signed": 29 + }, + { + "identifier": "ChargeAssetTxPayment", + "ty": 599, + "additional_signed": 29 + } + ] + }, + "ty": 600 + } + } +] diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index ade0a3b5c3..06a81a2576 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -63,17 +63,12 @@ pub fn generate_constants( quote! { #( #[doc = #docs ] )* - pub fn #fn_name(&self) -> ::core::result::Result<#return_ty, ::subxt::BasicError> { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash(#pallet_name, #constant_name)? == [#(#constant_hash,)*] { - let pallet = metadata.pallet(#pallet_name)?; - let constant = pallet.constant(#constant_name)?; - let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + pub fn #fn_name(&self) -> ::subxt::client::constants::ConstantAddress<'static, #return_ty> { + ::subxt::client::constants::StaticAddress::new_with_validation( + #pallet_name, + #constant_name, + [#(#constant_hash,)*] + ) } } }); @@ -82,15 +77,9 @@ pub fn generate_constants( pub mod constants { use super::#types_mod_ident; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #(#constant_fns)* } } diff --git a/subxt/src/client/constants_client.rs b/subxt/src/client/constants_client.rs new file mode 100644 index 0000000000..2b2eee41f5 --- /dev/null +++ b/subxt/src/client/constants_client.rs @@ -0,0 +1,89 @@ +// 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. + +use super::OfflineClientT; +use crate::Config; +use codec::Decode; +use crate::error::BasicError; +use crate::metadata::MetadataError; +use scale_value::{ Value, scale::TypeId }; + +/// A client for accessing constants. +pub struct ConstantsClient { + client: Client, + _marker: std::marker::PhantomData, +} + +impl ConstantsClient { + /// Create a new [`ConstantsClient`]. + pub fn new(client: Client) -> Self { + Self { client, _marker: std::marker::PhantomData } + } +} + +impl > ConstantsClient { + /// Access a constant, returning a [`Value`] type representing it. + pub fn value_at(&self, pallet_name: &str, constant_name: &str) -> Result, BasicError> { + let metadata = self.client.metadata(); + let pallet = metadata.pallet(&pallet_name)?; + let constant = pallet.constant(&constant_name)?; + let val = scale_value::scale::decode_as_type(&mut &*constant.value, constant.ty.id(), metadata.types())?; + Ok(val) + } + + /// Access the constant at the address given, returning the type defined by this address. + /// This is probably used with addresses given from static codegen, although you can manually + /// construct your own, too. + pub fn at(&self, address: &ConstantAddress<'_, ReturnTy>) -> Result { + let metadata = self.client.metadata(); + + // 1. Validate constant shape if hash given: + if let Some(actual_hash) = address.constant_hash { + let expected_hash = metadata.constant_hash(&address.pallet_name, &address.constant_name)?; + if actual_hash != expected_hash { + return Err(MetadataError::IncompatibleMetadata.into()); + } + } + + // 2. Attempt to decode the constant into the type given: + let pallet = metadata.pallet(&address.pallet_name)?; + let constant = pallet.constant(&address.constant_name)?; + let value = codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) + } + +} + +/// This is returned from constant accesses in the statically generated +/// code, and contains the information needed to find, validate and decode +/// the constant. +pub struct ConstantAddress<'a, ReturnTy> { + pallet_name: &'a str, + constant_name: &'a str, + constant_hash: Option<[u8; 32]>, + _marker: std::marker::PhantomData +} + +impl <'a, ReturnTy> ConstantAddress<'a, ReturnTy> { + /// Create a new [`ConstantAddress`] that will be validated + /// against node metadata using the hash given. + pub fn new_with_validation(pallet_name: &'a str, constant_name: &'a str, hash: [u8; 32]) -> Self { + Self { + pallet_name, + constant_name, + constant_hash: Some(hash), + _marker: std::marker::PhantomData + } + } + + /// Do not validate this constant prior to accessing it. + pub fn unvalidated(self) -> Self { + Self { + pallet_name: self.pallet_name, + constant_name: self.constant_name, + constant_hash: None, + _marker: self._marker + } + } +} \ No newline at end of file diff --git a/subxt/src/events/events_client.rs b/subxt/src/client/events_client.rs similarity index 99% rename from subxt/src/events/events_client.rs rename to subxt/src/client/events_client.rs index 21bcf46533..8ff590905e 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/client/events_client.rs @@ -24,7 +24,7 @@ use crate::{ }, Config, }; -use super::{ +use crate::events::{ EventSubscription, Events, EventSub, diff --git a/subxt/src/client/mod.rs b/subxt/src/client/mod.rs index 25f2911f42..af12940632 100644 --- a/subxt/src/client/mod.rs +++ b/subxt/src/client/mod.rs @@ -10,6 +10,10 @@ mod offline_client; mod online_client; +mod events_client; +mod tx_client; +mod storage_client; +mod constants_client; pub use offline_client::{ OfflineClient, @@ -18,4 +22,24 @@ pub use offline_client::{ pub use online_client::{ OnlineClient, OnlineClientT, -}; \ No newline at end of file +}; + +/// This module contains a client for working with events. +pub mod events { + pub use super::events_client::*; +} + +/// This module contains a client for working with transactions. +pub mod tx { + pub use super::tx_client::*; +} + +/// This module contains a client for working with storage. +pub mod storage { + pub use super::storage_client::*; +} + +/// This module contains a client for working with constants. +pub mod constants { + pub use super::constants_client::*; +} \ No newline at end of file diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 382a3b51d5..9b7b0b1e15 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -6,9 +6,12 @@ use crate::{ Config, Metadata, rpc::RuntimeVersion, - extrinsic::TxClient, +}; +use super::{ + tx::TxClient, events::EventsClient, storage::StorageClient, + constants::ConstantsClient, }; use std::sync::Arc; use derivative::Derivative; @@ -37,6 +40,11 @@ pub trait OfflineClientT: Clone + Send + Sync + 'static { fn storage(&self) -> StorageClient { StorageClient::new(self.clone()) } + + /// Access constants. + fn constants(&self) -> ConstantsClient { + ConstantsClient::new(self.clone()) + } } /// A client that is capable of performing offline-only operations. diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/client/storage_client.rs similarity index 76% rename from subxt/src/storage/storage_client.rs rename to subxt/src/client/storage_client.rs index 361c979971..8dad8bf961 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/client/storage_client.rs @@ -27,7 +27,81 @@ use crate::{ StorageHasher, }; -/// Client for querying runtime storage. +/// Query the runtime storage using [StorageClient]. +/// +/// This module is the core of performing runtime storage queries. While you can +/// work with it directly, it's prefer to use the generated `storage()` interface where +/// possible. +/// +/// The exposed API is performing RPC calls to `state_getStorage` and `state_getKeysPaged`. +/// +/// A runtime storage entry can be of type: +/// - [StorageEntryKey::Plain] for keys constructed just from the prefix +/// `twox_128(pallet) ++ twox_128(storage_item)` +/// - [StorageEntryKey::Map] for mapped keys constructed from the prefix, +/// plus other arguments `twox_128(pallet) ++ twox_128(storage_item) ++ hash(arg1) ++ arg1` +/// +/// # Examples +/// +/// ## Fetch Storage Keys +/// +/// ```no_run +/// # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; +/// # use subxt::storage::StorageClient; +/// +/// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] +/// pub mod polkadot {} +/// +/// # #[tokio::main] +/// # async fn main() { +/// # let api = ClientBuilder::new() +/// # .build() +/// # .await +/// # .unwrap() +/// # .to_runtime_api::>>(); +/// # // Obtain the storage client wrapper from the API. +/// # let storage: StorageClient<_> = api.client.storage(); +/// // Fetch just the keys, returning up to 10 keys. +/// let keys = storage +/// .fetch_keys::(10, None, None) +/// .await +/// .unwrap(); +/// // Iterate over each key +/// for key in keys.iter() { +/// println!("Key: 0x{}", hex::encode(&key)); +/// } +/// # } +/// ``` +/// +/// ## Iterate over Storage +/// +/// ```no_run +/// # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; +/// # use subxt::storage::StorageClient; +/// +/// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] +/// pub mod polkadot {} +/// +/// # #[tokio::main] +/// # async fn main() { +/// # let api = ClientBuilder::new() +/// # .build() +/// # .await +/// # .unwrap() +/// # .to_runtime_api::>>(); +/// # // Obtain the storage client wrapper from the API. +/// # let storage: StorageClient<_> = api.client.storage(); +/// // Iterate over keys and values. +/// let mut iter = storage +/// .iter::(None) +/// .await +/// .unwrap(); +/// while let Some((key, value)) = iter.next().await.unwrap() { +/// println!("Key: 0x{}", hex::encode(&key)); +/// println!("Value: {}", value); +/// } +/// # } +/// ``` pub struct StorageClient { client: Client, _marker: PhantomData diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/client/tx_client.rs similarity index 99% rename from subxt/src/extrinsic/tx_client.rs rename to subxt/src/client/tx_client.rs index ec4a723ada..6931bd36fe 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/client/tx_client.rs @@ -32,10 +32,8 @@ use codec::{ Decode, Encode, }; -use super::{ - transaction::{ - TransactionProgress, - }, +use crate::extrinsic::{ + TransactionProgress, }; /// A client for working with transactions. diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 2a3588b1f5..c9de7ea392 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -9,6 +9,7 @@ use crate::{ Config, client::{ OnlineClientT, + events::EventsClient, } }; use codec::Decode; @@ -28,7 +29,6 @@ use std::{ }; pub use super::{ - EventsClient, EventDetails, EventFilter, Events, diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index b3a3083333..fcc1bd95c9 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -86,11 +86,7 @@ mod event_subscription; mod events_type; mod filter_events; -mod events_client; -pub use events_client::{ - EventsClient, -}; pub use event_subscription::{ EventSub, EventSubscription, diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index 02431e6188..246569ab9c 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -21,12 +21,8 @@ mod params; mod signer; mod transaction; -mod tx_client; pub use self::{ - tx_client::{ - TxClient, - }, params::{ AssetTip, BaseExtrinsicParams, diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index 9fb60b3c4e..cfe8074949 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -13,6 +13,7 @@ pub use sp_runtime::traits::SignedExtension; use crate::{ client::{ OnlineClientT, + events::EventsClient, }, error::{ BasicError, @@ -24,7 +25,6 @@ use crate::{ }, events::{ self, - EventsClient, EventDetails, Events, RawEventDetails, diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 00d6ed61ef..b3518fce54 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -227,7 +227,6 @@ pub mod events; pub mod extrinsic; pub mod metadata; pub mod rpc; -pub mod storage; pub use crate::{ client::{ @@ -276,12 +275,6 @@ pub use crate::{ RpcClient, SystemProperties, }, - storage::{ - KeyIter, - StorageEntry, - StorageEntryKey, - StorageMapKey, - }, }; /// Trait to uniquely identify the call (extrinsic)'s identity from the runtime metadata. @@ -291,17 +284,17 @@ pub use crate::{ /// /// When encoding an extrinsic, we use this information to know how to map /// the call to the specific pallet and call index needed by a particular node. -// pub trait Call: Encode { -// /// Pallet name. -// const PALLET: &'static str; -// /// Function name. -// const FUNCTION: &'static str; +pub trait Call: Encode { + /// Pallet name. + const PALLET: &'static str; + /// Function name. + const FUNCTION: &'static str; -// /// Returns true if the given pallet and function names match this call. -// fn is_call(pallet: &str, function: &str) -> bool { -// Self::PALLET == pallet && Self::FUNCTION == function -// } -// } + /// Returns true if the given pallet and function names match this call. + fn is_call(pallet: &str, function: &str) -> bool { + Self::PALLET == pallet && Self::FUNCTION == function + } +} /// Trait to uniquely identify the events's identity from the runtime metadata. /// diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index a877a0c0d4..967ee48a16 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -493,7 +493,7 @@ impl TryFrom for Metadata { #[cfg(test)] mod tests { use super::*; - use crate::StorageEntryKey; + use crate::client::storage::StorageEntryKey; use frame_metadata::{ ExtrinsicMetadata, PalletStorageMetadata, @@ -620,7 +620,7 @@ mod tests { #[derive(codec::Encode)] struct ValidStorage; - impl crate::StorageEntry for ValidStorage { + impl crate::client::storage::StorageEntry for ValidStorage { const PALLET: &'static str = "System"; const STORAGE: &'static str = "Account"; type Value = (); diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs deleted file mode 100644 index 8f7e209f7d..0000000000 --- a/subxt/src/storage/mod.rs +++ /dev/null @@ -1,89 +0,0 @@ -// 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. - -//! Query the runtime storage using [StorageClient]. -//! -//! This module is the core of performing runtime storage queries. While you can -//! work with it directly, it's prefer to use the generated `storage()` interface where -//! possible. -//! -//! The exposed API is performing RPC calls to `state_getStorage` and `state_getKeysPaged`. -//! -//! A runtime storage entry can be of type: -//! - [StorageEntryKey::Plain] for keys constructed just from the prefix -//! `twox_128(pallet) ++ twox_128(storage_item)` -//! - [StorageEntryKey::Map] for mapped keys constructed from the prefix, -//! plus other arguments `twox_128(pallet) ++ twox_128(storage_item) ++ hash(arg1) ++ arg1` -//! -//! # Examples -//! -//! ## Fetch Storage Keys -//! -//! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # use subxt::storage::StorageClient; -//! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} -//! -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! # // Obtain the storage client wrapper from the API. -//! # let storage: StorageClient<_> = api.client.storage(); -//! // Fetch just the keys, returning up to 10 keys. -//! let keys = storage -//! .fetch_keys::(10, None, None) -//! .await -//! .unwrap(); -//! // Iterate over each key -//! for key in keys.iter() { -//! println!("Key: 0x{}", hex::encode(&key)); -//! } -//! # } -//! ``` -//! -//! ## Iterate over Storage -//! -//! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # use subxt::storage::StorageClient; -//! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} -//! -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! # // Obtain the storage client wrapper from the API. -//! # let storage: StorageClient<_> = api.client.storage(); -//! // Iterate over keys and values. -//! let mut iter = storage -//! .iter::(None) -//! .await -//! .unwrap(); -//! while let Some((key, value)) = iter.next().await.unwrap() { -//! println!("Key: 0x{}", hex::encode(&key)); -//! println!("Value: {}", value); -//! } -//! # } -//! ``` - -mod storage_client; - -pub use storage_client::{ - StorageClient, - KeyIter, - StorageEntry, - StorageEntryKey, - StorageMapKey, -}; \ No newline at end of file From 955e4ae70ee856891e3e2bbff0e4b744d24d6cff Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 7 Jul 2022 11:10:39 +0100 Subject: [PATCH 14/75] WIP storage client updates --- codegen/src/api/storage.rs | 10 +- subxt/src/client/events_client.rs | 1 - subxt/src/client/storage_client.rs | 210 +++++++++++++++++++++++------ subxt/src/rpc.rs | 4 +- 4 files changed, 174 insertions(+), 51 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 195778bb0d..97cb08a76b 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -80,15 +80,9 @@ pub fn generate_storage( #( #storage_structs )* - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #( #storage_fns )* } } diff --git a/subxt/src/client/events_client.rs b/subxt/src/client/events_client.rs index 8ff590905e..3d3c7df439 100644 --- a/subxt/src/client/events_client.rs +++ b/subxt/src/client/events_client.rs @@ -133,7 +133,6 @@ where .rpc() .storage(&system_events_key(), Some(block_hash)) .await? - .map(|s| s.0) .unwrap_or_else(Vec::new); Ok(Events::new( diff --git a/subxt/src/client/storage_client.rs b/subxt/src/client/storage_client.rs index 8dad8bf961..239050ec7a 100644 --- a/subxt/src/client/storage_client.rs +++ b/subxt/src/client/storage_client.rs @@ -133,81 +133,73 @@ where T: Config, Client: OnlineClientT, { - /// Fetch the value under an unhashed storage key - pub async fn fetch_unhashed( + /// Fetch the raw encoded value under the raw storage key given. + pub async fn fetch_raw_key( &self, - key: StorageKey, + key: &StorageKey, hash: Option, - ) -> Result, BasicError> { - if let Some(data) = self.client.rpc().storage(&key, hash).await? { - Ok(Some(Decode::decode(&mut &data.0[..])?)) - } else { - Ok(None) - } + ) -> Result>, BasicError> { + let data = self.client.rpc().storage(&key, hash).await?; + Ok(data.map(|d| d.0)) } - /// Fetch the raw encoded value under the raw storage key. - pub async fn fetch_raw( + /// Fetch the raw encoded value at the address given. + pub async fn fetch_raw>( &self, - key: StorageKey, + key: K, hash: Option, - ) -> Result, BasicError> { - self.client.rpc().storage(&key, hash).await + ) -> Result>, BasicError> { + let key = key.into(); + self.fetch_raw_key(&key, hash).await } - /// Fetch a StorageKey with an optional block hash. - pub async fn fetch( + /// Fetch a decoded value from storage at a given address and optional block hash. + pub async fn fetch( &self, - store: &F, + address: StorageAddress<'_, ReturnTy>, hash: Option, - ) -> Result, BasicError> { - let prefix = StorageKeyPrefix::new::(); - let key = store.key().final_key(prefix); - self.fetch_unhashed::(key, hash).await + ) -> Result, BasicError> { + if let Some(data) = self.fetch_raw(&address, hash).await? { + Ok(Some(Decode::decode(&mut &*data)?)) + } else { + Ok(None) + } } /// Fetch a StorageKey that has a default value with an optional block hash. - pub async fn fetch_or_default( + pub async fn fetch_or_default( &self, - store: &F, + address: StorageAddress<'_, ReturnTy>, hash: Option, - ) -> Result { - if let Some(data) = self.fetch(store, hash).await? { + ) -> Result { + let pallet_name = address.pallet_name; + let storage_name = address.storage_name; + if let Some(data) = self.fetch(address, hash).await? { Ok(data) } else { let metadata = self.client.metadata(); - let pallet_metadata = metadata.pallet(F::PALLET)?; - let storage_metadata = pallet_metadata.storage(F::STORAGE)?; + let pallet_metadata = metadata.pallet(pallet_name)?; + let storage_metadata = pallet_metadata.storage(storage_name)?; let default = Decode::decode(&mut &storage_metadata.default[..]) .map_err(MetadataError::DefaultError)?; Ok(default) } } - /// Query historical storage entries - pub async fn query_storage( - &self, - keys: Vec, - from: T::Hash, - to: Option, - ) -> Result>, BasicError> { - self.client.rpc().query_storage(keys, from, to).await - } - /// Fetch up to `count` keys for a storage map in lexicographic order. /// /// Supports pagination by passing a value to `start_key`. - pub async fn fetch_keys( + pub async fn fetch_keys>( &self, + key: StorageKey, count: u32, start_key: Option, hash: Option, ) -> Result, BasicError> { - let key = StorageKeyPrefix::new::().to_storage_key(); let keys = self .client .rpc() - .storage_keys_paged(Some(key), count, start_key, hash) + .storage_keys_paged(key.into(), count, start_key, hash) .await?; Ok(keys) } @@ -238,6 +230,118 @@ where } } + +/// WHAT DO WE ACTUALLY NEED? +/// +/// - Iterate entries +/// - Access specific entry +/// - Return raw bytes, Value, or decoded type. +/// +/// Accessing a single entry: +/// - PALLET NAME +/// - STORAGE ENTRY NAME +/// - for a "plain" key, that's it. For a "map" key, we need +/// a list of 1 or more values + hashers, which we'll append to the +/// hashed key to access the specific item. +/// +/// Iterating entries: +/// - how many entries per page to obtain? +/// - PALLET NAME +/// - STORAGE ENTRY name +/// - Key to start from (allows pagination) + + + + + + + + + + + + + + + + + + +/// This is returned from storage accesses in the statically generated +/// code, and contains the information needed to find, validate and decode +/// the storage entry. +pub struct StorageAddress <'a, ReturnTy> { + pallet_name: &'a str, + storage_name: &'a str, + // How to access the specific value at that storage address. + storage_entry_key: StorageEntryKey, + // Hash provided from static code for validation. + storage_hash: Option<[u8; 32]>, + _marker: std::marker::PhantomData +} + +impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { + /// Create a new [`StorageAddress`] that will be validated + /// against node metadata using the hash given. + pub fn new_with_validation( + pallet_name: &'a str, + storage_name: &'a str, + storage_entry_key: StorageEntryKey, + hash: [u8; 32] + ) -> Self { + Self { + pallet_name, + storage_name, + storage_entry_key, + storage_hash: Some(hash), + _marker: std::marker::PhantomData + } + } + + /// Do not validate this storage prior to accessing it. + pub fn unvalidated(self) -> Self { + Self { + pallet_name: self.pallet_name, + storage_name: self.storage_name, + storage_entry_key: self.storage_entry_key, + storage_hash: None, + _marker: self._marker + } + } + + // Convert this address into bytes that we can pass to a node to look up + // the associated value at this address. + pub fn to_bytes(&self) -> Vec { + // First encode the pallet/name part: + let mut bytes = sp_core::twox_128(self.pallet_name.as_bytes()).to_vec(); + bytes.extend(&sp_core::twox_128(self.storage_name.as_bytes())[..]); + + // Then, if we need to further dig into this entry, we do so, + // hashing additional fields as specified: + if let StorageEntryKey::Map(map) = &self.storage_entry_key { + for entry in map { + entry.to_bytes(&mut bytes); + } + } + + bytes + } +} + +impl <'a, R> From<&StorageAddress<'a, R>> for StorageKey { + fn from(address: &StorageAddress<'a, R>) -> Self { + StorageKey(address.to_bytes()) + } +} + + + + + + + + + /// Storage entry trait. pub trait StorageEntry { /// Pallet name. @@ -327,6 +431,32 @@ impl StorageMapKey { hasher, } } + + /// Convert this [`StorageMapKey`] into bytes and append it to some existing bytes. + pub fn to_bytes(&self, bytes: &mut Vec) { + match &self.hasher { + StorageHasher::Identity => bytes.extend(&self.value), + StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(bytes)), + StorageHasher::Blake2_128Concat => { + // adapted from substrate Blake2_128Concat::hash since StorageHasher is not public + let v = sp_core::blake2_128(&self.value) + .iter() + .chain(&self.value) + .cloned(); + bytes.extend(v); + } + StorageHasher::Blake2_256 => bytes.extend(sp_core::blake2_256(&self.value)), + StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(&self.value)), + StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(&self.value)), + StorageHasher::Twox64Concat => { + let v = sp_core::twox_64(&self.value) + .iter() + .chain(&self.value) + .cloned(); + bytes.extend(v); + } + } + } } /// Iterates over key value pairs in a map. diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index 7425086266..7e62e147f1 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -324,7 +324,7 @@ impl Rpc { } } - /// Fetch a storage key + /// Fetch the raw bytes for a given storage key pub async fn storage( &self, key: &StorageKey, @@ -340,7 +340,7 @@ impl Rpc { /// If `start_key` is passed, return next keys in storage in lexicographic order. pub async fn storage_keys_paged( &self, - key: Option, + key: StorageKey, count: u32, start_key: Option, hash: Option, From 7ab22aafd587ab5c261aa3f2d9a8a0e3778da7e5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 7 Jul 2022 12:21:05 +0100 Subject: [PATCH 15/75] First pass migrated runtime storage over to new format --- subxt/src/client/events_client.rs | 1 + subxt/src/client/storage_client.rs | 207 +++++++--------------------- subxt/src/metadata/metadata_type.rs | 14 -- 3 files changed, 49 insertions(+), 173 deletions(-) diff --git a/subxt/src/client/events_client.rs b/subxt/src/client/events_client.rs index 3d3c7df439..beb05a37c3 100644 --- a/subxt/src/client/events_client.rs +++ b/subxt/src/client/events_client.rs @@ -133,6 +133,7 @@ where .rpc() .storage(&system_events_key(), Some(block_hash)) .await? + .map(|e| e.0) .unwrap_or_else(Vec::new); Ok(Events::new( diff --git a/subxt/src/client/storage_client.rs b/subxt/src/client/storage_client.rs index 239050ec7a..8dcf23530d 100644 --- a/subxt/src/client/storage_client.rs +++ b/subxt/src/client/storage_client.rs @@ -7,13 +7,13 @@ use codec::{ Encode, }; use sp_core::storage::{ - StorageChangeSet, StorageData, StorageKey, }; pub use sp_runtime::traits::SignedExtension; use std::{ marker::PhantomData, + borrow::Cow, }; use crate::{ error::BasicError, @@ -133,33 +133,24 @@ where T: Config, Client: OnlineClientT, { - /// Fetch the raw encoded value under the raw storage key given. - pub async fn fetch_raw_key( - &self, - key: &StorageKey, - hash: Option, - ) -> Result>, BasicError> { - let data = self.client.rpc().storage(&key, hash).await?; - Ok(data.map(|d| d.0)) - } - - /// Fetch the raw encoded value at the address given. + /// Fetch the raw encoded value at the address/key given. pub async fn fetch_raw>( &self, key: K, hash: Option, ) -> Result>, BasicError> { let key = key.into(); - self.fetch_raw_key(&key, hash).await + let data = self.client.rpc().storage(&key, hash).await?; + Ok(data.map(|d| d.0)) } /// Fetch a decoded value from storage at a given address and optional block hash. pub async fn fetch( &self, - address: StorageAddress<'_, ReturnTy>, + address: &StorageAddress<'_, ReturnTy>, hash: Option, ) -> Result, BasicError> { - if let Some(data) = self.fetch_raw(&address, hash).await? { + if let Some(data) = self.fetch_raw(address, hash).await? { Ok(Some(Decode::decode(&mut &*data)?)) } else { Ok(None) @@ -169,11 +160,11 @@ where /// Fetch a StorageKey that has a default value with an optional block hash. pub async fn fetch_or_default( &self, - address: StorageAddress<'_, ReturnTy>, + address: &StorageAddress<'_, ReturnTy>, hash: Option, ) -> Result { - let pallet_name = address.pallet_name; - let storage_name = address.storage_name; + let pallet_name = &*address.pallet_name; + let storage_name = &*address.storage_name; if let Some(data) = self.fetch(address, hash).await? { Ok(data) } else { @@ -191,7 +182,7 @@ where /// Supports pagination by passing a value to `start_key`. pub async fn fetch_keys>( &self, - key: StorageKey, + key: K, count: u32, start_key: Option, hash: Option, @@ -205,11 +196,12 @@ where } /// Returns an iterator of key value pairs. - pub async fn iter( + pub async fn iter( &self, + address: StorageAddress<'_, ReturnTy>, page_size: u32, hash: Option, - ) -> Result, BasicError> { + ) -> Result, BasicError> { let hash = if let Some(hash) = hash { hash } else { @@ -221,60 +213,23 @@ where }; Ok(KeyIter { client: self.clone(), + address: address.to_owned(), hash, count: page_size, start_key: None, buffer: Default::default(), - _marker: PhantomData, }) } } - -/// WHAT DO WE ACTUALLY NEED? -/// -/// - Iterate entries -/// - Access specific entry -/// - Return raw bytes, Value, or decoded type. -/// -/// Accessing a single entry: -/// - PALLET NAME -/// - STORAGE ENTRY NAME -/// - for a "plain" key, that's it. For a "map" key, we need -/// a list of 1 or more values + hashers, which we'll append to the -/// hashed key to access the specific item. -/// -/// Iterating entries: -/// - how many entries per page to obtain? -/// - PALLET NAME -/// - STORAGE ENTRY name -/// - Key to start from (allows pagination) - - - - - - - - - - - - - - - - - - /// This is returned from storage accesses in the statically generated /// code, and contains the information needed to find, validate and decode /// the storage entry. pub struct StorageAddress <'a, ReturnTy> { - pallet_name: &'a str, - storage_name: &'a str, + pallet_name: Cow<'a, str>, + storage_name: Cow<'a, str>, // How to access the specific value at that storage address. - storage_entry_key: StorageEntryKey, + storage_entry_key: Cow<'a, StorageEntryKey>, // Hash provided from static code for validation. storage_hash: Option<[u8; 32]>, _marker: std::marker::PhantomData @@ -284,15 +239,15 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { /// Create a new [`StorageAddress`] that will be validated /// against node metadata using the hash given. pub fn new_with_validation( - pallet_name: &'a str, - storage_name: &'a str, - storage_entry_key: StorageEntryKey, + pallet_name: impl Into>, + storage_name: impl Into>, + storage_entry_key: impl Into>, hash: [u8; 32] ) -> Self { Self { - pallet_name, - storage_name, - storage_entry_key, + pallet_name: pallet_name.into(), + storage_name: storage_name.into(), + storage_entry_key: storage_entry_key.into(), storage_hash: Some(hash), _marker: std::marker::PhantomData } @@ -309,8 +264,8 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { } } - // Convert this address into bytes that we can pass to a node to look up - // the associated value at this address. + /// Convert this address into bytes that we can pass to a node to look up + /// the associated value at this address. pub fn to_bytes(&self) -> Vec { // First encode the pallet/name part: let mut bytes = sp_core::twox_128(self.pallet_name.as_bytes()).to_vec(); @@ -318,7 +273,7 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { // Then, if we need to further dig into this entry, we do so, // hashing additional fields as specified: - if let StorageEntryKey::Map(map) = &self.storage_entry_key { + if let StorageEntryKey::Map(map) = &*self.storage_entry_key { for entry in map { entry.to_bytes(&mut bytes); } @@ -326,6 +281,17 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { bytes } + + /// Take a storage address and return an owned storage address. + pub fn to_owned(self) -> StorageAddress<'static, ReturnTy> { + StorageAddress { + pallet_name: self.pallet_name.into_owned().into(), + storage_name: self.storage_name.into_owned().into(), + storage_entry_key: Cow::Owned(self.storage_entry_key.into_owned()), + storage_hash: self.storage_hash, + _marker: self._marker + } + } } impl <'a, R> From<&StorageAddress<'a, R>> for StorageKey { @@ -334,44 +300,8 @@ impl <'a, R> From<&StorageAddress<'a, R>> for StorageKey { } } - - - - - - - - -/// Storage entry trait. -pub trait StorageEntry { - /// Pallet name. - const PALLET: &'static str; - /// Storage name. - const STORAGE: &'static str; - /// Type of the storage entry value. - type Value: Decode; - /// Get the key data for the storage. - fn key(&self) -> StorageEntryKey; -} - -/// The prefix of the key to a [`StorageEntry`] -pub struct StorageKeyPrefix(Vec); - -impl StorageKeyPrefix { - /// Create the storage key prefix for a [`StorageEntry`] - pub fn new() -> Self { - let mut bytes = sp_core::twox_128(T::PALLET.as_bytes()).to_vec(); - bytes.extend(&sp_core::twox_128(T::STORAGE.as_bytes())[..]); - Self(bytes) - } - - /// Convert the prefix into a [`StorageKey`] - pub fn to_storage_key(self) -> StorageKey { - StorageKey(self.0) - } -} - /// Storage key. +#[derive(Clone)] pub enum StorageEntryKey { /// Plain key. Plain, @@ -379,45 +309,8 @@ pub enum StorageEntryKey { Map(Vec), } -impl StorageEntryKey { - /// Construct the final [`sp_core::storage::StorageKey`] for the storage entry. - pub fn final_key(&self, prefix: StorageKeyPrefix) -> sp_core::storage::StorageKey { - let mut bytes = prefix.0; - if let Self::Map(map_keys) = self { - for map_key in map_keys { - bytes.extend(Self::hash(&map_key.hasher, &map_key.value)) - } - } - sp_core::storage::StorageKey(bytes) - } - - fn hash(hasher: &StorageHasher, bytes: &[u8]) -> Vec { - match hasher { - StorageHasher::Identity => bytes.to_vec(), - StorageHasher::Blake2_128 => sp_core::blake2_128(bytes).to_vec(), - StorageHasher::Blake2_128Concat => { - // copied from substrate Blake2_128Concat::hash since StorageHasher is not public - sp_core::blake2_128(bytes) - .iter() - .chain(bytes) - .cloned() - .collect() - } - StorageHasher::Blake2_256 => sp_core::blake2_256(bytes).to_vec(), - StorageHasher::Twox128 => sp_core::twox_128(bytes).to_vec(), - StorageHasher::Twox256 => sp_core::twox_256(bytes).to_vec(), - StorageHasher::Twox64Concat => { - sp_core::twox_64(bytes) - .iter() - .chain(bytes) - .cloned() - .collect() - } - } - } -} - /// Storage key for a Map. +#[derive(Clone)] pub struct StorageMapKey { value: Vec, hasher: StorageHasher, @@ -439,20 +332,16 @@ impl StorageMapKey { StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(bytes)), StorageHasher::Blake2_128Concat => { // adapted from substrate Blake2_128Concat::hash since StorageHasher is not public - let v = sp_core::blake2_128(&self.value) - .iter() - .chain(&self.value) - .cloned(); + let v = sp_core::blake2_128(&self.value); + let v = v.iter().chain(&self.value).cloned(); bytes.extend(v); } StorageHasher::Blake2_256 => bytes.extend(sp_core::blake2_256(&self.value)), StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(&self.value)), StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(&self.value)), StorageHasher::Twox64Concat => { - let v = sp_core::twox_64(&self.value) - .iter() - .chain(&self.value) - .cloned(); + let v = sp_core::twox_64(&self.value); + let v = v.iter().chain(&self.value).cloned(); bytes.extend(v); } } @@ -460,25 +349,25 @@ impl StorageMapKey { } /// Iterates over key value pairs in a map. -pub struct KeyIter { +pub struct KeyIter { client: StorageClient, - _marker: PhantomData, + address: StorageAddress<'static, ReturnTy>, count: u32, hash: T::Hash, start_key: Option, buffer: Vec<(StorageKey, StorageData)>, } -impl<'a, T: Config, Client: OnlineClientT, F: StorageEntry> KeyIter { +impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode> KeyIter { /// Returns the next key value pair from a map. - pub async fn next(&mut self) -> Result, BasicError> { + pub async fn next(&mut self) -> Result, BasicError> { loop { if let Some((k, v)) = self.buffer.pop() { return Ok(Some((k, Decode::decode(&mut &v.0[..])?))) } else { let keys = self .client - .fetch_keys::(self.count, self.start_key.take(), Some(self.hash)) + .fetch_keys(&self.address, self.count, self.start_key.take(), Some(self.hash)) .await?; if keys.is_empty() { diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 967ee48a16..a28b18d97f 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -493,7 +493,6 @@ impl TryFrom for Metadata { #[cfg(test)] mod tests { use super::*; - use crate::client::storage::StorageEntryKey; use frame_metadata::{ ExtrinsicMetadata, PalletStorageMetadata, @@ -617,19 +616,6 @@ mod tests { #[test] fn metadata_storage_inner_cache() { let metadata = load_metadata(); - - #[derive(codec::Encode)] - struct ValidStorage; - impl crate::client::storage::StorageEntry for ValidStorage { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "Account"; - type Value = (); - - fn key(&self) -> StorageEntryKey { - unreachable!("Should not be called"); - } - } - let hash = metadata.storage_hash("System", "Account"); let mut call_number = 0; From dc1c422cbde9c44e0edbd8437b0a005e6ffb2ff4 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 7 Jul 2022 12:53:30 +0100 Subject: [PATCH 16/75] pass over codegen to generate StorageAddresses and throw other stuff out --- codegen/src/api/storage.rs | 203 ++++------------------------- subxt/src/client/storage_client.rs | 48 ++++++- 2 files changed, 73 insertions(+), 178 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 97cb08a76b..72c754ef28 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -23,32 +23,8 @@ use scale_info::{ TypeDef, }; -/// Generate storage from the provided pallet's metadata. -/// -/// The function creates a new module named `storage` under the pallet's module. -/// -/// ```ignore -/// pub mod PalletName { -/// pub mod storage { -/// ... -/// } -/// } -/// ``` -/// -/// The function generates the storage as rust structs that implement the `subxt::StorageEntry` -/// trait to uniquely identify the storage's identity when creating the extrinsic. -/// -/// ```ignore -/// pub struct StorageName { -/// pub storage_param: type, -/// } -/// impl ::subxt::StorageEntry for StorageName { -/// ... -/// } -/// ``` -/// -/// Storages are extracted from the API and wrapped into the generated `StorageApi` of -/// each module. +/// Generate functions which create storage addresses from the provided pallet's metadata. +/// These addresses can be used to access and iterate over storage values. /// /// # Arguments /// @@ -68,18 +44,16 @@ pub fn generate_storage( return quote!() }; - let (storage_structs, storage_fns): (Vec<_>, Vec<_>) = storage + let storage_fns: Vec<_> = storage .entries .iter() .map(|entry| generate_storage_entry_fns(metadata, type_gen, pallet, entry)) - .unzip(); + .collect(); quote! { pub mod storage { use super::#types_mod_ident; - #( #storage_structs )* - pub struct StorageApi; impl StorageApi { @@ -94,15 +68,10 @@ fn generate_storage_entry_fns( type_gen: &TypeGenerator, pallet: &PalletMetadata, storage_entry: &StorageEntryMetadata, -) -> (TokenStream2, TokenStream2) { - let entry_struct_ident = format_ident!("{}", storage_entry.name); - let (fields, entry_struct, constructor, key_impl, should_ref) = match storage_entry.ty - { +) -> TokenStream2 { + let (fields, key_impl, should_ref) = match storage_entry.ty { StorageEntryType::Plain(_) => { - let entry_struct = quote!( pub struct #entry_struct_ident; ); - let constructor = quote!( #entry_struct_ident ); - let key_impl = quote!(::subxt::StorageEntryKey::Plain); - (vec![], entry_struct, constructor, key_impl, false) + (vec![], quote!(::subxt::client::storage::client::storage::StorageEntryKey::Plain), false) } StorageEntryType::Map { ref key, @@ -139,31 +108,8 @@ fn generate_storage_entry_fns( }) .collect::>(); - let field_names = fields.iter().map(|(n, _)| n); - let field_types = fields.iter().map(|(_, t)| { - // If the field type is `::std::vec::Vec` obtain the type parameter and - // surround with slice brackets. Otherwise, utilize the field_type as is. - match t.vec_type_param() { - Some(ty) => quote!([#ty]), - None => quote!(#t), - } - }); // There cannot be a reference without a parameter. let should_ref = !fields.is_empty(); - let (entry_struct, constructor) = if should_ref { - ( - quote! { - pub struct #entry_struct_ident <'a>( #( pub &'a #field_types ),* ); - }, - quote!( #entry_struct_ident( #( #field_names ),* ) ), - ) - } else { - ( - quote!( pub struct #entry_struct_ident; ), - quote!( #entry_struct_ident ), - ) - }; - let key_impl = if hashers.len() == fields.len() { // If the number of hashers matches the number of fields, we're dealing with // something shaped like a StorageNMap, and each field should be hashed separately @@ -173,10 +119,10 @@ fn generate_storage_entry_fns( .enumerate() .map(|(field_idx, hasher)| { let index = syn::Index::from(field_idx); - quote!( ::subxt::StorageMapKey::new(&self.#index, #hasher) ) + quote!( ::subxt::client::storage::StorageMapKey::new(&self.#index, #hasher) ) }); quote! { - ::subxt::StorageEntryKey::Map( + ::subxt::client::storage::StorageEntryKey::Map( vec![ #( #keys ),* ] ) } @@ -190,8 +136,8 @@ fn generate_storage_entry_fns( quote!( &self.#index ) }); quote! { - ::subxt::StorageEntryKey::Map( - vec![ ::subxt::StorageMapKey::new(&(#( #items ),*), #hasher) ] + ::subxt::client::storage::StorageEntryKey::Map( + vec![ ::subxt::client::storage::StorageMapKey::new(&(#( #items ),*), #hasher) ] ) } } else { @@ -204,33 +150,20 @@ fn generate_storage_entry_fns( ) }; - (fields, entry_struct, constructor, key_impl, should_ref) + (fields, key_impl, should_ref) } _ => { - let (lifetime_param, lifetime_ref) = (quote!(<'a>), quote!(&'a)); - let ty_path = type_gen.resolve_type_path(key.id(), &[]); let fields = vec![(format_ident!("_0"), ty_path.clone())]; - - // `ty_path` can be `std::vec::Vec`. In such cases, the entry struct - // should contain a slice reference. - let ty_slice = match ty_path.vec_type_param() { - Some(ty) => quote!([#ty]), - None => quote!(#ty_path), - }; - let entry_struct = quote! { - pub struct #entry_struct_ident #lifetime_param( pub #lifetime_ref #ty_slice ); - }; - let constructor = quote!( #entry_struct_ident(_0) ); let hasher = hashers.get(0).unwrap_or_else(|| { abort_call_site!("No hasher found for single key") }); let key_impl = quote! { - ::subxt::StorageEntryKey::Map( - vec![ ::subxt::StorageMapKey::new(&self.0, #hasher) ] + ::subxt::client::storage::StorageEntryKey::Map( + vec![ ::subxt::client::storage::StorageMapKey::new(&self.0, #hasher) ] ) }; - (fields, entry_struct, constructor, key_impl, true) + (fields, key_impl, true) } } } @@ -249,85 +182,23 @@ fn generate_storage_entry_fns( }); let fn_name = format_ident!("{}", storage_entry.name.to_snake_case()); - let fn_name_iter = format_ident!("{}_iter", fn_name); let storage_entry_ty = match storage_entry.ty { StorageEntryType::Plain(ref ty) => ty, StorageEntryType::Map { ref value, .. } => value, }; let storage_entry_value_ty = type_gen.resolve_type_path(storage_entry_ty.id(), &[]); - let (return_ty, fetch) = match storage_entry.modifier { + let return_ty = match storage_entry.modifier { StorageEntryModifier::Default => { - (quote!( #storage_entry_value_ty ), quote!(fetch_or_default)) + quote!( #storage_entry_value_ty ) } StorageEntryModifier::Optional => { - ( - quote!( ::core::option::Option<#storage_entry_value_ty> ), - quote!(fetch), - ) - } - }; - - let storage_entry_impl = quote! ( - const PALLET: &'static str = #pallet_name; - const STORAGE: &'static str = #storage_name; - type Value = #storage_entry_value_ty; - fn key(&self) -> ::subxt::StorageEntryKey { - #key_impl - } - ); - - let anon_lifetime = match should_ref { - true => quote!(<'_>), - false => quote!(), - }; - let storage_entry_type = quote! { - #entry_struct - impl ::subxt::StorageEntry for #entry_struct_ident #anon_lifetime { - #storage_entry_impl + quote!( ::core::option::Option<#storage_entry_value_ty> ) } }; let docs = &storage_entry.docs; let docs_token = quote! { #( #[doc = #docs ] )* }; - let lifetime_param = match should_ref { - true => quote!(<'a>), - false => quote!(), - }; - let client_iter_fn = if matches!(storage_entry.ty, StorageEntryType::Map { .. }) { - quote! ( - #docs_token - pub fn #fn_name_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result<::subxt::KeyIter<'a, T, #entry_struct_ident #lifetime_param>, ::subxt::BasicError> - > + 'a { - // Instead of an async fn which borrows all of self, - // we make sure that the returned future only borrows - // client, which allows you to chain calls a little better. - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::<#entry_struct_ident>() { - Ok(hash) => hash, - Err(e) => return Err(e.into()) - } - }; - if runtime_storage_hash == [#(#storage_hash,)*] { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - ) - } else { - quote!() - }; - let key_args_ref = match should_ref { true => quote!(&'a), false => quote!(), @@ -343,39 +214,19 @@ fn generate_storage_entry_fns( quote!( #field_name: #key_args_ref #field_ty ) }); - let client_fns = quote! { + quote! { #docs_token pub fn #fn_name( &self, #( #key_args, )* block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result<#return_ty, ::subxt::BasicError> - > + 'a { - // Instead of an async fn which borrows all of self, - // we make sure that the returned future only borrows - // client, which allows you to chain calls a little better. - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::<#entry_struct_ident>() { - Ok(hash) => hash, - Err(e) => return Err(e.into()) - } - }; - if runtime_storage_hash == [#(#storage_hash,)*] { - let entry = #constructor; - client.storage().#fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::client::storage::StorageAddress::<'static, #return_ty> { + ::subxt::client::storage::StorageAddress::new_with_validation( + #pallet_name, + #storage_name, + #key_impl, + [#(#storage_hash,)*] + ) } - - #client_iter_fn - }; - - (storage_entry_type, client_fns) + } } diff --git a/subxt/src/client/storage_client.rs b/subxt/src/client/storage_client.rs index 8dcf23530d..254a6f3a4d 100644 --- a/subxt/src/client/storage_client.rs +++ b/subxt/src/client/storage_client.rs @@ -23,6 +23,7 @@ use crate::{ client::{ OnlineClientT, }, + metadata::Metadata, Config, StorageHasher, }; @@ -150,6 +151,19 @@ where address: &StorageAddress<'_, ReturnTy>, hash: Option, ) -> Result, BasicError> { + // Metadata validation checks whether the static address given + // is likely to actually correspond to a real storage entry or not. + // if not, it means static codegen doesn't line up with runtime + // metadata. + if let Some(validation_hash) = address.storage_hash { + validate_storage( + &*address.pallet_name, + &*address.storage_name, + validation_hash, + &self.client.metadata() + )?; + } + if let Some(data) = self.fetch_raw(address, hash).await? { Ok(Some(Decode::decode(&mut &*data)?)) } else { @@ -165,6 +179,7 @@ where ) -> Result { let pallet_name = &*address.pallet_name; let storage_name = &*address.storage_name; + // Metadata validation happens via .fetch(): if let Some(data) = self.fetch(address, hash).await? { Ok(data) } else { @@ -202,6 +217,22 @@ where page_size: u32, hash: Option, ) -> Result, BasicError> { + // Metadata validation checks whether the static address given + // is likely to actually correspond to a real storage entry or not. + // if not, it means static codegen doesn't line up with runtime + // metadata. + if let Some(validation_hash) = address.storage_hash { + validate_storage( + &*address.pallet_name, + &*address.storage_name, + validation_hash, + &self.client.metadata() + )?; + } + + // Fetch a concrete block hash to iterate over. We do this so that if new blocks + // are produced midway through iteration, we continue to iterate at the block + // we started with and not the new block. let hash = if let Some(hash) = hash { hash } else { @@ -211,6 +242,7 @@ where .await? .expect("didn't pass a block number; qed") }; + Ok(KeyIter { client: self.clone(), address: address.to_owned(), @@ -285,8 +317,8 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { /// Take a storage address and return an owned storage address. pub fn to_owned(self) -> StorageAddress<'static, ReturnTy> { StorageAddress { - pallet_name: self.pallet_name.into_owned().into(), - storage_name: self.storage_name.into_owned().into(), + pallet_name: Cow::Owned(self.pallet_name.into_owned()), + storage_name: Cow::Owned(self.storage_name.into_owned()), storage_entry_key: Cow::Owned(self.storage_entry_key.into_owned()), storage_hash: self.storage_hash, _marker: self._marker @@ -394,3 +426,15 @@ impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode> KeyIter Result<(), BasicError> { + let expected_hash = match metadata.storage_hash(pallet_name, storage_name) { + Ok(hash) => hash, + Err(e) => return Err(e.into()) + }; + match expected_hash != hash { + true => Ok(()), + false => Err(crate::MetadataError::IncompatibleMetadata.into()) + } +} \ No newline at end of file From e9070b037ad067b63dfd16f55d483636722583a4 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 10:43:05 +0100 Subject: [PATCH 17/75] don't need a Call trait any more --- codegen/src/api/calls.rs | 34 +++------------------------------- subxt/src/lib.rs | 19 ------------------- 2 files changed, 3 insertions(+), 50 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index dddfe62d3b..6165a132b0 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -22,31 +22,8 @@ use quote::{ }; use scale_info::form::PortableForm; -/// Generate calls from the provided pallet's metadata. -/// -/// The function creates a new module named `calls` under the pallet's module. -/// ```ignore -/// pub mod PalletName { -/// pub mod calls { -/// ... -/// } -/// } -/// ``` -/// -/// The function generates the calls as rust structs that implement the `subxt::Call` trait -/// to uniquely identify the call's identity when creating the extrinsic. -/// -/// ```ignore -/// pub struct CallName { -/// pub call_param: type, -/// } -/// impl ::subxt::Call for CallName { -/// ... -/// } -/// ``` -/// -/// Calls are extracted from the API and wrapped into the generated `TransactionApi` of -/// each module. +/// Generate calls from the provided pallet's metadata. Each call returns a `SubmittableExtrinsic` +/// that can be passed to the subxt client to submit/sign/encode. /// /// # Arguments /// @@ -113,11 +90,6 @@ pub fn generate_calls( // The call structure's documentation was stripped above. let call_struct = quote! { #struct_def - - impl ::subxt::Call for #struct_name { - const PALLET: &'static str = #pallet_name; - const FUNCTION: &'static str = #call_name; - } }; let client_fn = quote! { #docs @@ -152,7 +124,7 @@ pub fn generate_calls( #( #call_structs )* - pub struct TransactionApi + pub struct TransactionApi; impl TransactionApi { #( #call_fns )* diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index b3518fce54..407739f862 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -277,25 +277,6 @@ pub use crate::{ }, }; -/// Trait to uniquely identify the call (extrinsic)'s identity from the runtime metadata. -/// -/// Generated API structures that represent each of the different possible -/// calls to a node each implement this trait. -/// -/// When encoding an extrinsic, we use this information to know how to map -/// the call to the specific pallet and call index needed by a particular node. -pub trait Call: Encode { - /// Pallet name. - const PALLET: &'static str; - /// Function name. - const FUNCTION: &'static str; - - /// Returns true if the given pallet and function names match this call. - fn is_call(pallet: &str, function: &str) -> bool { - Self::PALLET == pallet && Self::FUNCTION == function - } -} - /// Trait to uniquely identify the events's identity from the runtime metadata. /// /// Generated API structures that represent an event implement this trait. From 9b0a27c823b9010294db1c2a31c38819e95248e2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 11:24:13 +0100 Subject: [PATCH 18/75] shuffle things around a bit --- codegen/src/api/constants.rs | 4 +- codegen/src/api/storage.rs | 18 +++---- subxt/src/client/mod.rs | 24 --------- subxt/src/client/offline_client.rs | 6 +-- subxt/src/constants/constant_address.rs | 51 ++++++++++++++++++ .../{client => constants}/constants_client.rs | 52 ++++--------------- subxt/src/constants/mod.rs | 15 ++++++ subxt/src/events/event_subscription.rs | 4 +- subxt/src/{client => events}/events_client.rs | 0 subxt/src/events/mod.rs | 4 ++ subxt/src/extrinsic/mod.rs | 6 +++ subxt/src/extrinsic/transaction.rs | 2 +- subxt/src/{client => extrinsic}/tx_client.rs | 0 subxt/src/lib.rs | 2 + subxt/src/storage/mod.rs | 16 ++++++ .../src/{client => storage}/storage_client.rs | 0 16 files changed, 121 insertions(+), 83 deletions(-) create mode 100644 subxt/src/constants/constant_address.rs rename subxt/src/{client => constants}/constants_client.rs (55%) create mode 100644 subxt/src/constants/mod.rs rename subxt/src/{client => events}/events_client.rs (100%) rename subxt/src/{client => extrinsic}/tx_client.rs (100%) create mode 100644 subxt/src/storage/mod.rs rename subxt/src/{client => storage}/storage_client.rs (100%) diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index 06a81a2576..4cce6ec871 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -63,8 +63,8 @@ pub fn generate_constants( quote! { #( #[doc = #docs ] )* - pub fn #fn_name(&self) -> ::subxt::client::constants::ConstantAddress<'static, #return_ty> { - ::subxt::client::constants::StaticAddress::new_with_validation( + pub fn #fn_name(&self) -> ::subxt::constants::ConstantAddress<'static, #return_ty> { + ::subxt::constants::StaticAddress::new_with_validation( #pallet_name, #constant_name, [#(#constant_hash,)*] diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 72c754ef28..5391de3e03 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -71,7 +71,7 @@ fn generate_storage_entry_fns( ) -> TokenStream2 { let (fields, key_impl, should_ref) = match storage_entry.ty { StorageEntryType::Plain(_) => { - (vec![], quote!(::subxt::client::storage::client::storage::StorageEntryKey::Plain), false) + (vec![], quote!(::subxt::storage::StorageEntryKey::Plain), false) } StorageEntryType::Map { ref key, @@ -119,10 +119,10 @@ fn generate_storage_entry_fns( .enumerate() .map(|(field_idx, hasher)| { let index = syn::Index::from(field_idx); - quote!( ::subxt::client::storage::StorageMapKey::new(&self.#index, #hasher) ) + quote!( ::subxt::storage::StorageMapKey::new(&self.#index, #hasher) ) }); quote! { - ::subxt::client::storage::StorageEntryKey::Map( + ::subxt::storage::StorageEntryKey::Map( vec![ #( #keys ),* ] ) } @@ -136,8 +136,8 @@ fn generate_storage_entry_fns( quote!( &self.#index ) }); quote! { - ::subxt::client::storage::StorageEntryKey::Map( - vec![ ::subxt::client::storage::StorageMapKey::new(&(#( #items ),*), #hasher) ] + ::subxt::storage::StorageEntryKey::Map( + vec![ ::subxt::storage::StorageMapKey::new(&(#( #items ),*), #hasher) ] ) } } else { @@ -159,8 +159,8 @@ fn generate_storage_entry_fns( abort_call_site!("No hasher found for single key") }); let key_impl = quote! { - ::subxt::client::storage::StorageEntryKey::Map( - vec![ ::subxt::client::storage::StorageMapKey::new(&self.0, #hasher) ] + ::subxt::storage::StorageEntryKey::Map( + vec![ ::subxt::storage::StorageMapKey::new(&self.0, #hasher) ] ) }; (fields, key_impl, true) @@ -220,8 +220,8 @@ fn generate_storage_entry_fns( &self, #( #key_args, )* block_hash: ::core::option::Option, - ) -> ::subxt::client::storage::StorageAddress::<'static, #return_ty> { - ::subxt::client::storage::StorageAddress::new_with_validation( + ) -> ::subxt::storage::StorageAddress::<'static, #return_ty> { + ::subxt::storage::StorageAddress::new_with_validation( #pallet_name, #storage_name, #key_impl, diff --git a/subxt/src/client/mod.rs b/subxt/src/client/mod.rs index af12940632..2e782ed4bb 100644 --- a/subxt/src/client/mod.rs +++ b/subxt/src/client/mod.rs @@ -10,10 +10,6 @@ mod offline_client; mod online_client; -mod events_client; -mod tx_client; -mod storage_client; -mod constants_client; pub use offline_client::{ OfflineClient, @@ -23,23 +19,3 @@ pub use online_client::{ OnlineClient, OnlineClientT, }; - -/// This module contains a client for working with events. -pub mod events { - pub use super::events_client::*; -} - -/// This module contains a client for working with transactions. -pub mod tx { - pub use super::tx_client::*; -} - -/// This module contains a client for working with storage. -pub mod storage { - pub use super::storage_client::*; -} - -/// This module contains a client for working with constants. -pub mod constants { - pub use super::constants_client::*; -} \ No newline at end of file diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 9b7b0b1e15..e783bb20d8 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -6,12 +6,10 @@ use crate::{ Config, Metadata, rpc::RuntimeVersion, -}; -use super::{ - tx::TxClient, + constants::ConstantsClient, + extrinsic::TxClient, events::EventsClient, storage::StorageClient, - constants::ConstantsClient, }; use std::sync::Arc; use derivative::Derivative; diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs new file mode 100644 index 0000000000..cd0621c68f --- /dev/null +++ b/subxt/src/constants/constant_address.rs @@ -0,0 +1,51 @@ +// 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. + +/// This is returned from constant accesses in the statically generated +/// code, and contains the information needed to find, validate and decode +/// the constant. +pub struct ConstantAddress<'a, ReturnTy> { + pallet_name: &'a str, + constant_name: &'a str, + constant_hash: Option<[u8; 32]>, + _marker: std::marker::PhantomData +} + +impl <'a, ReturnTy> ConstantAddress<'a, ReturnTy> { + /// Create a new [`ConstantAddress`] that will be validated + /// against node metadata using the hash given. + pub fn new_with_validation(pallet_name: &'a str, constant_name: &'a str, hash: [u8; 32]) -> Self { + Self { + pallet_name, + constant_name, + constant_hash: Some(hash), + _marker: std::marker::PhantomData + } + } + + /// Do not validate this constant prior to accessing it. + pub fn unvalidated(self) -> Self { + Self { + pallet_name: self.pallet_name, + constant_name: self.constant_name, + constant_hash: None, + _marker: self._marker + } + } + + /// The pallet name. + pub fn pallet_name(&self) -> &'a str { + self.pallet_name + } + + /// The constant name. + pub fn constant_name(&self) -> &'a str { + self.constant_name + } + + /// A hash used for metadata validation. + pub(super) fn validation_hash(&self) -> Option<[u8; 32]> { + self.constant_hash + } +} \ No newline at end of file diff --git a/subxt/src/client/constants_client.rs b/subxt/src/constants/constants_client.rs similarity index 55% rename from subxt/src/client/constants_client.rs rename to subxt/src/constants/constants_client.rs index 2b2eee41f5..2de3fbcec2 100644 --- a/subxt/src/client/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -2,11 +2,14 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use super::OfflineClientT; -use crate::Config; use codec::Decode; -use crate::error::BasicError; -use crate::metadata::MetadataError; +use super::ConstantAddress; +use crate::{ + Config, + client::OfflineClientT, + error::BasicError, + metadata::MetadataError, +}; use scale_value::{ Value, scale::TypeId }; /// A client for accessing constants. @@ -39,51 +42,18 @@ impl > ConstantsClient { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: - if let Some(actual_hash) = address.constant_hash { - let expected_hash = metadata.constant_hash(&address.pallet_name, &address.constant_name)?; + if let Some(actual_hash) = address.validation_hash() { + let expected_hash = metadata.constant_hash(address.pallet_name(), address.constant_name())?; if actual_hash != expected_hash { return Err(MetadataError::IncompatibleMetadata.into()); } } // 2. Attempt to decode the constant into the type given: - let pallet = metadata.pallet(&address.pallet_name)?; - let constant = pallet.constant(&address.constant_name)?; + let pallet = metadata.pallet(address.pallet_name())?; + let constant = pallet.constant(address.constant_name())?; let value = codec::Decode::decode(&mut &constant.value[..])?; Ok(value) } } - -/// This is returned from constant accesses in the statically generated -/// code, and contains the information needed to find, validate and decode -/// the constant. -pub struct ConstantAddress<'a, ReturnTy> { - pallet_name: &'a str, - constant_name: &'a str, - constant_hash: Option<[u8; 32]>, - _marker: std::marker::PhantomData -} - -impl <'a, ReturnTy> ConstantAddress<'a, ReturnTy> { - /// Create a new [`ConstantAddress`] that will be validated - /// against node metadata using the hash given. - pub fn new_with_validation(pallet_name: &'a str, constant_name: &'a str, hash: [u8; 32]) -> Self { - Self { - pallet_name, - constant_name, - constant_hash: Some(hash), - _marker: std::marker::PhantomData - } - } - - /// Do not validate this constant prior to accessing it. - pub fn unvalidated(self) -> Self { - Self { - pallet_name: self.pallet_name, - constant_name: self.constant_name, - constant_hash: None, - _marker: self._marker - } - } -} \ No newline at end of file diff --git a/subxt/src/constants/mod.rs b/subxt/src/constants/mod.rs new file mode 100644 index 0000000000..a0f06e9ed6 --- /dev/null +++ b/subxt/src/constants/mod.rs @@ -0,0 +1,15 @@ +// 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 associated with accessing constants. + +mod constants_client; +mod constant_address; + +pub use constants_client::{ + ConstantsClient, +}; +pub use constant_address::{ + ConstantAddress, +}; \ No newline at end of file diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index c9de7ea392..f3335286bd 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -9,8 +9,8 @@ use crate::{ Config, client::{ OnlineClientT, - events::EventsClient, - } + }, + events::EventsClient, }; use codec::Decode; use derivative::Derivative; diff --git a/subxt/src/client/events_client.rs b/subxt/src/events/events_client.rs similarity index 100% rename from subxt/src/client/events_client.rs rename to subxt/src/events/events_client.rs diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index fcc1bd95c9..6796d9d849 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -86,6 +86,7 @@ mod event_subscription; mod events_type; mod filter_events; +mod events_client; pub use event_subscription::{ EventSub, @@ -103,3 +104,6 @@ pub use filter_events::{ FilterEvents, FilteredEventDetails, }; +pub use events_client::{ + EventsClient, +}; \ No newline at end of file diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index 246569ab9c..3d13f4a149 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -21,6 +21,7 @@ mod params; mod signer; mod transaction; +mod tx_client; pub use self::{ params::{ @@ -44,5 +45,10 @@ pub use self::{ TransactionInBlock, TransactionProgress, TransactionStatus, + }, + tx_client::{ + SignedSubmittableExtrinsic, + SubmittableExtrinsic, + TxClient, } }; diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index cfe8074949..d62c1c38cc 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -13,7 +13,6 @@ pub use sp_runtime::traits::SignedExtension; use crate::{ client::{ OnlineClientT, - events::EventsClient, }, error::{ BasicError, @@ -28,6 +27,7 @@ use crate::{ EventDetails, Events, RawEventDetails, + EventsClient, }, rpc::SubstrateTransactionStatus, PhantomDataSendSync, diff --git a/subxt/src/client/tx_client.rs b/subxt/src/extrinsic/tx_client.rs similarity index 100% rename from subxt/src/client/tx_client.rs rename to subxt/src/extrinsic/tx_client.rs diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 407739f862..3fb67d196b 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -225,8 +225,10 @@ pub mod config; pub mod error; pub mod events; pub mod extrinsic; +pub mod constants; pub mod metadata; pub mod rpc; +pub mod storage; pub use crate::{ client::{ diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs new file mode 100644 index 0000000000..bf1b60ed02 --- /dev/null +++ b/subxt/src/storage/mod.rs @@ -0,0 +1,16 @@ +// 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 associated with accessing and working with storage items. + +mod storage_client; + +pub use storage_client::{ + KeyIter, + SignedExtension, + StorageAddress, + StorageClient, + StorageEntryKey, + StorageMapKey, +}; \ No newline at end of file diff --git a/subxt/src/client/storage_client.rs b/subxt/src/storage/storage_client.rs similarity index 100% rename from subxt/src/client/storage_client.rs rename to subxt/src/storage/storage_client.rs From 7a939b73776c39aa58165f234e363ce15d65f29b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 12:53:08 +0100 Subject: [PATCH 19/75] Various proc_macro fixes to get 'cargo check' working --- codegen/src/api/calls.rs | 2 +- codegen/src/api/constants.rs | 2 +- codegen/src/api/errors.rs | 12 +++++------ codegen/src/api/mod.rs | 19 ++++++++--------- codegen/src/api/storage.rs | 33 +++++++++++------------------ subxt/src/error.rs | 20 +++++++---------- subxt/src/lib.rs | 6 ------ subxt/src/storage/storage_client.rs | 6 ++++++ 8 files changed, 43 insertions(+), 57 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 6165a132b0..8c54ac502f 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -96,7 +96,7 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, #struct_name, DispatchError, root_mod::Event> { + ) -> ::subxt::extrinsic::SubmittableExtrinsic<::subxt::metadata::EncodeStaticCall<#struct_name>, DispatchError, root_mod::Event> { ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( ::subxt::metadata::EncodeStaticCall { pallet: #pallet_name, diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index 4cce6ec871..16d696c238 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -64,7 +64,7 @@ pub fn generate_constants( quote! { #( #[doc = #docs ] )* pub fn #fn_name(&self) -> ::subxt::constants::ConstantAddress<'static, #return_ty> { - ::subxt::constants::StaticAddress::new_with_validation( + ::subxt::constants::ConstantAddress::new_with_validation( #pallet_name, #constant_name, [#(#constant_hash,)*] diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 1bdd98a68f..b4702beadc 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -36,7 +36,7 @@ impl quote::ToTokens for ModuleErrorType { ModuleErrorType::NamedField => { quote! { if let &Self::Module { index, error } = self { - Some(::subxt::ModuleErrorData { pallet_index: index, error: [error, 0, 0, 0] }) + Some(::subxt::error::ModuleErrorData { pallet_index: index, error: [error, 0, 0, 0] }) } else { None } @@ -45,7 +45,7 @@ impl quote::ToTokens for ModuleErrorType { ModuleErrorType::LegacyError => { quote! { if let Self::Module (module_error) = self { - Some(::subxt::ModuleErrorData { pallet_index: module_error.index, error: [module_error.error, 0, 0, 0] }) + Some(::subxt::error::ModuleErrorData { pallet_index: module_error.index, error: [module_error.error, 0, 0, 0] }) } else { None } @@ -54,7 +54,7 @@ impl quote::ToTokens for ModuleErrorType { ModuleErrorType::ArrayError => { quote! { if let Self::Module (module_error) = self { - Some(::subxt::ModuleErrorData { pallet_index: module_error.index, error: module_error.error }) + Some(::subxt::error::ModuleErrorData { pallet_index: module_error.index, error: module_error.error }) } else { None } @@ -141,7 +141,7 @@ fn module_error_type( } } -/// The aim of this is to implement the `::subxt::HasModuleError` trait for +/// The aim of this is to implement the `::subxt::error::HasModuleError` trait for /// the generated `DispatchError`, so that we can obtain the module error details, /// if applicable, from it. pub fn generate_has_module_error_impl( @@ -180,8 +180,8 @@ pub fn generate_has_module_error_impl( let error_type = module_error_type(module_field, metadata); quote! { - impl ::subxt::HasModuleError for #types_mod_ident::sp_runtime::DispatchError { - fn module_error_data(&self) -> Option<::subxt::ModuleErrorData> { + impl ::subxt::error::HasModuleError for #types_mod_ident::sp_runtime::DispatchError { + fn module_error_data(&self) -> Option<::subxt::error::ModuleErrorData> { #error_type } } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 1de771ea91..ff8394107c 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -276,18 +276,19 @@ impl RuntimeGenerator { // Impl HasModuleError on DispatchError so we can pluck out module error details. #has_module_error_impl - pub fn constants(&'a self) -> ConstantsApi { + pub fn constants() -> ConstantsApi { ConstantsApi } - pub fn storage(&'a self) -> StorageApi { + pub fn storage() -> StorageApi { StorageApi } - pub fn tx(&'a self) -> TransactionApi { + pub fn tx() -> TransactionApi { TransactionApi } + pub struct ConstantsApi; impl ConstantsApi { #( pub fn #pallets_with_constants(&self) -> #pallets_with_constants::constants::ConstantsApi { @@ -296,6 +297,7 @@ impl RuntimeGenerator { )* } + pub struct StorageApi; impl StorageApi { #( pub fn #pallets_with_storage(&self) -> #pallets_with_storage::storage::StorageApi { @@ -304,6 +306,7 @@ impl RuntimeGenerator { )* } + pub struct TransactionApi; impl TransactionApi { #( pub fn #pallets_with_calls(&self) -> #pallets_with_calls::calls::TransactionApi { @@ -313,14 +316,10 @@ impl RuntimeGenerator { } /// check whether the Client you are using is aligned with the statically generated codegen. - pub fn validate_codegen>(client: C) -> Result<(), ::subxt::MetadataError> { - let runtime_metadata_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.metadata_hash(&PALLETS) - }; + pub fn validate_codegen>(client: C) -> Result<(), ::subxt::error::MetadataError> { + let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ #(#metadata_hash,)* ] { - Err(::subxt::MetadataError::IncompatibleMetadata) + Err(::subxt::error::MetadataError::IncompatibleMetadata) } else { Ok(()) } diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 5391de3e03..ef23daaf9a 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -69,9 +69,9 @@ fn generate_storage_entry_fns( pallet: &PalletMetadata, storage_entry: &StorageEntryMetadata, ) -> TokenStream2 { - let (fields, key_impl, should_ref) = match storage_entry.ty { + let (fields, key_impl) = match storage_entry.ty { StorageEntryType::Plain(_) => { - (vec![], quote!(::subxt::storage::StorageEntryKey::Plain), false) + (vec![], quote!(::subxt::storage::StorageEntryKey::Plain)) } StorageEntryType::Map { ref key, @@ -108,18 +108,15 @@ fn generate_storage_entry_fns( }) .collect::>(); - // There cannot be a reference without a parameter. - let should_ref = !fields.is_empty(); let key_impl = if hashers.len() == fields.len() { // If the number of hashers matches the number of fields, we're dealing with // something shaped like a StorageNMap, and each field should be hashed separately // according to the corresponding hasher. let keys = hashers .into_iter() - .enumerate() - .map(|(field_idx, hasher)| { - let index = syn::Index::from(field_idx); - quote!( ::subxt::storage::StorageMapKey::new(&self.#index, #hasher) ) + .zip(&fields) + .map(|(hasher, (field_name, _))| { + quote!( ::subxt::storage::StorageMapKey::new(#field_name, #hasher) ) }); quote! { ::subxt::storage::StorageEntryKey::Map( @@ -131,9 +128,8 @@ fn generate_storage_entry_fns( // tuple of them using the one hasher we're told about. This corresponds to a // StorageMap. let hasher = hashers.get(0).expect("checked for 1 hasher"); - let items = (0..fields.len()).map(|field_idx| { - let index = syn::Index::from(field_idx); - quote!( &self.#index ) + let items = fields.iter().map(|(field_name, _)| { + quote!( #field_name ) }); quote! { ::subxt::storage::StorageEntryKey::Map( @@ -150,7 +146,7 @@ fn generate_storage_entry_fns( ) }; - (fields, key_impl, should_ref) + (fields, key_impl) } _ => { let ty_path = type_gen.resolve_type_path(key.id(), &[]); @@ -160,10 +156,10 @@ fn generate_storage_entry_fns( }); let key_impl = quote! { ::subxt::storage::StorageEntryKey::Map( - vec![ ::subxt::storage::StorageMapKey::new(&self.0, #hasher) ] + vec![ ::subxt::storage::StorageMapKey::new(_0, #hasher) ] ) }; - (fields, key_impl, true) + (fields, key_impl) } } } @@ -199,19 +195,15 @@ fn generate_storage_entry_fns( let docs = &storage_entry.docs; let docs_token = quote! { #( #[doc = #docs ] )* }; - let key_args_ref = match should_ref { - true => quote!(&'a), - false => quote!(), - }; let key_args = fields.iter().map(|(field_name, field_type)| { // The field type is translated from `std::vec::Vec` to `[T]`, if the // interface should generate a reference. In such cases, the vector ultimately is // a slice. let field_ty = match field_type.vec_type_param() { - Some(ty) if should_ref => quote!([#ty]), + Some(ty) => quote!(&[#ty]), _ => quote!(#field_type), }; - quote!( #field_name: #key_args_ref #field_ty ) + quote!( #field_name: & #field_ty ) }); quote! { @@ -219,7 +211,6 @@ fn generate_storage_entry_fns( pub fn #fn_name( &self, #( #key_args, )* - block_hash: ::core::option::Option, ) -> ::subxt::storage::StorageAddress::<'static, #return_ty> { ::subxt::storage::StorageAddress::new_with_validation( #pallet_name, diff --git a/subxt/src/error.rs b/subxt/src/error.rs index a981d7ddb2..c4946551c1 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -4,19 +4,15 @@ //! Types representing the errors that can be returned. -use crate::metadata::{ - InvalidMetadataError, - MetadataError, -}; use core::fmt::Debug; -use jsonrpsee::core::error::Error as RequestError; -use scale_value::{ - scale::{ - DecodeError, - } -}; -use sp_core::crypto::SecretStringError; -use sp_runtime::transaction_validity::TransactionValidityError; + +// Re-expose the errors we use from other crates here: +pub use crate::metadata::MetadataError; +pub use crate::metadata::InvalidMetadataError; +pub use jsonrpsee::core::error::Error as RequestError; +pub use scale_value::scale::DecodeError; +pub use sp_core::crypto::SecretStringError; +pub use sp_runtime::transaction_validity::TransactionValidityError; /// An error that may contain some runtime error `E` pub type Error = GenericError>; diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 3fb67d196b..63fce9b7ec 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -242,12 +242,6 @@ pub use crate::{ error::{ BasicError, Error, - GenericError, - HasModuleError, - ModuleError, - ModuleErrorData, - RuntimeError, - TransactionError, }, events::{ EventDetails, diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 254a6f3a4d..ed8f0dd3ed 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -341,6 +341,12 @@ pub enum StorageEntryKey { Map(Vec), } +impl <'a> From for Cow<'a, StorageEntryKey> { + fn from(k: StorageEntryKey) -> Self { + Cow::Owned(k) + } +} + /// Storage key for a Map. #[derive(Clone)] pub struct StorageMapKey { From 2d0cb0a465383fcafff3a9f1661989456385f7cf Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 13:17:40 +0100 Subject: [PATCH 20/75] organise what's exposed from subxt --- codegen/src/api/events.rs | 7 +- codegen/src/api/mod.rs | 10 +- codegen/src/api/storage.rs | 2 +- codegen/src/types/derives.rs | 8 +- codegen/src/types/tests.rs | 80 +++++++------- subxt/src/events/events_type.rs | 16 +-- subxt/src/events/filter_events.rs | 20 ++-- subxt/src/events/mod.rs | 33 +++++- subxt/src/extrinsic/params.rs | 2 +- subxt/src/extrinsic/transaction.rs | 11 +- subxt/src/extrinsic/tx_client.rs | 6 +- subxt/src/lib.rs | 164 ++-------------------------- subxt/src/rpc.rs | 2 +- subxt/src/storage/mod.rs | 1 + subxt/src/storage/storage_client.rs | 6 +- subxt/src/utils.rs | 94 ++++++++++++++++ 16 files changed, 228 insertions(+), 234 deletions(-) create mode 100644 subxt/src/utils.rs diff --git a/codegen/src/api/events.rs b/codegen/src/api/events.rs index f960e3bb0d..5e16964265 100644 --- a/codegen/src/api/events.rs +++ b/codegen/src/api/events.rs @@ -11,6 +11,7 @@ use scale_info::form::PortableForm; /// Generate events from the provided pallet metadata. /// /// The function creates a new module named `events` under the pallet's module. +/// /// ```ignore /// pub mod PalletName { /// pub mod events { @@ -19,14 +20,14 @@ use scale_info::form::PortableForm; /// } /// ``` /// -/// The function generates the events as rust structs that implement the `subxt::Event` trait +/// The function generates the events as rust structs that implement the `subxt::event::StaticEvent` trait /// to uniquely identify the event's identity when creating the extrinsic. /// /// ```ignore /// pub struct EventName { /// pub event_param: type, /// } -/// impl ::subxt::Event for EventName { +/// impl ::subxt::events::StaticEvent for EventName { /// ... /// } /// ``` @@ -62,7 +63,7 @@ pub fn generate_events( quote! { #struct_def - impl ::subxt::Event for #event_struct { + impl ::subxt::events::StaticEvent for #event_struct { const PALLET: &'static str = #pallet_name; const EVENT: &'static str = #event_name; } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index ff8394107c..9682c383a7 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -118,25 +118,25 @@ impl RuntimeGenerator { ), ( "sp_core::crypto::AccountId32", - parse_quote!(::subxt::sp_core::crypto::AccountId32), + parse_quote!(::subxt::ext::sp_core::crypto::AccountId32), ), ( "primitive_types::H256", - parse_quote!(::subxt::sp_core::H256), + parse_quote!(::subxt::ext::sp_core::H256), ), ( "sp_runtime::multiaddress::MultiAddress", - parse_quote!(::subxt::sp_runtime::MultiAddress), + parse_quote!(::subxt::ext::sp_runtime::MultiAddress), ), ( "frame_support::traits::misc::WrapperKeepOpaque", - parse_quote!(::subxt::WrapperKeepOpaque), + parse_quote!(::subxt::utils::WrapperKeepOpaque), ), // BTreeMap and BTreeSet impose an `Ord` constraint on their key types. This // can cause an issue with generated code that doesn't impl `Ord` by default. // Decoding them to Vec by default (KeyedVec is just an alias for Vec with // suitable type params) avoids these issues. - ("BTreeMap", parse_quote!(::subxt::KeyedVec)), + ("BTreeMap", parse_quote!(::subxt::utils::KeyedVec)), ("BTreeSet", parse_quote!(::std::vec::Vec)), ] .iter() diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index ef23daaf9a..4c995b13ae 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -92,7 +92,7 @@ fn generate_storage_entry_fns( StorageHasher::Identity => "Identity", }; let hasher = format_ident!("{}", hasher); - quote!( ::subxt::StorageHasher::#hasher ) + quote!( ::subxt::storage::StorageHasher::#hasher ) }) .collect::>(); match key_ty.type_def() { diff --git a/codegen/src/types/derives.rs b/codegen/src/types/derives.rs index e94664c0eb..7ae2a180b9 100644 --- a/codegen/src/types/derives.rs +++ b/codegen/src/types/derives.rs @@ -69,9 +69,9 @@ impl FromIterator for Derives { } impl Derives { - /// Add `::subxt::codec::CompactAs` to the derives. + /// Add `::subxt::ext::codec::CompactAs` to the derives. pub fn insert_codec_compact_as(&mut self) { - self.insert(parse_quote!(::subxt::codec::CompactAs)); + self.insert(parse_quote!(::subxt::ext::codec::CompactAs)); } pub fn append(&mut self, derives: impl Iterator) { @@ -88,8 +88,8 @@ impl Derives { impl Default for Derives { fn default() -> Self { let mut derives = HashSet::new(); - derives.insert(syn::parse_quote!(::subxt::codec::Encode)); - derives.insert(syn::parse_quote!(::subxt::codec::Decode)); + derives.insert(syn::parse_quote!(::subxt::ext::codec::Encode)); + derives.insert(syn::parse_quote!(::subxt::ext::codec::Decode)); derives.insert(syn::parse_quote!(Debug)); Self { derives } } diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs index 9233a793e4..8fe4157484 100644 --- a/codegen/src/types/tests.rs +++ b/codegen/src/types/tests.rs @@ -53,7 +53,7 @@ fn generate_struct_with_primitives() { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { pub a: ::core::primitive::bool, pub b: ::core::primitive::u32, @@ -99,12 +99,12 @@ fn generate_struct_with_a_struct_field() { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Child { pub a: ::core::primitive::i32, } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Parent { pub a: ::core::primitive::bool, pub b: root::subxt_codegen::types::tests::Child, @@ -144,10 +144,10 @@ fn generate_tuple_struct() { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Child(pub ::core::primitive::i32,); - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Parent(pub ::core::primitive::bool, pub root::subxt_codegen::types::tests::Child,); } } @@ -226,34 +226,34 @@ fn derive_compact_as_for_uint_wrapper_structs() { pub mod tests { use super::root; - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Su128 { pub a: ::core::primitive::u128, } - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Su16 { pub a: ::core::primitive::u16, } - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Su32 { pub a: ::core::primitive::u32, } - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Su64 { pub a: ::core::primitive::u64, } - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Su8 { pub a: ::core::primitive::u8, } - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct TSu128(pub ::core::primitive::u128,); - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct TSu16(pub ::core::primitive::u16,); - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct TSu32(pub ::core::primitive::u32,); - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct TSu64(pub ::core::primitive::u64,); - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct TSu8(pub ::core::primitive::u8,); } } @@ -289,7 +289,7 @@ fn generate_enum() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub enum E { # [codec (index = 0)] A, @@ -347,7 +347,7 @@ fn compact_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub enum E { # [codec (index = 0)] A { @@ -358,12 +358,12 @@ fn compact_fields() { B( #[codec(compact)] ::core::primitive::u32,), } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { #[codec(compact)] pub a: ::core::primitive::u32, } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct TupleStruct(#[codec(compact)] pub ::core::primitive::u32,); } } @@ -397,7 +397,7 @@ fn generate_array_field() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { pub a: [::core::primitive::u8; 32usize], } @@ -434,7 +434,7 @@ fn option_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { pub a: ::core::option::Option<::core::primitive::bool>, pub b: ::core::option::Option<::core::primitive::u32>, @@ -474,7 +474,7 @@ fn box_fields_struct() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { pub a: ::std::boxed::Box<::core::primitive::bool>, pub b: ::std::boxed::Box<::core::primitive::u32>, @@ -514,7 +514,7 @@ fn box_fields_enum() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub enum E { # [codec (index = 0)] A(::std::boxed::Box<::core::primitive::bool>,), @@ -554,7 +554,7 @@ fn range_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { pub a: ::core::ops::Range<::core::primitive::u32>, pub b: ::core::ops::RangeInclusive<::core::primitive::u32>, @@ -598,12 +598,12 @@ fn generics() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Bar { pub b: root::subxt_codegen::types::tests::Foo<::core::primitive::u32>, pub c: root::subxt_codegen::types::tests::Foo<::core::primitive::u8>, } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Foo<_0> { pub a: _0, } @@ -646,12 +646,12 @@ fn generics_nested() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Bar<_0> { pub b: root::subxt_codegen::types::tests::Foo<_0, ::core::primitive::u32>, } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Foo<_0, _1> { pub a: _0, pub b: ::core::option::Option<(_0, _1,)>, @@ -697,7 +697,7 @@ fn generate_bitvec() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { pub lsb: ::subxt::bitvec::vec::BitVec<::core::primitive::u8, root::bitvec::order::Lsb0>, pub msb: ::subxt::bitvec::vec::BitVec<::core::primitive::u16, root::bitvec::order::Msb0>, @@ -750,12 +750,12 @@ fn generics_with_alias_adds_phantom_data_marker() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::CompactAs, ::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::CompactAs, ::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct NamedFields<_0> { pub b: ::core::primitive::u32, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_0> } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct UnnamedFields<_0, _1> ( pub (::core::primitive::u32, ::core::primitive::u32,), #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1)> @@ -818,20 +818,20 @@ fn modules() { pub mod b { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Bar { pub a: root::subxt_codegen::types::tests::m::a::Foo, } } - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Foo; } pub mod c { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct Foo { pub a: root::subxt_codegen::types::tests::m::a::b::Bar, } @@ -868,7 +868,7 @@ fn dont_force_struct_names_camel_case() { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct AB; } } @@ -905,10 +905,10 @@ fn apply_user_defined_derives_for_all_types() { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Clone, Debug, Eq)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Clone, Debug, Eq)] pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Clone, Debug, Eq)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Clone, Debug, Eq)] pub struct B; } } @@ -964,13 +964,13 @@ fn apply_user_defined_derives_for_specific_types() { pub mod tests { use super::root; - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug, Eq)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug, Eq)] pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug, Eq, Hash)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug, Eq, Hash)] pub struct B(pub root :: subxt_codegen :: types :: tests :: C,); - #[derive(::subxt::codec::Decode, ::subxt::codec::Encode, Debug, Eq, Ord, PartialOrd)] + #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug, Eq, Ord, PartialOrd)] pub struct C; } } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 8947324b4f..8002f593dc 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -7,9 +7,7 @@ use crate::{ error::BasicError, Config, - Event, Metadata, - Phase, }; use codec::{ Compact, @@ -18,6 +16,10 @@ use codec::{ Input, }; use derivative::Derivative; +use super::{ + Phase, + StaticEvent +}; /// A collection of events obtained from a block, bundled with the necessary /// information needed to decode and iterate over them. @@ -223,7 +225,7 @@ impl<'a, T: Config, Evs: Decode> Events { /// /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to /// use even if you do not statically know about all of the possible events. - pub fn find(&self) -> impl Iterator> + '_ { + pub fn find(&self) -> impl Iterator> + '_ { self.iter_raw().filter_map(|ev| { ev.and_then(|ev| ev.as_event::().map_err(Into::into)) .transpose() @@ -235,7 +237,7 @@ impl<'a, T: Config, Evs: Decode> Events { /// /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to /// use even if you do not statically know about all of the possible events. - pub fn find_first(&self) -> Result, BasicError> { + pub fn find_first(&self) -> Result, BasicError> { self.find::().next().transpose() } @@ -243,7 +245,7 @@ impl<'a, T: Config, Evs: Decode> Events { /// /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to /// use even if you do not statically know about all of the possible events. - pub fn has(&self) -> Result { + pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) } } @@ -286,7 +288,7 @@ pub struct RawEventDetails { impl RawEventDetails { /// Attempt to decode this [`RawEventDetails`] into a specific event. - pub fn as_event(&self) -> Result, CodecError> { + pub fn as_event(&self) -> Result, CodecError> { if self.pallet == E::PALLET && self.variant == E::EVENT { Ok(Some(E::decode(&mut &self.bytes[..])?)) } else { @@ -364,7 +366,6 @@ pub(crate) mod test_utils { use crate::{ Config, SubstrateConfig, - Phase, }; use codec::Encode; use frame_metadata::{ @@ -476,7 +477,6 @@ mod tests { }, *, }; - use crate::Phase; use codec::Encode; use scale_info::TypeInfo; use scale_value::Value; diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index 0e44bbda4d..6d52666a74 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -8,8 +8,10 @@ use super::Events; use crate::{ BasicError, Config, - Event, - Phase, +}; +use super::{ + StaticEvent, + Phase }; use codec::Decode; use futures::{ @@ -134,8 +136,8 @@ pub(crate) mod private { // A special case impl for searching for a tuple of exactly one event (in this case, we don't // need to return an `(Option,)`; we can just return `Event`. -impl private::Sealed for (Ev,) {} -impl EventFilter for (Ev,) { +impl private::Sealed for (Ev,) {} +impl EventFilter for (Ev,) { type ReturnType = Ev; fn filter<'a, T: Config, Evs: Decode + 'static>( events: Events, @@ -176,8 +178,8 @@ impl EventFilter for (Ev,) { // A generalised impl for tuples of sizes greater than 1: macro_rules! impl_event_filter { ($($ty:ident $idx:tt),+) => { - impl <$($ty: Event),+> private::Sealed for ( $($ty,)+ ) {} - impl <$($ty: Event),+> EventFilter for ( $($ty,)+ ) { + impl <$($ty: StaticEvent),+> private::Sealed for ( $($ty,)+ ) {} + impl <$($ty: StaticEvent),+> EventFilter for ( $($ty,)+ ) { type ReturnType = ( $(Option<$ty>,)+ ); fn filter<'a, T: Config, Evs: Decode + 'static>( events: Events @@ -260,7 +262,7 @@ mod test { // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventA(u8); - impl crate::Event for EventA { + impl StaticEvent for EventA { const PALLET: &'static str = "Test"; const EVENT: &'static str = "A"; } @@ -268,7 +270,7 @@ mod test { // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventB(bool); - impl crate::Event for EventB { + impl StaticEvent for EventB { const PALLET: &'static str = "Test"; const EVENT: &'static str = "B"; } @@ -276,7 +278,7 @@ mod test { // An event in our pallet that we can filter on. #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] struct EventC(u8, bool); - impl crate::Event for EventC { + impl StaticEvent for EventC { const PALLET: &'static str = "Test"; const EVENT: &'static str = "C"; } diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 6796d9d849..c3ffe02db2 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -106,4 +106,35 @@ pub use filter_events::{ }; pub use events_client::{ EventsClient, -}; \ No newline at end of file +}; + +use codec::{ Encode, Decode }; + +/// Trait to uniquely identify the events's identity from the runtime metadata. +/// +/// Generated API structures that represent an event implement this trait. +/// +/// The trait is utilized to decode emitted events from a block, via obtaining the +/// form of the `Event` from the metadata. +pub trait StaticEvent: Decode { + /// Pallet name. + const PALLET: &'static str; + /// Event name. + const EVENT: &'static str; + + /// Returns true if the given pallet and event names match this event. + fn is_event(pallet: &str, event: &str) -> bool { + Self::PALLET == pallet && Self::EVENT == event + } +} + +/// A phase of a block's execution. +#[derive(Clone, Debug, Eq, PartialEq, Decode, Encode)] +pub enum Phase { + /// Applying an extrinsic. + ApplyExtrinsic(u32), + /// Finalizing the block. + Finalization, + /// Initializing the block. + Initialization, +} \ No newline at end of file diff --git a/subxt/src/extrinsic/params.rs b/subxt/src/extrinsic/params.rs index 367668ee98..598fd15cc4 100644 --- a/subxt/src/extrinsic/params.rs +++ b/subxt/src/extrinsic/params.rs @@ -9,7 +9,7 @@ use codec::{ use core::fmt::Debug; use crate::{ Config, - Encoded, + utils::Encoded, }; use derivative::Derivative; diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index d62c1c38cc..581839abdc 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -28,11 +28,12 @@ use crate::{ Events, RawEventDetails, EventsClient, + Phase, + StaticEvent, }, rpc::SubstrateTransactionStatus, - PhantomDataSendSync, + utils::PhantomDataSendSync, Config, - Phase, }; use derivative::Derivative; use futures::{ @@ -494,7 +495,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::find()`] does, with the /// exception that it filters out events not related to the submitted extrinsic. - pub fn find( + pub fn find( &self, ) -> impl Iterator> + '_ { self.iter_raw().filter_map(|ev| { @@ -508,7 +509,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::find_first()`] does, with the /// exception that it ignores events not related to the submitted extrinsic. - pub fn find_first(&self) -> Result, BasicError> { + pub fn find_first(&self) -> Result, BasicError> { self.find::().next().transpose() } @@ -516,7 +517,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::has()`] does, with the /// exception that it ignores events not related to the submitted extrinsic. - pub fn has(&self) -> Result { + pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) } } diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index 6931bd36fe..3fc76b4aa9 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -6,7 +6,6 @@ use sp_runtime::{ traits::Hash, ApplyExtrinsicResult, }; -use crate::PhantomDataSendSync; use crate::{ Config, client::{ @@ -25,7 +24,10 @@ use crate::{ EncodeWithMetadata, MetadataLocation, }, - Encoded, + utils::{ + Encoded, + PhantomDataSendSync, + } }; use codec::{ Compact, diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 63fce9b7ec..b714942bd8 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -204,22 +204,8 @@ )] #![allow(clippy::type_complexity)] -pub use frame_metadata::StorageHasher; pub use subxt_macro::subxt; -pub use bitvec; -pub use codec; -pub use sp_core; -pub use sp_runtime; - -use codec::{ - Decode, - DecodeAll, - Encode, -}; -use core::fmt::Debug; -use derivative::Derivative; - pub mod client; pub mod config; pub mod error; @@ -229,7 +215,10 @@ pub mod constants; pub mod metadata; pub mod rpc; pub mod storage; +pub mod utils; +// Expose a few of the most common types at root, +// but leave most types behind their respoctive modules. pub use crate::{ client::{ OfflineClient, @@ -238,152 +227,23 @@ pub use crate::{ config::{ Config, SubstrateConfig, + PolkadotConfig, }, error::{ BasicError, Error, }, - events::{ - EventDetails, - Events, - RawEventDetails, - }, - extrinsic::{ - PairSigner, - PolkadotExtrinsicParams, - PolkadotExtrinsicParamsBuilder, - SubstrateExtrinsicParams, - SubstrateExtrinsicParamsBuilder, - TransactionEvents, - TransactionInBlock, - TransactionProgress, - TransactionStatus, - }, metadata::{ - ErrorMetadata, Metadata, - MetadataError, - PalletMetadata, - }, - rpc::{ - BlockNumber, - ReadProof, - RpcClient, - SystemProperties, }, }; -/// Trait to uniquely identify the events's identity from the runtime metadata. -/// -/// Generated API structures that represent an event implement this trait. -/// -/// The trait is utilized to decode emitted events from a block, via obtaining the -/// form of the `Event` from the metadata. -pub trait Event: Decode { - /// Pallet name. - const PALLET: &'static str; - /// Event name. - const EVENT: &'static str; - - /// Returns true if the given pallet and event names match this event. - fn is_event(pallet: &str, event: &str) -> bool { - Self::PALLET == pallet && Self::EVENT == event - } -} - -/// 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)] -pub struct Encoded(pub Vec); - -impl codec::Encode for Encoded { - fn encode(&self) -> Vec { - self.0.to_owned() - } -} - -/// A phase of a block's execution. -#[derive(Clone, Debug, Eq, PartialEq, Decode, Encode)] -pub enum Phase { - /// Applying an extrinsic. - ApplyExtrinsic(u32), - /// Finalizing the block. - Finalization, - /// Initializing the block. - Initialization, -} - -/// A wrapper for any type `T` which implement encode/decode in a way compatible with `Vec`. -/// -/// [`WrapperKeepOpaque`] stores the type only in its opaque format, aka as a `Vec`. To -/// access the real type `T` [`Self::try_decode`] needs to be used. -#[derive(Derivative, Encode, Decode)] -#[derivative( - Debug(bound = ""), - Clone(bound = ""), - PartialEq(bound = ""), - Eq(bound = ""), - Default(bound = ""), - Hash(bound = "") -)] -pub struct WrapperKeepOpaque { - data: Vec, - _phantom: PhantomDataSendSync, -} - -impl WrapperKeepOpaque { - /// Try to decode the wrapped type from the inner `data`. - /// - /// Returns `None` if the decoding failed. - pub fn try_decode(&self) -> Option { - T::decode_all(&mut &self.data[..]).ok() - } - - /// Returns the length of the encoded `T`. - pub fn encoded_len(&self) -> usize { - self.data.len() - } - - /// Returns the encoded data. - pub fn encoded(&self) -> &[u8] { - &self.data - } - - /// Create from the given encoded `data`. - pub fn from_encoded(data: Vec) -> Self { - Self { - data, - _phantom: PhantomDataSendSync::new(), - } - } +/// Re-export external crates that are made use of in the subxt API. +pub mod ext { + pub use bitvec; + pub use codec; + pub use sp_core; + pub use sp_runtime; + pub use frame_metadata; + pub use scale_value; } - -/// A version of [`std::marker::PhantomData`] that is also Send and Sync (which is fine -/// because regardless of the generic param, it is always possible to Send + Sync this -/// 0 size type). -#[derive(Derivative, Encode, Decode, scale_info::TypeInfo)] -#[derivative( - Clone(bound = ""), - PartialEq(bound = ""), - Debug(bound = ""), - Eq(bound = ""), - Default(bound = ""), - Hash(bound = "") -)] -#[scale_info(skip_type_params(T))] -#[doc(hidden)] -pub struct PhantomDataSendSync(core::marker::PhantomData); - -impl PhantomDataSendSync { - pub(crate) fn new() -> Self { - Self(core::marker::PhantomData) - } -} - -unsafe impl Send for PhantomDataSendSync {} -unsafe impl Sync for PhantomDataSendSync {} - -/// This represents a key-value collection and is SCALE compatible -/// with collections like BTreeMap. This has the same type params -/// as `BTreeMap` which allows us to easily swap the two during codegen. -pub type KeyedVec = Vec<(K, V)>; diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index 7e62e147f1..93e6965c41 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -91,7 +91,7 @@ use crate::{ error::BasicError, Config, Metadata, - PhantomDataSendSync, + utils::PhantomDataSendSync, }; use codec::{ Decode, diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index bf1b60ed02..8879876607 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -13,4 +13,5 @@ pub use storage_client::{ StorageClient, StorageEntryKey, StorageMapKey, + StorageHasher, }; \ No newline at end of file diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index ed8f0dd3ed..2d8ac163d7 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -25,9 +25,11 @@ use crate::{ }, metadata::Metadata, Config, - StorageHasher, }; +// We use this type a bunch, so export it from here. +pub use frame_metadata::StorageHasher; + /// Query the runtime storage using [StorageClient]. /// /// This module is the core of performing runtime storage queries. While you can @@ -441,6 +443,6 @@ fn validate_storage(pallet_name: &str, storage_name: &str, hash: [u8; 32], metad }; match expected_hash != hash { true => Ok(()), - false => Err(crate::MetadataError::IncompatibleMetadata.into()) + false => Err(crate::error::MetadataError::IncompatibleMetadata.into()) } } \ No newline at end of file diff --git a/subxt/src/utils.rs b/subxt/src/utils.rs new file mode 100644 index 0000000000..f12a54f5c7 --- /dev/null +++ b/subxt/src/utils.rs @@ -0,0 +1,94 @@ +// 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. + +//! Miscellaneous utility helpers. + +use codec::{ Encode, Decode, DecodeAll }; +use derivative::Derivative; + +/// 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)] +pub struct Encoded(pub Vec); + +impl codec::Encode for Encoded { + fn encode(&self) -> Vec { + self.0.to_owned() + } +} + +/// A wrapper for any type `T` which implement encode/decode in a way compatible with `Vec`. +/// +/// [`WrapperKeepOpaque`] stores the type only in its opaque format, aka as a `Vec`. To +/// access the real type `T` [`Self::try_decode`] needs to be used. +#[derive(Derivative, Encode, Decode)] +#[derivative( + Debug(bound = ""), + Clone(bound = ""), + PartialEq(bound = ""), + Eq(bound = ""), + Default(bound = ""), + Hash(bound = "") +)] +pub struct WrapperKeepOpaque { + data: Vec, + _phantom: PhantomDataSendSync, +} + +impl WrapperKeepOpaque { + /// Try to decode the wrapped type from the inner `data`. + /// + /// Returns `None` if the decoding failed. + pub fn try_decode(&self) -> Option { + T::decode_all(&mut &self.data[..]).ok() + } + + /// Returns the length of the encoded `T`. + pub fn encoded_len(&self) -> usize { + self.data.len() + } + + /// Returns the encoded data. + pub fn encoded(&self) -> &[u8] { + &self.data + } + + /// Create from the given encoded `data`. + pub fn from_encoded(data: Vec) -> Self { + Self { + data, + _phantom: PhantomDataSendSync::new(), + } + } +} + +/// A version of [`std::marker::PhantomData`] that is also Send and Sync (which is fine +/// because regardless of the generic param, it is always possible to Send + Sync this +/// 0 size type). +#[derive(Derivative, Encode, Decode, scale_info::TypeInfo)] +#[derivative( + Clone(bound = ""), + PartialEq(bound = ""), + Debug(bound = ""), + Eq(bound = ""), + Default(bound = ""), + Hash(bound = "") +)] +#[scale_info(skip_type_params(T))] +#[doc(hidden)] +pub struct PhantomDataSendSync(core::marker::PhantomData); + +impl PhantomDataSendSync { + pub(crate) fn new() -> Self { + Self(core::marker::PhantomData) + } +} + +unsafe impl Send for PhantomDataSendSync {} +unsafe impl Sync for PhantomDataSendSync {} + +/// This represents a key-value collection and is SCALE compatible +/// with collections like BTreeMap. This has the same type params +/// as `BTreeMap` which allows us to easily swap the two during codegen. +pub type KeyedVec = Vec<(K, V)>; From 700c77e85a66cb9d5de8a2da312d4c4c96ee4304 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 13:43:17 +0100 Subject: [PATCH 21/75] Get first example working; balance_transfer_with_params --- codegen/src/api/mod.rs | 4 +- codegen/src/types/tests.rs | 4 +- codegen/src/types/type_path.rs | 2 +- .../examples/balance_transfer_with_params.rs | 28 ++++----- subxt/src/client/offline_client.rs | 61 ++++++++++++++----- subxt/src/client/online_client.rs | 55 +++++++++++++++-- subxt/src/extrinsic/transaction.rs | 4 +- 7 files changed, 118 insertions(+), 40 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 9682c383a7..ae22944669 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -110,11 +110,11 @@ impl RuntimeGenerator { let mut type_substitutes = [ ( "bitvec::order::Lsb0", - parse_quote!(::subxt::bitvec::order::Lsb0), + parse_quote!(::subxt::ext::bitvec::order::Lsb0), ), ( "bitvec::order::Msb0", - parse_quote!(::subxt::bitvec::order::Msb0), + parse_quote!(::subxt::ext::bitvec::order::Msb0), ), ( "sp_core::crypto::AccountId32", diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs index 8fe4157484..c789bbab50 100644 --- a/codegen/src/types/tests.rs +++ b/codegen/src/types/tests.rs @@ -699,8 +699,8 @@ fn generate_bitvec() { use super::root; #[derive(::subxt::ext::codec::Decode, ::subxt::ext::codec::Encode, Debug)] pub struct S { - pub lsb: ::subxt::bitvec::vec::BitVec<::core::primitive::u8, root::bitvec::order::Lsb0>, - pub msb: ::subxt::bitvec::vec::BitVec<::core::primitive::u16, root::bitvec::order::Msb0>, + pub lsb: ::subxt::ext::bitvec::vec::BitVec<::core::primitive::u8, root::bitvec::order::Lsb0>, + pub msb: ::subxt::ext::bitvec::vec::BitVec<::core::primitive::u16, root::bitvec::order::Msb0>, } } } diff --git a/codegen/src/types/type_path.rs b/codegen/src/types/type_path.rs index c26b21bd6e..646a18ad2c 100644 --- a/codegen/src/types/type_path.rs +++ b/codegen/src/types/type_path.rs @@ -182,7 +182,7 @@ impl TypePathType { let bit_order_type = &self.params[0]; let bit_store_type = &self.params[1]; - let type_path = parse_quote! { ::subxt::bitvec::vec::BitVec<#bit_store_type, #bit_order_type> }; + let type_path = parse_quote! { ::subxt::ext::bitvec::vec::BitVec<#bit_store_type, #bit_order_type> }; syn::Type::Path(type_path) } diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index d903435f2e..83287fd468 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -15,12 +15,11 @@ use subxt::{ extrinsic::{ Era, PlainTip, + PairSigner, + PolkadotExtrinsicParamsBuilder as Params, }, - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, - PolkadotExtrinsicParamsBuilder as Params, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -33,22 +32,23 @@ async fn main() -> Result<(), Box> { let signer = PairSigner::new(AccountKeyring::Alice.pair()); let dest = AccountKeyring::Bob.to_account_id().into(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + // Create a client to use: + let api = OnlineClient::::new().await?; + + // Create a transaction to submit: + let tx = polkadot::tx() + .balances() + .transfer(dest, 123_456_789_012_345); // Configure the transaction tip and era: let tx_params = Params::new() .tip(PlainTip::new(20_000_000_000)) - .era(Era::Immortal, *api.client.genesis()); + .era(Era::Immortal, api.genesis_hash()); - // Send the transaction: + // submit the transaction: let hash = api .tx() - .balances() - .transfer(dest, 123_456_789_012_345)? - .sign_and_submit(&signer, tx_params) + .sign_and_submit(&tx, &signer, tx_params) .await?; println!("Balance transfer extrinsic submitted: {}", hash); diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index e783bb20d8..5037289fad 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -77,23 +77,56 @@ impl OfflineClient { }) } } -} -impl OfflineClientT for OfflineClient { - /// Return the genesis hash. - fn genesis_hash(&self) -> T::Hash { - self.inner.genesis_hash - } + /// Return the genesis hash. + pub fn genesis_hash(&self) -> T::Hash { + self.inner.genesis_hash + } - /// Return the runtime version. - fn runtime_version(&self) -> RuntimeVersion { - self.inner.runtime_version.clone() - } + /// Return the runtime version. + pub fn runtime_version(&self) -> RuntimeVersion { + self.inner.runtime_version.clone() + } - /// Return the [`Metadata`] used in this client. - fn metadata(&self) -> Metadata { - self.inner.metadata.clone() - } + /// Return the [`Metadata`] used in this client. + pub fn metadata(&self) -> Metadata { + self.inner.metadata.clone() + } + + // Just a copy of the most important trait methods so that people + // don't need to import the trait for most things: + + /// Work with transactions. + pub fn tx(&self) -> TxClient { + >::tx(self) + } + + /// Work with events. + pub fn events(&self) -> EventsClient { + >::events(self) + } + + /// Work with storage. + pub fn storage(&self) -> StorageClient { + >::storage(self) + } + + /// Access constants. + pub fn constants(&self) -> ConstantsClient { + >::constants(self) + } +} + +impl OfflineClientT for OfflineClient { + fn genesis_hash(&self) -> T::Hash { + self.genesis_hash() + } + fn runtime_version(&self) -> RuntimeVersion { + self.runtime_version() + } + fn metadata(&self) -> Metadata { + self.metadata() + } } // For ergonomics; cloning a client is deliberately fairly cheap (via Arc), diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index cefbd8525c..9f5d8d148f 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -19,6 +19,10 @@ use crate::{ BasicError, }, Metadata, + constants::ConstantsClient, + extrinsic::TxClient, + events::EventsClient, + storage::StorageClient, }; use derivative::Derivative; @@ -111,23 +115,64 @@ impl OnlineClient { pub fn subscribe_to_updates(&self) -> ClientRuntimeUpdater { ClientRuntimeUpdater(self.clone()) } -} -impl OfflineClientT for OnlineClient { - fn metadata(&self) -> Metadata { + /// Return the [`Metadata`] used in this client. + pub fn metadata(&self) -> Metadata { let inner = self.inner.read(); inner.metadata.clone() } - fn genesis_hash(&self) -> T::Hash { + /// Return the genesis hash. + pub fn genesis_hash(&self) -> T::Hash { let inner = self.inner.read(); inner.genesis_hash } - fn runtime_version(&self) -> RuntimeVersion { + /// Return the runtime version. + pub fn runtime_version(&self) -> RuntimeVersion { let inner = self.inner.read(); inner.runtime_version.clone() } + + /// Return an RPC client to make raw requests with. + pub fn rpc(&self) -> &Rpc { + &self.rpc + } + + // Just a copy of the most important trait methods so that people + // don't need to import the trait for most things: + + /// Work with transactions. + pub fn tx(&self) -> TxClient { + >::tx(self) + } + + /// Work with events. + pub fn events(&self) -> EventsClient { + >::events(self) + } + + /// Work with storage. + pub fn storage(&self) -> StorageClient { + >::storage(self) + } + + /// Access constants. + pub fn constants(&self) -> ConstantsClient { + >::constants(self) + } +} + +impl OfflineClientT for OnlineClient { + fn metadata(&self) -> Metadata { + self.metadata() + } + fn genesis_hash(&self) -> T::Hash { + self.genesis_hash() + } + fn runtime_version(&self) -> RuntimeVersion { + self.runtime_version() + } } impl OnlineClientT for OnlineClient { diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index 581839abdc..aa6c87298c 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -8,8 +8,6 @@ use std::task::Poll; use codec::Decode; use sp_runtime::traits::Hash; -pub use sp_runtime::traits::SignedExtension; - use crate::{ client::{ OnlineClientT, @@ -45,6 +43,8 @@ use jsonrpsee::core::{ Error as RpcError, }; +pub use sp_runtime::traits::SignedExtension; + /// This struct represents a subscription to the progress of some transaction, and is /// returned from [`crate::SubmittableExtrinsic::sign_and_submit_then_watch()`]. #[derive(Derivative)] From 5e68da22eb2c00b86ed688ba73b0e346983c5c78 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 13:45:48 +0100 Subject: [PATCH 22/75] get balance_transfer example compiling --- examples/examples/balance_transfer.rs | 33 +++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index f337b0bd13..112557ea79 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -12,10 +12,9 @@ use sp_keyring::AccountKeyring; use subxt::{ - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + extrinsic::PairSigner, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -26,23 +25,23 @@ async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); let signer = PairSigner::new(AccountKeyring::Alice.pair()); - - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); - - // Submit the `transfer` extrinsic from Alice's account to Bob's. let dest = AccountKeyring::Bob.to_account_id().into(); - // Obtain an extrinsic, calling the "transfer" function in - // the "balances" pallet. - let extrinsic = api.tx().balances().transfer(dest, 123_456_789_012_345)?; + // Create a client to use: + let api = OnlineClient::::new().await?; + + // Create a transaction to submit: + let tx = polkadot::tx() + .balances() + .transfer(dest, 123_456_789_012_345); - // Sign and submit the extrinsic, returning its hash. - let tx_hash = extrinsic.sign_and_submit_default(&signer).await?; + // submit the transaction with default params: + let hash = api + .tx() + .sign_and_submit_default(&tx, &signer) + .await?; - println!("Balance transfer extrinsic submitted: {}", tx_hash); + println!("Balance transfer extrinsic submitted: {}", hash); Ok(()) } From 9d55c43568eb214682ccf7440846a9a834e04ed6 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 14:21:45 +0100 Subject: [PATCH 23/75] get concurrent_storage_requests.rs example compiling --- .../examples/concurrent_storage_requests.rs | 18 +- subxt/src/constants/constants_client.rs | 3 + subxt/src/events/events_client.rs | 3 + subxt/src/extrinsic/tx_client.rs | 11 +- subxt/src/storage/storage_client.rs | 200 ++++++++++-------- 5 files changed, 131 insertions(+), 104 deletions(-) diff --git a/examples/examples/concurrent_storage_requests.rs b/examples/examples/concurrent_storage_requests.rs index 483a0aebdd..5bf5a7fe5b 100644 --- a/examples/examples/concurrent_storage_requests.rs +++ b/examples/examples/concurrent_storage_requests.rs @@ -5,9 +5,8 @@ use futures::join; use sp_keyring::AccountKeyring; use subxt::{ - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -15,17 +14,18 @@ pub mod polkadot {} #[tokio::main] async fn main() -> Result<(), Box> { - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::new().await?; let addr = AccountKeyring::Bob.to_account_id(); + // Construct storage addresses to access: + let staking_bonded = polkadot::storage().staking().bonded(&addr); + let staking_ledger = polkadot::storage().staking().ledger(&addr); + // For storage requests, we can join futures together to // await multiple futures concurrently: - let a_fut = api.storage().staking().bonded(&addr, None); - let b_fut = api.storage().staking().ledger(&addr, None); + let a_fut = api.storage().fetch(&staking_bonded, None); + let b_fut = api.storage().fetch(&staking_ledger, None); let (a, b) = join!(a_fut, b_fut); println!("{a:?}, {b:?}"); diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index 2de3fbcec2..c18b37dfa7 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -11,8 +11,11 @@ use crate::{ metadata::MetadataError, }; use scale_value::{ Value, scale::TypeId }; +use derivative::Derivative; /// A client for accessing constants. +#[derive(Derivative)] +#[derivative(Clone(bound = "Client: Clone"))] pub struct ConstantsClient { client: Client, _marker: std::marker::PhantomData, diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index beb05a37c3..d86d5949e4 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -30,8 +30,11 @@ use crate::events::{ EventSub, FinalizedEventSub, }; +use derivative::Derivative; /// A client for working with events. +#[derive(Derivative)] +#[derivative(Clone(bound = "Client: Clone"))] pub struct EventsClient { client: Client, _marker: std::marker::PhantomData diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index 3fc76b4aa9..b301191f1b 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -37,16 +37,19 @@ use codec::{ use crate::extrinsic::{ TransactionProgress, }; +use derivative::Derivative; /// A client for working with transactions. -pub struct TxClient { - client: C, +#[derive(Derivative)] +#[derivative(Clone(bound = "Client: Clone"))] +pub struct TxClient { + client: Client, _marker: PhantomDataSendSync, } -impl TxClient { +impl TxClient { /// Create a new [`TxClient`] - pub fn new(client: C) -> Self { + pub fn new(client: Client) -> Self { Self { client, _marker: PhantomDataSendSync::new() diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 2d8ac163d7..0662b3038c 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -14,6 +14,7 @@ pub use sp_runtime::traits::SignedExtension; use std::{ marker::PhantomData, borrow::Cow, + future::Future, }; use crate::{ error::BasicError, @@ -26,6 +27,7 @@ use crate::{ metadata::Metadata, Config, }; +use derivative::Derivative; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; @@ -105,20 +107,13 @@ pub use frame_metadata::StorageHasher; /// } /// # } /// ``` +#[derive(Derivative)] +#[derivative(Clone(bound = "Client: Clone"))] pub struct StorageClient { client: Client, _marker: PhantomData } -impl Clone for StorageClient { - fn clone(&self) -> Self { - Self { - client: self.client.clone(), - _marker: PhantomData, - } - } -} - impl StorageClient{ /// Create a new [`StorageClient`] pub fn new( @@ -137,125 +132,148 @@ where Client: OnlineClientT, { /// Fetch the raw encoded value at the address/key given. - pub async fn fetch_raw>( + pub fn fetch_raw>( &self, key: K, hash: Option, - ) -> Result>, BasicError> { + ) -> impl Future>, BasicError>> + 'static { + let client = self.client.clone(); let key = key.into(); - let data = self.client.rpc().storage(&key, hash).await?; - Ok(data.map(|d| d.0)) + // Ensure that the returned future doesn't have a lifetime tied to api.storage(), + // which is a temporary thing we'll be throwing away quickly: + async move { + let data = client.rpc().storage(&key, hash).await?; + Ok(data.map(|d| d.0)) + } } /// Fetch a decoded value from storage at a given address and optional block hash. - pub async fn fetch( + pub fn fetch<'a, ReturnTy: Decode>( &self, - address: &StorageAddress<'_, ReturnTy>, + address: &'a StorageAddress<'_, ReturnTy>, hash: Option, - ) -> Result, BasicError> { - // Metadata validation checks whether the static address given - // is likely to actually correspond to a real storage entry or not. - // if not, it means static codegen doesn't line up with runtime - // metadata. - if let Some(validation_hash) = address.storage_hash { - validate_storage( - &*address.pallet_name, - &*address.storage_name, - validation_hash, - &self.client.metadata() - )?; - } + ) -> impl Future, BasicError>> + 'a { + let client = self.client.clone(); + async move { + // Metadata validation checks whether the static address given + // is likely to actually correspond to a real storage entry or not. + // if not, it means static codegen doesn't line up with runtime + // metadata. + if let Some(validation_hash) = address.storage_hash { + validate_storage( + &*address.pallet_name, + &*address.storage_name, + validation_hash, + &client.metadata() + )?; + } - if let Some(data) = self.fetch_raw(address, hash).await? { - Ok(Some(Decode::decode(&mut &*data)?)) - } else { - Ok(None) + if let Some(data) = client.storage().fetch_raw(address, hash).await? { + Ok(Some(Decode::decode(&mut &*data)?)) + } else { + Ok(None) + } } } /// Fetch a StorageKey that has a default value with an optional block hash. - pub async fn fetch_or_default( + pub fn fetch_or_default<'a, ReturnTy: Decode>( &self, - address: &StorageAddress<'_, ReturnTy>, + address: &'a StorageAddress<'_, ReturnTy>, hash: Option, - ) -> Result { - let pallet_name = &*address.pallet_name; - let storage_name = &*address.storage_name; - // Metadata validation happens via .fetch(): - if let Some(data) = self.fetch(address, hash).await? { - Ok(data) - } else { - let metadata = self.client.metadata(); - let pallet_metadata = metadata.pallet(pallet_name)?; - let storage_metadata = pallet_metadata.storage(storage_name)?; - let default = Decode::decode(&mut &storage_metadata.default[..]) - .map_err(MetadataError::DefaultError)?; - Ok(default) + ) -> impl Future> + 'a { + let client = self.client.clone(); + async move { + let pallet_name = &*address.pallet_name; + let storage_name = &*address.storage_name; + // Metadata validation happens via .fetch(): + if let Some(data) = client.storage().fetch(address, hash).await? { + Ok(data) + } else { + let metadata = client.metadata(); + let pallet_metadata = metadata.pallet(pallet_name)?; + let storage_metadata = pallet_metadata.storage(storage_name)?; + let default = Decode::decode(&mut &storage_metadata.default[..]) + .map_err(MetadataError::DefaultError)?; + Ok(default) + } } + } /// Fetch up to `count` keys for a storage map in lexicographic order. /// /// Supports pagination by passing a value to `start_key`. - pub async fn fetch_keys>( + pub fn fetch_keys>( &self, key: K, count: u32, start_key: Option, hash: Option, - ) -> Result, BasicError> { - let keys = self - .client - .rpc() - .storage_keys_paged(key.into(), count, start_key, hash) - .await?; - Ok(keys) + ) -> impl Future, BasicError>> + 'static { + let client = self.client.clone(); + let key = key.into(); + async move { + let keys = client + .rpc() + .storage_keys_paged(key, count, start_key, hash) + .await?; + Ok(keys) + } } /// Returns an iterator of key value pairs. - pub async fn iter( + pub fn iter<'a, ReturnTy: Decode + 'static>( &self, - address: StorageAddress<'_, ReturnTy>, + address: StorageAddress<'a, ReturnTy>, page_size: u32, hash: Option, - ) -> Result, BasicError> { - // Metadata validation checks whether the static address given - // is likely to actually correspond to a real storage entry or not. - // if not, it means static codegen doesn't line up with runtime - // metadata. - if let Some(validation_hash) = address.storage_hash { - validate_storage( - &*address.pallet_name, - &*address.storage_name, - validation_hash, - &self.client.metadata() - )?; - } + ) -> impl Future, BasicError>> + 'a { + let client = self.client.clone(); + async move { + // Metadata validation checks whether the static address given + // is likely to actually correspond to a real storage entry or not. + // if not, it means static codegen doesn't line up with runtime + // metadata. + if let Some(validation_hash) = address.storage_hash { + validate_storage( + &*address.pallet_name, + &*address.storage_name, + validation_hash, + &client.metadata() + )?; + } - // Fetch a concrete block hash to iterate over. We do this so that if new blocks - // are produced midway through iteration, we continue to iterate at the block - // we started with and not the new block. - let hash = if let Some(hash) = hash { - hash - } else { - self.client - .rpc() - .block_hash(None) - .await? - .expect("didn't pass a block number; qed") - }; - - Ok(KeyIter { - client: self.clone(), - address: address.to_owned(), - hash, - count: page_size, - start_key: None, - buffer: Default::default(), - }) + // Fetch a concrete block hash to iterate over. We do this so that if new blocks + // are produced midway through iteration, we continue to iterate at the block + // we started with and not the new block. + let hash = if let Some(hash) = hash { + hash + } else { + client + .rpc() + .block_hash(None) + .await? + .expect("didn't pass a block number; qed") + }; + + Ok(KeyIter { + client: client.storage(), + address: address.to_owned(), + hash, + count: page_size, + start_key: None, + buffer: Default::default(), + }) + } } } + + + + + /// This is returned from storage accesses in the statically generated /// code, and contains the information needed to find, validate and decode /// the storage entry. From 6e1c5e210645f4cb76f39a78f2721345560cf0fb Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 14:48:15 +0100 Subject: [PATCH 24/75] get fetch_all_accounts example compiling --- TEMP_METADATA.json | 47380 ---------------------- codegen/src/api/storage.rs | 24 + examples/examples/custom_config.rs | 35 +- examples/examples/fetch_all_accounts.rs | 14 +- 4 files changed, 52 insertions(+), 47401 deletions(-) delete mode 100644 TEMP_METADATA.json diff --git a/TEMP_METADATA.json b/TEMP_METADATA.json deleted file mode 100644 index 22578a4508..0000000000 --- a/TEMP_METADATA.json +++ /dev/null @@ -1,47380 +0,0 @@ -[ - 1635018093, - { - "V14": { - "types": { - "types": [ - { - "id": 0, - "type": { - "path": [ - "sp_core", - "crypto", - "AccountId32" - ], - "def": { - "composite": { - "fields": [ - { - "type": 1, - "typeName": "[u8; 32]" - } - ] - } - } - } - }, - { - "id": 1, - "type": { - "def": { - "array": { - "len": 32, - "type": 2 - } - } - } - }, - { - "id": 2, - "type": { - "def": { - "primitive": "u8" - } - } - }, - { - "id": 3, - "type": { - "path": [ - "frame_system", - "AccountInfo" - ], - "params": [ - { - "name": "Index", - "type": 4 - }, - { - "name": "AccountData", - "type": 5 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "nonce", - "type": 4, - "typeName": "Index" - }, - { - "name": "consumers", - "type": 4, - "typeName": "RefCount" - }, - { - "name": "providers", - "type": 4, - "typeName": "RefCount" - }, - { - "name": "sufficients", - "type": 4, - "typeName": "RefCount" - }, - { - "name": "data", - "type": 5, - "typeName": "AccountData" - } - ] - } - } - } - }, - { - "id": 4, - "type": { - "def": { - "primitive": "u32" - } - } - }, - { - "id": 5, - "type": { - "path": [ - "pallet_balances", - "AccountData" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "free", - "type": 6, - "typeName": "Balance" - }, - { - "name": "reserved", - "type": 6, - "typeName": "Balance" - }, - { - "name": "misc_frozen", - "type": 6, - "typeName": "Balance" - }, - { - "name": "fee_frozen", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 6, - "type": { - "def": { - "primitive": "u128" - } - } - }, - { - "id": 7, - "type": { - "path": [ - "frame_support", - "weights", - "PerDispatchClass" - ], - "params": [ - { - "name": "T", - "type": 8 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "normal", - "type": 8, - "typeName": "T" - }, - { - "name": "operational", - "type": 8, - "typeName": "T" - }, - { - "name": "mandatory", - "type": 8, - "typeName": "T" - } - ] - } - } - } - }, - { - "id": 8, - "type": { - "def": { - "primitive": "u64" - } - } - }, - { - "id": 9, - "type": { - "path": [ - "primitive_types", - "H256" - ], - "def": { - "composite": { - "fields": [ - { - "type": 1, - "typeName": "[u8; 32]" - } - ] - } - } - } - }, - { - "id": 10, - "type": { - "def": { - "sequence": { - "type": 2 - } - } - } - }, - { - "id": 11, - "type": { - "path": [ - "sp_runtime", - "generic", - "digest", - "Digest" - ], - "def": { - "composite": { - "fields": [ - { - "name": "logs", - "type": 12, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 12, - "type": { - "def": { - "sequence": { - "type": 13 - } - } - } - }, - { - "id": 13, - "type": { - "path": [ - "sp_runtime", - "generic", - "digest", - "DigestItem" - ], - "def": { - "variant": { - "variants": [ - { - "name": "PreRuntime", - "fields": [ - { - "type": 14, - "typeName": "ConsensusEngineId" - }, - { - "type": 10, - "typeName": "Vec" - } - ], - "index": 6 - }, - { - "name": "Consensus", - "fields": [ - { - "type": 14, - "typeName": "ConsensusEngineId" - }, - { - "type": 10, - "typeName": "Vec" - } - ], - "index": 4 - }, - { - "name": "Seal", - "fields": [ - { - "type": 14, - "typeName": "ConsensusEngineId" - }, - { - "type": 10, - "typeName": "Vec" - } - ], - "index": 5 - }, - { - "name": "Other", - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ], - "index": 0 - }, - { - "name": "RuntimeEnvironmentUpdated", - "index": 8 - } - ] - } - } - } - }, - { - "id": 14, - "type": { - "def": { - "array": { - "len": 4, - "type": 2 - } - } - } - }, - { - "id": 15, - "type": { - "def": { - "sequence": { - "type": 16 - } - } - } - }, - { - "id": 16, - "type": { - "path": [ - "frame_system", - "EventRecord" - ], - "params": [ - { - "name": "E", - "type": 17 - }, - { - "name": "T", - "type": 9 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "phase", - "type": 109, - "typeName": "Phase" - }, - { - "name": "event", - "type": 17, - "typeName": "E" - }, - { - "name": "topics", - "type": 110, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 17, - "type": { - "path": [ - "node_runtime", - "Event" - ], - "def": { - "variant": { - "variants": [ - { - "name": "System", - "fields": [ - { - "type": 18, - "typeName": "frame_system::Event" - } - ], - "index": 0 - }, - { - "name": "Utility", - "fields": [ - { - "type": 27, - "typeName": "pallet_utility::Event" - } - ], - "index": 1 - }, - { - "name": "Indices", - "fields": [ - { - "type": 30, - "typeName": "pallet_indices::Event" - } - ], - "index": 5 - }, - { - "name": "Balances", - "fields": [ - { - "type": 31, - "typeName": "pallet_balances::Event" - } - ], - "index": 6 - }, - { - "name": "ElectionProviderMultiPhase", - "fields": [ - { - "type": 33, - "typeName": "pallet_election_provider_multi_phase::Event" - } - ], - "index": 9 - }, - { - "name": "Staking", - "fields": [ - { - "type": 37, - "typeName": "pallet_staking::Event" - } - ], - "index": 10 - }, - { - "name": "Session", - "fields": [ - { - "type": 38, - "typeName": "pallet_session::Event" - } - ], - "index": 11 - }, - { - "name": "Democracy", - "fields": [ - { - "type": 39, - "typeName": "pallet_democracy::Event" - } - ], - "index": 12 - }, - { - "name": "Council", - "fields": [ - { - "type": 44, - "typeName": "pallet_collective::Event" - } - ], - "index": 13 - }, - { - "name": "TechnicalCommittee", - "fields": [ - { - "type": 45, - "typeName": "pallet_collective::Event" - } - ], - "index": 14 - }, - { - "name": "Elections", - "fields": [ - { - "type": 46, - "typeName": "pallet_elections_phragmen::Event" - } - ], - "index": 15 - }, - { - "name": "TechnicalMembership", - "fields": [ - { - "type": 49, - "typeName": "pallet_membership::Event" - } - ], - "index": 16 - }, - { - "name": "Grandpa", - "fields": [ - { - "type": 50, - "typeName": "pallet_grandpa::Event" - } - ], - "index": 17 - }, - { - "name": "Treasury", - "fields": [ - { - "type": 55, - "typeName": "pallet_treasury::Event" - } - ], - "index": 18 - }, - { - "name": "Contracts", - "fields": [ - { - "type": 56, - "typeName": "pallet_contracts::Event" - } - ], - "index": 19 - }, - { - "name": "Sudo", - "fields": [ - { - "type": 57, - "typeName": "pallet_sudo::Event" - } - ], - "index": 20 - }, - { - "name": "ImOnline", - "fields": [ - { - "type": 59, - "typeName": "pallet_im_online::Event" - } - ], - "index": 21 - }, - { - "name": "Offences", - "fields": [ - { - "type": 68, - "typeName": "pallet_offences::Event" - } - ], - "index": 23 - }, - { - "name": "Identity", - "fields": [ - { - "type": 70, - "typeName": "pallet_identity::Event" - } - ], - "index": 26 - }, - { - "name": "Society", - "fields": [ - { - "type": 71, - "typeName": "pallet_society::Event" - } - ], - "index": 27 - }, - { - "name": "Recovery", - "fields": [ - { - "type": 72, - "typeName": "pallet_recovery::Event" - } - ], - "index": 28 - }, - { - "name": "Vesting", - "fields": [ - { - "type": 73, - "typeName": "pallet_vesting::Event" - } - ], - "index": 29 - }, - { - "name": "Scheduler", - "fields": [ - { - "type": 74, - "typeName": "pallet_scheduler::Event" - } - ], - "index": 30 - }, - { - "name": "Preimage", - "fields": [ - { - "type": 78, - "typeName": "pallet_preimage::Event" - } - ], - "index": 31 - }, - { - "name": "Proxy", - "fields": [ - { - "type": 79, - "typeName": "pallet_proxy::Event" - } - ], - "index": 32 - }, - { - "name": "Multisig", - "fields": [ - { - "type": 82, - "typeName": "pallet_multisig::Event" - } - ], - "index": 33 - }, - { - "name": "Bounties", - "fields": [ - { - "type": 84, - "typeName": "pallet_bounties::Event" - } - ], - "index": 34 - }, - { - "name": "Tips", - "fields": [ - { - "type": 85, - "typeName": "pallet_tips::Event" - } - ], - "index": 35 - }, - { - "name": "Assets", - "fields": [ - { - "type": 86, - "typeName": "pallet_assets::Event" - } - ], - "index": 36 - }, - { - "name": "Lottery", - "fields": [ - { - "type": 87, - "typeName": "pallet_lottery::Event" - } - ], - "index": 38 - }, - { - "name": "Gilt", - "fields": [ - { - "type": 89, - "typeName": "pallet_gilt::Event" - } - ], - "index": 39 - }, - { - "name": "Uniques", - "fields": [ - { - "type": 90, - "typeName": "pallet_uniques::Event" - } - ], - "index": 40 - }, - { - "name": "TransactionStorage", - "fields": [ - { - "type": 96, - "typeName": "pallet_transaction_storage::Event" - } - ], - "index": 41 - }, - { - "name": "BagsList", - "fields": [ - { - "type": 97, - "typeName": "pallet_bags_list::Event" - } - ], - "index": 42 - }, - { - "name": "StateTrieMigration", - "fields": [ - { - "type": 98, - "typeName": "pallet_state_trie_migration::Event" - } - ], - "index": 43 - }, - { - "name": "ChildBounties", - "fields": [ - { - "type": 100, - "typeName": "pallet_child_bounties::Event" - } - ], - "index": 44 - }, - { - "name": "Referenda", - "fields": [ - { - "type": 101, - "typeName": "pallet_referenda::Event" - } - ], - "index": 45 - }, - { - "name": "ConvictionVoting", - "fields": [ - { - "type": 103, - "typeName": "pallet_conviction_voting::Event" - } - ], - "index": 46 - }, - { - "name": "Whitelist", - "fields": [ - { - "type": 104, - "typeName": "pallet_whitelist::Event" - } - ], - "index": 47 - } - ] - } - } - } - }, - { - "id": 18, - "type": { - "path": [ - "frame_system", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "ExtrinsicSuccess", - "fields": [ - { - "name": "dispatch_info", - "type": 19, - "typeName": "DispatchInfo" - } - ], - "index": 0, - "docs": [ - "An extrinsic completed successfully." - ] - }, - { - "name": "ExtrinsicFailed", - "fields": [ - { - "name": "dispatch_error", - "type": 22, - "typeName": "DispatchError" - }, - { - "name": "dispatch_info", - "type": 19, - "typeName": "DispatchInfo" - } - ], - "index": 1, - "docs": [ - "An extrinsic failed." - ] - }, - { - "name": "CodeUpdated", - "index": 2, - "docs": [ - "`:code` was updated." - ] - }, - { - "name": "NewAccount", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "A new account was created." - ] - }, - { - "name": "KilledAccount", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "An account was reaped." - ] - }, - { - "name": "Remarked", - "fields": [ - { - "name": "sender", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 5, - "docs": [ - "On on-chain remark happened." - ] - } - ] - } - }, - "docs": [ - "Event for the System pallet." - ] - } - }, - { - "id": 19, - "type": { - "path": [ - "frame_support", - "weights", - "DispatchInfo" - ], - "def": { - "composite": { - "fields": [ - { - "name": "weight", - "type": 8, - "typeName": "Weight" - }, - { - "name": "class", - "type": 20, - "typeName": "DispatchClass" - }, - { - "name": "pays_fee", - "type": 21, - "typeName": "Pays" - } - ] - } - } - } - }, - { - "id": 20, - "type": { - "path": [ - "frame_support", - "weights", - "DispatchClass" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Normal", - "index": 0 - }, - { - "name": "Operational", - "index": 1 - }, - { - "name": "Mandatory", - "index": 2 - } - ] - } - } - } - }, - { - "id": 21, - "type": { - "path": [ - "frame_support", - "weights", - "Pays" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Yes", - "index": 0 - }, - { - "name": "No", - "index": 1 - } - ] - } - } - } - }, - { - "id": 22, - "type": { - "path": [ - "sp_runtime", - "DispatchError" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Other", - "index": 0 - }, - { - "name": "CannotLookup", - "index": 1 - }, - { - "name": "BadOrigin", - "index": 2 - }, - { - "name": "Module", - "fields": [ - { - "type": 23, - "typeName": "ModuleError" - } - ], - "index": 3 - }, - { - "name": "ConsumerRemaining", - "index": 4 - }, - { - "name": "NoProviders", - "index": 5 - }, - { - "name": "TooManyConsumers", - "index": 6 - }, - { - "name": "Token", - "fields": [ - { - "type": 24, - "typeName": "TokenError" - } - ], - "index": 7 - }, - { - "name": "Arithmetic", - "fields": [ - { - "type": 25, - "typeName": "ArithmeticError" - } - ], - "index": 8 - }, - { - "name": "Transactional", - "fields": [ - { - "type": 26, - "typeName": "TransactionalError" - } - ], - "index": 9 - } - ] - } - } - } - }, - { - "id": 23, - "type": { - "path": [ - "sp_runtime", - "ModuleError" - ], - "def": { - "composite": { - "fields": [ - { - "name": "index", - "type": 2, - "typeName": "u8" - }, - { - "name": "error", - "type": 14, - "typeName": "[u8; MAX_MODULE_ERROR_ENCODED_SIZE]" - } - ] - } - } - } - }, - { - "id": 24, - "type": { - "path": [ - "sp_runtime", - "TokenError" - ], - "def": { - "variant": { - "variants": [ - { - "name": "NoFunds", - "index": 0 - }, - { - "name": "WouldDie", - "index": 1 - }, - { - "name": "BelowMinimum", - "index": 2 - }, - { - "name": "CannotCreate", - "index": 3 - }, - { - "name": "UnknownAsset", - "index": 4 - }, - { - "name": "Frozen", - "index": 5 - }, - { - "name": "Unsupported", - "index": 6 - } - ] - } - } - } - }, - { - "id": 25, - "type": { - "path": [ - "sp_runtime", - "ArithmeticError" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Underflow", - "index": 0 - }, - { - "name": "Overflow", - "index": 1 - }, - { - "name": "DivisionByZero", - "index": 2 - } - ] - } - } - } - }, - { - "id": 26, - "type": { - "path": [ - "sp_runtime", - "TransactionalError" - ], - "def": { - "variant": { - "variants": [ - { - "name": "LimitReached", - "index": 0 - }, - { - "name": "NoLayer", - "index": 1 - } - ] - } - } - } - }, - { - "id": 27, - "type": { - "path": [ - "pallet_utility", - "pallet", - "Event" - ], - "def": { - "variant": { - "variants": [ - { - "name": "BatchInterrupted", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "u32" - }, - { - "name": "error", - "type": 22, - "typeName": "DispatchError" - } - ], - "index": 0, - "docs": [ - "Batch of dispatches did not complete fully. Index of first failing dispatch given, as", - "well as the error." - ] - }, - { - "name": "BatchCompleted", - "index": 1, - "docs": [ - "Batch of dispatches completed fully with no error." - ] - }, - { - "name": "ItemCompleted", - "index": 2, - "docs": [ - "A single item within a Batch of dispatches has completed with no error." - ] - }, - { - "name": "DispatchedAs", - "fields": [ - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 3, - "docs": [ - "A call was dispatched." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 28, - "type": { - "path": [ - "Result" - ], - "params": [ - { - "name": "T", - "type": 29 - }, - { - "name": "E", - "type": 22 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Ok", - "fields": [ - { - "type": 29 - } - ], - "index": 0 - }, - { - "name": "Err", - "fields": [ - { - "type": 22 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 29, - "type": { - "def": { - "tuple": [] - } - } - }, - { - "id": 30, - "type": { - "path": [ - "pallet_indices", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "IndexAssigned", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - } - ], - "index": 0, - "docs": [ - "A account index was assigned." - ] - }, - { - "name": "IndexFreed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - } - ], - "index": 1, - "docs": [ - "A account index has been freed up (unassigned)." - ] - }, - { - "name": "IndexFrozen", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 2, - "docs": [ - "A account index has been frozen to its current account ID." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 31, - "type": { - "path": [ - "pallet_balances", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Endowed", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "free_balance", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 0, - "docs": [ - "An account was created with some free balance." - ] - }, - { - "name": "DustLost", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 1, - "docs": [ - "An account was removed whose balance was non-zero but below ExistentialDeposit,", - "resulting in an outright loss." - ] - }, - { - "name": "Transfer", - "fields": [ - { - "name": "from", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "to", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 2, - "docs": [ - "Transfer succeeded." - ] - }, - { - "name": "BalanceSet", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "free", - "type": 6, - "typeName": "T::Balance" - }, - { - "name": "reserved", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 3, - "docs": [ - "A balance was set by root." - ] - }, - { - "name": "Reserved", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 4, - "docs": [ - "Some balance was reserved (moved from free to reserved)." - ] - }, - { - "name": "Unreserved", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 5, - "docs": [ - "Some balance was unreserved (moved from reserved to free)." - ] - }, - { - "name": "ReserveRepatriated", - "fields": [ - { - "name": "from", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "to", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - }, - { - "name": "destination_status", - "type": 32, - "typeName": "Status" - } - ], - "index": 6, - "docs": [ - "Some balance was moved from the reserve of the first account to the second account.", - "Final argument indicates the destination balance type." - ] - }, - { - "name": "Deposit", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 7, - "docs": [ - "Some amount was deposited (e.g. for transaction fees)." - ] - }, - { - "name": "Withdraw", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 8, - "docs": [ - "Some amount was withdrawn from the account (e.g. for transaction fees)." - ] - }, - { - "name": "Slashed", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 9, - "docs": [ - "Some amount was removed from the account (e.g. for misbehavior)." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 32, - "type": { - "path": [ - "frame_support", - "traits", - "tokens", - "misc", - "BalanceStatus" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Free", - "index": 0 - }, - { - "name": "Reserved", - "index": 1 - } - ] - } - } - } - }, - { - "id": 33, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "SolutionStored", - "fields": [ - { - "name": "election_compute", - "type": 34, - "typeName": "ElectionCompute" - }, - { - "name": "prev_ejected", - "type": 35, - "typeName": "bool" - } - ], - "index": 0, - "docs": [ - "A solution was stored with the given compute.", - "", - "If the solution is signed, this means that it hasn't yet been processed. If the", - "solution is unsigned, this means that it has also been processed.", - "", - "The `bool` is `true` when a previous solution was ejected to make room for this one." - ] - }, - { - "name": "ElectionFinalized", - "fields": [ - { - "name": "election_compute", - "type": 36, - "typeName": "Option" - } - ], - "index": 1, - "docs": [ - "The election has been finalized, with `Some` of the given computation, or else if the", - "election failed, `None`." - ] - }, - { - "name": "Rewarded", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "::AccountId" - }, - { - "name": "value", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "An account has been rewarded for their signed submission being finalized." - ] - }, - { - "name": "Slashed", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "::AccountId" - }, - { - "name": "value", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 3, - "docs": [ - "An account has been slashed for submitting an invalid signed submission." - ] - }, - { - "name": "SignedPhaseStarted", - "fields": [ - { - "name": "round", - "type": 4, - "typeName": "u32" - } - ], - "index": 4, - "docs": [ - "The signed phase of the given round has started." - ] - }, - { - "name": "UnsignedPhaseStarted", - "fields": [ - { - "name": "round", - "type": 4, - "typeName": "u32" - } - ], - "index": 5, - "docs": [ - "The unsigned phase of the given round has started." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 34, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "ElectionCompute" - ], - "def": { - "variant": { - "variants": [ - { - "name": "OnChain", - "index": 0 - }, - { - "name": "Signed", - "index": 1 - }, - { - "name": "Unsigned", - "index": 2 - }, - { - "name": "Fallback", - "index": 3 - }, - { - "name": "Emergency", - "index": 4 - } - ] - } - } - } - }, - { - "id": 35, - "type": { - "def": { - "primitive": "bool" - } - } - }, - { - "id": 36, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 34 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 34 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 37, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "EraPaid", - "fields": [ - { - "type": 4, - "typeName": "EraIndex" - }, - { - "type": 6, - "typeName": "BalanceOf" - }, - { - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 0, - "docs": [ - "The era payout has been set; the first balance is the validator-payout; the second is", - "the remainder from the maximum amount of reward.", - "\\[era_index, validator_payout, remainder\\]" - ] - }, - { - "name": "Rewarded", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "The nominator has been rewarded by this amount. \\[stash, amount\\]" - ] - }, - { - "name": "Slashed", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "One validator (and its nominators) has been slashed by the given amount.", - "\\[validator, amount\\]" - ] - }, - { - "name": "OldSlashingReportDiscarded", - "fields": [ - { - "type": 4, - "typeName": "SessionIndex" - } - ], - "index": 3, - "docs": [ - "An old slashing report from a prior era was discarded because it could", - "not be processed. \\[session_index\\]" - ] - }, - { - "name": "StakersElected", - "index": 4, - "docs": [ - "A new set of stakers was elected." - ] - }, - { - "name": "Bonded", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 5, - "docs": [ - "An account has bonded this amount. \\[stash, amount\\]", - "", - "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,", - "it will not be emitted for staking rewards when they are added to stake." - ] - }, - { - "name": "Unbonded", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 6, - "docs": [ - "An account has unbonded this amount. \\[stash, amount\\]" - ] - }, - { - "name": "Withdrawn", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 7, - "docs": [ - "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`", - "from the unlocking queue. \\[stash, amount\\]" - ] - }, - { - "name": "Kicked", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 8, - "docs": [ - "A nominator has been kicked from a validator. \\[nominator, stash\\]" - ] - }, - { - "name": "StakingElectionFailed", - "index": 9, - "docs": [ - "The election failed. No new era is planned." - ] - }, - { - "name": "Chilled", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 10, - "docs": [ - "An account has stopped participating as either a validator or nominator.", - "\\[stash\\]" - ] - }, - { - "name": "PayoutStarted", - "fields": [ - { - "type": 4, - "typeName": "EraIndex" - }, - { - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 11, - "docs": [ - "The stakers' rewards are getting paid. \\[era_index, validator_stash\\]" - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 38, - "type": { - "path": [ - "pallet_session", - "pallet", - "Event" - ], - "def": { - "variant": { - "variants": [ - { - "name": "NewSession", - "fields": [ - { - "name": "session_index", - "type": 4, - "typeName": "SessionIndex" - } - ], - "index": 0, - "docs": [ - "New session has happened. Note that the argument is the session index, not the", - "block number as the type might suggest." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 39, - "type": { - "path": [ - "pallet_democracy", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Proposed", - "fields": [ - { - "name": "proposal_index", - "type": 4, - "typeName": "PropIndex" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 0, - "docs": [ - "A motion has been proposed by a public account." - ] - }, - { - "name": "Tabled", - "fields": [ - { - "name": "proposal_index", - "type": 4, - "typeName": "PropIndex" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "depositors", - "type": 40, - "typeName": "Vec" - } - ], - "index": 1, - "docs": [ - "A public proposal has been tabled for referendum vote." - ] - }, - { - "name": "ExternalTabled", - "index": 2, - "docs": [ - "An external proposal has been tabled." - ] - }, - { - "name": "Started", - "fields": [ - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - }, - { - "name": "threshold", - "type": 41, - "typeName": "VoteThreshold" - } - ], - "index": 3, - "docs": [ - "A referendum has begun." - ] - }, - { - "name": "Passed", - "fields": [ - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 4, - "docs": [ - "A proposal has been approved by referendum." - ] - }, - { - "name": "NotPassed", - "fields": [ - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 5, - "docs": [ - "A proposal has been rejected by referendum." - ] - }, - { - "name": "Cancelled", - "fields": [ - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 6, - "docs": [ - "A referendum has been cancelled." - ] - }, - { - "name": "Executed", - "fields": [ - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 7, - "docs": [ - "A proposal has been enacted." - ] - }, - { - "name": "Delegated", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "target", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 8, - "docs": [ - "An account has delegated their vote to another account." - ] - }, - { - "name": "Undelegated", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 9, - "docs": [ - "An account has cancelled a previous delegation operation." - ] - }, - { - "name": "Vetoed", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "until", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 10, - "docs": [ - "An external proposal has been vetoed." - ] - }, - { - "name": "PreimageNoted", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 11, - "docs": [ - "A proposal's preimage was noted, and the deposit taken." - ] - }, - { - "name": "PreimageUsed", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "provider", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 12, - "docs": [ - "A proposal preimage was removed and used (the deposit was returned)." - ] - }, - { - "name": "PreimageInvalid", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 13, - "docs": [ - "A proposal could not be executed because its preimage was invalid." - ] - }, - { - "name": "PreimageMissing", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 14, - "docs": [ - "A proposal could not be executed because its preimage was missing." - ] - }, - { - "name": "PreimageReaped", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "provider", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "reaper", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 15, - "docs": [ - "A registered preimage was removed and the deposit collected by the reaper." - ] - }, - { - "name": "Blacklisted", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 16, - "docs": [ - "A proposal_hash has been blacklisted permanently." - ] - }, - { - "name": "Voted", - "fields": [ - { - "name": "voter", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - }, - { - "name": "vote", - "type": 42, - "typeName": "AccountVote>" - } - ], - "index": 17, - "docs": [ - "An account has voted in a referendum" - ] - }, - { - "name": "Seconded", - "fields": [ - { - "name": "seconder", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "prop_index", - "type": 4, - "typeName": "PropIndex" - } - ], - "index": 18, - "docs": [ - "An account has secconded a proposal" - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 40, - "type": { - "def": { - "sequence": { - "type": 0 - } - } - } - }, - { - "id": 41, - "type": { - "path": [ - "pallet_democracy", - "vote_threshold", - "VoteThreshold" - ], - "def": { - "variant": { - "variants": [ - { - "name": "SuperMajorityApprove", - "index": 0 - }, - { - "name": "SuperMajorityAgainst", - "index": 1 - }, - { - "name": "SimpleMajority", - "index": 2 - } - ] - } - } - } - }, - { - "id": 42, - "type": { - "path": [ - "pallet_democracy", - "vote", - "AccountVote" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Standard", - "fields": [ - { - "name": "vote", - "type": 43, - "typeName": "Vote" - }, - { - "name": "balance", - "type": 6, - "typeName": "Balance" - } - ], - "index": 0 - }, - { - "name": "Split", - "fields": [ - { - "name": "aye", - "type": 6, - "typeName": "Balance" - }, - { - "name": "nay", - "type": 6, - "typeName": "Balance" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 43, - "type": { - "path": [ - "pallet_democracy", - "vote", - "Vote" - ], - "def": { - "composite": { - "fields": [ - { - "type": 2 - } - ] - } - } - } - }, - { - "id": 44, - "type": { - "path": [ - "pallet_collective", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Proposed", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proposal_index", - "type": 4, - "typeName": "ProposalIndex" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "threshold", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 0, - "docs": [ - "A motion (given hash) has been proposed (by given account) with a threshold (given", - "`MemberCount`)." - ] - }, - { - "name": "Voted", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "voted", - "type": 35, - "typeName": "bool" - }, - { - "name": "yes", - "type": 4, - "typeName": "MemberCount" - }, - { - "name": "no", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 1, - "docs": [ - "A motion (given hash) has been voted on by given account, leaving", - "a tally (yes votes and no votes given respectively as `MemberCount`)." - ] - }, - { - "name": "Approved", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 2, - "docs": [ - "A motion was approved by the required threshold." - ] - }, - { - "name": "Disapproved", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 3, - "docs": [ - "A motion was not approved by the required threshold." - ] - }, - { - "name": "Executed", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 4, - "docs": [ - "A motion was executed; result will be `Ok` if it returned without error." - ] - }, - { - "name": "MemberExecuted", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 5, - "docs": [ - "A single member did some action; result will be `Ok` if it returned without error." - ] - }, - { - "name": "Closed", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "yes", - "type": 4, - "typeName": "MemberCount" - }, - { - "name": "no", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 6, - "docs": [ - "A proposal was closed because its threshold was reached or after its duration was up." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 45, - "type": { - "path": [ - "pallet_collective", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Proposed", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proposal_index", - "type": 4, - "typeName": "ProposalIndex" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "threshold", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 0, - "docs": [ - "A motion (given hash) has been proposed (by given account) with a threshold (given", - "`MemberCount`)." - ] - }, - { - "name": "Voted", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "voted", - "type": 35, - "typeName": "bool" - }, - { - "name": "yes", - "type": 4, - "typeName": "MemberCount" - }, - { - "name": "no", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 1, - "docs": [ - "A motion (given hash) has been voted on by given account, leaving", - "a tally (yes votes and no votes given respectively as `MemberCount`)." - ] - }, - { - "name": "Approved", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 2, - "docs": [ - "A motion was approved by the required threshold." - ] - }, - { - "name": "Disapproved", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 3, - "docs": [ - "A motion was not approved by the required threshold." - ] - }, - { - "name": "Executed", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 4, - "docs": [ - "A motion was executed; result will be `Ok` if it returned without error." - ] - }, - { - "name": "MemberExecuted", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 5, - "docs": [ - "A single member did some action; result will be `Ok` if it returned without error." - ] - }, - { - "name": "Closed", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "yes", - "type": 4, - "typeName": "MemberCount" - }, - { - "name": "no", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 6, - "docs": [ - "A proposal was closed because its threshold was reached or after its duration was up." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 46, - "type": { - "path": [ - "pallet_elections_phragmen", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NewTerm", - "fields": [ - { - "name": "new_members", - "type": 47, - "typeName": "Vec<(::AccountId, BalanceOf)>" - } - ], - "index": 0, - "docs": [ - "A new term with new_members. This indicates that enough candidates existed to run", - "the election, not that enough have has been elected. The inner value must be examined", - "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond", - "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to", - "begin with." - ] - }, - { - "name": "EmptyTerm", - "index": 1, - "docs": [ - "No (or not enough) candidates existed for this round. This is different from", - "`NewTerm(\\[\\])`. See the description of `NewTerm`." - ] - }, - { - "name": "ElectionError", - "index": 2, - "docs": [ - "Internal error happened while trying to perform election." - ] - }, - { - "name": "MemberKicked", - "fields": [ - { - "name": "member", - "type": 0, - "typeName": "::AccountId" - } - ], - "index": 3, - "docs": [ - "A member has been removed. This should always be followed by either `NewTerm` or", - "`EmptyTerm`." - ] - }, - { - "name": "Renounced", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "::AccountId" - } - ], - "index": 4, - "docs": [ - "Someone has renounced their candidacy." - ] - }, - { - "name": "CandidateSlashed", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 5, - "docs": [ - "A candidate was slashed by amount due to failing to obtain a seat as member or", - "runner-up.", - "", - "Note that old members and runners-up are also candidates." - ] - }, - { - "name": "SeatHolderSlashed", - "fields": [ - { - "name": "seat_holder", - "type": 0, - "typeName": "::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 6, - "docs": [ - "A seat holder was slashed by amount by being forcefully removed from the set." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 47, - "type": { - "def": { - "sequence": { - "type": 48 - } - } - } - }, - { - "id": 48, - "type": { - "def": { - "tuple": [ - 0, - 6 - ] - } - } - }, - { - "id": 49, - "type": { - "path": [ - "pallet_membership", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "MemberAdded", - "index": 0, - "docs": [ - "The given member was added; see the transaction for who." - ] - }, - { - "name": "MemberRemoved", - "index": 1, - "docs": [ - "The given member was removed; see the transaction for who." - ] - }, - { - "name": "MembersSwapped", - "index": 2, - "docs": [ - "Two members were swapped; see the transaction for who." - ] - }, - { - "name": "MembersReset", - "index": 3, - "docs": [ - "The membership was reset; see the transaction for who the new set is." - ] - }, - { - "name": "KeyChanged", - "index": 4, - "docs": [ - "One of the members' keys changed." - ] - }, - { - "name": "Dummy", - "index": 5, - "docs": [ - "Phantom member, never used." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 50, - "type": { - "path": [ - "pallet_grandpa", - "pallet", - "Event" - ], - "def": { - "variant": { - "variants": [ - { - "name": "NewAuthorities", - "fields": [ - { - "name": "authority_set", - "type": 51, - "typeName": "AuthorityList" - } - ], - "index": 0, - "docs": [ - "New authority set has been applied." - ] - }, - { - "name": "Paused", - "index": 1, - "docs": [ - "Current authority set has been paused." - ] - }, - { - "name": "Resumed", - "index": 2, - "docs": [ - "Current authority set has been resumed." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 51, - "type": { - "def": { - "sequence": { - "type": 52 - } - } - } - }, - { - "id": 52, - "type": { - "def": { - "tuple": [ - 53, - 8 - ] - } - } - }, - { - "id": 53, - "type": { - "path": [ - "sp_finality_grandpa", - "app", - "Public" - ], - "def": { - "composite": { - "fields": [ - { - "type": 54, - "typeName": "ed25519::Public" - } - ] - } - } - } - }, - { - "id": 54, - "type": { - "path": [ - "sp_core", - "ed25519", - "Public" - ], - "def": { - "composite": { - "fields": [ - { - "type": 1, - "typeName": "[u8; 32]" - } - ] - } - } - } - }, - { - "id": 55, - "type": { - "path": [ - "pallet_treasury", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Proposed", - "fields": [ - { - "name": "proposal_index", - "type": 4, - "typeName": "ProposalIndex" - } - ], - "index": 0, - "docs": [ - "New proposal." - ] - }, - { - "name": "Spending", - "fields": [ - { - "name": "budget_remaining", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "We have ended a spend period and will now allocate funds." - ] - }, - { - "name": "Awarded", - "fields": [ - { - "name": "proposal_index", - "type": 4, - "typeName": "ProposalIndex" - }, - { - "name": "award", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 2, - "docs": [ - "Some funds have been allocated." - ] - }, - { - "name": "Rejected", - "fields": [ - { - "name": "proposal_index", - "type": 4, - "typeName": "ProposalIndex" - }, - { - "name": "slashed", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 3, - "docs": [ - "A proposal was rejected; funds were slashed." - ] - }, - { - "name": "Burnt", - "fields": [ - { - "name": "burnt_funds", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 4, - "docs": [ - "Some of our funds have been burnt." - ] - }, - { - "name": "Rollover", - "fields": [ - { - "name": "rollover_balance", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 5, - "docs": [ - "Spending has finished; this is the amount that rolls over until next spend." - ] - }, - { - "name": "Deposit", - "fields": [ - { - "name": "value", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 6, - "docs": [ - "Some funds have been deposited." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 56, - "type": { - "path": [ - "pallet_contracts", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Instantiated", - "fields": [ - { - "name": "deployer", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "contract", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "Contract deployed by address at the specified address." - ] - }, - { - "name": "Terminated", - "fields": [ - { - "name": "contract", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The contract that was terminated." - ] - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The account that received the contracts remaining balance" - ] - } - ], - "index": 1, - "docs": [ - "Contract has been removed.", - "", - "# Note", - "", - "The only way for a contract to be removed and emitting this event is by calling", - "`seal_terminate`." - ] - }, - { - "name": "CodeStored", - "fields": [ - { - "name": "code_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 2, - "docs": [ - "Code with the specified hash has been stored." - ] - }, - { - "name": "ContractEmitted", - "fields": [ - { - "name": "contract", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The contract that emitted the event." - ] - }, - { - "name": "data", - "type": 10, - "typeName": "Vec", - "docs": [ - "Data supplied by the contract. Metadata generated during contract compilation", - "is needed to decode it." - ] - } - ], - "index": 3, - "docs": [ - "A custom event emitted by the contract." - ] - }, - { - "name": "CodeRemoved", - "fields": [ - { - "name": "code_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 4, - "docs": [ - "A code with the specified hash was removed." - ] - }, - { - "name": "ContractCodeUpdated", - "fields": [ - { - "name": "contract", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The contract that has been updated." - ] - }, - { - "name": "new_code_hash", - "type": 9, - "typeName": "T::Hash", - "docs": [ - "New code hash that was set for the contract." - ] - }, - { - "name": "old_code_hash", - "type": 9, - "typeName": "T::Hash", - "docs": [ - "Previous code hash of the contract." - ] - } - ], - "index": 5, - "docs": [ - "A contract's code was updated." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 57, - "type": { - "path": [ - "pallet_sudo", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Sudid", - "fields": [ - { - "name": "sudo_result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 0, - "docs": [ - "A sudo just took place. \\[result\\]" - ] - }, - { - "name": "KeyChanged", - "fields": [ - { - "name": "old_sudoer", - "type": 58, - "typeName": "Option" - } - ], - "index": 1, - "docs": [ - "The \\[sudoer\\] just switched identity; the old key is supplied if one existed." - ] - }, - { - "name": "SudoAsDone", - "fields": [ - { - "name": "sudo_result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 2, - "docs": [ - "A sudo just took place. \\[result\\]" - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 58, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 0 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 0 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 59, - "type": { - "path": [ - "pallet_im_online", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "HeartbeatReceived", - "fields": [ - { - "name": "authority_id", - "type": 60, - "typeName": "T::AuthorityId" - } - ], - "index": 0, - "docs": [ - "A new heartbeat was received from `AuthorityId`." - ] - }, - { - "name": "AllGood", - "index": 1, - "docs": [ - "At the end of the session, no offence was committed." - ] - }, - { - "name": "SomeOffline", - "fields": [ - { - "name": "offline", - "type": 62, - "typeName": "Vec>" - } - ], - "index": 2, - "docs": [ - "At the end of the session, at least one validator was found to be offline." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 60, - "type": { - "path": [ - "pallet_im_online", - "sr25519", - "app_sr25519", - "Public" - ], - "def": { - "composite": { - "fields": [ - { - "type": 61, - "typeName": "sr25519::Public" - } - ] - } - } - } - }, - { - "id": 61, - "type": { - "path": [ - "sp_core", - "sr25519", - "Public" - ], - "def": { - "composite": { - "fields": [ - { - "type": 1, - "typeName": "[u8; 32]" - } - ] - } - } - } - }, - { - "id": 62, - "type": { - "def": { - "sequence": { - "type": 63 - } - } - } - }, - { - "id": 63, - "type": { - "def": { - "tuple": [ - 0, - 64 - ] - } - } - }, - { - "id": 64, - "type": { - "path": [ - "pallet_staking", - "Exposure" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "total", - "type": 65, - "typeName": "Balance" - }, - { - "name": "own", - "type": 65, - "typeName": "Balance" - }, - { - "name": "others", - "type": 66, - "typeName": "Vec>" - } - ] - } - } - } - }, - { - "id": 65, - "type": { - "def": { - "compact": { - "type": 6 - } - } - } - }, - { - "id": 66, - "type": { - "def": { - "sequence": { - "type": 67 - } - } - } - }, - { - "id": 67, - "type": { - "path": [ - "pallet_staking", - "IndividualExposure" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "value", - "type": 65, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 68, - "type": { - "path": [ - "pallet_offences", - "pallet", - "Event" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Offence", - "fields": [ - { - "name": "kind", - "type": 69, - "typeName": "Kind" - }, - { - "name": "timeslot", - "type": 10, - "typeName": "OpaqueTimeSlot" - } - ], - "index": 0, - "docs": [ - "There is an offence reported of the given `kind` happened at the `session_index` and", - "(kind-specific) time slot. This event is not deposited for duplicate slashes.", - "\\[kind, timeslot\\]." - ] - } - ] - } - }, - "docs": [ - "Events type." - ] - } - }, - { - "id": 69, - "type": { - "def": { - "array": { - "len": 16, - "type": 2 - } - } - } - }, - { - "id": 70, - "type": { - "path": [ - "pallet_identity", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "IdentitySet", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "A name was set or reset (which will remove all judgements)." - ] - }, - { - "name": "IdentityCleared", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "A name was cleared, and the given balance returned." - ] - }, - { - "name": "IdentityKilled", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "A name was removed and the given balance slashed." - ] - }, - { - "name": "JudgementRequested", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "registrar_index", - "type": 4, - "typeName": "RegistrarIndex" - } - ], - "index": 3, - "docs": [ - "A judgement was asked from a registrar." - ] - }, - { - "name": "JudgementUnrequested", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "registrar_index", - "type": 4, - "typeName": "RegistrarIndex" - } - ], - "index": 4, - "docs": [ - "A judgement request was retracted." - ] - }, - { - "name": "JudgementGiven", - "fields": [ - { - "name": "target", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "registrar_index", - "type": 4, - "typeName": "RegistrarIndex" - } - ], - "index": 5, - "docs": [ - "A judgement was given by a registrar." - ] - }, - { - "name": "RegistrarAdded", - "fields": [ - { - "name": "registrar_index", - "type": 4, - "typeName": "RegistrarIndex" - } - ], - "index": 6, - "docs": [ - "A registrar was added." - ] - }, - { - "name": "SubIdentityAdded", - "fields": [ - { - "name": "sub", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "main", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 7, - "docs": [ - "A sub-identity was added to an identity and the deposit paid." - ] - }, - { - "name": "SubIdentityRemoved", - "fields": [ - { - "name": "sub", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "main", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 8, - "docs": [ - "A sub-identity was removed from an identity and the deposit freed." - ] - }, - { - "name": "SubIdentityRevoked", - "fields": [ - { - "name": "sub", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "main", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 9, - "docs": [ - "A sub-identity was cleared, and the given deposit repatriated from the", - "main identity account to the sub-identity account." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 71, - "type": { - "path": [ - "pallet_society", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Founded", - "fields": [ - { - "name": "founder", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "The society is founded by the given identity." - ] - }, - { - "name": "Bid", - "fields": [ - { - "name": "candidate_id", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "offer", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "A membership bid just happened. The given account is the candidate's ID and their offer", - "is the second." - ] - }, - { - "name": "Vouch", - "fields": [ - { - "name": "candidate_id", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "offer", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "vouching", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 2, - "docs": [ - "A membership bid just happened by vouching. The given account is the candidate's ID and", - "their offer is the second. The vouching party is the third." - ] - }, - { - "name": "AutoUnbid", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "A candidate was dropped (due to an excess of bids in the system)." - ] - }, - { - "name": "Unbid", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "A candidate was dropped (by their request)." - ] - }, - { - "name": "Unvouch", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 5, - "docs": [ - "A candidate was dropped (by request of who vouched for them)." - ] - }, - { - "name": "Inducted", - "fields": [ - { - "name": "primary", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "candidates", - "type": 40, - "typeName": "Vec" - } - ], - "index": 6, - "docs": [ - "A group of candidates have been inducted. The batch's primary is the first value, the", - "batch in full is the second." - ] - }, - { - "name": "SuspendedMemberJudgement", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "judged", - "type": 35, - "typeName": "bool" - } - ], - "index": 7, - "docs": [ - "A suspended member has been judged." - ] - }, - { - "name": "CandidateSuspended", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 8, - "docs": [ - "A candidate has been suspended" - ] - }, - { - "name": "MemberSuspended", - "fields": [ - { - "name": "member", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 9, - "docs": [ - "A member has been suspended" - ] - }, - { - "name": "Challenged", - "fields": [ - { - "name": "member", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 10, - "docs": [ - "A member has been challenged" - ] - }, - { - "name": "Vote", - "fields": [ - { - "name": "candidate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "voter", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "vote", - "type": 35, - "typeName": "bool" - } - ], - "index": 11, - "docs": [ - "A vote has been placed" - ] - }, - { - "name": "DefenderVote", - "fields": [ - { - "name": "voter", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "vote", - "type": 35, - "typeName": "bool" - } - ], - "index": 12, - "docs": [ - "A vote has been placed for a defending member" - ] - }, - { - "name": "NewMaxMembers", - "fields": [ - { - "name": "max", - "type": 4, - "typeName": "u32" - } - ], - "index": 13, - "docs": [ - "A new \\[max\\] member count has been set" - ] - }, - { - "name": "Unfounded", - "fields": [ - { - "name": "founder", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 14, - "docs": [ - "Society is unfounded." - ] - }, - { - "name": "Deposit", - "fields": [ - { - "name": "value", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 15, - "docs": [ - "Some funds were deposited into the society account." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 72, - "type": { - "path": [ - "pallet_recovery", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "RecoveryCreated", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "A recovery process has been set up for an account." - ] - }, - { - "name": "RecoveryInitiated", - "fields": [ - { - "name": "lost_account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "rescuer_account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "A recovery process has been initiated for lost account by rescuer account." - ] - }, - { - "name": "RecoveryVouched", - "fields": [ - { - "name": "lost_account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "rescuer_account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "sender", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 2, - "docs": [ - "A recovery process for lost account by rescuer account has been vouched for by sender." - ] - }, - { - "name": "RecoveryClosed", - "fields": [ - { - "name": "lost_account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "rescuer_account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "A recovery process for lost account by rescuer account has been closed." - ] - }, - { - "name": "AccountRecovered", - "fields": [ - { - "name": "lost_account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "rescuer_account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "Lost account has been successfully recovered by rescuer account." - ] - }, - { - "name": "RecoveryRemoved", - "fields": [ - { - "name": "lost_account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 5, - "docs": [ - "A recovery process has been removed for an account." - ] - } - ] - } - }, - "docs": [ - "Events type." - ] - } - }, - { - "id": 73, - "type": { - "path": [ - "pallet_vesting", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "VestingUpdated", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "unvested", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 0, - "docs": [ - "The amount vested has been updated. This could indicate a change in funds available.", - "The balance given is the amount which is left unvested (and thus locked)." - ] - }, - { - "name": "VestingCompleted", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "An \\[account\\] has become fully vested." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 74, - "type": { - "path": [ - "pallet_scheduler", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Scheduled", - "fields": [ - { - "name": "when", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ], - "index": 0, - "docs": [ - "Scheduled some task." - ] - }, - { - "name": "Canceled", - "fields": [ - { - "name": "when", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Canceled some task." - ] - }, - { - "name": "Dispatched", - "fields": [ - { - "name": "task", - "type": 75, - "typeName": "TaskAddress" - }, - { - "name": "id", - "type": 76, - "typeName": "Option>" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 2, - "docs": [ - "Dispatched some task." - ] - }, - { - "name": "CallLookupFailed", - "fields": [ - { - "name": "task", - "type": 75, - "typeName": "TaskAddress" - }, - { - "name": "id", - "type": 76, - "typeName": "Option>" - }, - { - "name": "error", - "type": 77, - "typeName": "LookupError" - } - ], - "index": 3, - "docs": [ - "The call for the provided hash was not found so the task has been aborted." - ] - } - ] - } - }, - "docs": [ - "Events type." - ] - } - }, - { - "id": 75, - "type": { - "def": { - "tuple": [ - 4, - 4 - ] - } - } - }, - { - "id": 76, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 10 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 10 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 77, - "type": { - "path": [ - "frame_support", - "traits", - "schedule", - "LookupError" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Unknown", - "index": 0 - }, - { - "name": "BadFormat", - "index": 1 - } - ] - } - } - } - }, - { - "id": 78, - "type": { - "path": [ - "pallet_preimage", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Noted", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 0, - "docs": [ - "A preimage has been noted." - ] - }, - { - "name": "Requested", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 1, - "docs": [ - "A preimage has been requested." - ] - }, - { - "name": "Cleared", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 2, - "docs": [ - "A preimage has ben cleared." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 79, - "type": { - "path": [ - "pallet_proxy", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "ProxyExecuted", - "fields": [ - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 0, - "docs": [ - "A proxy was executed correctly, with the given." - ] - }, - { - "name": "AnonymousCreated", - "fields": [ - { - "name": "anonymous", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "disambiguation_index", - "type": 81, - "typeName": "u16" - } - ], - "index": 1, - "docs": [ - "Anonymous account has been created by new proxy with given", - "disambiguation index and proxy type." - ] - }, - { - "name": "Announced", - "fields": [ - { - "name": "real", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 9, - "typeName": "CallHashOf" - } - ], - "index": 2, - "docs": [ - "An announcement was placed to make a call in the future." - ] - }, - { - "name": "ProxyAdded", - "fields": [ - { - "name": "delegator", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegatee", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 3, - "docs": [ - "A proxy was added." - ] - }, - { - "name": "ProxyRemoved", - "fields": [ - { - "name": "delegator", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegatee", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 4, - "docs": [ - "A proxy was removed." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 80, - "type": { - "path": [ - "node_runtime", - "ProxyType" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Any", - "index": 0 - }, - { - "name": "NonTransfer", - "index": 1 - }, - { - "name": "Governance", - "index": 2 - }, - { - "name": "Staking", - "index": 3 - } - ] - } - } - } - }, - { - "id": 81, - "type": { - "def": { - "primitive": "u16" - } - } - }, - { - "id": 82, - "type": { - "path": [ - "pallet_multisig", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NewMultisig", - "fields": [ - { - "name": "approving", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "multisig", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 1, - "typeName": "CallHash" - } - ], - "index": 0, - "docs": [ - "A new multisig operation has begun." - ] - }, - { - "name": "MultisigApproval", - "fields": [ - { - "name": "approving", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "timepoint", - "type": 83, - "typeName": "Timepoint" - }, - { - "name": "multisig", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 1, - "typeName": "CallHash" - } - ], - "index": 1, - "docs": [ - "A multisig operation has been approved by someone." - ] - }, - { - "name": "MultisigExecuted", - "fields": [ - { - "name": "approving", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "timepoint", - "type": 83, - "typeName": "Timepoint" - }, - { - "name": "multisig", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 1, - "typeName": "CallHash" - }, - { - "name": "result", - "type": 28, - "typeName": "DispatchResult" - } - ], - "index": 2, - "docs": [ - "A multisig operation has been executed." - ] - }, - { - "name": "MultisigCancelled", - "fields": [ - { - "name": "cancelling", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "timepoint", - "type": 83, - "typeName": "Timepoint" - }, - { - "name": "multisig", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 1, - "typeName": "CallHash" - } - ], - "index": 3, - "docs": [ - "A multisig operation has been cancelled." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 83, - "type": { - "path": [ - "pallet_multisig", - "Timepoint" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "height", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 84, - "type": { - "path": [ - "pallet_bounties", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "BountyProposed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - } - ], - "index": 0, - "docs": [ - "New bounty proposal." - ] - }, - { - "name": "BountyRejected", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "bond", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "A bounty proposal was rejected; funds were slashed." - ] - }, - { - "name": "BountyBecameActive", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - } - ], - "index": 2, - "docs": [ - "A bounty proposal is funded and became active." - ] - }, - { - "name": "BountyAwarded", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "A bounty is awarded to a beneficiary." - ] - }, - { - "name": "BountyClaimed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "payout", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "A bounty is claimed by beneficiary." - ] - }, - { - "name": "BountyCanceled", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - } - ], - "index": 5, - "docs": [ - "A bounty is cancelled." - ] - }, - { - "name": "BountyExtended", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - } - ], - "index": 6, - "docs": [ - "A bounty expiry is extended." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 85, - "type": { - "path": [ - "pallet_tips", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NewTip", - "fields": [ - { - "name": "tip_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 0, - "docs": [ - "A new tip suggestion has been opened." - ] - }, - { - "name": "TipClosing", - "fields": [ - { - "name": "tip_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 1, - "docs": [ - "A tip suggestion has reached threshold and is closing." - ] - }, - { - "name": "TipClosed", - "fields": [ - { - "name": "tip_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "payout", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "A tip suggestion has been closed." - ] - }, - { - "name": "TipRetracted", - "fields": [ - { - "name": "tip_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 3, - "docs": [ - "A tip suggestion has been retracted." - ] - }, - { - "name": "TipSlashed", - "fields": [ - { - "name": "tip_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "finder", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 4, - "docs": [ - "A tip suggestion has been slashed." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 86, - "type": { - "path": [ - "pallet_assets", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Created", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "creator", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "Some asset class was created." - ] - }, - { - "name": "Issued", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "total_supply", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 1, - "docs": [ - "Some assets were issued." - ] - }, - { - "name": "Transferred", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "from", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "to", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 2, - "docs": [ - "Some assets were transferred." - ] - }, - { - "name": "Burned", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "balance", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 3, - "docs": [ - "Some assets were destroyed." - ] - }, - { - "name": "TeamChanged", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "issuer", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "admin", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "freezer", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "The management team changed." - ] - }, - { - "name": "OwnerChanged", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 5, - "docs": [ - "The owner changed." - ] - }, - { - "name": "Frozen", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 6, - "docs": [ - "Some account `who` was frozen." - ] - }, - { - "name": "Thawed", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 7, - "docs": [ - "Some account `who` was thawed." - ] - }, - { - "name": "AssetFrozen", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - } - ], - "index": 8, - "docs": [ - "Some asset `asset_id` was frozen." - ] - }, - { - "name": "AssetThawed", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - } - ], - "index": 9, - "docs": [ - "Some asset `asset_id` was thawed." - ] - }, - { - "name": "Destroyed", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - } - ], - "index": 10, - "docs": [ - "An asset class was destroyed." - ] - }, - { - "name": "ForceCreated", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 11, - "docs": [ - "Some asset class was force-created." - ] - }, - { - "name": "MetadataSet", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "name", - "type": 10, - "typeName": "Vec" - }, - { - "name": "symbol", - "type": 10, - "typeName": "Vec" - }, - { - "name": "decimals", - "type": 2, - "typeName": "u8" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 12, - "docs": [ - "New metadata has been set for an asset." - ] - }, - { - "name": "MetadataCleared", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - } - ], - "index": 13, - "docs": [ - "Metadata has been cleared for an asset." - ] - }, - { - "name": "ApprovedTransfer", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "source", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 14, - "docs": [ - "(Additional) funds have been approved for transfer to a destination account." - ] - }, - { - "name": "ApprovalCancelled", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 15, - "docs": [ - "An approval for account `delegate` was cancelled by `owner`." - ] - }, - { - "name": "TransferredApproved", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "destination", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 16, - "docs": [ - "An `amount` was transferred in its entirety from `owner` to `destination` by", - "the approved `delegate`." - ] - }, - { - "name": "AssetStatusChanged", - "fields": [ - { - "name": "asset_id", - "type": 4, - "typeName": "T::AssetId" - } - ], - "index": 17, - "docs": [ - "An asset has had its attributes changed by the `Force` origin." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 87, - "type": { - "path": [ - "pallet_lottery", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "LotteryStarted", - "index": 0, - "docs": [ - "A lottery has been started!" - ] - }, - { - "name": "CallsUpdated", - "index": 1, - "docs": [ - "A new set of calls have been set!" - ] - }, - { - "name": "Winner", - "fields": [ - { - "name": "winner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "lottery_balance", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "A winner has been chosen!" - ] - }, - { - "name": "TicketBought", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_index", - "type": 88, - "typeName": "CallIndex" - } - ], - "index": 3, - "docs": [ - "A ticket has been bought!" - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 88, - "type": { - "def": { - "tuple": [ - 2, - 2 - ] - } - } - }, - { - "id": 89, - "type": { - "path": [ - "pallet_gilt", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "BidPlaced", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "duration", - "type": 4, - "typeName": "u32" - } - ], - "index": 0, - "docs": [ - "A bid was successfully placed." - ] - }, - { - "name": "BidRetracted", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "duration", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "A bid was successfully removed (before being accepted as a gilt)." - ] - }, - { - "name": "GiltIssued", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ActiveIndex" - }, - { - "name": "expiry", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "A bid was accepted as a gilt. The balance may not be released until expiry." - ] - }, - { - "name": "GiltThawed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ActiveIndex" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "original_amount", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "additional_amount", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 3, - "docs": [ - "An expired gilt has been thawed." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 90, - "type": { - "path": [ - "pallet_uniques", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Created", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "creator", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "An asset class was created." - ] - }, - { - "name": "ForceCreated", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "An asset class was force-created." - ] - }, - { - "name": "Destroyed", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 2, - "docs": [ - "An asset `class` was destroyed." - ] - }, - { - "name": "Issued", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "An asset `instance` was issued." - ] - }, - { - "name": "Transferred", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "from", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "to", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "An asset `instance` was transferred." - ] - }, - { - "name": "Burned", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 5, - "docs": [ - "An asset `instance` was destroyed." - ] - }, - { - "name": "Frozen", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - } - ], - "index": 6, - "docs": [ - "Some asset `instance` was frozen." - ] - }, - { - "name": "Thawed", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - } - ], - "index": 7, - "docs": [ - "Some asset `instance` was thawed." - ] - }, - { - "name": "ClassFrozen", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 8, - "docs": [ - "Some asset `class` was frozen." - ] - }, - { - "name": "ClassThawed", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 9, - "docs": [ - "Some asset `class` was thawed." - ] - }, - { - "name": "OwnerChanged", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "new_owner", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 10, - "docs": [ - "The owner changed." - ] - }, - { - "name": "TeamChanged", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "issuer", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "admin", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "freezer", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 11, - "docs": [ - "The management team changed." - ] - }, - { - "name": "ApprovedTransfer", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 12, - "docs": [ - "An `instance` of an asset `class` has been approved by the `owner` for transfer by a", - "`delegate`." - ] - }, - { - "name": "ApprovalCancelled", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "owner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 13, - "docs": [ - "An approval for a `delegate` account to transfer the `instance` of an asset `class` was", - "cancelled by its `owner`." - ] - }, - { - "name": "AssetStatusChanged", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 14, - "docs": [ - "An asset `class` has had its attributes changed by the `Force` origin." - ] - }, - { - "name": "ClassMetadataSet", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "data", - "type": 91, - "typeName": "BoundedVec" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 15, - "docs": [ - "New metadata has been set for an asset class." - ] - }, - { - "name": "ClassMetadataCleared", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 16, - "docs": [ - "Metadata has been cleared for an asset class." - ] - }, - { - "name": "MetadataSet", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "data", - "type": 91, - "typeName": "BoundedVec" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 17, - "docs": [ - "New metadata has been set for an asset instance." - ] - }, - { - "name": "MetadataCleared", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - } - ], - "index": 18, - "docs": [ - "Metadata has been cleared for an asset instance." - ] - }, - { - "name": "Redeposited", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "successful_instances", - "type": 92, - "typeName": "Vec" - } - ], - "index": 19, - "docs": [ - "Metadata has been cleared for an asset instance." - ] - }, - { - "name": "AttributeSet", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "maybe_instance", - "type": 93, - "typeName": "Option" - }, - { - "name": "key", - "type": 94, - "typeName": "BoundedVec" - }, - { - "name": "value", - "type": 95, - "typeName": "BoundedVec" - } - ], - "index": 20, - "docs": [ - "New attribute metadata has been set for an asset class or instance." - ] - }, - { - "name": "AttributeCleared", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "maybe_instance", - "type": 93, - "typeName": "Option" - }, - { - "name": "key", - "type": 94, - "typeName": "BoundedVec" - } - ], - "index": 21, - "docs": [ - "Attribute metadata has been cleared for an asset class or instance." - ] - }, - { - "name": "OwnershipAcceptanceChanged", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "maybe_class", - "type": 93, - "typeName": "Option" - } - ], - "index": 22, - "docs": [ - "Ownership acceptance has changed for an account." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 91, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 92, - "type": { - "def": { - "sequence": { - "type": 4 - } - } - } - }, - { - "id": 93, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 4 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 94, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 95, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 96, - "type": { - "path": [ - "pallet_transaction_storage", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Stored", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ], - "index": 0, - "docs": [ - "Stored data under specified index." - ] - }, - { - "name": "Renewed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Renewed data under specified index." - ] - }, - { - "name": "ProofChecked", - "index": 2, - "docs": [ - "Storage proof was successfully checked." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 97, - "type": { - "path": [ - "pallet_bags_list", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Rebagged", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "from", - "type": 8, - "typeName": "T::Score" - }, - { - "name": "to", - "type": 8, - "typeName": "T::Score" - } - ], - "index": 0, - "docs": [ - "Moved an account from one bag to another." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 98, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Migrated", - "fields": [ - { - "name": "top", - "type": 4, - "typeName": "u32" - }, - { - "name": "child", - "type": 4, - "typeName": "u32" - }, - { - "name": "compute", - "type": 99, - "typeName": "MigrationCompute" - } - ], - "index": 0, - "docs": [ - "Given number of `(top, child)` keys were migrated respectively, with the given", - "`compute`." - ] - }, - { - "name": "Slashed", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "Some account got slashed by the given amount." - ] - }, - { - "name": "AutoMigrationFinished", - "index": 2, - "docs": [ - "The auto migration task finished." - ] - }, - { - "name": "Halted", - "index": 3, - "docs": [ - "Migration got halted." - ] - } - ] - } - }, - "docs": [ - "Inner events of this pallet." - ] - } - }, - { - "id": 99, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "MigrationCompute" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Signed", - "index": 0 - }, - { - "name": "Auto", - "index": 1 - } - ] - } - } - } - }, - { - "id": 100, - "type": { - "path": [ - "pallet_child_bounties", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Added", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "child_index", - "type": 4, - "typeName": "BountyIndex" - } - ], - "index": 0, - "docs": [ - "A child-bounty is added." - ] - }, - { - "name": "Awarded", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "child_index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "A child-bounty is awarded to a beneficiary." - ] - }, - { - "name": "Claimed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "child_index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "payout", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 2, - "docs": [ - "A child-bounty is claimed by beneficiary." - ] - }, - { - "name": "Canceled", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "child_index", - "type": 4, - "typeName": "BountyIndex" - } - ], - "index": 3, - "docs": [ - "A child-bounty is cancelled." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 101, - "type": { - "path": [ - "pallet_referenda", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Submitted", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "track", - "type": 2, - "typeName": "TrackIdOf", - "docs": [ - "The track (and by extension proposal dispatch origin) of this referendum." - ] - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash", - "docs": [ - "The hash of the proposal up for referendum." - ] - } - ], - "index": 0, - "docs": [ - "A referendum has being submitted." - ] - }, - { - "name": "DecisionDepositPlaced", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The account who placed the deposit." - ] - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf", - "docs": [ - "The amount placed by the account." - ] - } - ], - "index": 1, - "docs": [ - "The decision deposit has been placed." - ] - }, - { - "name": "DecisionDepositRefunded", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The account who placed the deposit." - ] - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf", - "docs": [ - "The amount placed by the account." - ] - } - ], - "index": 2, - "docs": [ - "The decision deposit has been refunded." - ] - }, - { - "name": "DepositSlashed", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId", - "docs": [ - "The account who placed the deposit." - ] - }, - { - "name": "amount", - "type": 6, - "typeName": "BalanceOf", - "docs": [ - "The amount placed by the account." - ] - } - ], - "index": 3, - "docs": [ - "A deposit has been slashaed." - ] - }, - { - "name": "DecisionStarted", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "track", - "type": 2, - "typeName": "TrackIdOf", - "docs": [ - "The track (and by extension proposal dispatch origin) of this referendum." - ] - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash", - "docs": [ - "The hash of the proposal up for referendum." - ] - }, - { - "name": "tally", - "type": 102, - "typeName": "T::Tally", - "docs": [ - "The current tally of votes in this referendum." - ] - } - ], - "index": 4, - "docs": [ - "A referendum has moved into the deciding phase." - ] - }, - { - "name": "ConfirmStarted", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - } - ], - "index": 5 - }, - { - "name": "ConfirmAborted", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - } - ], - "index": 6 - }, - { - "name": "Confirmed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "tally", - "type": 102, - "typeName": "T::Tally", - "docs": [ - "The final tally of votes in this referendum." - ] - } - ], - "index": 7, - "docs": [ - "A referendum has ended its confirmation phase and is ready for approval." - ] - }, - { - "name": "Approved", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - } - ], - "index": 8, - "docs": [ - "A referendum has been approved and its proposal has been scheduled." - ] - }, - { - "name": "Rejected", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "tally", - "type": 102, - "typeName": "T::Tally", - "docs": [ - "The final tally of votes in this referendum." - ] - } - ], - "index": 9, - "docs": [ - "A proposal has been rejected by referendum." - ] - }, - { - "name": "TimedOut", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "tally", - "type": 102, - "typeName": "T::Tally", - "docs": [ - "The final tally of votes in this referendum." - ] - } - ], - "index": 10, - "docs": [ - "A referendum has been timed out without being decided." - ] - }, - { - "name": "Cancelled", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "tally", - "type": 102, - "typeName": "T::Tally", - "docs": [ - "The final tally of votes in this referendum." - ] - } - ], - "index": 11, - "docs": [ - "A referendum has been cancelled." - ] - }, - { - "name": "Killed", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex", - "docs": [ - "Index of the referendum." - ] - }, - { - "name": "tally", - "type": 102, - "typeName": "T::Tally", - "docs": [ - "The final tally of votes in this referendum." - ] - } - ], - "index": 12, - "docs": [ - "A referendum has been killed." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 102, - "type": { - "path": [ - "pallet_conviction_voting", - "types", - "Tally" - ], - "params": [ - { - "name": "Votes", - "type": 6 - }, - { - "name": "Total", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "ayes", - "type": 6, - "typeName": "Votes" - }, - { - "name": "nays", - "type": 6, - "typeName": "Votes" - }, - { - "name": "turnout", - "type": 6, - "typeName": "Votes" - } - ] - } - } - } - }, - { - "id": 103, - "type": { - "path": [ - "pallet_conviction_voting", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Delegated", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - }, - { - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "An account has delegated their vote to another account. \\[who, target\\]" - ] - }, - { - "name": "Undelegated", - "fields": [ - { - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "An \\[account\\] has cancelled a previous delegation operation." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 104, - "type": { - "path": [ - "pallet_whitelist", - "pallet", - "Event" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "CallWhitelisted", - "fields": [ - { - "name": "call_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 0 - }, - { - "name": "WhitelistedCallRemoved", - "fields": [ - { - "name": "call_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 1 - }, - { - "name": "WhitelistedCallDispatched", - "fields": [ - { - "name": "call_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "result", - "type": 105, - "typeName": "DispatchResultWithPostInfo" - } - ], - "index": 2 - } - ] - } - }, - "docs": [ - "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t" - ] - } - }, - { - "id": 105, - "type": { - "path": [ - "Result" - ], - "params": [ - { - "name": "T", - "type": 106 - }, - { - "name": "E", - "type": 108 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Ok", - "fields": [ - { - "type": 106 - } - ], - "index": 0 - }, - { - "name": "Err", - "fields": [ - { - "type": 108 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 106, - "type": { - "path": [ - "frame_support", - "weights", - "PostDispatchInfo" - ], - "def": { - "composite": { - "fields": [ - { - "name": "actual_weight", - "type": 107, - "typeName": "Option" - }, - { - "name": "pays_fee", - "type": 21, - "typeName": "Pays" - } - ] - } - } - } - }, - { - "id": 107, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 8 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 8 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 108, - "type": { - "path": [ - "sp_runtime", - "DispatchErrorWithPostInfo" - ], - "params": [ - { - "name": "Info", - "type": 106 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "post_info", - "type": 106, - "typeName": "Info" - }, - { - "name": "error", - "type": 22, - "typeName": "DispatchError" - } - ] - } - } - } - }, - { - "id": 109, - "type": { - "path": [ - "frame_system", - "Phase" - ], - "def": { - "variant": { - "variants": [ - { - "name": "ApplyExtrinsic", - "fields": [ - { - "type": 4, - "typeName": "u32" - } - ], - "index": 0 - }, - { - "name": "Finalization", - "index": 1 - }, - { - "name": "Initialization", - "index": 2 - } - ] - } - } - } - }, - { - "id": 110, - "type": { - "def": { - "sequence": { - "type": 9 - } - } - } - }, - { - "id": 111, - "type": { - "def": { - "sequence": { - "type": 75 - } - } - } - }, - { - "id": 112, - "type": { - "path": [ - "frame_system", - "LastRuntimeUpgradeInfo" - ], - "def": { - "composite": { - "fields": [ - { - "name": "spec_version", - "type": 113, - "typeName": "codec::Compact" - }, - { - "name": "spec_name", - "type": 114, - "typeName": "sp_runtime::RuntimeString" - } - ] - } - } - } - }, - { - "id": 113, - "type": { - "def": { - "compact": { - "type": 4 - } - } - } - }, - { - "id": 114, - "type": { - "def": { - "primitive": "str" - } - } - }, - { - "id": 115, - "type": { - "path": [ - "frame_system", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "fill_block", - "fields": [ - { - "name": "ratio", - "type": 116, - "typeName": "Perbill" - } - ], - "index": 0, - "docs": [ - "A dispatch that will fill the block weight up to the given ratio." - ] - }, - { - "name": "remark", - "fields": [ - { - "name": "remark", - "type": 10, - "typeName": "Vec" - } - ], - "index": 1, - "docs": [ - "Make some on-chain remark.", - "", - "# ", - "- `O(1)`", - "# " - ] - }, - { - "name": "set_heap_pages", - "fields": [ - { - "name": "pages", - "type": 8, - "typeName": "u64" - } - ], - "index": 2, - "docs": [ - "Set the number of pages in the WebAssembly environment's heap." - ] - }, - { - "name": "set_code", - "fields": [ - { - "name": "code", - "type": 10, - "typeName": "Vec" - } - ], - "index": 3, - "docs": [ - "Set the new runtime code.", - "", - "# ", - "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`", - "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is", - " expensive).", - "- 1 storage write (codec `O(C)`).", - "- 1 digest item.", - "- 1 event.", - "The weight of this function is dependent on the runtime, but generally this is very", - "expensive. We will treat this as a full block.", - "# " - ] - }, - { - "name": "set_code_without_checks", - "fields": [ - { - "name": "code", - "type": 10, - "typeName": "Vec" - } - ], - "index": 4, - "docs": [ - "Set the new runtime code without doing any checks of the given `code`.", - "", - "# ", - "- `O(C)` where `C` length of `code`", - "- 1 storage write (codec `O(C)`).", - "- 1 digest item.", - "- 1 event.", - "The weight of this function is dependent on the runtime. We will treat this as a full", - "block. # " - ] - }, - { - "name": "set_storage", - "fields": [ - { - "name": "items", - "type": 117, - "typeName": "Vec" - } - ], - "index": 5, - "docs": [ - "Set some items of storage." - ] - }, - { - "name": "kill_storage", - "fields": [ - { - "name": "keys", - "type": 119, - "typeName": "Vec" - } - ], - "index": 6, - "docs": [ - "Kill some items from storage." - ] - }, - { - "name": "kill_prefix", - "fields": [ - { - "name": "prefix", - "type": 10, - "typeName": "Key" - }, - { - "name": "subkeys", - "type": 4, - "typeName": "u32" - } - ], - "index": 7, - "docs": [ - "Kill all storage items with a key that starts with the given prefix.", - "", - "**NOTE:** We rely on the Root origin to provide us the number of subkeys under", - "the prefix we are removing to accurately calculate the weight of this function." - ] - }, - { - "name": "remark_with_event", - "fields": [ - { - "name": "remark", - "type": 10, - "typeName": "Vec" - } - ], - "index": 8, - "docs": [ - "Make some on-chain remark and emit event." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 116, - "type": { - "path": [ - "sp_arithmetic", - "per_things", - "Perbill" - ], - "def": { - "composite": { - "fields": [ - { - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 117, - "type": { - "def": { - "sequence": { - "type": 118 - } - } - } - }, - { - "id": 118, - "type": { - "def": { - "tuple": [ - 10, - 10 - ] - } - } - }, - { - "id": 119, - "type": { - "def": { - "sequence": { - "type": 10 - } - } - } - }, - { - "id": 120, - "type": { - "path": [ - "frame_system", - "limits", - "BlockWeights" - ], - "def": { - "composite": { - "fields": [ - { - "name": "base_block", - "type": 8, - "typeName": "Weight" - }, - { - "name": "max_block", - "type": 8, - "typeName": "Weight" - }, - { - "name": "per_class", - "type": 121, - "typeName": "PerDispatchClass" - } - ] - } - } - } - }, - { - "id": 121, - "type": { - "path": [ - "frame_support", - "weights", - "PerDispatchClass" - ], - "params": [ - { - "name": "T", - "type": 122 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "normal", - "type": 122, - "typeName": "T" - }, - { - "name": "operational", - "type": 122, - "typeName": "T" - }, - { - "name": "mandatory", - "type": 122, - "typeName": "T" - } - ] - } - } - } - }, - { - "id": 122, - "type": { - "path": [ - "frame_system", - "limits", - "WeightsPerClass" - ], - "def": { - "composite": { - "fields": [ - { - "name": "base_extrinsic", - "type": 8, - "typeName": "Weight" - }, - { - "name": "max_extrinsic", - "type": 107, - "typeName": "Option" - }, - { - "name": "max_total", - "type": 107, - "typeName": "Option" - }, - { - "name": "reserved", - "type": 107, - "typeName": "Option" - } - ] - } - } - } - }, - { - "id": 123, - "type": { - "path": [ - "frame_system", - "limits", - "BlockLength" - ], - "def": { - "composite": { - "fields": [ - { - "name": "max", - "type": 124, - "typeName": "PerDispatchClass" - } - ] - } - } - } - }, - { - "id": 124, - "type": { - "path": [ - "frame_support", - "weights", - "PerDispatchClass" - ], - "params": [ - { - "name": "T", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "normal", - "type": 4, - "typeName": "T" - }, - { - "name": "operational", - "type": 4, - "typeName": "T" - }, - { - "name": "mandatory", - "type": 4, - "typeName": "T" - } - ] - } - } - } - }, - { - "id": 125, - "type": { - "path": [ - "frame_support", - "weights", - "RuntimeDbWeight" - ], - "def": { - "composite": { - "fields": [ - { - "name": "read", - "type": 8, - "typeName": "Weight" - }, - { - "name": "write", - "type": 8, - "typeName": "Weight" - } - ] - } - } - } - }, - { - "id": 126, - "type": { - "path": [ - "sp_version", - "RuntimeVersion" - ], - "def": { - "composite": { - "fields": [ - { - "name": "spec_name", - "type": 114, - "typeName": "RuntimeString" - }, - { - "name": "impl_name", - "type": 114, - "typeName": "RuntimeString" - }, - { - "name": "authoring_version", - "type": 4, - "typeName": "u32" - }, - { - "name": "spec_version", - "type": 4, - "typeName": "u32" - }, - { - "name": "impl_version", - "type": 4, - "typeName": "u32" - }, - { - "name": "apis", - "type": 127, - "typeName": "ApisVec" - }, - { - "name": "transaction_version", - "type": 4, - "typeName": "u32" - }, - { - "name": "state_version", - "type": 2, - "typeName": "u8" - } - ] - } - } - } - }, - { - "id": 127, - "type": { - "path": [ - "Cow" - ], - "params": [ - { - "name": "T", - "type": 128 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 128 - } - ] - } - } - } - }, - { - "id": 128, - "type": { - "def": { - "sequence": { - "type": 129 - } - } - } - }, - { - "id": 129, - "type": { - "def": { - "tuple": [ - 130, - 4 - ] - } - } - }, - { - "id": 130, - "type": { - "def": { - "array": { - "len": 8, - "type": 2 - } - } - } - }, - { - "id": 131, - "type": { - "path": [ - "frame_system", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InvalidSpecName", - "index": 0, - "docs": [ - "The name of specification does not match between the current runtime", - "and the new runtime." - ] - }, - { - "name": "SpecVersionNeedsToIncrease", - "index": 1, - "docs": [ - "The specification version is not allowed to decrease between the current runtime", - "and the new runtime." - ] - }, - { - "name": "FailedToExtractRuntimeVersion", - "index": 2, - "docs": [ - "Failed to extract the runtime version from the new runtime.", - "", - "Either calling `Core_version` or decoding `RuntimeVersion` failed." - ] - }, - { - "name": "NonDefaultComposite", - "index": 3, - "docs": [ - "Suicide called when the account has non-default composite data." - ] - }, - { - "name": "NonZeroRefCount", - "index": 4, - "docs": [ - "There is a non-zero reference count preventing the account from being purged." - ] - }, - { - "name": "CallFiltered", - "index": 5, - "docs": [ - "The origin filter prevent the call to be dispatched." - ] - } - ] - } - }, - "docs": [ - "Error for the System pallet" - ] - } - }, - { - "id": 132, - "type": { - "path": [ - "pallet_utility", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "batch", - "fields": [ - { - "name": "calls", - "type": 133, - "typeName": "Vec<::Call>" - } - ], - "index": 0, - "docs": [ - "Send a batch of dispatch calls.", - "", - "May be called from any origin.", - "", - "- `calls`: The calls to be dispatched from the same origin. The number of call must not", - " exceed the constant: `batched_calls_limit` (available in constant metadata).", - "", - "If origin is root then call are dispatch without checking origin filter. (This includes", - "bypassing `frame_system::Config::BaseCallFilter`).", - "", - "# ", - "- Complexity: O(C) where C is the number of calls to be batched.", - "# ", - "", - "This will return `Ok` in all circumstances. To determine the success of the batch, an", - "event is deposited. If a call failed and the batch was interrupted, then the", - "`BatchInterrupted` event is deposited, along with the number of successful calls made", - "and the error of the failed call. If all were successful, then the `BatchCompleted`", - "event is deposited." - ] - }, - { - "name": "as_derivative", - "fields": [ - { - "name": "index", - "type": 81, - "typeName": "u16" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 1, - "docs": [ - "Send a call through an indexed pseudonym of the sender.", - "", - "Filter from origin are passed along. The call will be dispatched with an origin which", - "use the same filter as the origin of this call.", - "", - "NOTE: If you need to ensure that any account-based filtering is not honored (i.e.", - "because you expect `proxy` to have been used prior in the call stack and you do not want", - "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`", - "in the Multisig pallet instead.", - "", - "NOTE: Prior to version *12, this was called `as_limited_sub`.", - "", - "The dispatch origin for this call must be _Signed_." - ] - }, - { - "name": "batch_all", - "fields": [ - { - "name": "calls", - "type": 133, - "typeName": "Vec<::Call>" - } - ], - "index": 2, - "docs": [ - "Send a batch of dispatch calls and atomically execute them.", - "The whole transaction will rollback and fail if any of the calls failed.", - "", - "May be called from any origin.", - "", - "- `calls`: The calls to be dispatched from the same origin. The number of call must not", - " exceed the constant: `batched_calls_limit` (available in constant metadata).", - "", - "If origin is root then call are dispatch without checking origin filter. (This includes", - "bypassing `frame_system::Config::BaseCallFilter`).", - "", - "# ", - "- Complexity: O(C) where C is the number of calls to be batched.", - "# " - ] - }, - { - "name": "dispatch_as", - "fields": [ - { - "name": "as_origin", - "type": 331, - "typeName": "Box" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 3, - "docs": [ - "Dispatches a function call with a provided origin.", - "", - "The dispatch origin for this call must be _Root_.", - "", - "# ", - "- O(1).", - "- Limited storage reads.", - "- One DB write (event).", - "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as().", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 133, - "type": { - "def": { - "sequence": { - "type": 134 - } - } - } - }, - { - "id": 134, - "type": { - "path": [ - "node_runtime", - "Call" - ], - "def": { - "variant": { - "variants": [ - { - "name": "System", - "fields": [ - { - "type": 115, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 0 - }, - { - "name": "Utility", - "fields": [ - { - "type": 132, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 1 - }, - { - "name": "Babe", - "fields": [ - { - "type": 135, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 2 - }, - { - "name": "Timestamp", - "fields": [ - { - "type": 145, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 3 - }, - { - "name": "Authorship", - "fields": [ - { - "type": 147, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 4 - }, - { - "name": "Indices", - "fields": [ - { - "type": 149, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 5 - }, - { - "name": "Balances", - "fields": [ - { - "type": 150, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 6 - }, - { - "name": "ElectionProviderMultiPhase", - "fields": [ - { - "type": 153, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 9 - }, - { - "name": "Staking", - "fields": [ - { - "type": 212, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 10 - }, - { - "name": "Session", - "fields": [ - { - "type": 222, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 11 - }, - { - "name": "Democracy", - "fields": [ - { - "type": 225, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 12 - }, - { - "name": "Council", - "fields": [ - { - "type": 227, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 13 - }, - { - "name": "TechnicalCommittee", - "fields": [ - { - "type": 228, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 14 - }, - { - "name": "Elections", - "fields": [ - { - "type": 229, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 15 - }, - { - "name": "TechnicalMembership", - "fields": [ - { - "type": 231, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 16 - }, - { - "name": "Grandpa", - "fields": [ - { - "type": 232, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 17 - }, - { - "name": "Treasury", - "fields": [ - { - "type": 244, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 18 - }, - { - "name": "Contracts", - "fields": [ - { - "type": 245, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 19 - }, - { - "name": "Sudo", - "fields": [ - { - "type": 247, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 20 - }, - { - "name": "ImOnline", - "fields": [ - { - "type": 248, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 21 - }, - { - "name": "Identity", - "fields": [ - { - "type": 256, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 26 - }, - { - "name": "Society", - "fields": [ - { - "type": 296, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 27 - }, - { - "name": "Recovery", - "fields": [ - { - "type": 298, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 28 - }, - { - "name": "Vesting", - "fields": [ - { - "type": 299, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 29 - }, - { - "name": "Scheduler", - "fields": [ - { - "type": 301, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 30 - }, - { - "name": "Preimage", - "fields": [ - { - "type": 304, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 31 - }, - { - "name": "Proxy", - "fields": [ - { - "type": 305, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 32 - }, - { - "name": "Multisig", - "fields": [ - { - "type": 307, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 33 - }, - { - "name": "Bounties", - "fields": [ - { - "type": 310, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 34 - }, - { - "name": "Tips", - "fields": [ - { - "type": 311, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 35 - }, - { - "name": "Assets", - "fields": [ - { - "type": 312, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 36 - }, - { - "name": "Lottery", - "fields": [ - { - "type": 314, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 38 - }, - { - "name": "Gilt", - "fields": [ - { - "type": 315, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 39 - }, - { - "name": "Uniques", - "fields": [ - { - "type": 318, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 40 - }, - { - "name": "TransactionStorage", - "fields": [ - { - "type": 321, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 41 - }, - { - "name": "BagsList", - "fields": [ - { - "type": 323, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 42 - }, - { - "name": "StateTrieMigration", - "fields": [ - { - "type": 324, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 43 - }, - { - "name": "ChildBounties", - "fields": [ - { - "type": 329, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 44 - }, - { - "name": "Referenda", - "fields": [ - { - "type": 330, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 45 - }, - { - "name": "ConvictionVoting", - "fields": [ - { - "type": 337, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 46 - }, - { - "name": "Whitelist", - "fields": [ - { - "type": 342, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::dispatch\n::CallableCallFor" - } - ], - "index": 47 - } - ] - } - } - } - }, - { - "id": 135, - "type": { - "path": [ - "pallet_babe", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "report_equivocation", - "fields": [ - { - "name": "equivocation_proof", - "type": 136, - "typeName": "Box>" - }, - { - "name": "key_owner_proof", - "type": 141, - "typeName": "T::KeyOwnerProof" - } - ], - "index": 0, - "docs": [ - "Report authority equivocation/misbehavior. This method will verify", - "the equivocation proof and validate the given key ownership proof", - "against the extracted offender. If both are valid, the offence will", - "be reported." - ] - }, - { - "name": "report_equivocation_unsigned", - "fields": [ - { - "name": "equivocation_proof", - "type": 136, - "typeName": "Box>" - }, - { - "name": "key_owner_proof", - "type": 141, - "typeName": "T::KeyOwnerProof" - } - ], - "index": 1, - "docs": [ - "Report authority equivocation/misbehavior. This method will verify", - "the equivocation proof and validate the given key ownership proof", - "against the extracted offender. If both are valid, the offence will", - "be reported.", - "This extrinsic must be called unsigned and it is expected that only", - "block authors will call it (validated in `ValidateUnsigned`), as such", - "if the block author is defined it will be defined as the equivocation", - "reporter." - ] - }, - { - "name": "plan_config_change", - "fields": [ - { - "name": "config", - "type": 142, - "typeName": "NextConfigDescriptor" - } - ], - "index": 2, - "docs": [ - "Plan an epoch config change. The epoch config change is recorded and will be enacted on", - "the next call to `enact_epoch_change`. The config will be activated one epoch after.", - "Multiple calls to this method will replace any existing planned config change that had", - "not been enacted yet." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 136, - "type": { - "path": [ - "sp_consensus_slots", - "EquivocationProof" - ], - "params": [ - { - "name": "Header", - "type": 137 - }, - { - "name": "Id", - "type": 139 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "offender", - "type": 139, - "typeName": "Id" - }, - { - "name": "slot", - "type": 140, - "typeName": "Slot" - }, - { - "name": "first_header", - "type": 137, - "typeName": "Header" - }, - { - "name": "second_header", - "type": 137, - "typeName": "Header" - } - ] - } - } - } - }, - { - "id": 137, - "type": { - "path": [ - "sp_runtime", - "generic", - "header", - "Header" - ], - "params": [ - { - "name": "Number", - "type": 4 - }, - { - "name": "Hash", - "type": 138 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "parent_hash", - "type": 9, - "typeName": "Hash::Output" - }, - { - "name": "number", - "type": 113, - "typeName": "Number" - }, - { - "name": "state_root", - "type": 9, - "typeName": "Hash::Output" - }, - { - "name": "extrinsics_root", - "type": 9, - "typeName": "Hash::Output" - }, - { - "name": "digest", - "type": 11, - "typeName": "Digest" - } - ] - } - } - } - }, - { - "id": 138, - "type": { - "path": [ - "sp_runtime", - "traits", - "BlakeTwo256" - ], - "def": { - "composite": {} - } - } - }, - { - "id": 139, - "type": { - "path": [ - "sp_consensus_babe", - "app", - "Public" - ], - "def": { - "composite": { - "fields": [ - { - "type": 61, - "typeName": "sr25519::Public" - } - ] - } - } - } - }, - { - "id": 140, - "type": { - "path": [ - "sp_consensus_slots", - "Slot" - ], - "def": { - "composite": { - "fields": [ - { - "type": 8, - "typeName": "u64" - } - ] - } - } - } - }, - { - "id": 141, - "type": { - "path": [ - "sp_session", - "MembershipProof" - ], - "def": { - "composite": { - "fields": [ - { - "name": "session", - "type": 4, - "typeName": "SessionIndex" - }, - { - "name": "trie_nodes", - "type": 119, - "typeName": "Vec>" - }, - { - "name": "validator_count", - "type": 4, - "typeName": "ValidatorCount" - } - ] - } - } - } - }, - { - "id": 142, - "type": { - "path": [ - "sp_consensus_babe", - "digests", - "NextConfigDescriptor" - ], - "def": { - "variant": { - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "c", - "type": 143, - "typeName": "(u64, u64)" - }, - { - "name": "allowed_slots", - "type": 144, - "typeName": "AllowedSlots" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 143, - "type": { - "def": { - "tuple": [ - 8, - 8 - ] - } - } - }, - { - "id": 144, - "type": { - "path": [ - "sp_consensus_babe", - "AllowedSlots" - ], - "def": { - "variant": { - "variants": [ - { - "name": "PrimarySlots", - "index": 0 - }, - { - "name": "PrimaryAndSecondaryPlainSlots", - "index": 1 - }, - { - "name": "PrimaryAndSecondaryVRFSlots", - "index": 2 - } - ] - } - } - } - }, - { - "id": 145, - "type": { - "path": [ - "pallet_timestamp", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "set", - "fields": [ - { - "name": "now", - "type": 146, - "typeName": "T::Moment" - } - ], - "index": 0, - "docs": [ - "Set the current time.", - "", - "This call should be invoked exactly once per block. It will panic at the finalization", - "phase, if this call hasn't been invoked by that time.", - "", - "The timestamp should be greater than the previous one by the amount specified by", - "`MinimumPeriod`.", - "", - "The dispatch origin for this call must be `Inherent`.", - "", - "# ", - "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)", - "- 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in", - " `on_finalize`)", - "- 1 event handler `on_timestamp_set`. Must be `O(1)`.", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 146, - "type": { - "def": { - "compact": { - "type": 8 - } - } - } - }, - { - "id": 147, - "type": { - "path": [ - "pallet_authorship", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "set_uncles", - "fields": [ - { - "name": "new_uncles", - "type": 148, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Provide a set of uncles." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 148, - "type": { - "def": { - "sequence": { - "type": 137 - } - } - } - }, - { - "id": 149, - "type": { - "path": [ - "pallet_indices", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "claim", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - } - ], - "index": 0, - "docs": [ - "Assign an previously unassigned index.", - "", - "Payment: `Deposit` is reserved from the sender account.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `index`: the index to be claimed. This must not be in use.", - "", - "Emits `IndexAssigned` if successful.", - "", - "# ", - "- `O(1)`.", - "- One storage mutation (codec `O(1)`).", - "- One reserve operation.", - "- One event.", - "-------------------", - "- DB Weight: 1 Read/Write (Accounts)", - "# " - ] - }, - { - "name": "transfer", - "fields": [ - { - "name": "new", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - } - ], - "index": 1, - "docs": [ - "Assign an index already owned by the sender to another account. The balance reservation", - "is effectively transferred to the new account.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `index`: the index to be re-assigned. This must be owned by the sender.", - "- `new`: the new owner of the index. This function is a no-op if it is equal to sender.", - "", - "Emits `IndexAssigned` if successful.", - "", - "# ", - "- `O(1)`.", - "- One storage mutation (codec `O(1)`).", - "- One transfer operation.", - "- One event.", - "-------------------", - "- DB Weight:", - " - Reads: Indices Accounts, System Account (recipient)", - " - Writes: Indices Accounts, System Account (recipient)", - "# " - ] - }, - { - "name": "free", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - } - ], - "index": 2, - "docs": [ - "Free up an index owned by the sender.", - "", - "Payment: Any previous deposit placed for the index is unreserved in the sender account.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must own the index.", - "", - "- `index`: the index to be freed. This must be owned by the sender.", - "", - "Emits `IndexFreed` if successful.", - "", - "# ", - "- `O(1)`.", - "- One storage mutation (codec `O(1)`).", - "- One reserve operation.", - "- One event.", - "-------------------", - "- DB Weight: 1 Read/Write (Accounts)", - "# " - ] - }, - { - "name": "force_transfer", - "fields": [ - { - "name": "new", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - }, - { - "name": "freeze", - "type": 35, - "typeName": "bool" - } - ], - "index": 3, - "docs": [ - "Force an index to an account. This doesn't require a deposit. If the index is already", - "held, then any deposit is reimbursed to its current owner.", - "", - "The dispatch origin for this call must be _Root_.", - "", - "- `index`: the index to be (re-)assigned.", - "- `new`: the new owner of the index. This function is a no-op if it is equal to sender.", - "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred.", - "", - "Emits `IndexAssigned` if successful.", - "", - "# ", - "- `O(1)`.", - "- One storage mutation (codec `O(1)`).", - "- Up to one reserve operation.", - "- One event.", - "-------------------", - "- DB Weight:", - " - Reads: Indices Accounts, System Account (original owner)", - " - Writes: Indices Accounts, System Account (original owner)", - "# " - ] - }, - { - "name": "freeze", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "T::AccountIndex" - } - ], - "index": 4, - "docs": [ - "Freeze an index so it will always point to the sender account. This consumes the", - "deposit.", - "", - "The dispatch origin for this call must be _Signed_ and the signing account must have a", - "non-frozen account `index`.", - "", - "- `index`: the index to be frozen in place.", - "", - "Emits `IndexFrozen` if successful.", - "", - "# ", - "- `O(1)`.", - "- One storage mutation (codec `O(1)`).", - "- Up to one slash operation.", - "- One event.", - "-------------------", - "- DB Weight: 1 Read/Write (Accounts)", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 150, - "type": { - "path": [ - "pallet_balances", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "transfer", - "fields": [ - { - "name": "dest", - "type": 151, - "typeName": "::Source" - }, - { - "name": "value", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 0, - "docs": [ - "Transfer some liquid free balance to another account.", - "", - "`transfer` will set the `FreeBalance` of the sender and receiver.", - "If the sender's account is below the existential deposit as a result", - "of the transfer, the account will be reaped.", - "", - "The dispatch origin for this call must be `Signed` by the transactor.", - "", - "# ", - "- Dependent on arguments but not critical, given proper implementations for input config", - " types. See related functions below.", - "- It contains a limited number of reads and writes internally and no complex", - " computation.", - "", - "Related functions:", - "", - " - `ensure_can_withdraw` is always called internally but has a bounded complexity.", - " - Transferring balances to accounts that did not exist before will cause", - " `T::OnNewAccount::on_new_account` to be called.", - " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.", - " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check", - " that the transfer will not kill the origin account.", - "---------------------------------", - "- Origin account is already in memory, so no DB operations for them.", - "# " - ] - }, - { - "name": "set_balance", - "fields": [ - { - "name": "who", - "type": 151, - "typeName": "::Source" - }, - { - "name": "new_free", - "type": 65, - "typeName": "T::Balance" - }, - { - "name": "new_reserved", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 1, - "docs": [ - "Set the balances of a given account.", - "", - "This will alter `FreeBalance` and `ReservedBalance` in storage. it will", - "also alter the total issuance of the system (`TotalIssuance`) appropriately.", - "If the new free or reserved balance is below the existential deposit,", - "it will reset the account nonce (`frame_system::AccountNonce`).", - "", - "The dispatch origin for this call is `root`." - ] - }, - { - "name": "force_transfer", - "fields": [ - { - "name": "source", - "type": 151, - "typeName": "::Source" - }, - { - "name": "dest", - "type": 151, - "typeName": "::Source" - }, - { - "name": "value", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 2, - "docs": [ - "Exactly as `transfer`, except the origin must be root and the source account may be", - "specified.", - "# ", - "- Same as transfer, but additional read and write because the source account is not", - " assumed to be in the overlay.", - "# " - ] - }, - { - "name": "transfer_keep_alive", - "fields": [ - { - "name": "dest", - "type": 151, - "typeName": "::Source" - }, - { - "name": "value", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 3, - "docs": [ - "Same as the [`transfer`] call, but with a check that the transfer will not kill the", - "origin account.", - "", - "99% of the time you want [`transfer`] instead.", - "", - "[`transfer`]: struct.Pallet.html#method.transfer" - ] - }, - { - "name": "transfer_all", - "fields": [ - { - "name": "dest", - "type": 151, - "typeName": "::Source" - }, - { - "name": "keep_alive", - "type": 35, - "typeName": "bool" - } - ], - "index": 4, - "docs": [ - "Transfer the entire transferable balance from the caller account.", - "", - "NOTE: This function only attempts to transfer _transferable_ balances. This means that", - "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be", - "transferred by this function. To ensure that this function results in a killed account,", - "you might need to prepare the account by removing any reference counters, storage", - "deposits, etc...", - "", - "The dispatch origin of this call must be Signed.", - "", - "- `dest`: The recipient of the transfer.", - "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all", - " of the funds the account has, causing the sender account to be killed (false), or", - " transfer everything except at least the existential deposit, which will guarantee to", - " keep the sender account alive (true). # ", - "- O(1). Just like transfer, but reading the user's transferable balance first.", - " #" - ] - }, - { - "name": "force_unreserve", - "fields": [ - { - "name": "who", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 5, - "docs": [ - "Unreserve some balance from a user by force.", - "", - "Can only be called by ROOT." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 151, - "type": { - "path": [ - "sp_runtime", - "multiaddress", - "MultiAddress" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "AccountIndex", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Id", - "fields": [ - { - "type": 0, - "typeName": "AccountId" - } - ], - "index": 0 - }, - { - "name": "Index", - "fields": [ - { - "type": 113, - "typeName": "AccountIndex" - } - ], - "index": 1 - }, - { - "name": "Raw", - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ], - "index": 2 - }, - { - "name": "Address32", - "fields": [ - { - "type": 1, - "typeName": "[u8; 32]" - } - ], - "index": 3 - }, - { - "name": "Address20", - "fields": [ - { - "type": 152, - "typeName": "[u8; 20]" - } - ], - "index": 4 - } - ] - } - } - } - }, - { - "id": 152, - "type": { - "def": { - "array": { - "len": 20, - "type": 2 - } - } - } - }, - { - "id": 153, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "submit_unsigned", - "fields": [ - { - "name": "raw_solution", - "type": 154, - "typeName": "Box>>" - }, - { - "name": "witness", - "type": 207, - "typeName": "SolutionOrSnapshotSize" - } - ], - "index": 0, - "docs": [ - "Submit a solution for the unsigned phase.", - "", - "The dispatch origin fo this call must be __none__.", - "", - "This submission is checked on the fly. Moreover, this unsigned solution is only", - "validated when submitted to the pool from the **local** node. Effectively, this means", - "that only active validators can submit this transaction when authoring a block (similar", - "to an inherent).", - "", - "To prevent any incorrect solution (and thus wasted time/weight), this transaction will", - "panic if the solution submitted by the validator is invalid in any way, effectively", - "putting their authoring reward at risk.", - "", - "No deposit or reward is associated with this submission." - ] - }, - { - "name": "set_minimum_untrusted_score", - "fields": [ - { - "name": "maybe_next_score", - "type": 208, - "typeName": "Option" - } - ], - "index": 1, - "docs": [ - "Set a new value for `MinimumUntrustedScore`.", - "", - "Dispatch origin must be aligned with `T::ForceOrigin`.", - "", - "This check can be turned off by setting the value to `None`." - ] - }, - { - "name": "set_emergency_election_result", - "fields": [ - { - "name": "supports", - "type": 209, - "typeName": "Supports" - } - ], - "index": 2, - "docs": [ - "Set a solution in the queue, to be handed out to the client of this pallet in the next", - "call to `ElectionProvider::elect`.", - "", - "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`.", - "", - "The solution is not checked for any feasibility and is assumed to be trustworthy, as any", - "feasibility check itself can in principle cause the election process to fail (due to", - "memory/weight constrains)." - ] - }, - { - "name": "submit", - "fields": [ - { - "name": "raw_solution", - "type": 154, - "typeName": "Box>>" - } - ], - "index": 3, - "docs": [ - "Submit a solution for the signed phase.", - "", - "The dispatch origin fo this call must be __signed__.", - "", - "The solution is potentially queued, based on the claimed score and processed at the end", - "of the signed phase.", - "", - "A deposit is reserved and recorded for the solution. Based on the outcome, the solution", - "might be rewarded, slashed, or get all or a part of the deposit back." - ] - }, - { - "name": "governance_fallback", - "fields": [ - { - "name": "maybe_max_voters", - "type": 93, - "typeName": "Option" - }, - { - "name": "maybe_max_targets", - "type": 93, - "typeName": "Option" - } - ], - "index": 4, - "docs": [ - "Trigger the governance fallback.", - "", - "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to", - "calling [`Call::set_emergency_election_result`]." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 154, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "RawSolution" - ], - "params": [ - { - "name": "S", - "type": 155 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "solution", - "type": 155, - "typeName": "S" - }, - { - "name": "score", - "type": 206, - "typeName": "ElectionScore" - }, - { - "name": "round", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 155, - "type": { - "path": [ - "node_runtime", - "NposSolution16" - ], - "def": { - "composite": { - "fields": [ - { - "name": "votes1", - "type": 156 - }, - { - "name": "votes2", - "type": 159 - }, - { - "name": "votes3", - "type": 164 - }, - { - "name": "votes4", - "type": 167 - }, - { - "name": "votes5", - "type": 170 - }, - { - "name": "votes6", - "type": 173 - }, - { - "name": "votes7", - "type": 176 - }, - { - "name": "votes8", - "type": 179 - }, - { - "name": "votes9", - "type": 182 - }, - { - "name": "votes10", - "type": 185 - }, - { - "name": "votes11", - "type": 188 - }, - { - "name": "votes12", - "type": 191 - }, - { - "name": "votes13", - "type": 194 - }, - { - "name": "votes14", - "type": 197 - }, - { - "name": "votes15", - "type": 200 - }, - { - "name": "votes16", - "type": 203 - } - ] - } - } - } - }, - { - "id": 156, - "type": { - "def": { - "sequence": { - "type": 157 - } - } - } - }, - { - "id": 157, - "type": { - "def": { - "tuple": [ - 113, - 158 - ] - } - } - }, - { - "id": 158, - "type": { - "def": { - "compact": { - "type": 81 - } - } - } - }, - { - "id": 159, - "type": { - "def": { - "sequence": { - "type": 160 - } - } - } - }, - { - "id": 160, - "type": { - "def": { - "tuple": [ - 113, - 161, - 158 - ] - } - } - }, - { - "id": 161, - "type": { - "def": { - "tuple": [ - 158, - 162 - ] - } - } - }, - { - "id": 162, - "type": { - "def": { - "compact": { - "type": 163 - } - } - } - }, - { - "id": 163, - "type": { - "path": [ - "sp_arithmetic", - "per_things", - "PerU16" - ], - "def": { - "composite": { - "fields": [ - { - "type": 81, - "typeName": "u16" - } - ] - } - } - } - }, - { - "id": 164, - "type": { - "def": { - "sequence": { - "type": 165 - } - } - } - }, - { - "id": 165, - "type": { - "def": { - "tuple": [ - 113, - 166, - 158 - ] - } - } - }, - { - "id": 166, - "type": { - "def": { - "array": { - "len": 2, - "type": 161 - } - } - } - }, - { - "id": 167, - "type": { - "def": { - "sequence": { - "type": 168 - } - } - } - }, - { - "id": 168, - "type": { - "def": { - "tuple": [ - 113, - 169, - 158 - ] - } - } - }, - { - "id": 169, - "type": { - "def": { - "array": { - "len": 3, - "type": 161 - } - } - } - }, - { - "id": 170, - "type": { - "def": { - "sequence": { - "type": 171 - } - } - } - }, - { - "id": 171, - "type": { - "def": { - "tuple": [ - 113, - 172, - 158 - ] - } - } - }, - { - "id": 172, - "type": { - "def": { - "array": { - "len": 4, - "type": 161 - } - } - } - }, - { - "id": 173, - "type": { - "def": { - "sequence": { - "type": 174 - } - } - } - }, - { - "id": 174, - "type": { - "def": { - "tuple": [ - 113, - 175, - 158 - ] - } - } - }, - { - "id": 175, - "type": { - "def": { - "array": { - "len": 5, - "type": 161 - } - } - } - }, - { - "id": 176, - "type": { - "def": { - "sequence": { - "type": 177 - } - } - } - }, - { - "id": 177, - "type": { - "def": { - "tuple": [ - 113, - 178, - 158 - ] - } - } - }, - { - "id": 178, - "type": { - "def": { - "array": { - "len": 6, - "type": 161 - } - } - } - }, - { - "id": 179, - "type": { - "def": { - "sequence": { - "type": 180 - } - } - } - }, - { - "id": 180, - "type": { - "def": { - "tuple": [ - 113, - 181, - 158 - ] - } - } - }, - { - "id": 181, - "type": { - "def": { - "array": { - "len": 7, - "type": 161 - } - } - } - }, - { - "id": 182, - "type": { - "def": { - "sequence": { - "type": 183 - } - } - } - }, - { - "id": 183, - "type": { - "def": { - "tuple": [ - 113, - 184, - 158 - ] - } - } - }, - { - "id": 184, - "type": { - "def": { - "array": { - "len": 8, - "type": 161 - } - } - } - }, - { - "id": 185, - "type": { - "def": { - "sequence": { - "type": 186 - } - } - } - }, - { - "id": 186, - "type": { - "def": { - "tuple": [ - 113, - 187, - 158 - ] - } - } - }, - { - "id": 187, - "type": { - "def": { - "array": { - "len": 9, - "type": 161 - } - } - } - }, - { - "id": 188, - "type": { - "def": { - "sequence": { - "type": 189 - } - } - } - }, - { - "id": 189, - "type": { - "def": { - "tuple": [ - 113, - 190, - 158 - ] - } - } - }, - { - "id": 190, - "type": { - "def": { - "array": { - "len": 10, - "type": 161 - } - } - } - }, - { - "id": 191, - "type": { - "def": { - "sequence": { - "type": 192 - } - } - } - }, - { - "id": 192, - "type": { - "def": { - "tuple": [ - 113, - 193, - 158 - ] - } - } - }, - { - "id": 193, - "type": { - "def": { - "array": { - "len": 11, - "type": 161 - } - } - } - }, - { - "id": 194, - "type": { - "def": { - "sequence": { - "type": 195 - } - } - } - }, - { - "id": 195, - "type": { - "def": { - "tuple": [ - 113, - 196, - 158 - ] - } - } - }, - { - "id": 196, - "type": { - "def": { - "array": { - "len": 12, - "type": 161 - } - } - } - }, - { - "id": 197, - "type": { - "def": { - "sequence": { - "type": 198 - } - } - } - }, - { - "id": 198, - "type": { - "def": { - "tuple": [ - 113, - 199, - 158 - ] - } - } - }, - { - "id": 199, - "type": { - "def": { - "array": { - "len": 13, - "type": 161 - } - } - } - }, - { - "id": 200, - "type": { - "def": { - "sequence": { - "type": 201 - } - } - } - }, - { - "id": 201, - "type": { - "def": { - "tuple": [ - 113, - 202, - 158 - ] - } - } - }, - { - "id": 202, - "type": { - "def": { - "array": { - "len": 14, - "type": 161 - } - } - } - }, - { - "id": 203, - "type": { - "def": { - "sequence": { - "type": 204 - } - } - } - }, - { - "id": 204, - "type": { - "def": { - "tuple": [ - 113, - 205, - 158 - ] - } - } - }, - { - "id": 205, - "type": { - "def": { - "array": { - "len": 15, - "type": 161 - } - } - } - }, - { - "id": 206, - "type": { - "path": [ - "sp_npos_elections", - "ElectionScore" - ], - "def": { - "composite": { - "fields": [ - { - "name": "minimal_stake", - "type": 6, - "typeName": "ExtendedBalance" - }, - { - "name": "sum_stake", - "type": 6, - "typeName": "ExtendedBalance" - }, - { - "name": "sum_stake_squared", - "type": 6, - "typeName": "ExtendedBalance" - } - ] - } - } - } - }, - { - "id": 207, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "SolutionOrSnapshotSize" - ], - "def": { - "composite": { - "fields": [ - { - "name": "voters", - "type": 113, - "typeName": "u32" - }, - { - "name": "targets", - "type": 113, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 208, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 206 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 206 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 209, - "type": { - "def": { - "sequence": { - "type": 210 - } - } - } - }, - { - "id": 210, - "type": { - "def": { - "tuple": [ - 0, - 211 - ] - } - } - }, - { - "id": 211, - "type": { - "path": [ - "sp_npos_elections", - "Support" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "total", - "type": 6, - "typeName": "ExtendedBalance" - }, - { - "name": "voters", - "type": 47, - "typeName": "Vec<(AccountId, ExtendedBalance)>" - } - ] - } - } - } - }, - { - "id": 212, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "bond", - "fields": [ - { - "name": "controller", - "type": 151, - "typeName": "::Source" - }, - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "payee", - "type": 213, - "typeName": "RewardDestination" - } - ], - "index": 0, - "docs": [ - "Take the origin account as a stash and lock up `value` of its balance. `controller` will", - "be the account that controls it.", - "", - "`value` must be more than the `minimum_balance` specified by `T::Currency`.", - "", - "The dispatch origin for this call must be _Signed_ by the stash account.", - "", - "Emits `Bonded`.", - "# ", - "- Independent of the arguments. Moderate complexity.", - "- O(1).", - "- Three extra DB entries.", - "", - "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned", - "unless the `origin` falls below _existential deposit_ and gets removed as dust.", - "------------------", - "# " - ] - }, - { - "name": "bond_extra", - "fields": [ - { - "name": "max_additional", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "Add some extra amount that have appeared in the stash `free_balance` into the balance up", - "for staking.", - "", - "The dispatch origin for this call must be _Signed_ by the stash, not the controller.", - "", - "Use this if there are additional funds in your stash account that you wish to bond.", - "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose", - "any limitation on the amount that can be added.", - "", - "Emits `Bonded`.", - "", - "# ", - "- Independent of the arguments. Insignificant complexity.", - "- O(1).", - "# " - ] - }, - { - "name": "unbond", - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "Schedule a portion of the stash to be unlocked ready for transfer out after the bond", - "period ends. If this leaves an amount actively bonded less than", - "T::Currency::minimum_balance(), then it is increased to the full amount.", - "", - "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - "", - "Once the unlock period is done, you can call `withdraw_unbonded` to actually move", - "the funds out of management ready for transfer.", - "", - "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)", - "can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need", - "to be called first to remove some of the chunks (if possible).", - "", - "If a user encounters the `InsufficientBond` error when calling this extrinsic,", - "they should call `chill` first in order to free up their bonded funds.", - "", - "Emits `Unbonded`.", - "", - "See also [`Call::withdraw_unbonded`]." - ] - }, - { - "name": "withdraw_unbonded", - "fields": [ - { - "name": "num_slashing_spans", - "type": 4, - "typeName": "u32" - } - ], - "index": 3, - "docs": [ - "Remove any unlocked chunks from the `unlocking` queue from our management.", - "", - "This essentially frees up that balance to be used by the stash account to do", - "whatever it wants.", - "", - "The dispatch origin for this call must be _Signed_ by the controller.", - "", - "Emits `Withdrawn`.", - "", - "See also [`Call::unbond`].", - "", - "# ", - "Complexity O(S) where S is the number of slashing spans to remove", - "NOTE: Weight annotation is the kill scenario, we refund otherwise.", - "# " - ] - }, - { - "name": "validate", - "fields": [ - { - "name": "prefs", - "type": 214, - "typeName": "ValidatorPrefs" - } - ], - "index": 4, - "docs": [ - "Declare the desire to validate for the origin controller.", - "", - "Effects will be felt at the beginning of the next era.", - "", - "The dispatch origin for this call must be _Signed_ by the controller, not the stash." - ] - }, - { - "name": "nominate", - "fields": [ - { - "name": "targets", - "type": 216, - "typeName": "Vec<::Source>" - } - ], - "index": 5, - "docs": [ - "Declare the desire to nominate `targets` for the origin controller.", - "", - "Effects will be felt at the beginning of the next era.", - "", - "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - "", - "# ", - "- The transaction's complexity is proportional to the size of `targets` (N)", - "which is capped at CompactAssignments::LIMIT (T::MaxNominations).", - "- Both the reads and writes follow a similar pattern.", - "# " - ] - }, - { - "name": "chill", - "index": 6, - "docs": [ - "Declare no desire to either validate or nominate.", - "", - "Effects will be felt at the beginning of the next era.", - "", - "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - "", - "# ", - "- Independent of the arguments. Insignificant complexity.", - "- Contains one read.", - "- Writes are limited to the `origin` account key.", - "# " - ] - }, - { - "name": "set_payee", - "fields": [ - { - "name": "payee", - "type": 213, - "typeName": "RewardDestination" - } - ], - "index": 7, - "docs": [ - "(Re-)set the payment target for a controller.", - "", - "Effects will be felt instantly (as soon as this function is completed successfully).", - "", - "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - "", - "# ", - "- Independent of the arguments. Insignificant complexity.", - "- Contains a limited number of reads.", - "- Writes are limited to the `origin` account key.", - "---------", - "- Weight: O(1)", - "- DB Weight:", - " - Read: Ledger", - " - Write: Payee", - "# " - ] - }, - { - "name": "set_controller", - "fields": [ - { - "name": "controller", - "type": 151, - "typeName": "::Source" - } - ], - "index": 8, - "docs": [ - "(Re-)set the controller of a stash.", - "", - "Effects will be felt instantly (as soon as this function is completed successfully).", - "", - "The dispatch origin for this call must be _Signed_ by the stash, not the controller.", - "", - "# ", - "- Independent of the arguments. Insignificant complexity.", - "- Contains a limited number of reads.", - "- Writes are limited to the `origin` account key.", - "----------", - "Weight: O(1)", - "DB Weight:", - "- Read: Bonded, Ledger New Controller, Ledger Old Controller", - "- Write: Bonded, Ledger New Controller, Ledger Old Controller", - "# " - ] - }, - { - "name": "set_validator_count", - "fields": [ - { - "name": "new", - "type": 113, - "typeName": "u32" - } - ], - "index": 9, - "docs": [ - "Sets the ideal number of validators.", - "", - "The dispatch origin must be Root.", - "", - "# ", - "Weight: O(1)", - "Write: Validator Count", - "# " - ] - }, - { - "name": "increase_validator_count", - "fields": [ - { - "name": "additional", - "type": 113, - "typeName": "u32" - } - ], - "index": 10, - "docs": [ - "Increments the ideal number of validators.", - "", - "The dispatch origin must be Root.", - "", - "# ", - "Same as [`Self::set_validator_count`].", - "# " - ] - }, - { - "name": "scale_validator_count", - "fields": [ - { - "name": "factor", - "type": 217, - "typeName": "Percent" - } - ], - "index": 11, - "docs": [ - "Scale up the ideal number of validators by a factor.", - "", - "The dispatch origin must be Root.", - "", - "# ", - "Same as [`Self::set_validator_count`].", - "# " - ] - }, - { - "name": "force_no_eras", - "index": 12, - "docs": [ - "Force there to be no new eras indefinitely.", - "", - "The dispatch origin must be Root.", - "", - "# Warning", - "", - "The election process starts multiple blocks before the end of the era.", - "Thus the election process may be ongoing when this is called. In this case the", - "election will continue until the next era is triggered.", - "", - "# ", - "- No arguments.", - "- Weight: O(1)", - "- Write: ForceEra", - "# " - ] - }, - { - "name": "force_new_era", - "index": 13, - "docs": [ - "Force there to be a new era at the end of the next session. After this, it will be", - "reset to normal (non-forced) behaviour.", - "", - "The dispatch origin must be Root.", - "", - "# Warning", - "", - "The election process starts multiple blocks before the end of the era.", - "If this is called just before a new era is triggered, the election process may not", - "have enough blocks to get a result.", - "", - "# ", - "- No arguments.", - "- Weight: O(1)", - "- Write ForceEra", - "# " - ] - }, - { - "name": "set_invulnerables", - "fields": [ - { - "name": "invulnerables", - "type": 40, - "typeName": "Vec" - } - ], - "index": 14, - "docs": [ - "Set the validators who cannot be slashed (if any).", - "", - "The dispatch origin must be Root." - ] - }, - { - "name": "force_unstake", - "fields": [ - { - "name": "stash", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "num_slashing_spans", - "type": 4, - "typeName": "u32" - } - ], - "index": 15, - "docs": [ - "Force a current staker to become completely unstaked, immediately.", - "", - "The dispatch origin must be Root." - ] - }, - { - "name": "force_new_era_always", - "index": 16, - "docs": [ - "Force there to be a new era at the end of sessions indefinitely.", - "", - "The dispatch origin must be Root.", - "", - "# Warning", - "", - "The election process starts multiple blocks before the end of the era.", - "If this is called just before a new era is triggered, the election process may not", - "have enough blocks to get a result." - ] - }, - { - "name": "cancel_deferred_slash", - "fields": [ - { - "name": "era", - "type": 4, - "typeName": "EraIndex" - }, - { - "name": "slash_indices", - "type": 92, - "typeName": "Vec" - } - ], - "index": 17, - "docs": [ - "Cancel enactment of a deferred slash.", - "", - "Can be called by the `T::SlashCancelOrigin`.", - "", - "Parameters: era and indices of the slashes for that era to kill." - ] - }, - { - "name": "payout_stakers", - "fields": [ - { - "name": "validator_stash", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "era", - "type": 4, - "typeName": "EraIndex" - } - ], - "index": 18, - "docs": [ - "Pay out all the stakers behind a single validator for a single era.", - "", - "- `validator_stash` is the stash account of the validator. Their nominators, up to", - " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.", - "- `era` may be any era between `[current_era - history_depth; current_era]`.", - "", - "The origin of this call must be _Signed_. Any account can call this function, even if", - "it is not one of the stakers.", - "", - "# ", - "- Time complexity: at most O(MaxNominatorRewardedPerValidator).", - "- Contains a limited number of reads and writes.", - "-----------", - "N is the Number of payouts for the validator (including the validator)", - "Weight:", - "- Reward Destination Staked: O(N)", - "- Reward Destination Controller (Creating): O(N)", - "", - " NOTE: weights are assuming that payouts are made to alive stash account (Staked).", - " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here.", - "# " - ] - }, - { - "name": "rebond", - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 19, - "docs": [ - "Rebond a portion of the stash scheduled to be unlocked.", - "", - "The dispatch origin must be signed by the controller.", - "", - "# ", - "- Time complexity: O(L), where L is unlocking chunks", - "- Bounded by `MaxUnlockingChunks`.", - "- Storage changes: Can't increase storage, only decrease it.", - "# " - ] - }, - { - "name": "set_history_depth", - "fields": [ - { - "name": "new_history_depth", - "type": 113, - "typeName": "EraIndex" - }, - { - "name": "era_items_deleted", - "type": 113, - "typeName": "u32" - } - ], - "index": 20, - "docs": [ - "Set `HistoryDepth` value. This function will delete any history information", - "when `HistoryDepth` is reduced.", - "", - "Parameters:", - "- `new_history_depth`: The new history depth you would like to set.", - "- `era_items_deleted`: The number of items that will be deleted by this dispatch. This", - " should report all the storage items that will be deleted by clearing old era history.", - " Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an", - " accurate number.", - "", - "Origin must be root.", - "", - "# ", - "- E: Number of history depths removed, i.e. 10 -> 7 = 3", - "- Weight: O(E)", - "- DB Weight:", - " - Reads: Current Era, History Depth", - " - Writes: History Depth", - " - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs", - " - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake,", - " ErasStartSessionIndex", - "# " - ] - }, - { - "name": "reap_stash", - "fields": [ - { - "name": "stash", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "num_slashing_spans", - "type": 4, - "typeName": "u32" - } - ], - "index": 21, - "docs": [ - "Remove all data structures concerning a staker/stash once it is at a state where it can", - "be considered `dust` in the staking system. The requirements are:", - "", - "1. the `total_balance` of the stash is below existential deposit.", - "2. or, the `ledger.total` of the stash is below existential deposit.", - "", - "The former can happen in cases like a slash; the latter when a fully unbonded account", - "is still receiving staking rewards in `RewardDestination::Staked`.", - "", - "It can be called by anyone, as long as `stash` meets the above requirements.", - "", - "Refunds the transaction fees upon successful execution." - ] - }, - { - "name": "kick", - "fields": [ - { - "name": "who", - "type": 216, - "typeName": "Vec<::Source>" - } - ], - "index": 22, - "docs": [ - "Remove the given nominations from the calling validator.", - "", - "Effects will be felt at the beginning of the next era.", - "", - "The dispatch origin for this call must be _Signed_ by the controller, not the stash.", - "", - "- `who`: A list of nominator stash accounts who are nominating this validator which", - " should no longer be nominating this validator.", - "", - "Note: Making this call only makes sense if you first set the validator preferences to", - "block any further nominations." - ] - }, - { - "name": "set_staking_configs", - "fields": [ - { - "name": "min_nominator_bond", - "type": 218, - "typeName": "ConfigOp>" - }, - { - "name": "min_validator_bond", - "type": 218, - "typeName": "ConfigOp>" - }, - { - "name": "max_nominator_count", - "type": 219, - "typeName": "ConfigOp" - }, - { - "name": "max_validator_count", - "type": 219, - "typeName": "ConfigOp" - }, - { - "name": "chill_threshold", - "type": 220, - "typeName": "ConfigOp" - }, - { - "name": "min_commission", - "type": 221, - "typeName": "ConfigOp" - } - ], - "index": 23, - "docs": [ - "Update the various staking configurations .", - "", - "* `min_nominator_bond`: The minimum active bond needed to be a nominator.", - "* `min_validator_bond`: The minimum active bond needed to be a validator.", - "* `max_nominator_count`: The max number of users who can be a nominator at once. When", - " set to `None`, no limit is enforced.", - "* `max_validator_count`: The max number of users who can be a validator at once. When", - " set to `None`, no limit is enforced.", - "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which", - " should be filled in order for the `chill_other` transaction to work.", - "* `min_commission`: The minimum amount of commission that each validators must maintain.", - " This is checked only upon calling `validate`. Existing validators are not affected.", - "", - "Origin must be Root to call this function.", - "", - "NOTE: Existing nominators and validators will not be affected by this update.", - "to kick people under the new limits, `chill_other` should be called." - ] - }, - { - "name": "chill_other", - "fields": [ - { - "name": "controller", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 24, - "docs": [ - "Declare a `controller` to stop participating as either a validator or nominator.", - "", - "Effects will be felt at the beginning of the next era.", - "", - "The dispatch origin for this call must be _Signed_, but can be called by anyone.", - "", - "If the caller is the same as the controller being targeted, then no further checks are", - "enforced, and this function behaves just like `chill`.", - "", - "If the caller is different than the controller being targeted, the following conditions", - "must be met:", - "", - "* `controller` must belong to a nominator who has become non-decodable,", - "", - "Or:", - "", - "* A `ChillThreshold` must be set and checked which defines how close to the max", - " nominators or validators we must reach before users can start chilling one-another.", - "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine", - " how close we are to the threshold.", - "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines", - " if this is a person that should be chilled because they have not met the threshold", - " bond required.", - "", - "This can be helpful if bond requirements are updated, and we need to remove old users", - "who do not satisfy these requirements." - ] - }, - { - "name": "force_apply_min_commission", - "fields": [ - { - "name": "validator_stash", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 25, - "docs": [ - "Force a validator to have at least the minimum commission. This will not affect a", - "validator who already has a commission greater than or equal to the minimum. Any account", - "can call this." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 213, - "type": { - "path": [ - "pallet_staking", - "RewardDestination" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Staked", - "index": 0 - }, - { - "name": "Stash", - "index": 1 - }, - { - "name": "Controller", - "index": 2 - }, - { - "name": "Account", - "fields": [ - { - "type": 0, - "typeName": "AccountId" - } - ], - "index": 3 - }, - { - "name": "None", - "index": 4 - } - ] - } - } - } - }, - { - "id": 214, - "type": { - "path": [ - "pallet_staking", - "ValidatorPrefs" - ], - "def": { - "composite": { - "fields": [ - { - "name": "commission", - "type": 215, - "typeName": "Perbill" - }, - { - "name": "blocked", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 215, - "type": { - "def": { - "compact": { - "type": 116 - } - } - } - }, - { - "id": 216, - "type": { - "def": { - "sequence": { - "type": 151 - } - } - } - }, - { - "id": 217, - "type": { - "path": [ - "sp_arithmetic", - "per_things", - "Percent" - ], - "def": { - "composite": { - "fields": [ - { - "type": 2, - "typeName": "u8" - } - ] - } - } - } - }, - { - "id": 218, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "ConfigOp" - ], - "params": [ - { - "name": "T", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Noop", - "index": 0 - }, - { - "name": "Set", - "fields": [ - { - "type": 6, - "typeName": "T" - } - ], - "index": 1 - }, - { - "name": "Remove", - "index": 2 - } - ] - } - } - } - }, - { - "id": 219, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "ConfigOp" - ], - "params": [ - { - "name": "T", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Noop", - "index": 0 - }, - { - "name": "Set", - "fields": [ - { - "type": 4, - "typeName": "T" - } - ], - "index": 1 - }, - { - "name": "Remove", - "index": 2 - } - ] - } - } - } - }, - { - "id": 220, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "ConfigOp" - ], - "params": [ - { - "name": "T", - "type": 217 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Noop", - "index": 0 - }, - { - "name": "Set", - "fields": [ - { - "type": 217, - "typeName": "T" - } - ], - "index": 1 - }, - { - "name": "Remove", - "index": 2 - } - ] - } - } - } - }, - { - "id": 221, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "ConfigOp" - ], - "params": [ - { - "name": "T", - "type": 116 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Noop", - "index": 0 - }, - { - "name": "Set", - "fields": [ - { - "type": 116, - "typeName": "T" - } - ], - "index": 1 - }, - { - "name": "Remove", - "index": 2 - } - ] - } - } - } - }, - { - "id": 222, - "type": { - "path": [ - "pallet_session", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "set_keys", - "fields": [ - { - "name": "keys", - "type": 223, - "typeName": "T::Keys" - }, - { - "name": "proof", - "type": 10, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Sets the session key(s) of the function caller to `keys`.", - "Allows an account to set its session key prior to becoming a validator.", - "This doesn't take effect until the next session.", - "", - "The dispatch origin of this function must be signed.", - "", - "# ", - "- Complexity: `O(1)`. Actual cost depends on the number of length of", - " `T::Keys::key_ids()` which is fixed.", - "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`", - "- DbWrites: `origin account`, `NextKeys`", - "- DbReads per key id: `KeyOwner`", - "- DbWrites per key id: `KeyOwner`", - "# " - ] - }, - { - "name": "purge_keys", - "index": 1, - "docs": [ - "Removes any session key(s) of the function caller.", - "", - "This doesn't take effect until the next session.", - "", - "The dispatch origin of this function must be Signed and the account must be either be", - "convertible to a validator ID using the chain's typical addressing system (this usually", - "means being a controller account) or directly convertible into a validator ID (which", - "usually means being a stash account).", - "", - "# ", - "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length", - " of `T::Keys::key_ids()` which is fixed.", - "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`", - "- DbWrites: `NextKeys`, `origin account`", - "- DbWrites per key id: `KeyOwner`", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 223, - "type": { - "path": [ - "node_runtime", - "SessionKeys" - ], - "def": { - "composite": { - "fields": [ - { - "name": "grandpa", - "type": 53, - "typeName": "::Public" - }, - { - "name": "babe", - "type": 139, - "typeName": "::Public" - }, - { - "name": "im_online", - "type": 60, - "typeName": "::Public" - }, - { - "name": "authority_discovery", - "type": 224, - "typeName": "::Public" - } - ] - } - } - } - }, - { - "id": 224, - "type": { - "path": [ - "sp_authority_discovery", - "app", - "Public" - ], - "def": { - "composite": { - "fields": [ - { - "type": 61, - "typeName": "sr25519::Public" - } - ] - } - } - } - }, - { - "id": 225, - "type": { - "path": [ - "pallet_democracy", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "propose", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 0, - "docs": [ - "Propose a sensitive action to be taken.", - "", - "The dispatch origin of this call must be _Signed_ and the sender must", - "have funds to cover the deposit.", - "", - "- `proposal_hash`: The hash of the proposal preimage.", - "- `value`: The amount of deposit (must be at least `MinimumDeposit`).", - "", - "Emits `Proposed`.", - "", - "Weight: `O(p)`" - ] - }, - { - "name": "second", - "fields": [ - { - "name": "proposal", - "type": 113, - "typeName": "PropIndex" - }, - { - "name": "seconds_upper_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Signals agreement with a particular proposal.", - "", - "The dispatch origin of this call must be _Signed_ and the sender", - "must have funds to cover the deposit, equal to the original deposit.", - "", - "- `proposal`: The index of the proposal to second.", - "- `seconds_upper_bound`: an upper bound on the current number of seconds on this", - " proposal. Extrinsic is weighted according to this value with no refund.", - "", - "Weight: `O(S)` where S is the number of seconds a proposal already has." - ] - }, - { - "name": "vote", - "fields": [ - { - "name": "ref_index", - "type": 113, - "typeName": "ReferendumIndex" - }, - { - "name": "vote", - "type": 42, - "typeName": "AccountVote>" - } - ], - "index": 2, - "docs": [ - "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", - "otherwise it is a vote to keep the status quo.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `ref_index`: The index of the referendum to vote for.", - "- `vote`: The vote configuration.", - "", - "Weight: `O(R)` where R is the number of referendums the voter has voted on." - ] - }, - { - "name": "emergency_cancel", - "fields": [ - { - "name": "ref_index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 3, - "docs": [ - "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same", - "referendum.", - "", - "The dispatch origin of this call must be `CancellationOrigin`.", - "", - "-`ref_index`: The index of the referendum to cancel.", - "", - "Weight: `O(1)`." - ] - }, - { - "name": "external_propose", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 4, - "docs": [ - "Schedule a referendum to be tabled once it is legal to schedule an external", - "referendum.", - "", - "The dispatch origin of this call must be `ExternalOrigin`.", - "", - "- `proposal_hash`: The preimage hash of the proposal.", - "", - "Weight: `O(V)` with V number of vetoers in the blacklist of proposal.", - " Decoding vec of length V. Charged as maximum" - ] - }, - { - "name": "external_propose_majority", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 5, - "docs": [ - "Schedule a majority-carries referendum to be tabled next once it is legal to schedule", - "an external referendum.", - "", - "The dispatch of this call must be `ExternalMajorityOrigin`.", - "", - "- `proposal_hash`: The preimage hash of the proposal.", - "", - "Unlike `external_propose`, blacklisting has no effect on this and it may replace a", - "pre-scheduled `external_propose` call.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "external_propose_default", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 6, - "docs": [ - "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to", - "schedule an external referendum.", - "", - "The dispatch of this call must be `ExternalDefaultOrigin`.", - "", - "- `proposal_hash`: The preimage hash of the proposal.", - "", - "Unlike `external_propose`, blacklisting has no effect on this and it may replace a", - "pre-scheduled `external_propose` call.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "fast_track", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "voting_period", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 7, - "docs": [ - "Schedule the currently externally-proposed majority-carries referendum to be tabled", - "immediately. If there is no externally-proposed referendum currently, or if there is one", - "but it is not a majority-carries referendum then it fails.", - "", - "The dispatch of this call must be `FastTrackOrigin`.", - "", - "- `proposal_hash`: The hash of the current external proposal.", - "- `voting_period`: The period that is allowed for voting on this proposal. Increased to", - " `FastTrackVotingPeriod` if too low.", - "- `delay`: The number of block after voting has ended in approval and this should be", - " enacted. This doesn't have a minimum amount.", - "", - "Emits `Started`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "veto_external", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 8, - "docs": [ - "Veto and blacklist the external proposal hash.", - "", - "The dispatch origin of this call must be `VetoOrigin`.", - "", - "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist.", - "", - "Emits `Vetoed`.", - "", - "Weight: `O(V + log(V))` where V is number of `existing vetoers`" - ] - }, - { - "name": "cancel_referendum", - "fields": [ - { - "name": "ref_index", - "type": 113, - "typeName": "ReferendumIndex" - } - ], - "index": 9, - "docs": [ - "Remove a referendum.", - "", - "The dispatch origin of this call must be _Root_.", - "", - "- `ref_index`: The index of the referendum to cancel.", - "", - "# Weight: `O(1)`." - ] - }, - { - "name": "cancel_queued", - "fields": [ - { - "name": "which", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 10, - "docs": [ - "Cancel a proposal queued for enactment.", - "", - "The dispatch origin of this call must be _Root_.", - "", - "- `which`: The index of the referendum to cancel.", - "", - "Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`." - ] - }, - { - "name": "delegate", - "fields": [ - { - "name": "to", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "conviction", - "type": 226, - "typeName": "Conviction" - }, - { - "name": "balance", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 11, - "docs": [ - "Delegate the voting power (with some given conviction) of the sending account.", - "", - "The balance delegated is locked for as long as it's delegated, and thereafter for the", - "time appropriate for the conviction's lock period.", - "", - "The dispatch origin of this call must be _Signed_, and the signing account must either:", - " - be delegating already; or", - " - have no voting activity (if there is, then it will need to be removed/consolidated", - " through `reap_vote` or `unvote`).", - "", - "- `to`: The account whose voting the `target` account's voting power will follow.", - "- `conviction`: The conviction that will be attached to the delegated votes. When the", - " account is undelegated, the funds will be locked for the corresponding period.", - "- `balance`: The amount of the account's balance to be used in delegating. This must not", - " be more than the account's current balance.", - "", - "Emits `Delegated`.", - "", - "Weight: `O(R)` where R is the number of referendums the voter delegating to has", - " voted on. Weight is charged as if maximum votes." - ] - }, - { - "name": "undelegate", - "index": 12, - "docs": [ - "Undelegate the voting power of the sending account.", - "", - "Tokens may be unlocked following once an amount of time consistent with the lock period", - "of the conviction with which the delegation was issued.", - "", - "The dispatch origin of this call must be _Signed_ and the signing account must be", - "currently delegating.", - "", - "Emits `Undelegated`.", - "", - "Weight: `O(R)` where R is the number of referendums the voter delegating to has", - " voted on. Weight is charged as if maximum votes." - ] - }, - { - "name": "clear_public_proposals", - "index": 13, - "docs": [ - "Clears all public proposals.", - "", - "The dispatch origin of this call must be _Root_.", - "", - "Weight: `O(1)`." - ] - }, - { - "name": "note_preimage", - "fields": [ - { - "name": "encoded_proposal", - "type": 10, - "typeName": "Vec" - } - ], - "index": 14, - "docs": [ - "Register the preimage for an upcoming proposal. This doesn't require the proposal to be", - "in the dispatch queue but does require a deposit, returned once enacted.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `encoded_proposal`: The preimage of a proposal.", - "", - "Emits `PreimageNoted`.", - "", - "Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." - ] - }, - { - "name": "note_preimage_operational", - "fields": [ - { - "name": "encoded_proposal", - "type": 10, - "typeName": "Vec" - } - ], - "index": 15, - "docs": [ - "Same as `note_preimage` but origin is `OperationalPreimageOrigin`." - ] - }, - { - "name": "note_imminent_preimage", - "fields": [ - { - "name": "encoded_proposal", - "type": 10, - "typeName": "Vec" - } - ], - "index": 16, - "docs": [ - "Register the preimage for an upcoming proposal. This requires the proposal to be", - "in the dispatch queue. No deposit is needed. When this call is successful, i.e.", - "the preimage has not been uploaded before and matches some imminent proposal,", - "no fee is paid.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `encoded_proposal`: The preimage of a proposal.", - "", - "Emits `PreimageNoted`.", - "", - "Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit)." - ] - }, - { - "name": "note_imminent_preimage_operational", - "fields": [ - { - "name": "encoded_proposal", - "type": 10, - "typeName": "Vec" - } - ], - "index": 17, - "docs": [ - "Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`." - ] - }, - { - "name": "reap_preimage", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "proposal_len_upper_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 18, - "docs": [ - "Remove an expired proposal preimage and collect the deposit.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `proposal_hash`: The preimage hash of a proposal.", - "- `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is", - " weighted according to this value with no refund.", - "", - "This will only work after `VotingPeriod` blocks from the time that the preimage was", - "noted, if it's the same account doing it. If it's a different account, then it'll only", - "work an additional `EnactmentPeriod` later.", - "", - "Emits `PreimageReaped`.", - "", - "Weight: `O(D)` where D is length of proposal." - ] - }, - { - "name": "unlock", - "fields": [ - { - "name": "target", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 19, - "docs": [ - "Unlock tokens that have an expired lock.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `target`: The account to remove the lock on.", - "", - "Weight: `O(R)` with R number of vote of target." - ] - }, - { - "name": "remove_vote", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 20, - "docs": [ - "Remove a vote for a referendum.", - "", - "If:", - "- the referendum was cancelled, or", - "- the referendum is ongoing, or", - "- the referendum has ended such that", - " - the vote of the account was in opposition to the result; or", - " - there was no conviction to the account's vote; or", - " - the account made a split vote", - "...then the vote is removed cleanly and a following call to `unlock` may result in more", - "funds being available.", - "", - "If, however, the referendum has ended and:", - "- it finished corresponding to the vote of the account, and", - "- the account made a standard vote with conviction, and", - "- the lock period of the conviction is not over", - "...then the lock will be aggregated into the overall account's lock, which may involve", - "*overlocking* (where the two locks are combined into a single lock that is the maximum", - "of both the amount locked and the time is it locked for).", - "", - "The dispatch origin of this call must be _Signed_, and the signer must have a vote", - "registered for referendum `index`.", - "", - "- `index`: The index of referendum of the vote to be removed.", - "", - "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", - " Weight is calculated for the maximum number of vote." - ] - }, - { - "name": "remove_other_vote", - "fields": [ - { - "name": "target", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 21, - "docs": [ - "Remove a vote for a referendum.", - "", - "If the `target` is equal to the signer, then this function is exactly equivalent to", - "`remove_vote`. If not equal to the signer, then the vote must have expired,", - "either because the referendum was cancelled, because the voter lost the referendum or", - "because the conviction period is over.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `target`: The account of the vote to be removed; this account must have voted for", - " referendum `index`.", - "- `index`: The index of referendum of the vote to be removed.", - "", - "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.", - " Weight is calculated for the maximum number of vote." - ] - }, - { - "name": "enact_proposal", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 22, - "docs": [ - "Enact a proposal from a referendum. For now we just make the weight be the maximum." - ] - }, - { - "name": "blacklist", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "maybe_ref_index", - "type": 93, - "typeName": "Option" - } - ], - "index": 23, - "docs": [ - "Permanently place a proposal into the blacklist. This prevents it from ever being", - "proposed again.", - "", - "If called on a queued public or external proposal, then this will result in it being", - "removed. If the `ref_index` supplied is an active referendum with the proposal hash,", - "then it will be cancelled.", - "", - "The dispatch origin of this call must be `BlacklistOrigin`.", - "", - "- `proposal_hash`: The proposal hash to blacklist permanently.", - "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be", - "cancelled.", - "", - "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a", - " reasonable value)." - ] - }, - { - "name": "cancel_proposal", - "fields": [ - { - "name": "prop_index", - "type": 113, - "typeName": "PropIndex" - } - ], - "index": 24, - "docs": [ - "Remove a proposal.", - "", - "The dispatch origin of this call must be `CancelProposalOrigin`.", - "", - "- `prop_index`: The index of the proposal to cancel.", - "", - "Weight: `O(p)` where `p = PublicProps::::decode_len()`" - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 226, - "type": { - "path": [ - "pallet_democracy", - "conviction", - "Conviction" - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Locked1x", - "index": 1 - }, - { - "name": "Locked2x", - "index": 2 - }, - { - "name": "Locked3x", - "index": 3 - }, - { - "name": "Locked4x", - "index": 4 - }, - { - "name": "Locked5x", - "index": 5 - }, - { - "name": "Locked6x", - "index": 6 - } - ] - } - } - } - }, - { - "id": 227, - "type": { - "path": [ - "pallet_collective", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "set_members", - "fields": [ - { - "name": "new_members", - "type": 40, - "typeName": "Vec" - }, - { - "name": "prime", - "type": 58, - "typeName": "Option" - }, - { - "name": "old_count", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 0, - "docs": [ - "Set the collective's membership.", - "", - "- `new_members`: The new member list. Be nice to the chain and provide it sorted.", - "- `prime`: The prime member whose vote sets the default.", - "- `old_count`: The upper bound for the previous number of members in storage. Used for", - " weight estimation.", - "", - "Requires root origin.", - "", - "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", - " the weight estimations rely on it to estimate dispatchable weight.", - "", - "# WARNING:", - "", - "The `pallet-collective` can also be managed by logic outside of the pallet through the", - "implementation of the trait [`ChangeMembers`].", - "Any call to `set_members` must be careful that the member set doesn't get out of sync", - "with other logic managing the member set.", - "", - "# ", - "## Weight", - "- `O(MP + N)` where:", - " - `M` old-members-count (code- and governance-bounded)", - " - `N` new-members-count (code- and governance-bounded)", - " - `P` proposals-count (code-bounded)", - "- DB:", - " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the", - " members", - " - 1 storage read (codec `O(P)`) for reading the proposals", - " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", - " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", - "# " - ] - }, - { - "name": "execute", - "fields": [ - { - "name": "proposal", - "type": 134, - "typeName": "Box<>::Proposal>" - }, - { - "name": "length_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Dispatch a proposal from a member using the `Member` origin.", - "", - "Origin must be a member of the collective.", - "", - "# ", - "## Weight", - "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching", - " `proposal`", - "- DB: 1 read (codec `O(M)`) + DB access of `proposal`", - "- 1 event", - "# " - ] - }, - { - "name": "propose", - "fields": [ - { - "name": "threshold", - "type": 113, - "typeName": "MemberCount" - }, - { - "name": "proposal", - "type": 134, - "typeName": "Box<>::Proposal>" - }, - { - "name": "length_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 2, - "docs": [ - "Add a new proposal to either be voted on or executed directly.", - "", - "Requires the sender to be member.", - "", - "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)", - "or put up for voting.", - "", - "# ", - "## Weight", - "- `O(B + M + P1)` or `O(B + M + P2)` where:", - " - `B` is `proposal` size in bytes (length-fee-bounded)", - " - `M` is members-count (code- and governance-bounded)", - " - branching is influenced by `threshold` where:", - " - `P1` is proposal execution complexity (`threshold < 2`)", - " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", - "- DB:", - " - 1 storage read `is_member` (codec `O(M)`)", - " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", - " - DB accesses influenced by `threshold`:", - " - EITHER storage accesses done by `proposal` (`threshold < 2`)", - " - OR proposal insertion (`threshold <= 2`)", - " - 1 storage mutation `Proposals` (codec `O(P2)`)", - " - 1 storage mutation `ProposalCount` (codec `O(1)`)", - " - 1 storage write `ProposalOf` (codec `O(B)`)", - " - 1 storage write `Voting` (codec `O(M)`)", - " - 1 event", - "# " - ] - }, - { - "name": "vote", - "fields": [ - { - "name": "proposal", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "index", - "type": 113, - "typeName": "ProposalIndex" - }, - { - "name": "approve", - "type": 35, - "typeName": "bool" - } - ], - "index": 3, - "docs": [ - "Add an aye or nay vote for the sender to the given proposal.", - "", - "Requires the sender to be a member.", - "", - "Transaction fees will be waived if the member is voting on any particular proposal", - "for the first time and the call is successful. Subsequent vote changes will charge a", - "fee.", - "# ", - "## Weight", - "- `O(M)` where `M` is members-count (code- and governance-bounded)", - "- DB:", - " - 1 storage read `Members` (codec `O(M)`)", - " - 1 storage mutation `Voting` (codec `O(M)`)", - "- 1 event", - "# " - ] - }, - { - "name": "close", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "index", - "type": 113, - "typeName": "ProposalIndex" - }, - { - "name": "proposal_weight_bound", - "type": 146, - "typeName": "Weight" - }, - { - "name": "length_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 4, - "docs": [ - "Close a vote that is either approved, disapproved or whose voting period has ended.", - "", - "May be called by any signed account in order to finish voting and close the proposal.", - "", - "If called before the end of the voting period it will only close the vote if it is", - "has enough votes to be approved or disapproved.", - "", - "If called after the end of the voting period abstentions are counted as rejections", - "unless there is a prime member set and the prime member cast an approval.", - "", - "If the close operation completes successfully with disapproval, the transaction fee will", - "be waived. Otherwise execution of the approved operation will be charged to the caller.", - "", - "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed", - "proposal.", - "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via", - "`storage::read` so it is `size_of::() == 4` larger than the pure length.", - "", - "# ", - "## Weight", - "- `O(B + M + P1 + P2)` where:", - " - `B` is `proposal` size in bytes (length-fee-bounded)", - " - `M` is members-count (code- and governance-bounded)", - " - `P1` is the complexity of `proposal` preimage.", - " - `P2` is proposal-count (code-bounded)", - "- DB:", - " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", - " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec", - " `O(P2)`)", - " - any mutations done while executing `proposal` (`P1`)", - "- up to 3 events", - "# " - ] - }, - { - "name": "disapprove_proposal", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 5, - "docs": [ - "Disapprove a proposal, close, and remove it from the system, regardless of its current", - "state.", - "", - "Must be called by the Root origin.", - "", - "Parameters:", - "* `proposal_hash`: The hash of the proposal that should be disapproved.", - "", - "# ", - "Complexity: O(P) where P is the number of max proposals", - "DB Weight:", - "* Reads: Proposals", - "* Writes: Voting, Proposals, ProposalOf", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 228, - "type": { - "path": [ - "pallet_collective", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "set_members", - "fields": [ - { - "name": "new_members", - "type": 40, - "typeName": "Vec" - }, - { - "name": "prime", - "type": 58, - "typeName": "Option" - }, - { - "name": "old_count", - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 0, - "docs": [ - "Set the collective's membership.", - "", - "- `new_members`: The new member list. Be nice to the chain and provide it sorted.", - "- `prime`: The prime member whose vote sets the default.", - "- `old_count`: The upper bound for the previous number of members in storage. Used for", - " weight estimation.", - "", - "Requires root origin.", - "", - "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but", - " the weight estimations rely on it to estimate dispatchable weight.", - "", - "# WARNING:", - "", - "The `pallet-collective` can also be managed by logic outside of the pallet through the", - "implementation of the trait [`ChangeMembers`].", - "Any call to `set_members` must be careful that the member set doesn't get out of sync", - "with other logic managing the member set.", - "", - "# ", - "## Weight", - "- `O(MP + N)` where:", - " - `M` old-members-count (code- and governance-bounded)", - " - `N` new-members-count (code- and governance-bounded)", - " - `P` proposals-count (code-bounded)", - "- DB:", - " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the", - " members", - " - 1 storage read (codec `O(P)`) for reading the proposals", - " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal", - " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one", - "# " - ] - }, - { - "name": "execute", - "fields": [ - { - "name": "proposal", - "type": 134, - "typeName": "Box<>::Proposal>" - }, - { - "name": "length_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Dispatch a proposal from a member using the `Member` origin.", - "", - "Origin must be a member of the collective.", - "", - "# ", - "## Weight", - "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching", - " `proposal`", - "- DB: 1 read (codec `O(M)`) + DB access of `proposal`", - "- 1 event", - "# " - ] - }, - { - "name": "propose", - "fields": [ - { - "name": "threshold", - "type": 113, - "typeName": "MemberCount" - }, - { - "name": "proposal", - "type": 134, - "typeName": "Box<>::Proposal>" - }, - { - "name": "length_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 2, - "docs": [ - "Add a new proposal to either be voted on or executed directly.", - "", - "Requires the sender to be member.", - "", - "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)", - "or put up for voting.", - "", - "# ", - "## Weight", - "- `O(B + M + P1)` or `O(B + M + P2)` where:", - " - `B` is `proposal` size in bytes (length-fee-bounded)", - " - `M` is members-count (code- and governance-bounded)", - " - branching is influenced by `threshold` where:", - " - `P1` is proposal execution complexity (`threshold < 2`)", - " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)", - "- DB:", - " - 1 storage read `is_member` (codec `O(M)`)", - " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)", - " - DB accesses influenced by `threshold`:", - " - EITHER storage accesses done by `proposal` (`threshold < 2`)", - " - OR proposal insertion (`threshold <= 2`)", - " - 1 storage mutation `Proposals` (codec `O(P2)`)", - " - 1 storage mutation `ProposalCount` (codec `O(1)`)", - " - 1 storage write `ProposalOf` (codec `O(B)`)", - " - 1 storage write `Voting` (codec `O(M)`)", - " - 1 event", - "# " - ] - }, - { - "name": "vote", - "fields": [ - { - "name": "proposal", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "index", - "type": 113, - "typeName": "ProposalIndex" - }, - { - "name": "approve", - "type": 35, - "typeName": "bool" - } - ], - "index": 3, - "docs": [ - "Add an aye or nay vote for the sender to the given proposal.", - "", - "Requires the sender to be a member.", - "", - "Transaction fees will be waived if the member is voting on any particular proposal", - "for the first time and the call is successful. Subsequent vote changes will charge a", - "fee.", - "# ", - "## Weight", - "- `O(M)` where `M` is members-count (code- and governance-bounded)", - "- DB:", - " - 1 storage read `Members` (codec `O(M)`)", - " - 1 storage mutation `Voting` (codec `O(M)`)", - "- 1 event", - "# " - ] - }, - { - "name": "close", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "index", - "type": 113, - "typeName": "ProposalIndex" - }, - { - "name": "proposal_weight_bound", - "type": 146, - "typeName": "Weight" - }, - { - "name": "length_bound", - "type": 113, - "typeName": "u32" - } - ], - "index": 4, - "docs": [ - "Close a vote that is either approved, disapproved or whose voting period has ended.", - "", - "May be called by any signed account in order to finish voting and close the proposal.", - "", - "If called before the end of the voting period it will only close the vote if it is", - "has enough votes to be approved or disapproved.", - "", - "If called after the end of the voting period abstentions are counted as rejections", - "unless there is a prime member set and the prime member cast an approval.", - "", - "If the close operation completes successfully with disapproval, the transaction fee will", - "be waived. Otherwise execution of the approved operation will be charged to the caller.", - "", - "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed", - "proposal.", - "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via", - "`storage::read` so it is `size_of::() == 4` larger than the pure length.", - "", - "# ", - "## Weight", - "- `O(B + M + P1 + P2)` where:", - " - `B` is `proposal` size in bytes (length-fee-bounded)", - " - `M` is members-count (code- and governance-bounded)", - " - `P1` is the complexity of `proposal` preimage.", - " - `P2` is proposal-count (code-bounded)", - "- DB:", - " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)", - " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec", - " `O(P2)`)", - " - any mutations done while executing `proposal` (`P1`)", - "- up to 3 events", - "# " - ] - }, - { - "name": "disapprove_proposal", - "fields": [ - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 5, - "docs": [ - "Disapprove a proposal, close, and remove it from the system, regardless of its current", - "state.", - "", - "Must be called by the Root origin.", - "", - "Parameters:", - "* `proposal_hash`: The hash of the proposal that should be disapproved.", - "", - "# ", - "Complexity: O(P) where P is the number of max proposals", - "DB Weight:", - "* Reads: Proposals", - "* Writes: Voting, Proposals, ProposalOf", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 229, - "type": { - "path": [ - "pallet_elections_phragmen", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "vote", - "fields": [ - { - "name": "votes", - "type": 40, - "typeName": "Vec" - }, - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 0, - "docs": [ - "Vote for a set of candidates for the upcoming round of election. This can be called to", - "set the initial votes, or update already existing votes.", - "", - "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is", - "reserved. The deposit is based on the number of votes and can be updated over time.", - "", - "The `votes` should:", - " - not be empty.", - " - be less than the number of possible candidates. Note that all current members and", - " runners-up are also automatically candidates for the next round.", - "", - "If `value` is more than `who`'s free balance, then the maximum of the two is used.", - "", - "The dispatch origin of this call must be signed.", - "", - "### Warning", - "", - "It is the responsibility of the caller to **NOT** place all of their balance into the", - "lock and keep some for further operations.", - "", - "# ", - "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less.", - "# " - ] - }, - { - "name": "remove_voter", - "index": 1, - "docs": [ - "Remove `origin` as a voter.", - "", - "This removes the lock and returns the deposit.", - "", - "The dispatch origin of this call must be signed and be a voter." - ] - }, - { - "name": "submit_candidacy", - "fields": [ - { - "name": "candidate_count", - "type": 113, - "typeName": "u32" - } - ], - "index": 2, - "docs": [ - "Submit oneself for candidacy. A fixed amount of deposit is recorded.", - "", - "All candidates are wiped at the end of the term. They either become a member/runner-up,", - "or leave the system while their deposit is slashed.", - "", - "The dispatch origin of this call must be signed.", - "", - "### Warning", - "", - "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]", - "to get their deposit back. Losing the spot in an election will always lead to a slash.", - "", - "# ", - "The number of current candidates must be provided as witness data.", - "# " - ] - }, - { - "name": "renounce_candidacy", - "fields": [ - { - "name": "renouncing", - "type": 230, - "typeName": "Renouncing" - } - ], - "index": 3, - "docs": [ - "Renounce one's intention to be a candidate for the next election round. 3 potential", - "outcomes exist:", - "", - "- `origin` is a candidate and not elected in any set. In this case, the deposit is", - " unreserved, returned and origin is removed as a candidate.", - "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and", - " origin is removed as a runner-up.", - "- `origin` is a current member. In this case, the deposit is unreserved and origin is", - " removed as a member, consequently not being a candidate for the next round anymore.", - " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they", - " are immediately used. If the prime is renouncing, then no prime will exist until the", - " next round.", - "", - "The dispatch origin of this call must be signed, and have one of the above roles.", - "", - "# ", - "The type of renouncing must be provided as witness data.", - "# " - ] - }, - { - "name": "remove_member", - "fields": [ - { - "name": "who", - "type": 151, - "typeName": "::Source" - }, - { - "name": "has_replacement", - "type": 35, - "typeName": "bool" - } - ], - "index": 4, - "docs": [ - "Remove a particular member from the set. This is effective immediately and the bond of", - "the outgoing member is slashed.", - "", - "If a runner-up is available, then the best runner-up will be removed and replaces the", - "outgoing member. Otherwise, a new phragmen election is started.", - "", - "The dispatch origin of this call must be root.", - "", - "Note that this does not affect the designated block number of the next election.", - "", - "# ", - "If we have a replacement, we use a small weight. Else, since this is a root call and", - "will go into phragmen, we assume full block for now.", - "# " - ] - }, - { - "name": "clean_defunct_voters", - "fields": [ - { - "name": "num_voters", - "type": 4, - "typeName": "u32" - }, - { - "name": "num_defunct", - "type": 4, - "typeName": "u32" - } - ], - "index": 5, - "docs": [ - "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The", - "deposit of the removed voters are returned.", - "", - "This is an root function to be used only for cleaning the state.", - "", - "The dispatch origin of this call must be root.", - "", - "# ", - "The total number of voters and those that are defunct must be provided as witness data.", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 230, - "type": { - "path": [ - "pallet_elections_phragmen", - "Renouncing" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Member", - "index": 0 - }, - { - "name": "RunnerUp", - "index": 1 - }, - { - "name": "Candidate", - "fields": [ - { - "type": 113, - "typeName": "u32" - } - ], - "index": 2 - } - ] - } - } - } - }, - { - "id": 231, - "type": { - "path": [ - "pallet_membership", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "add_member", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "Add a member `who` to the set.", - "", - "May only be called from `T::AddOrigin`." - ] - }, - { - "name": "remove_member", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "Remove a member `who` from the set.", - "", - "May only be called from `T::RemoveOrigin`." - ] - }, - { - "name": "swap_member", - "fields": [ - { - "name": "remove", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "add", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 2, - "docs": [ - "Swap out one member `remove` for another `add`.", - "", - "May only be called from `T::SwapOrigin`.", - "", - "Prime membership is *not* passed from `remove` to `add`, if extant." - ] - }, - { - "name": "reset_members", - "fields": [ - { - "name": "members", - "type": 40, - "typeName": "Vec" - } - ], - "index": 3, - "docs": [ - "Change the membership to a new set, disregarding the existing membership. Be nice and", - "pass `members` pre-sorted.", - "", - "May only be called from `T::ResetOrigin`." - ] - }, - { - "name": "change_key", - "fields": [ - { - "name": "new", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "Swap out the sending member for some other key `new`.", - "", - "May only be called from `Signed` origin of a current member.", - "", - "Prime membership is passed from the origin account to `new`, if extant." - ] - }, - { - "name": "set_prime", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 5, - "docs": [ - "Set the prime member. Must be a current member.", - "", - "May only be called from `T::PrimeOrigin`." - ] - }, - { - "name": "clear_prime", - "index": 6, - "docs": [ - "Remove the prime member if it exists.", - "", - "May only be called from `T::PrimeOrigin`." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 232, - "type": { - "path": [ - "pallet_grandpa", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "report_equivocation", - "fields": [ - { - "name": "equivocation_proof", - "type": 233, - "typeName": "Box>" - }, - { - "name": "key_owner_proof", - "type": 141, - "typeName": "T::KeyOwnerProof" - } - ], - "index": 0, - "docs": [ - "Report voter equivocation/misbehavior. This method will verify the", - "equivocation proof and validate the given key ownership proof", - "against the extracted offender. If both are valid, the offence", - "will be reported." - ] - }, - { - "name": "report_equivocation_unsigned", - "fields": [ - { - "name": "equivocation_proof", - "type": 233, - "typeName": "Box>" - }, - { - "name": "key_owner_proof", - "type": 141, - "typeName": "T::KeyOwnerProof" - } - ], - "index": 1, - "docs": [ - "Report voter equivocation/misbehavior. This method will verify the", - "equivocation proof and validate the given key ownership proof", - "against the extracted offender. If both are valid, the offence", - "will be reported.", - "", - "This extrinsic must be called unsigned and it is expected that only", - "block authors will call it (validated in `ValidateUnsigned`), as such", - "if the block author is defined it will be defined as the equivocation", - "reporter." - ] - }, - { - "name": "note_stalled", - "fields": [ - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "best_finalized_block_number", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 2, - "docs": [ - "Note that the current authority set of the GRANDPA finality gadget has", - "stalled. This will trigger a forced authority set change at the beginning", - "of the next session, to be enacted `delay` blocks after that. The delay", - "should be high enough to safely assume that the block signalling the", - "forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters", - "will start the new authority set using the given finalized block as base.", - "Only callable by root." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 233, - "type": { - "path": [ - "sp_finality_grandpa", - "EquivocationProof" - ], - "params": [ - { - "name": "H", - "type": 9 - }, - { - "name": "N", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "set_id", - "type": 8, - "typeName": "SetId" - }, - { - "name": "equivocation", - "type": 234, - "typeName": "Equivocation" - } - ] - } - } - } - }, - { - "id": 234, - "type": { - "path": [ - "sp_finality_grandpa", - "Equivocation" - ], - "params": [ - { - "name": "H", - "type": 9 - }, - { - "name": "N", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Prevote", - "fields": [ - { - "type": 235, - "typeName": "grandpa::Equivocation,\nAuthoritySignature>" - } - ], - "index": 0 - }, - { - "name": "Precommit", - "fields": [ - { - "type": 241, - "typeName": "grandpa::Equivocation,\nAuthoritySignature>" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 235, - "type": { - "path": [ - "finality_grandpa", - "Equivocation" - ], - "params": [ - { - "name": "Id", - "type": 53 - }, - { - "name": "V", - "type": 236 - }, - { - "name": "S", - "type": 237 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "round_number", - "type": 8, - "typeName": "u64" - }, - { - "name": "identity", - "type": 53, - "typeName": "Id" - }, - { - "name": "first", - "type": 240, - "typeName": "(V, S)" - }, - { - "name": "second", - "type": 240, - "typeName": "(V, S)" - } - ] - } - } - } - }, - { - "id": 236, - "type": { - "path": [ - "finality_grandpa", - "Prevote" - ], - "params": [ - { - "name": "H", - "type": 9 - }, - { - "name": "N", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "target_hash", - "type": 9, - "typeName": "H" - }, - { - "name": "target_number", - "type": 4, - "typeName": "N" - } - ] - } - } - } - }, - { - "id": 237, - "type": { - "path": [ - "sp_finality_grandpa", - "app", - "Signature" - ], - "def": { - "composite": { - "fields": [ - { - "type": 238, - "typeName": "ed25519::Signature" - } - ] - } - } - } - }, - { - "id": 238, - "type": { - "path": [ - "sp_core", - "ed25519", - "Signature" - ], - "def": { - "composite": { - "fields": [ - { - "type": 239, - "typeName": "[u8; 64]" - } - ] - } - } - } - }, - { - "id": 239, - "type": { - "def": { - "array": { - "len": 64, - "type": 2 - } - } - } - }, - { - "id": 240, - "type": { - "def": { - "tuple": [ - 236, - 237 - ] - } - } - }, - { - "id": 241, - "type": { - "path": [ - "finality_grandpa", - "Equivocation" - ], - "params": [ - { - "name": "Id", - "type": 53 - }, - { - "name": "V", - "type": 242 - }, - { - "name": "S", - "type": 237 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "round_number", - "type": 8, - "typeName": "u64" - }, - { - "name": "identity", - "type": 53, - "typeName": "Id" - }, - { - "name": "first", - "type": 243, - "typeName": "(V, S)" - }, - { - "name": "second", - "type": 243, - "typeName": "(V, S)" - } - ] - } - } - } - }, - { - "id": 242, - "type": { - "path": [ - "finality_grandpa", - "Precommit" - ], - "params": [ - { - "name": "H", - "type": 9 - }, - { - "name": "N", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "target_hash", - "type": 9, - "typeName": "H" - }, - { - "name": "target_number", - "type": 4, - "typeName": "N" - } - ] - } - } - } - }, - { - "id": 243, - "type": { - "def": { - "tuple": [ - 242, - 237 - ] - } - } - }, - { - "id": 244, - "type": { - "path": [ - "pallet_treasury", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "propose_spend", - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "beneficiary", - "type": 151, - "typeName": "::Source" - } - ], - "index": 0, - "docs": [ - "Put forward a suggestion for spending. A deposit proportional to the value", - "is reserved and slashed if the proposal is rejected. It is returned once the", - "proposal is awarded.", - "", - "# ", - "- Complexity: O(1)", - "- DbReads: `ProposalCount`, `origin account`", - "- DbWrites: `ProposalCount`, `Proposals`, `origin account`", - "# " - ] - }, - { - "name": "reject_proposal", - "fields": [ - { - "name": "proposal_id", - "type": 113, - "typeName": "ProposalIndex" - } - ], - "index": 1, - "docs": [ - "Reject a proposed spend. The original deposit will be slashed.", - "", - "May only be called from `T::RejectOrigin`.", - "", - "# ", - "- Complexity: O(1)", - "- DbReads: `Proposals`, `rejected proposer account`", - "- DbWrites: `Proposals`, `rejected proposer account`", - "# " - ] - }, - { - "name": "approve_proposal", - "fields": [ - { - "name": "proposal_id", - "type": 113, - "typeName": "ProposalIndex" - } - ], - "index": 2, - "docs": [ - "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", - "and the original deposit will be returned.", - "", - "May only be called from `T::ApproveOrigin`.", - "", - "# ", - "- Complexity: O(1).", - "- DbReads: `Proposals`, `Approvals`", - "- DbWrite: `Approvals`", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 245, - "type": { - "path": [ - "pallet_contracts", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "call", - "fields": [ - { - "name": "dest", - "type": 151, - "typeName": "::Source" - }, - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "gas_limit", - "type": 146, - "typeName": "Weight" - }, - { - "name": "storage_deposit_limit", - "type": 246, - "typeName": "Option< as codec::HasCompact>::Type>" - }, - { - "name": "data", - "type": 10, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Makes a call to an account, optionally transferring some balance.", - "", - "# Parameters", - "", - "* `dest`: Address of the contract to call.", - "* `value`: The balance to transfer from the `origin` to `dest`.", - "* `gas_limit`: The gas limit enforced when executing the constructor.", - "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the", - " caller to pay for the storage consumed.", - "* `data`: The input data to pass to the contract.", - "", - "* If the account is a smart-contract account, the associated code will be", - "executed and any value will be transferred.", - "* If the account is a regular account, any value will be transferred.", - "* If no account exists and the call value is not less than `existential_deposit`,", - "a regular account will be created and any value will be transferred." - ] - }, - { - "name": "instantiate_with_code", - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "gas_limit", - "type": 146, - "typeName": "Weight" - }, - { - "name": "storage_deposit_limit", - "type": 246, - "typeName": "Option< as codec::HasCompact>::Type>" - }, - { - "name": "code", - "type": 10, - "typeName": "Vec" - }, - { - "name": "data", - "type": 10, - "typeName": "Vec" - }, - { - "name": "salt", - "type": 10, - "typeName": "Vec" - } - ], - "index": 1, - "docs": [ - "Instantiates a new contract from the supplied `code` optionally transferring", - "some balance.", - "", - "This dispatchable has the same effect as calling [`Self::upload_code`] +", - "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please", - "also check the documentation of [`Self::upload_code`].", - "", - "# Parameters", - "", - "* `value`: The balance to transfer from the `origin` to the newly created contract.", - "* `gas_limit`: The gas limit enforced when executing the constructor.", - "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved", - " from the caller to pay for the storage consumed.", - "* `code`: The contract code to deploy in raw bytes.", - "* `data`: The input data to pass to the contract constructor.", - "* `salt`: Used for the address derivation. See [`Pallet::contract_address`].", - "", - "Instantiation is executed as follows:", - "", - "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that", - " code.", - "- If the `code_hash` already exists on the chain the underlying `code` will be shared.", - "- The destination address is computed based on the sender, code_hash and the salt.", - "- The smart-contract account is created at the computed address.", - "- The `value` is transferred to the new account.", - "- The `deploy` function is executed in the context of the newly-created account." - ] - }, - { - "name": "instantiate", - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "gas_limit", - "type": 146, - "typeName": "Weight" - }, - { - "name": "storage_deposit_limit", - "type": 246, - "typeName": "Option< as codec::HasCompact>::Type>" - }, - { - "name": "code_hash", - "type": 9, - "typeName": "CodeHash" - }, - { - "name": "data", - "type": 10, - "typeName": "Vec" - }, - { - "name": "salt", - "type": 10, - "typeName": "Vec" - } - ], - "index": 2, - "docs": [ - "Instantiates a contract from a previously deployed wasm binary.", - "", - "This function is identical to [`Self::instantiate_with_code`] but without the", - "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary", - "must be supplied." - ] - }, - { - "name": "upload_code", - "fields": [ - { - "name": "code", - "type": 10, - "typeName": "Vec" - }, - { - "name": "storage_deposit_limit", - "type": 246, - "typeName": "Option< as codec::HasCompact>::Type>" - } - ], - "index": 3, - "docs": [ - "Upload new `code` without instantiating a contract from it.", - "", - "If the code does not already exist a deposit is reserved from the caller", - "and unreserved only when [`Self::remove_code`] is called. The size of the reserve", - "depends on the instrumented size of the the supplied `code`.", - "", - "If the code already exists in storage it will still return `Ok` and upgrades", - "the in storage version to the current", - "[`InstructionWeights::version`](InstructionWeights).", - "", - "# Note", - "", - "Anyone can instantiate a contract from any uploaded code and thus prevent its removal.", - "To avoid this situation a constructor could employ access control so that it can", - "only be instantiated by permissioned entities. The same is true when uploading", - "through [`Self::instantiate_with_code`]." - ] - }, - { - "name": "remove_code", - "fields": [ - { - "name": "code_hash", - "type": 9, - "typeName": "CodeHash" - } - ], - "index": 4, - "docs": [ - "Remove the code stored under `code_hash` and refund the deposit to its owner.", - "", - "A code can only be removed by its original uploader (its owner) and only if it is", - "not used by any contract." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 246, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 65 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 65 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 247, - "type": { - "path": [ - "pallet_sudo", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "sudo", - "fields": [ - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 0, - "docs": [ - "Authenticates the sudo key and dispatches a function call with `Root` origin.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "# ", - "- O(1).", - "- Limited storage reads.", - "- One DB write (event).", - "- Weight of derivative `call` execution + 10,000.", - "# " - ] - }, - { - "name": "sudo_unchecked_weight", - "fields": [ - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - }, - { - "name": "weight", - "type": 8, - "typeName": "Weight" - } - ], - "index": 1, - "docs": [ - "Authenticates the sudo key and dispatches a function call with `Root` origin.", - "This function does not check the weight of the call, and instead allows the", - "Sudo user to specify the weight of the call.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "# ", - "- O(1).", - "- The weight of this call is defined by the caller.", - "# " - ] - }, - { - "name": "set_key", - "fields": [ - { - "name": "new", - "type": 151, - "typeName": "::Source" - } - ], - "index": 2, - "docs": [ - "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo", - "key.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "# ", - "- O(1).", - "- Limited storage reads.", - "- One DB change.", - "# " - ] - }, - { - "name": "sudo_as", - "fields": [ - { - "name": "who", - "type": 151, - "typeName": "::Source" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 3, - "docs": [ - "Authenticates the sudo key and dispatches a function call with `Signed` origin from", - "a given account.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "# ", - "- O(1).", - "- Limited storage reads.", - "- One DB write (event).", - "- Weight of derivative `call` execution + 10,000.", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 248, - "type": { - "path": [ - "pallet_im_online", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "heartbeat", - "fields": [ - { - "name": "heartbeat", - "type": 249, - "typeName": "Heartbeat" - }, - { - "name": "signature", - "type": 254, - "typeName": "::Signature" - } - ], - "index": 0, - "docs": [ - "# ", - "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is", - " length of `heartbeat.network_state.external_address`", - " - `O(K)`: decoding of length `K`", - " - `O(E)`: decoding/encoding of length `E`", - "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,", - " `ReceivedHeartbeats`", - "- DbWrites: `ReceivedHeartbeats`", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 249, - "type": { - "path": [ - "pallet_im_online", - "Heartbeat" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "block_number", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "network_state", - "type": 250, - "typeName": "OpaqueNetworkState" - }, - { - "name": "session_index", - "type": 4, - "typeName": "SessionIndex" - }, - { - "name": "authority_index", - "type": 4, - "typeName": "AuthIndex" - }, - { - "name": "validators_len", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 250, - "type": { - "path": [ - "sp_core", - "offchain", - "OpaqueNetworkState" - ], - "def": { - "composite": { - "fields": [ - { - "name": "peer_id", - "type": 251, - "typeName": "OpaquePeerId" - }, - { - "name": "external_addresses", - "type": 252, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 251, - "type": { - "path": [ - "sp_core", - "OpaquePeerId" - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 252, - "type": { - "def": { - "sequence": { - "type": 253 - } - } - } - }, - { - "id": 253, - "type": { - "path": [ - "sp_core", - "offchain", - "OpaqueMultiaddr" - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 254, - "type": { - "path": [ - "pallet_im_online", - "sr25519", - "app_sr25519", - "Signature" - ], - "def": { - "composite": { - "fields": [ - { - "type": 255, - "typeName": "sr25519::Signature" - } - ] - } - } - } - }, - { - "id": 255, - "type": { - "path": [ - "sp_core", - "sr25519", - "Signature" - ], - "def": { - "composite": { - "fields": [ - { - "type": 239, - "typeName": "[u8; 64]" - } - ] - } - } - } - }, - { - "id": 256, - "type": { - "path": [ - "pallet_identity", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "add_registrar", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "Add a registrar to the system.", - "", - "The dispatch origin for this call must be `T::RegistrarOrigin`.", - "", - "- `account`: the account of the registrar.", - "", - "Emits `RegistrarAdded` if successful.", - "", - "# ", - "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded).", - "- One storage mutation (codec `O(R)`).", - "- One event.", - "# " - ] - }, - { - "name": "set_identity", - "fields": [ - { - "name": "info", - "type": 257, - "typeName": "Box>" - } - ], - "index": 1, - "docs": [ - "Set an account's identity information and reserve the appropriate deposit.", - "", - "If the account already has identity information, the deposit is taken as part payment", - "for the new deposit.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `info`: The identity information.", - "", - "Emits `IdentitySet` if successful.", - "", - "# ", - "- `O(X + X' + R)`", - " - where `X` additional-field-count (deposit-bounded and code-bounded)", - " - where `R` judgements-count (registrar-count-bounded)", - "- One balance reserve operation.", - "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`).", - "- One event.", - "# " - ] - }, - { - "name": "set_subs", - "fields": [ - { - "name": "subs", - "type": 291, - "typeName": "Vec<(T::AccountId, Data)>" - } - ], - "index": 2, - "docs": [ - "Set the sub-accounts of the sender.", - "", - "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned", - "and an amount `SubAccountDeposit` will be reserved for each item in `subs`.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a registered", - "identity.", - "", - "- `subs`: The identity's (new) sub-accounts.", - "", - "# ", - "- `O(P + S)`", - " - where `P` old-subs-count (hard- and deposit-bounded).", - " - where `S` subs-count (hard- and deposit-bounded).", - "- At most one balance operations.", - "- DB:", - " - `P + S` storage mutations (codec complexity `O(1)`)", - " - One storage read (codec complexity `O(P)`).", - " - One storage write (codec complexity `O(S)`).", - " - One storage-exists (`IdentityOf::contains_key`).", - "# " - ] - }, - { - "name": "clear_identity", - "index": 3, - "docs": [ - "Clear an account's identity info and all sub-accounts and return all deposits.", - "", - "Payment: All reserved balances on the account are returned.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a registered", - "identity.", - "", - "Emits `IdentityCleared` if successful.", - "", - "# ", - "- `O(R + S + X)`", - " - where `R` registrar-count (governance-bounded).", - " - where `S` subs-count (hard- and deposit-bounded).", - " - where `X` additional-field-count (deposit-bounded and code-bounded).", - "- One balance-unreserve operation.", - "- `2` storage reads and `S + 2` storage deletions.", - "- One event.", - "# " - ] - }, - { - "name": "request_judgement", - "fields": [ - { - "name": "reg_index", - "type": 113, - "typeName": "RegistrarIndex" - }, - { - "name": "max_fee", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 4, - "docs": [ - "Request a judgement from a registrar.", - "", - "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement", - "given.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a", - "registered identity.", - "", - "- `reg_index`: The index of the registrar whose judgement is requested.", - "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:", - "", - "```nocompile", - "Self::registrars().get(reg_index).unwrap().fee", - "```", - "", - "Emits `JudgementRequested` if successful.", - "", - "# ", - "- `O(R + X)`.", - "- One balance-reserve operation.", - "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`.", - "- One event.", - "# " - ] - }, - { - "name": "cancel_request", - "fields": [ - { - "name": "reg_index", - "type": 4, - "typeName": "RegistrarIndex" - } - ], - "index": 5, - "docs": [ - "Cancel a previous request.", - "", - "Payment: A previously reserved deposit is returned on success.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a", - "registered identity.", - "", - "- `reg_index`: The index of the registrar whose judgement is no longer requested.", - "", - "Emits `JudgementUnrequested` if successful.", - "", - "# ", - "- `O(R + X)`.", - "- One balance-reserve operation.", - "- One storage mutation `O(R + X)`.", - "- One event", - "# " - ] - }, - { - "name": "set_fee", - "fields": [ - { - "name": "index", - "type": 113, - "typeName": "RegistrarIndex" - }, - { - "name": "fee", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 6, - "docs": [ - "Set the fee required for a judgement to be requested from a registrar.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must be the account", - "of the registrar whose index is `index`.", - "", - "- `index`: the index of the registrar whose fee is to be set.", - "- `fee`: the new fee.", - "", - "# ", - "- `O(R)`.", - "- One storage mutation `O(R)`.", - "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)", - "# " - ] - }, - { - "name": "set_account_id", - "fields": [ - { - "name": "index", - "type": 113, - "typeName": "RegistrarIndex" - }, - { - "name": "new", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 7, - "docs": [ - "Change the account associated with a registrar.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must be the account", - "of the registrar whose index is `index`.", - "", - "- `index`: the index of the registrar whose fee is to be set.", - "- `new`: the new account ID.", - "", - "# ", - "- `O(R)`.", - "- One storage mutation `O(R)`.", - "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)", - "# " - ] - }, - { - "name": "set_fields", - "fields": [ - { - "name": "index", - "type": 113, - "typeName": "RegistrarIndex" - }, - { - "name": "fields", - "type": 293, - "typeName": "IdentityFields" - } - ], - "index": 8, - "docs": [ - "Set the field information for a registrar.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must be the account", - "of the registrar whose index is `index`.", - "", - "- `index`: the index of the registrar whose fee is to be set.", - "- `fields`: the fields that the registrar concerns themselves with.", - "", - "# ", - "- `O(R)`.", - "- One storage mutation `O(R)`.", - "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)", - "# " - ] - }, - { - "name": "provide_judgement", - "fields": [ - { - "name": "reg_index", - "type": 113, - "typeName": "RegistrarIndex" - }, - { - "name": "target", - "type": 151, - "typeName": "::Source" - }, - { - "name": "judgement", - "type": 295, - "typeName": "Judgement>" - } - ], - "index": 9, - "docs": [ - "Provide a judgement for an account's identity.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must be the account", - "of the registrar whose index is `reg_index`.", - "", - "- `reg_index`: the index of the registrar whose judgement is being made.", - "- `target`: the account whose identity the judgement is upon. This must be an account", - " with a registered identity.", - "- `judgement`: the judgement of the registrar of index `reg_index` about `target`.", - "", - "Emits `JudgementGiven` if successful.", - "", - "# ", - "- `O(R + X)`.", - "- One balance-transfer operation.", - "- Up to one account-lookup operation.", - "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`.", - "- One event.", - "# " - ] - }, - { - "name": "kill_identity", - "fields": [ - { - "name": "target", - "type": 151, - "typeName": "::Source" - } - ], - "index": 10, - "docs": [ - "Remove an account's identity and sub-account information and slash the deposits.", - "", - "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by", - "`Slash`. Verification request deposits are not returned; they should be cancelled", - "manually using `cancel_request`.", - "", - "The dispatch origin for this call must match `T::ForceOrigin`.", - "", - "- `target`: the account whose identity the judgement is upon. This must be an account", - " with a registered identity.", - "", - "Emits `IdentityKilled` if successful.", - "", - "# ", - "- `O(R + S + X)`.", - "- One balance-reserve operation.", - "- `S + 2` storage mutations.", - "- One event.", - "# " - ] - }, - { - "name": "add_sub", - "fields": [ - { - "name": "sub", - "type": 151, - "typeName": "::Source" - }, - { - "name": "data", - "type": 260, - "typeName": "Data" - } - ], - "index": 11, - "docs": [ - "Add the given account to the sender's subs.", - "", - "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", - "to the sender.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a registered", - "sub identity of `sub`." - ] - }, - { - "name": "rename_sub", - "fields": [ - { - "name": "sub", - "type": 151, - "typeName": "::Source" - }, - { - "name": "data", - "type": 260, - "typeName": "Data" - } - ], - "index": 12, - "docs": [ - "Alter the associated name of the given sub-account.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a registered", - "sub identity of `sub`." - ] - }, - { - "name": "remove_sub", - "fields": [ - { - "name": "sub", - "type": 151, - "typeName": "::Source" - } - ], - "index": 13, - "docs": [ - "Remove the given account from the sender's subs.", - "", - "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", - "to the sender.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a registered", - "sub identity of `sub`." - ] - }, - { - "name": "quit_sub", - "index": 14, - "docs": [ - "Remove the sender as a sub-account.", - "", - "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated", - "to the sender (*not* the original depositor).", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have a registered", - "super-identity.", - "", - "NOTE: This should not normally be used, but is provided in the case that the non-", - "controller of an account is maliciously registered as a sub-account." - ] - } - ] - } - }, - "docs": [ - "Identity pallet declaration." - ] - } - }, - { - "id": 257, - "type": { - "path": [ - "pallet_identity", - "types", - "IdentityInfo" - ], - "params": [ - { - "name": "FieldLimit", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "additional", - "type": 258, - "typeName": "BoundedVec<(Data, Data), FieldLimit>" - }, - { - "name": "display", - "type": 260, - "typeName": "Data" - }, - { - "name": "legal", - "type": 260, - "typeName": "Data" - }, - { - "name": "web", - "type": 260, - "typeName": "Data" - }, - { - "name": "riot", - "type": 260, - "typeName": "Data" - }, - { - "name": "email", - "type": 260, - "typeName": "Data" - }, - { - "name": "pgp_fingerprint", - "type": 290, - "typeName": "Option<[u8; 20]>" - }, - { - "name": "image", - "type": 260, - "typeName": "Data" - }, - { - "name": "twitter", - "type": 260, - "typeName": "Data" - } - ] - } - } - } - }, - { - "id": 258, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 259 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 289, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 259, - "type": { - "def": { - "tuple": [ - 260, - 260 - ] - } - } - }, - { - "id": 260, - "type": { - "path": [ - "pallet_identity", - "types", - "Data" - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Raw0", - "fields": [ - { - "type": 261 - } - ], - "index": 1 - }, - { - "name": "Raw1", - "fields": [ - { - "type": 262 - } - ], - "index": 2 - }, - { - "name": "Raw2", - "fields": [ - { - "type": 263 - } - ], - "index": 3 - }, - { - "name": "Raw3", - "fields": [ - { - "type": 264 - } - ], - "index": 4 - }, - { - "name": "Raw4", - "fields": [ - { - "type": 14 - } - ], - "index": 5 - }, - { - "name": "Raw5", - "fields": [ - { - "type": 265 - } - ], - "index": 6 - }, - { - "name": "Raw6", - "fields": [ - { - "type": 266 - } - ], - "index": 7 - }, - { - "name": "Raw7", - "fields": [ - { - "type": 267 - } - ], - "index": 8 - }, - { - "name": "Raw8", - "fields": [ - { - "type": 130 - } - ], - "index": 9 - }, - { - "name": "Raw9", - "fields": [ - { - "type": 268 - } - ], - "index": 10 - }, - { - "name": "Raw10", - "fields": [ - { - "type": 269 - } - ], - "index": 11 - }, - { - "name": "Raw11", - "fields": [ - { - "type": 270 - } - ], - "index": 12 - }, - { - "name": "Raw12", - "fields": [ - { - "type": 271 - } - ], - "index": 13 - }, - { - "name": "Raw13", - "fields": [ - { - "type": 272 - } - ], - "index": 14 - }, - { - "name": "Raw14", - "fields": [ - { - "type": 273 - } - ], - "index": 15 - }, - { - "name": "Raw15", - "fields": [ - { - "type": 274 - } - ], - "index": 16 - }, - { - "name": "Raw16", - "fields": [ - { - "type": 69 - } - ], - "index": 17 - }, - { - "name": "Raw17", - "fields": [ - { - "type": 275 - } - ], - "index": 18 - }, - { - "name": "Raw18", - "fields": [ - { - "type": 276 - } - ], - "index": 19 - }, - { - "name": "Raw19", - "fields": [ - { - "type": 277 - } - ], - "index": 20 - }, - { - "name": "Raw20", - "fields": [ - { - "type": 152 - } - ], - "index": 21 - }, - { - "name": "Raw21", - "fields": [ - { - "type": 278 - } - ], - "index": 22 - }, - { - "name": "Raw22", - "fields": [ - { - "type": 279 - } - ], - "index": 23 - }, - { - "name": "Raw23", - "fields": [ - { - "type": 280 - } - ], - "index": 24 - }, - { - "name": "Raw24", - "fields": [ - { - "type": 281 - } - ], - "index": 25 - }, - { - "name": "Raw25", - "fields": [ - { - "type": 282 - } - ], - "index": 26 - }, - { - "name": "Raw26", - "fields": [ - { - "type": 283 - } - ], - "index": 27 - }, - { - "name": "Raw27", - "fields": [ - { - "type": 284 - } - ], - "index": 28 - }, - { - "name": "Raw28", - "fields": [ - { - "type": 285 - } - ], - "index": 29 - }, - { - "name": "Raw29", - "fields": [ - { - "type": 286 - } - ], - "index": 30 - }, - { - "name": "Raw30", - "fields": [ - { - "type": 287 - } - ], - "index": 31 - }, - { - "name": "Raw31", - "fields": [ - { - "type": 288 - } - ], - "index": 32 - }, - { - "name": "Raw32", - "fields": [ - { - "type": 1 - } - ], - "index": 33 - }, - { - "name": "BlakeTwo256", - "fields": [ - { - "type": 1 - } - ], - "index": 34 - }, - { - "name": "Sha256", - "fields": [ - { - "type": 1 - } - ], - "index": 35 - }, - { - "name": "Keccak256", - "fields": [ - { - "type": 1 - } - ], - "index": 36 - }, - { - "name": "ShaThree256", - "fields": [ - { - "type": 1 - } - ], - "index": 37 - } - ] - } - } - } - }, - { - "id": 261, - "type": { - "def": { - "array": { - "len": 0, - "type": 2 - } - } - } - }, - { - "id": 262, - "type": { - "def": { - "array": { - "len": 1, - "type": 2 - } - } - } - }, - { - "id": 263, - "type": { - "def": { - "array": { - "len": 2, - "type": 2 - } - } - } - }, - { - "id": 264, - "type": { - "def": { - "array": { - "len": 3, - "type": 2 - } - } - } - }, - { - "id": 265, - "type": { - "def": { - "array": { - "len": 5, - "type": 2 - } - } - } - }, - { - "id": 266, - "type": { - "def": { - "array": { - "len": 6, - "type": 2 - } - } - } - }, - { - "id": 267, - "type": { - "def": { - "array": { - "len": 7, - "type": 2 - } - } - } - }, - { - "id": 268, - "type": { - "def": { - "array": { - "len": 9, - "type": 2 - } - } - } - }, - { - "id": 269, - "type": { - "def": { - "array": { - "len": 10, - "type": 2 - } - } - } - }, - { - "id": 270, - "type": { - "def": { - "array": { - "len": 11, - "type": 2 - } - } - } - }, - { - "id": 271, - "type": { - "def": { - "array": { - "len": 12, - "type": 2 - } - } - } - }, - { - "id": 272, - "type": { - "def": { - "array": { - "len": 13, - "type": 2 - } - } - } - }, - { - "id": 273, - "type": { - "def": { - "array": { - "len": 14, - "type": 2 - } - } - } - }, - { - "id": 274, - "type": { - "def": { - "array": { - "len": 15, - "type": 2 - } - } - } - }, - { - "id": 275, - "type": { - "def": { - "array": { - "len": 17, - "type": 2 - } - } - } - }, - { - "id": 276, - "type": { - "def": { - "array": { - "len": 18, - "type": 2 - } - } - } - }, - { - "id": 277, - "type": { - "def": { - "array": { - "len": 19, - "type": 2 - } - } - } - }, - { - "id": 278, - "type": { - "def": { - "array": { - "len": 21, - "type": 2 - } - } - } - }, - { - "id": 279, - "type": { - "def": { - "array": { - "len": 22, - "type": 2 - } - } - } - }, - { - "id": 280, - "type": { - "def": { - "array": { - "len": 23, - "type": 2 - } - } - } - }, - { - "id": 281, - "type": { - "def": { - "array": { - "len": 24, - "type": 2 - } - } - } - }, - { - "id": 282, - "type": { - "def": { - "array": { - "len": 25, - "type": 2 - } - } - } - }, - { - "id": 283, - "type": { - "def": { - "array": { - "len": 26, - "type": 2 - } - } - } - }, - { - "id": 284, - "type": { - "def": { - "array": { - "len": 27, - "type": 2 - } - } - } - }, - { - "id": 285, - "type": { - "def": { - "array": { - "len": 28, - "type": 2 - } - } - } - }, - { - "id": 286, - "type": { - "def": { - "array": { - "len": 29, - "type": 2 - } - } - } - }, - { - "id": 287, - "type": { - "def": { - "array": { - "len": 30, - "type": 2 - } - } - } - }, - { - "id": 288, - "type": { - "def": { - "array": { - "len": 31, - "type": 2 - } - } - } - }, - { - "id": 289, - "type": { - "def": { - "sequence": { - "type": 259 - } - } - } - }, - { - "id": 290, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 152 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 152 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 291, - "type": { - "def": { - "sequence": { - "type": 292 - } - } - } - }, - { - "id": 292, - "type": { - "def": { - "tuple": [ - 0, - 260 - ] - } - } - }, - { - "id": 293, - "type": { - "path": [ - "pallet_identity", - "types", - "BitFlags" - ], - "params": [ - { - "name": "T", - "type": 294 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 8, - "typeName": "IdentityField" - } - ] - } - } - } - }, - { - "id": 294, - "type": { - "path": [ - "pallet_identity", - "types", - "IdentityField" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Display", - "index": 1 - }, - { - "name": "Legal", - "index": 2 - }, - { - "name": "Web", - "index": 4 - }, - { - "name": "Riot", - "index": 8 - }, - { - "name": "Email", - "index": 16 - }, - { - "name": "PgpFingerprint", - "index": 32 - }, - { - "name": "Image", - "index": 64 - }, - { - "name": "Twitter", - "index": 128 - } - ] - } - } - } - }, - { - "id": 295, - "type": { - "path": [ - "pallet_identity", - "types", - "Judgement" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Unknown", - "index": 0 - }, - { - "name": "FeePaid", - "fields": [ - { - "type": 6, - "typeName": "Balance" - } - ], - "index": 1 - }, - { - "name": "Reasonable", - "index": 2 - }, - { - "name": "KnownGood", - "index": 3 - }, - { - "name": "OutOfDate", - "index": 4 - }, - { - "name": "LowQuality", - "index": 5 - }, - { - "name": "Erroneous", - "index": 6 - } - ] - } - } - } - }, - { - "id": 296, - "type": { - "path": [ - "pallet_society", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "bid", - "fields": [ - { - "name": "value", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 0, - "docs": [ - "A user outside of the society can make a bid for entry.", - "", - "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned", - "when the bid becomes a member, or if the bid calls `unbid`.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `value`: A one time payment the bid would like to receive when joining the society.", - "", - "# ", - "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)", - "- Storage Reads:", - "\t- One storage read to check for suspended candidate. O(1)", - "\t- One storage read to check for suspended member. O(1)", - "\t- One storage read to retrieve all current bids. O(B)", - "\t- One storage read to retrieve all current candidates. O(C)", - "\t- One storage read to retrieve all members. O(M)", - "- Storage Writes:", - "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization", - " w/ read)", - "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", - "- Notable Computation:", - "\t- O(B + C + log M) search to check user is not already a part of society.", - "\t- O(log B) search to insert the new bid sorted.", - "- External Pallet Operations:", - "\t- One balance reserve operation. O(X)", - "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", - "- Events:", - "\t- One event for new bid.", - "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", - "", - "Total Complexity: O(M + B + C + logM + logB + X)", - "# " - ] - }, - { - "name": "unbid", - "fields": [ - { - "name": "pos", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "A bidder can remove their bid for entry into society.", - "By doing so, they will have their candidate deposit returned or", - "they will unvouch their voucher.", - "", - "Payment: The bid deposit is unreserved if the user made a bid.", - "", - "The dispatch origin for this call must be _Signed_ and a bidder.", - "", - "Parameters:", - "- `pos`: Position in the `Bids` vector of the bid who wants to unbid.", - "", - "# ", - "Key: B (len of bids), X (balance unreserve)", - "- One storage read and write to retrieve and update the bids. O(B)", - "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)", - "- One event.", - "", - "Total Complexity: O(B + X)", - "# " - ] - }, - { - "name": "vouch", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "value", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "tip", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "As a member, vouch for someone to join society by placing a bid on their behalf.", - "", - "There is no deposit required to vouch for a new bid, but a member can only vouch for", - "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by", - "the suspension judgement origin, the member will be banned from vouching again.", - "", - "As a vouching member, you can claim a tip if the candidate is accepted. This tip will", - "be paid as a portion of the reward the member will receive for joining the society.", - "", - "The dispatch origin for this call must be _Signed_ and a member.", - "", - "Parameters:", - "- `who`: The user who you would like to vouch for.", - "- `value`: The total reward to be paid between you and the candidate if they become", - "a member in the society.", - "- `tip`: Your cut of the total `value` payout when the candidate is inducted into", - "the society. Tips larger than `value` will be saturated upon payout.", - "", - "# ", - "Key: B (len of bids), C (len of candidates), M (len of members)", - "- Storage Reads:", - "\t- One storage read to retrieve all members. O(M)", - "\t- One storage read to check member is not already vouching. O(1)", - "\t- One storage read to check for suspended candidate. O(1)", - "\t- One storage read to check for suspended member. O(1)", - "\t- One storage read to retrieve all current bids. O(B)", - "\t- One storage read to retrieve all current candidates. O(C)", - "- Storage Writes:", - "\t- One storage write to insert vouching status to the member. O(1)", - "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization", - " w/ read)", - "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)", - "- Notable Computation:", - "\t- O(log M) search to check sender is a member.", - "\t- O(B + C + log M) search to check user is not already a part of society.", - "\t- O(log B) search to insert the new bid sorted.", - "- External Pallet Operations:", - "\t- One balance reserve operation. O(X)", - "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.", - "- Events:", - "\t- One event for vouch.", - "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT.", - "", - "Total Complexity: O(M + B + C + logM + logB + X)", - "# " - ] - }, - { - "name": "unvouch", - "fields": [ - { - "name": "pos", - "type": 4, - "typeName": "u32" - } - ], - "index": 3, - "docs": [ - "As a vouching member, unvouch a bid. This only works while vouched user is", - "only a bidder (and not a candidate).", - "", - "The dispatch origin for this call must be _Signed_ and a vouching member.", - "", - "Parameters:", - "- `pos`: Position in the `Bids` vector of the bid who should be unvouched.", - "", - "# ", - "Key: B (len of bids)", - "- One storage read O(1) to check the signer is a vouching member.", - "- One storage mutate to retrieve and update the bids. O(B)", - "- One vouching storage removal. O(1)", - "- One event.", - "", - "Total Complexity: O(B)", - "# " - ] - }, - { - "name": "vote", - "fields": [ - { - "name": "candidate", - "type": 151, - "typeName": "::Source" - }, - { - "name": "approve", - "type": 35, - "typeName": "bool" - } - ], - "index": 4, - "docs": [ - "As a member, vote on a candidate.", - "", - "The dispatch origin for this call must be _Signed_ and a member.", - "", - "Parameters:", - "- `candidate`: The candidate that the member would like to bid on.", - "- `approve`: A boolean which says if the candidate should be approved (`true`) or", - " rejected (`false`).", - "", - "# ", - "Key: C (len of candidates), M (len of members)", - "- One storage read O(M) and O(log M) search to check user is a member.", - "- One account lookup.", - "- One storage read O(C) and O(C) search to check that user is a candidate.", - "- One storage write to add vote to votes. O(1)", - "- One event.", - "", - "Total Complexity: O(M + logM + C)", - "# " - ] - }, - { - "name": "defender_vote", - "fields": [ - { - "name": "approve", - "type": 35, - "typeName": "bool" - } - ], - "index": 5, - "docs": [ - "As a member, vote on the defender.", - "", - "The dispatch origin for this call must be _Signed_ and a member.", - "", - "Parameters:", - "- `approve`: A boolean which says if the candidate should be", - "approved (`true`) or rejected (`false`).", - "", - "# ", - "- Key: M (len of members)", - "- One storage read O(M) and O(log M) search to check user is a member.", - "- One storage write to add vote to votes. O(1)", - "- One event.", - "", - "Total Complexity: O(M + logM)", - "# " - ] - }, - { - "name": "payout", - "index": 6, - "docs": [ - "Transfer the first matured payout for the sender and remove it from the records.", - "", - "NOTE: This extrinsic needs to be called multiple times to claim multiple matured", - "payouts.", - "", - "Payment: The member will receive a payment equal to their first matured", - "payout to their free balance.", - "", - "The dispatch origin for this call must be _Signed_ and a member with", - "payouts remaining.", - "", - "# ", - "Key: M (len of members), P (number of payouts for a particular member)", - "- One storage read O(M) and O(log M) search to check signer is a member.", - "- One storage read O(P) to get all payouts for a member.", - "- One storage read O(1) to get the current block number.", - "- One currency transfer call. O(X)", - "- One storage write or removal to update the member's payouts. O(P)", - "", - "Total Complexity: O(M + logM + P + X)", - "# " - ] - }, - { - "name": "found", - "fields": [ - { - "name": "founder", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "max_members", - "type": 4, - "typeName": "u32" - }, - { - "name": "rules", - "type": 10, - "typeName": "Vec" - } - ], - "index": 7, - "docs": [ - "Found the society.", - "", - "This is done as a discrete action in order to allow for the", - "pallet to be included into a running chain and can only be done once.", - "", - "The dispatch origin for this call must be from the _FounderSetOrigin_.", - "", - "Parameters:", - "- `founder` - The first member and head of the newly founded society.", - "- `max_members` - The initial max number of members for the society.", - "- `rules` - The rules of this society concerning membership.", - "", - "# ", - "- Two storage mutates to set `Head` and `Founder`. O(1)", - "- One storage write to add the first member to society. O(1)", - "- One event.", - "", - "Total Complexity: O(1)", - "# " - ] - }, - { - "name": "unfound", - "index": 8, - "docs": [ - "Annul the founding of the society.", - "", - "The dispatch origin for this call must be Signed, and the signing account must be both", - "the `Founder` and the `Head`. This implies that it may only be done when there is one", - "member.", - "", - "# ", - "- Two storage reads O(1).", - "- Four storage removals O(1).", - "- One event.", - "", - "Total Complexity: O(1)", - "# " - ] - }, - { - "name": "judge_suspended_member", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "forgive", - "type": 35, - "typeName": "bool" - } - ], - "index": 9, - "docs": [ - "Allow suspension judgement origin to make judgement on a suspended member.", - "", - "If a suspended member is forgiven, we simply add them back as a member, not affecting", - "any of the existing storage items for that member.", - "", - "If a suspended member is rejected, remove all associated storage items, including", - "their payouts, and remove any vouched bids they currently have.", - "", - "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", - "", - "Parameters:", - "- `who` - The suspended member to be judged.", - "- `forgive` - A boolean representing whether the suspension judgement origin forgives", - " (`true`) or rejects (`false`) a suspended member.", - "", - "# ", - "Key: B (len of bids), M (len of members)", - "- One storage read to check `who` is a suspended member. O(1)", - "- Up to one storage write O(M) with O(log M) binary search to add a member back to", - " society.", - "- Up to 3 storage removals O(1) to clean up a removed member.", - "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids.", - "- Up to one additional event if unvouch takes place.", - "- One storage removal. O(1)", - "- One event for the judgement.", - "", - "Total Complexity: O(M + logM + B)", - "# " - ] - }, - { - "name": "judge_suspended_candidate", - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "judgement", - "type": 297, - "typeName": "Judgement" - } - ], - "index": 10, - "docs": [ - "Allow suspended judgement origin to make judgement on a suspended candidate.", - "", - "If the judgement is `Approve`, we add them to society as a member with the appropriate", - "payment for joining society.", - "", - "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back", - "to the society treasury, or we ban the voucher from vouching again.", - "", - "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go", - "through the induction process again.", - "", - "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_.", - "", - "Parameters:", - "- `who` - The suspended candidate to be judged.", - "- `judgement` - `Approve`, `Reject`, or `Rebid`.", - "", - "# ", - "Key: B (len of bids), M (len of members), X (balance action)", - "- One storage read to check `who` is a suspended candidate.", - "- One storage removal of the suspended candidate.", - "- Approve Logic", - "\t- One storage read to get the available pot to pay users with. O(1)", - "\t- One storage write to update the available pot. O(1)", - "\t- One storage read to get the current block number. O(1)", - "\t- One storage read to get all members. O(M)", - "\t- Up to one unreserve currency action.", - "\t- Up to two new storage writes to payouts.", - "\t- Up to one storage write with O(log M) binary search to add a member to society.", - "- Reject Logic", - "\t- Up to one repatriate reserved currency action. O(X)", - "\t- Up to one storage write to ban the vouching member from vouching again.", - "- Rebid Logic", - "\t- Storage mutate with O(log B) binary search to place the user back into bids.", - "- Up to one additional event if unvouch takes place.", - "- One storage removal.", - "- One event for the judgement.", - "", - "Total Complexity: O(M + logM + B + X)", - "# " - ] - }, - { - "name": "set_max_members", - "fields": [ - { - "name": "max", - "type": 4, - "typeName": "u32" - } - ], - "index": 11, - "docs": [ - "Allows root origin to change the maximum number of members in society.", - "Max membership count must be greater than 1.", - "", - "The dispatch origin for this call must be from _ROOT_.", - "", - "Parameters:", - "- `max` - The maximum number of members for the society.", - "", - "# ", - "- One storage write to update the max. O(1)", - "- One event.", - "", - "Total Complexity: O(1)", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 297, - "type": { - "path": [ - "pallet_society", - "Judgement" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Rebid", - "index": 0 - }, - { - "name": "Reject", - "index": 1 - }, - { - "name": "Approve", - "index": 2 - } - ] - } - } - } - }, - { - "id": 298, - "type": { - "path": [ - "pallet_recovery", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "as_recovered", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 0, - "docs": [ - "Send a call through a recovered account.", - "", - "The dispatch origin for this call must be _Signed_ and registered to", - "be able to make calls on behalf of the recovered account.", - "", - "Parameters:", - "- `account`: The recovered account you want to make a call on-behalf-of.", - "- `call`: The call you want to make with the recovered account.", - "", - "# ", - "- The weight of the `call` + 10,000.", - "- One storage lookup to check account is recovered by `who`. O(1)", - "# " - ] - }, - { - "name": "set_recovered", - "fields": [ - { - "name": "lost", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "rescuer", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "Allow ROOT to bypass the recovery process and set an a rescuer account", - "for a lost account directly.", - "", - "The dispatch origin for this call must be _ROOT_.", - "", - "Parameters:", - "- `lost`: The \"lost account\" to be recovered.", - "- `rescuer`: The \"rescuer account\" which can call as the lost account.", - "", - "# ", - "- One storage write O(1)", - "- One event", - "# " - ] - }, - { - "name": "create_recovery", - "fields": [ - { - "name": "friends", - "type": 40, - "typeName": "Vec" - }, - { - "name": "threshold", - "type": 81, - "typeName": "u16" - }, - { - "name": "delay_period", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 2, - "docs": [ - "Create a recovery configuration for your account. This makes your account recoverable.", - "", - "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance", - "will be reserved for storing the recovery configuration. This deposit is returned", - "in full when the user calls `remove_recovery`.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be", - " ordered and contain no duplicate values.", - "- `threshold`: The number of friends that must vouch for a recovery attempt before the", - " account can be recovered. Should be less than or equal to the length of the list of", - " friends.", - "- `delay_period`: The number of blocks after a recovery attempt is initialized that", - " needs to pass before the account can be recovered.", - "", - "# ", - "- Key: F (len of friends)", - "- One storage read to check that account is not already recoverable. O(1).", - "- A check that the friends list is sorted and unique. O(F)", - "- One currency reserve operation. O(X)", - "- One storage write. O(1). Codec O(F).", - "- One event.", - "", - "Total Complexity: O(F + X)", - "# " - ] - }, - { - "name": "initiate_recovery", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "Initiate the process for recovering a recoverable account.", - "", - "Payment: `RecoveryDeposit` balance will be reserved for initiating the", - "recovery process. This deposit will always be repatriated to the account", - "trying to be recovered. See `close_recovery`.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `account`: The lost account that you want to recover. This account needs to be", - " recoverable (i.e. have a recovery configuration).", - "", - "# ", - "- One storage read to check that account is recoverable. O(F)", - "- One storage read to check that this recovery process hasn't already started. O(1)", - "- One currency reserve operation. O(X)", - "- One storage read to get the current block number. O(1)", - "- One storage write. O(1).", - "- One event.", - "", - "Total Complexity: O(F + X)", - "# " - ] - }, - { - "name": "vouch_recovery", - "fields": [ - { - "name": "lost", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "rescuer", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 4, - "docs": [ - "Allow a \"friend\" of a recoverable account to vouch for an active recovery", - "process for that account.", - "", - "The dispatch origin for this call must be _Signed_ and must be a \"friend\"", - "for the recoverable account.", - "", - "Parameters:", - "- `lost`: The lost account that you want to recover.", - "- `rescuer`: The account trying to rescue the lost account that you want to vouch for.", - "", - "The combination of these two parameters must point to an active recovery", - "process.", - "", - "# ", - "Key: F (len of friends in config), V (len of vouching friends)", - "- One storage read to get the recovery configuration. O(1), Codec O(F)", - "- One storage read to get the active recovery process. O(1), Codec O(V)", - "- One binary search to confirm caller is a friend. O(logF)", - "- One binary search to confirm caller has not already vouched. O(logV)", - "- One storage write. O(1), Codec O(V).", - "- One event.", - "", - "Total Complexity: O(F + logF + V + logV)", - "# " - ] - }, - { - "name": "claim_recovery", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 5, - "docs": [ - "Allow a successful rescuer to claim their recovered account.", - "", - "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\"", - "who has successfully completed the account recovery process: collected", - "`threshold` or more vouches, waited `delay_period` blocks since initiation.", - "", - "Parameters:", - "- `account`: The lost account that you want to claim has been successfully recovered by", - " you.", - "", - "# ", - "Key: F (len of friends in config), V (len of vouching friends)", - "- One storage read to get the recovery configuration. O(1), Codec O(F)", - "- One storage read to get the active recovery process. O(1), Codec O(V)", - "- One storage read to get the current block number. O(1)", - "- One storage write. O(1), Codec O(V).", - "- One event.", - "", - "Total Complexity: O(F + V)", - "# " - ] - }, - { - "name": "close_recovery", - "fields": [ - { - "name": "rescuer", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 6, - "docs": [ - "As the controller of a recoverable account, close an active recovery", - "process for your account.", - "", - "Payment: By calling this function, the recoverable account will receive", - "the recovery deposit `RecoveryDeposit` placed by the rescuer.", - "", - "The dispatch origin for this call must be _Signed_ and must be a", - "recoverable account with an active recovery process for it.", - "", - "Parameters:", - "- `rescuer`: The account trying to rescue this recoverable account.", - "", - "# ", - "Key: V (len of vouching friends)", - "- One storage read/remove to get the active recovery process. O(1), Codec O(V)", - "- One balance call to repatriate reserved. O(X)", - "- One event.", - "", - "Total Complexity: O(V + X)", - "# " - ] - }, - { - "name": "remove_recovery", - "index": 7, - "docs": [ - "Remove the recovery process for your account. Recovered accounts are still accessible.", - "", - "NOTE: The user must make sure to call `close_recovery` on all active", - "recovery attempts before calling this function else it will fail.", - "", - "Payment: By calling this function the recoverable account will unreserve", - "their recovery configuration deposit.", - "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)", - "", - "The dispatch origin for this call must be _Signed_ and must be a", - "recoverable account (i.e. has a recovery configuration).", - "", - "# ", - "Key: F (len of friends)", - "- One storage read to get the prefix iterator for active recoveries. O(1)", - "- One storage read/remove to get the recovery configuration. O(1), Codec O(F)", - "- One balance call to unreserved. O(X)", - "- One event.", - "", - "Total Complexity: O(F + X)", - "# " - ] - }, - { - "name": "cancel_recovered", - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 8, - "docs": [ - "Cancel the ability to use `as_recovered` for `account`.", - "", - "The dispatch origin for this call must be _Signed_ and registered to", - "be able to make calls on behalf of the recovered account.", - "", - "Parameters:", - "- `account`: The recovered account you are able to call on-behalf-of.", - "", - "# ", - "- One storage mutation to check account is recovered by `who`. O(1)", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 299, - "type": { - "path": [ - "pallet_vesting", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "vest", - "index": 0, - "docs": [ - "Unlock any vested funds of the sender account.", - "", - "The dispatch origin for this call must be _Signed_ and the sender must have funds still", - "locked under this pallet.", - "", - "Emits either `VestingCompleted` or `VestingUpdated`.", - "", - "# ", - "- `O(1)`.", - "- DbWeight: 2 Reads, 2 Writes", - " - Reads: Vesting Storage, Balances Locks, [Sender Account]", - " - Writes: Vesting Storage, Balances Locks, [Sender Account]", - "# " - ] - }, - { - "name": "vest_other", - "fields": [ - { - "name": "target", - "type": 151, - "typeName": "::Source" - } - ], - "index": 1, - "docs": [ - "Unlock any vested funds of a `target` account.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `target`: The account whose vested funds should be unlocked. Must have funds still", - "locked under this pallet.", - "", - "Emits either `VestingCompleted` or `VestingUpdated`.", - "", - "# ", - "- `O(1)`.", - "- DbWeight: 3 Reads, 3 Writes", - " - Reads: Vesting Storage, Balances Locks, Target Account", - " - Writes: Vesting Storage, Balances Locks, Target Account", - "# " - ] - }, - { - "name": "vested_transfer", - "fields": [ - { - "name": "target", - "type": 151, - "typeName": "::Source" - }, - { - "name": "schedule", - "type": 300, - "typeName": "VestingInfo, T::BlockNumber>" - } - ], - "index": 2, - "docs": [ - "Create a vested transfer.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `target`: The account receiving the vested funds.", - "- `schedule`: The vesting schedule attached to the transfer.", - "", - "Emits `VestingCreated`.", - "", - "NOTE: This will unlock all schedules through the current block.", - "", - "# ", - "- `O(1)`.", - "- DbWeight: 3 Reads, 3 Writes", - " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]", - " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]", - "# " - ] - }, - { - "name": "force_vested_transfer", - "fields": [ - { - "name": "source", - "type": 151, - "typeName": "::Source" - }, - { - "name": "target", - "type": 151, - "typeName": "::Source" - }, - { - "name": "schedule", - "type": 300, - "typeName": "VestingInfo, T::BlockNumber>" - } - ], - "index": 3, - "docs": [ - "Force a vested transfer.", - "", - "The dispatch origin for this call must be _Root_.", - "", - "- `source`: The account whose funds should be transferred.", - "- `target`: The account that should be transferred the vested funds.", - "- `schedule`: The vesting schedule attached to the transfer.", - "", - "Emits `VestingCreated`.", - "", - "NOTE: This will unlock all schedules through the current block.", - "", - "# ", - "- `O(1)`.", - "- DbWeight: 4 Reads, 4 Writes", - " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account", - " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account", - "# " - ] - }, - { - "name": "merge_schedules", - "fields": [ - { - "name": "schedule1_index", - "type": 4, - "typeName": "u32" - }, - { - "name": "schedule2_index", - "type": 4, - "typeName": "u32" - } - ], - "index": 4, - "docs": [ - "Merge two vesting schedules together, creating a new vesting schedule that unlocks over", - "the highest possible start and end blocks. If both schedules have already started the", - "current block will be used as the schedule start; with the caveat that if one schedule", - "is finished by the current block, the other will be treated as the new merged schedule,", - "unmodified.", - "", - "NOTE: If `schedule1_index == schedule2_index` this is a no-op.", - "NOTE: This will unlock all schedules through the current block prior to merging.", - "NOTE: If both schedules have ended by the current block, no new schedule will be created", - "and both will be removed.", - "", - "Merged schedule attributes:", - "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,", - " current_block)`.", - "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.", - "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `schedule1_index`: index of the first schedule to merge.", - "- `schedule2_index`: index of the second schedule to merge." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 300, - "type": { - "path": [ - "pallet_vesting", - "vesting_info", - "VestingInfo" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "locked", - "type": 6, - "typeName": "Balance" - }, - { - "name": "per_block", - "type": 6, - "typeName": "Balance" - }, - { - "name": "starting_block", - "type": 4, - "typeName": "BlockNumber" - } - ] - } - } - } - }, - { - "id": 301, - "type": { - "path": [ - "pallet_scheduler", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "schedule", - "fields": [ - { - "name": "when", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "maybe_periodic", - "type": 302, - "typeName": "Option>" - }, - { - "name": "priority", - "type": 2, - "typeName": "schedule::Priority" - }, - { - "name": "call", - "type": 303, - "typeName": "Box>" - } - ], - "index": 0, - "docs": [ - "Anonymously schedule a task." - ] - }, - { - "name": "cancel", - "fields": [ - { - "name": "when", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Cancel an anonymously scheduled task." - ] - }, - { - "name": "schedule_named", - "fields": [ - { - "name": "id", - "type": 10, - "typeName": "Vec" - }, - { - "name": "when", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "maybe_periodic", - "type": 302, - "typeName": "Option>" - }, - { - "name": "priority", - "type": 2, - "typeName": "schedule::Priority" - }, - { - "name": "call", - "type": 303, - "typeName": "Box>" - } - ], - "index": 2, - "docs": [ - "Schedule a named task." - ] - }, - { - "name": "cancel_named", - "fields": [ - { - "name": "id", - "type": 10, - "typeName": "Vec" - } - ], - "index": 3, - "docs": [ - "Cancel a named scheduled task." - ] - }, - { - "name": "schedule_after", - "fields": [ - { - "name": "after", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "maybe_periodic", - "type": 302, - "typeName": "Option>" - }, - { - "name": "priority", - "type": 2, - "typeName": "schedule::Priority" - }, - { - "name": "call", - "type": 303, - "typeName": "Box>" - } - ], - "index": 4, - "docs": [ - "Anonymously schedule a task after a delay.", - "", - "# ", - "Same as [`schedule`].", - "# " - ] - }, - { - "name": "schedule_named_after", - "fields": [ - { - "name": "id", - "type": 10, - "typeName": "Vec" - }, - { - "name": "after", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "maybe_periodic", - "type": 302, - "typeName": "Option>" - }, - { - "name": "priority", - "type": 2, - "typeName": "schedule::Priority" - }, - { - "name": "call", - "type": 303, - "typeName": "Box>" - } - ], - "index": 5, - "docs": [ - "Schedule a named task after a delay.", - "", - "# ", - "Same as [`schedule_named`](Self::schedule_named).", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 302, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 75 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 75 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 303, - "type": { - "path": [ - "frame_support", - "traits", - "schedule", - "MaybeHashed" - ], - "params": [ - { - "name": "T", - "type": 134 - }, - { - "name": "Hash", - "type": 9 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Value", - "fields": [ - { - "type": 134, - "typeName": "T" - } - ], - "index": 0 - }, - { - "name": "Hash", - "fields": [ - { - "type": 9, - "typeName": "Hash" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 304, - "type": { - "path": [ - "pallet_preimage", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "note_preimage", - "fields": [ - { - "name": "bytes", - "type": 10, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Register a preimage on-chain.", - "", - "If the preimage was previously requested, no fees or deposits are taken for providing", - "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage." - ] - }, - { - "name": "unnote_preimage", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 1, - "docs": [ - "Clear an unrequested preimage from the runtime storage." - ] - }, - { - "name": "request_preimage", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 2, - "docs": [ - "Request a preimage be uploaded to the chain without paying any fees or deposits.", - "", - "If the preimage requests has already been provided on-chain, we unreserve any deposit", - "a user may have paid, and take the control of the preimage out of their hands." - ] - }, - { - "name": "unrequest_preimage", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 3, - "docs": [ - "Clear a previously made request for a preimage.", - "", - "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 305, - "type": { - "path": [ - "pallet_proxy", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "proxy", - "fields": [ - { - "name": "real", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "force_proxy_type", - "type": 306, - "typeName": "Option" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 0, - "docs": [ - "Dispatch the given `call` from an account that the sender is authorised for through", - "`add_proxy`.", - "", - "Removes any corresponding announcement(s).", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `real`: The account that the proxy will make a call on behalf of.", - "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", - "- `call`: The call to be made by the `real` account.", - "", - "# ", - "Weight is a function of the number of proxies the user has (P).", - "# " - ] - }, - { - "name": "add_proxy", - "fields": [ - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 1, - "docs": [ - "Register a proxy account for the sender that is able to make calls on its behalf.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `proxy`: The account that the `caller` would like to make a proxy.", - "- `proxy_type`: The permissions allowed for this proxy account.", - "- `delay`: The announcement period required of the initial proxy. Will generally be", - "zero.", - "", - "# ", - "Weight is a function of the number of proxies the user has (P).", - "# " - ] - }, - { - "name": "remove_proxy", - "fields": [ - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - } - ], - "index": 2, - "docs": [ - "Unregister a proxy account for the sender.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `proxy`: The account that the `caller` would like to remove as a proxy.", - "- `proxy_type`: The permissions currently enabled for the removed proxy account.", - "", - "# ", - "Weight is a function of the number of proxies the user has (P).", - "# " - ] - }, - { - "name": "remove_proxies", - "index": 3, - "docs": [ - "Unregister all proxy accounts for the sender.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "WARNING: This may be called on accounts created by `anonymous`, however if done, then", - "the unreserved fees will be inaccessible. **All access to this account will be lost.**", - "", - "# ", - "Weight is a function of the number of proxies the user has (P).", - "# " - ] - }, - { - "name": "anonymous", - "fields": [ - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "index", - "type": 81, - "typeName": "u16" - } - ], - "index": 4, - "docs": [ - "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and", - "initialize it with a proxy of `proxy_type` for `origin` sender.", - "", - "Requires a `Signed` origin.", - "", - "- `proxy_type`: The type of the proxy that the sender will be registered as over the", - "new account. This will almost always be the most permissive `ProxyType` possible to", - "allow for maximum flexibility.", - "- `index`: A disambiguation index, in case this is called multiple times in the same", - "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just", - "want to use `0`.", - "- `delay`: The announcement period required of the initial proxy. Will generally be", - "zero.", - "", - "Fails with `Duplicate` if this has already been called in this transaction, from the", - "same sender, with the same parameters.", - "", - "Fails if there are insufficient funds to pay for deposit.", - "", - "# ", - "Weight is a function of the number of proxies the user has (P).", - "# ", - "TODO: Might be over counting 1 read" - ] - }, - { - "name": "kill_anonymous", - "fields": [ - { - "name": "spawner", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "T::ProxyType" - }, - { - "name": "index", - "type": 81, - "typeName": "u16" - }, - { - "name": "height", - "type": 113, - "typeName": "T::BlockNumber" - }, - { - "name": "ext_index", - "type": 113, - "typeName": "u32" - } - ], - "index": 5, - "docs": [ - "Removes a previously spawned anonymous proxy.", - "", - "WARNING: **All access to this account will be lost.** Any funds held in it will be", - "inaccessible.", - "", - "Requires a `Signed` origin, and the sender account must have been created by a call to", - "`anonymous` with corresponding parameters.", - "", - "- `spawner`: The account that originally called `anonymous` to create this account.", - "- `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.", - "- `proxy_type`: The proxy type originally passed to `anonymous`.", - "- `height`: The height of the chain when the call to `anonymous` was processed.", - "- `ext_index`: The extrinsic index in which the call to `anonymous` was processed.", - "", - "Fails with `NoPermission` in case the caller is not a previously created anonymous", - "account whose `anonymous` call has corresponding parameters.", - "", - "# ", - "Weight is a function of the number of proxies the user has (P).", - "# " - ] - }, - { - "name": "announce", - "fields": [ - { - "name": "real", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 9, - "typeName": "CallHashOf" - } - ], - "index": 6, - "docs": [ - "Publish the hash of a proxy-call that will be made in the future.", - "", - "This must be called some number of blocks before the corresponding `proxy` is attempted", - "if the delay associated with the proxy relationship is greater than zero.", - "", - "No more than `MaxPending` announcements may be made at any one time.", - "", - "This will take a deposit of `AnnouncementDepositFactor` as well as", - "`AnnouncementDepositBase` if there are no other pending announcements.", - "", - "The dispatch origin for this call must be _Signed_ and a proxy of `real`.", - "", - "Parameters:", - "- `real`: The account that the proxy will make a call on behalf of.", - "- `call_hash`: The hash of the call to be made by the `real` account.", - "", - "# ", - "Weight is a function of:", - "- A: the number of announcements made.", - "- P: the number of proxies the user has.", - "# " - ] - }, - { - "name": "remove_announcement", - "fields": [ - { - "name": "real", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 9, - "typeName": "CallHashOf" - } - ], - "index": 7, - "docs": [ - "Remove a given announcement.", - "", - "May be called by a proxy account to remove a call they previously announced and return", - "the deposit.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `real`: The account that the proxy will make a call on behalf of.", - "- `call_hash`: The hash of the call to be made by the `real` account.", - "", - "# ", - "Weight is a function of:", - "- A: the number of announcements made.", - "- P: the number of proxies the user has.", - "# " - ] - }, - { - "name": "reject_announcement", - "fields": [ - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "call_hash", - "type": 9, - "typeName": "CallHashOf" - } - ], - "index": 8, - "docs": [ - "Remove the given announcement of a delegate.", - "", - "May be called by a target (proxied) account to remove a call that one of their delegates", - "(`delegate`) has announced they want to execute. The deposit is returned.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `delegate`: The account that previously announced the call.", - "- `call_hash`: The hash of the call to be made.", - "", - "# ", - "Weight is a function of:", - "- A: the number of announcements made.", - "- P: the number of proxies the user has.", - "# " - ] - }, - { - "name": "proxy_announced", - "fields": [ - { - "name": "delegate", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "real", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "force_proxy_type", - "type": 306, - "typeName": "Option" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 9, - "docs": [ - "Dispatch the given `call` from an account that the sender is authorized for through", - "`add_proxy`.", - "", - "Removes any corresponding announcement(s).", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Parameters:", - "- `real`: The account that the proxy will make a call on behalf of.", - "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.", - "- `call`: The call to be made by the `real` account.", - "", - "# ", - "Weight is a function of:", - "- A: the number of announcements made.", - "- P: the number of proxies the user has.", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 306, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 80 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 80 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 307, - "type": { - "path": [ - "pallet_multisig", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "as_multi_threshold_1", - "fields": [ - { - "name": "other_signatories", - "type": 40, - "typeName": "Vec" - }, - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 0, - "docs": [ - "Immediately dispatch a multi-signature call using a single approval from the caller.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `other_signatories`: The accounts (other than the sender) who are part of the", - "multi-signature, but do not participate in the approval process.", - "- `call`: The call to be executed.", - "", - "Result is equivalent to the dispatched result.", - "", - "# ", - "O(Z + C) where Z is the length of the call and C its execution weight.", - "-------------------------------", - "- DB Weight: None", - "- Plus Call Weight", - "# " - ] - }, - { - "name": "as_multi", - "fields": [ - { - "name": "threshold", - "type": 81, - "typeName": "u16" - }, - { - "name": "other_signatories", - "type": 40, - "typeName": "Vec" - }, - { - "name": "maybe_timepoint", - "type": 308, - "typeName": "Option>" - }, - { - "name": "call", - "type": 309, - "typeName": "OpaqueCall" - }, - { - "name": "store_call", - "type": 35, - "typeName": "bool" - }, - { - "name": "max_weight", - "type": 8, - "typeName": "Weight" - } - ], - "index": 1, - "docs": [ - "Register approval for a dispatch to be made from a deterministic composite account if", - "approved by a total of `threshold - 1` of `other_signatories`.", - "", - "If there are enough, then dispatch the call.", - "", - "Payment: `DepositBase` will be reserved if this is the first approval, plus", - "`threshold` times `DepositFactor`. It is returned once this dispatch happens or", - "is cancelled.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `threshold`: The total number of approvals for this dispatch before it is executed.", - "- `other_signatories`: The accounts (other than the sender) who can approve this", - "dispatch. May not be empty.", - "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", - "not the first approval, then it must be `Some`, with the timepoint (block number and", - "transaction index) of the first approval transaction.", - "- `call`: The call to be executed.", - "", - "NOTE: Unless this is the final approval, you will generally want to use", - "`approve_as_multi` instead, since it only requires a hash of the call.", - "", - "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise", - "on success, result is `Ok` and the result from the interior call, if it was executed,", - "may be found in the deposited `MultisigExecuted` event.", - "", - "# ", - "- `O(S + Z + Call)`.", - "- Up to one balance-reserve or unreserve operation.", - "- One passthrough operation, one insert, both `O(S)` where `S` is the number of", - " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", - "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len.", - "- One encode & hash, both of complexity `O(S)`.", - "- Up to one binary search and insert (`O(logS + S)`).", - "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", - "- One event.", - "- The weight of the `call`.", - "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit", - " taken for its lifetime of `DepositBase + threshold * DepositFactor`.", - "-------------------------------", - "- DB Weight:", - " - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`)", - " - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`)", - "- Plus Call Weight", - "# " - ] - }, - { - "name": "approve_as_multi", - "fields": [ - { - "name": "threshold", - "type": 81, - "typeName": "u16" - }, - { - "name": "other_signatories", - "type": 40, - "typeName": "Vec" - }, - { - "name": "maybe_timepoint", - "type": 308, - "typeName": "Option>" - }, - { - "name": "call_hash", - "type": 1, - "typeName": "[u8; 32]" - }, - { - "name": "max_weight", - "type": 8, - "typeName": "Weight" - } - ], - "index": 2, - "docs": [ - "Register approval for a dispatch to be made from a deterministic composite account if", - "approved by a total of `threshold - 1` of `other_signatories`.", - "", - "Payment: `DepositBase` will be reserved if this is the first approval, plus", - "`threshold` times `DepositFactor`. It is returned once this dispatch happens or", - "is cancelled.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `threshold`: The total number of approvals for this dispatch before it is executed.", - "- `other_signatories`: The accounts (other than the sender) who can approve this", - "dispatch. May not be empty.", - "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is", - "not the first approval, then it must be `Some`, with the timepoint (block number and", - "transaction index) of the first approval transaction.", - "- `call_hash`: The hash of the call to be executed.", - "", - "NOTE: If this is the final approval, you will want to use `as_multi` instead.", - "", - "# ", - "- `O(S)`.", - "- Up to one balance-reserve or unreserve operation.", - "- One passthrough operation, one insert, both `O(S)` where `S` is the number of", - " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", - "- One encode & hash, both of complexity `O(S)`.", - "- Up to one binary search and insert (`O(logS + S)`).", - "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove.", - "- One event.", - "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit", - " taken for its lifetime of `DepositBase + threshold * DepositFactor`.", - "----------------------------------", - "- DB Weight:", - " - Read: Multisig Storage, [Caller Account]", - " - Write: Multisig Storage, [Caller Account]", - "# " - ] - }, - { - "name": "cancel_as_multi", - "fields": [ - { - "name": "threshold", - "type": 81, - "typeName": "u16" - }, - { - "name": "other_signatories", - "type": 40, - "typeName": "Vec" - }, - { - "name": "timepoint", - "type": 83, - "typeName": "Timepoint" - }, - { - "name": "call_hash", - "type": 1, - "typeName": "[u8; 32]" - } - ], - "index": 3, - "docs": [ - "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously", - "for this operation will be unreserved on success.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "- `threshold`: The total number of approvals for this dispatch before it is executed.", - "- `other_signatories`: The accounts (other than the sender) who can approve this", - "dispatch. May not be empty.", - "- `timepoint`: The timepoint (block number and transaction index) of the first approval", - "transaction for this dispatch.", - "- `call_hash`: The hash of the call to be executed.", - "", - "# ", - "- `O(S)`.", - "- Up to one balance-reserve or unreserve operation.", - "- One passthrough operation, one insert, both `O(S)` where `S` is the number of", - " signatories. `S` is capped by `MaxSignatories`, with weight being proportional.", - "- One encode & hash, both of complexity `O(S)`.", - "- One event.", - "- I/O: 1 read `O(S)`, one remove.", - "- Storage: removes one item.", - "----------------------------------", - "- DB Weight:", - " - Read: Multisig Storage, [Caller Account], Refund Account, Calls", - " - Write: Multisig Storage, [Caller Account], Refund Account, Calls", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 308, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 83 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 83 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 309, - "type": { - "path": [ - "frame_support", - "traits", - "misc", - "WrapperKeepOpaque" - ], - "params": [ - { - "name": "T", - "type": 134 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 113 - }, - { - "type": 134, - "typeName": "T" - } - ] - } - } - } - }, - { - "id": 310, - "type": { - "path": [ - "pallet_bounties", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "propose_bounty", - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "description", - "type": 10, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Propose a new bounty.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", - "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,", - "or slashed when rejected.", - "", - "- `curator`: The curator account whom will manage this bounty.", - "- `fee`: The curator fee.", - "- `value`: The total payment amount of this bounty, curator fee included.", - "- `description`: The description of this bounty." - ] - }, - { - "name": "approve_bounty", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 1, - "docs": [ - "Approve a bounty proposal. At a later time, the bounty will be funded and become active", - "and the original deposit will be returned.", - "", - "May only be called from `T::ApproveOrigin`.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "propose_curator", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "curator", - "type": 151, - "typeName": "::Source" - }, - { - "name": "fee", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "Assign a curator to a funded bounty.", - "", - "May only be called from `T::ApproveOrigin`.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "unassign_curator", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 3, - "docs": [ - "Unassign curator from a bounty.", - "", - "This function can only be called by the `RejectOrigin` a signed origin.", - "", - "If this function is called by the `RejectOrigin`, we assume that the curator is", - "malicious or inactive. As a result, we will slash the curator when possible.", - "", - "If the origin is the curator, we take this as a sign they are unable to do their job and", - "they willingly give up. We could slash them, but for now we allow them to recover their", - "deposit and exit without issue. (We may want to change this if it is abused.)", - "", - "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows", - "anyone in the community to call out that a curator is not doing their due diligence, and", - "we should pick a new curator. In this case the curator should also be slashed.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "accept_curator", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 4, - "docs": [ - "Accept the curator role for a bounty.", - "A deposit will be reserved from curator and refund upon successful payout.", - "", - "May only be called from the curator.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "award_bounty", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "beneficiary", - "type": 151, - "typeName": "::Source" - } - ], - "index": 5, - "docs": [ - "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds", - "after a delay.", - "", - "The dispatch origin for this call must be the curator of this bounty.", - "", - "- `bounty_id`: Bounty ID to award.", - "- `beneficiary`: The beneficiary account whom will receive the payout.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "claim_bounty", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 6, - "docs": [ - "Claim the payout from an awarded bounty after payout delay.", - "", - "The dispatch origin for this call must be the beneficiary of this bounty.", - "", - "- `bounty_id`: Bounty ID to claim.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "close_bounty", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 7, - "docs": [ - "Cancel a proposed or active bounty. All the funds will be sent to treasury and", - "the curator deposit will be unreserved if possible.", - "", - "Only `T::RejectOrigin` is able to cancel a bounty.", - "", - "- `bounty_id`: Bounty ID to cancel.", - "", - "# ", - "- O(1).", - "# " - ] - }, - { - "name": "extend_bounty_expiry", - "fields": [ - { - "name": "bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "remark", - "type": 10, - "typeName": "Vec" - } - ], - "index": 8, - "docs": [ - "Extend the expiry time of an active bounty.", - "", - "The dispatch origin for this call must be the curator of this bounty.", - "", - "- `bounty_id`: Bounty ID to extend.", - "- `remark`: additional information.", - "", - "# ", - "- O(1).", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 311, - "type": { - "path": [ - "pallet_tips", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "report_awesome", - "fields": [ - { - "name": "reason", - "type": 10, - "typeName": "Vec" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "Report something `reason` that deserves a tip and claim any eventual the finder's fee.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as", - "`DataDepositPerByte` for each byte in `reason`.", - "", - "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be", - " a UTF-8-encoded URL.", - "- `who`: The account which should be credited for the tip.", - "", - "Emits `NewTip` if successful.", - "", - "# ", - "- Complexity: `O(R)` where `R` length of `reason`.", - " - encoding and hashing of 'reason'", - "- DbReads: `Reasons`, `Tips`", - "- DbWrites: `Reasons`, `Tips`", - "# " - ] - }, - { - "name": "retract_tip", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 1, - "docs": [ - "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.", - "", - "If successful, the original deposit will be unreserved.", - "", - "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`", - "must have been reported by the signing account through `report_awesome` (and not", - "through `tip_new`).", - "", - "- `hash`: The identity of the open tip for which a tip value is declared. This is formed", - " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", - "", - "Emits `TipRetracted` if successful.", - "", - "# ", - "- Complexity: `O(1)`", - " - Depends on the length of `T::Hash` which is fixed.", - "- DbReads: `Tips`, `origin account`", - "- DbWrites: `Reasons`, `Tips`, `origin account`", - "# " - ] - }, - { - "name": "tip_new", - "fields": [ - { - "name": "reason", - "type": 10, - "typeName": "Vec" - }, - { - "name": "who", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "tip_value", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 2, - "docs": [ - "Give a tip for something new; no finder's fee will be taken.", - "", - "The dispatch origin for this call must be _Signed_ and the signing account must be a", - "member of the `Tippers` set.", - "", - "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be", - " a UTF-8-encoded URL.", - "- `who`: The account which should be credited for the tip.", - "- `tip_value`: The amount of tip that the sender would like to give. The median tip", - " value of active tippers will be given to the `who`.", - "", - "Emits `NewTip` if successful.", - "", - "# ", - "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.", - " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by", - " `ContainsLengthBound`. The actual cost depends on the implementation of", - " `T::Tippers`.", - " - `O(R)`: hashing and encoding of reason of length `R`", - "- DbReads: `Tippers`, `Reasons`", - "- DbWrites: `Reasons`, `Tips`", - "# " - ] - }, - { - "name": "tip", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "tip_value", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 3, - "docs": [ - "Declare a tip value for an already-open tip.", - "", - "The dispatch origin for this call must be _Signed_ and the signing account must be a", - "member of the `Tippers` set.", - "", - "- `hash`: The identity of the open tip for which a tip value is declared. This is formed", - " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary", - " account ID.", - "- `tip_value`: The amount of tip that the sender would like to give. The median tip", - " value of active tippers will be given to the `who`.", - "", - "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period", - "has started.", - "", - "# ", - "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length", - " `T`, insert tip and check closing, `T` is charged as upper bound given by", - " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`.", - "", - " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it", - " is weighted as if almost full i.e of length `T-1`.", - "- DbReads: `Tippers`, `Tips`", - "- DbWrites: `Tips`", - "# " - ] - }, - { - "name": "close_tip", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 4, - "docs": [ - "Close and payout a tip.", - "", - "The dispatch origin for this call must be _Signed_.", - "", - "The tip identified by `hash` must have finished its countdown period.", - "", - "- `hash`: The identity of the open tip for which a tip value is declared. This is formed", - " as the hash of the tuple of the original tip `reason` and the beneficiary account ID.", - "", - "# ", - "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length", - " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost", - " depends on the implementation of `T::Tippers`.", - "- DbReads: `Tips`, `Tippers`, `tip finder`", - "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`", - "# " - ] - }, - { - "name": "slash_tip", - "fields": [ - { - "name": "hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 5, - "docs": [ - "Remove and slash an already-open tip.", - "", - "May only be called from `T::RejectOrigin`.", - "", - "As a result, the finder is slashed and the deposits are lost.", - "", - "Emits `TipSlashed` if successful.", - "", - "# ", - " `T` is charged as upper bound given by `ContainsLengthBound`.", - " The actual cost depends on the implementation of `T::Tippers`.", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 312, - "type": { - "path": [ - "pallet_assets", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "create", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "admin", - "type": 151, - "typeName": "::Source" - }, - { - "name": "min_balance", - "type": 6, - "typeName": "T::Balance" - } - ], - "index": 0, - "docs": [ - "Issue a new class of fungible assets from a public origin.", - "", - "This new asset class has no assets initially and its owner is the origin.", - "", - "The origin must be Signed and the sender must have sufficient funds free.", - "", - "Funds of sender are reserved by `AssetDeposit`.", - "", - "Parameters:", - "- `id`: The identifier of the new asset. This must not be currently in use to identify", - "an existing asset.", - "- `admin`: The admin of this class of assets. The admin is the initial address of each", - "member of the asset class's admin team.", - "- `min_balance`: The minimum balance of this new asset that any single account must", - "have. If an account's balance is reduced below this, then it collapses to zero.", - "", - "Emits `Created` event when successful.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "force_create", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - }, - { - "name": "is_sufficient", - "type": 35, - "typeName": "bool" - }, - { - "name": "min_balance", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 1, - "docs": [ - "Issue a new class of fungible assets from a privileged origin.", - "", - "This new asset class has no assets initially.", - "", - "The origin must conform to `ForceOrigin`.", - "", - "Unlike `create`, no funds are reserved.", - "", - "- `id`: The identifier of the new asset. This must not be currently in use to identify", - "an existing asset.", - "- `owner`: The owner of this class of assets. The owner has full superuser permissions", - "over this asset, but may later change and configure the permissions using", - "`transfer_ownership` and `set_team`.", - "- `min_balance`: The minimum balance of this new asset that any single account must", - "have. If an account's balance is reduced below this, then it collapses to zero.", - "", - "Emits `ForceCreated` event when successful.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "destroy", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "witness", - "type": 313, - "typeName": "DestroyWitness" - } - ], - "index": 2, - "docs": [ - "Destroy a class of fungible assets.", - "", - "The origin must conform to `ForceOrigin` or must be Signed and the sender must be the", - "owner of the asset `id`.", - "", - "- `id`: The identifier of the asset to be destroyed. This must identify an existing", - "asset.", - "", - "Emits `Destroyed` event when successful.", - "", - "NOTE: It can be helpful to first freeze an asset before destroying it so that you", - "can provide accurate witness information and prevent users from manipulating state", - "in a way that can make it harder to destroy.", - "", - "Weight: `O(c + p + a)` where:", - "- `c = (witness.accounts - witness.sufficients)`", - "- `s = witness.sufficients`", - "- `a = witness.approvals`" - ] - }, - { - "name": "mint", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "beneficiary", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 3, - "docs": [ - "Mint assets of a particular class.", - "", - "The origin must be Signed and the sender must be the Issuer of the asset `id`.", - "", - "- `id`: The identifier of the asset to have some amount minted.", - "- `beneficiary`: The account to be credited with the minted assets.", - "- `amount`: The amount of the asset to be minted.", - "", - "Emits `Issued` event when successful.", - "", - "Weight: `O(1)`", - "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`." - ] - }, - { - "name": "burn", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "who", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 4, - "docs": [ - "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.", - "", - "Origin must be Signed and the sender should be the Manager of the asset `id`.", - "", - "Bails with `NoAccount` if the `who` is already dead.", - "", - "- `id`: The identifier of the asset to have some amount burned.", - "- `who`: The account to be debited from.", - "- `amount`: The maximum amount by which `who`'s balance should be reduced.", - "", - "Emits `Burned` with the actual amount burned. If this takes the balance to below the", - "minimum for the asset, then the amount burned is increased to take it to zero.", - "", - "Weight: `O(1)`", - "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`." - ] - }, - { - "name": "transfer", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "target", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 5, - "docs": [ - "Move some assets from the sender account to another.", - "", - "Origin must be Signed.", - "", - "- `id`: The identifier of the asset to have some amount transferred.", - "- `target`: The account to be credited.", - "- `amount`: The amount by which the sender's balance of assets should be reduced and", - "`target`'s balance increased. The amount actually transferred may be slightly greater in", - "the case that the transfer would otherwise take the sender balance above zero but below", - "the minimum balance. Must be greater than zero.", - "", - "Emits `Transferred` with the actual amount transferred. If this takes the source balance", - "to below the minimum for the asset, then the amount transferred is increased to take it", - "to zero.", - "", - "Weight: `O(1)`", - "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of", - "`target`." - ] - }, - { - "name": "transfer_keep_alive", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "target", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 6, - "docs": [ - "Move some assets from the sender account to another, keeping the sender account alive.", - "", - "Origin must be Signed.", - "", - "- `id`: The identifier of the asset to have some amount transferred.", - "- `target`: The account to be credited.", - "- `amount`: The amount by which the sender's balance of assets should be reduced and", - "`target`'s balance increased. The amount actually transferred may be slightly greater in", - "the case that the transfer would otherwise take the sender balance above zero but below", - "the minimum balance. Must be greater than zero.", - "", - "Emits `Transferred` with the actual amount transferred. If this takes the source balance", - "to below the minimum for the asset, then the amount transferred is increased to take it", - "to zero.", - "", - "Weight: `O(1)`", - "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of", - "`target`." - ] - }, - { - "name": "force_transfer", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "source", - "type": 151, - "typeName": "::Source" - }, - { - "name": "dest", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 7, - "docs": [ - "Move some assets from one account to another.", - "", - "Origin must be Signed and the sender should be the Admin of the asset `id`.", - "", - "- `id`: The identifier of the asset to have some amount transferred.", - "- `source`: The account to be debited.", - "- `dest`: The account to be credited.", - "- `amount`: The amount by which the `source`'s balance of assets should be reduced and", - "`dest`'s balance increased. The amount actually transferred may be slightly greater in", - "the case that the transfer would otherwise take the `source` balance above zero but", - "below the minimum balance. Must be greater than zero.", - "", - "Emits `Transferred` with the actual amount transferred. If this takes the source balance", - "to below the minimum for the asset, then the amount transferred is increased to take it", - "to zero.", - "", - "Weight: `O(1)`", - "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of", - "`dest`." - ] - }, - { - "name": "freeze", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "who", - "type": 151, - "typeName": "::Source" - } - ], - "index": 8, - "docs": [ - "Disallow further unprivileged transfers from an account.", - "", - "Origin must be Signed and the sender should be the Freezer of the asset `id`.", - "", - "- `id`: The identifier of the asset to be frozen.", - "- `who`: The account to be frozen.", - "", - "Emits `Frozen`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "thaw", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "who", - "type": 151, - "typeName": "::Source" - } - ], - "index": 9, - "docs": [ - "Allow unprivileged transfers from an account again.", - "", - "Origin must be Signed and the sender should be the Admin of the asset `id`.", - "", - "- `id`: The identifier of the asset to be frozen.", - "- `who`: The account to be unfrozen.", - "", - "Emits `Thawed`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "freeze_asset", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - } - ], - "index": 10, - "docs": [ - "Disallow further unprivileged transfers for the asset class.", - "", - "Origin must be Signed and the sender should be the Freezer of the asset `id`.", - "", - "- `id`: The identifier of the asset to be frozen.", - "", - "Emits `Frozen`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "thaw_asset", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - } - ], - "index": 11, - "docs": [ - "Allow unprivileged transfers for the asset again.", - "", - "Origin must be Signed and the sender should be the Admin of the asset `id`.", - "", - "- `id`: The identifier of the asset to be thawed.", - "", - "Emits `Thawed`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "transfer_ownership", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - } - ], - "index": 12, - "docs": [ - "Change the Owner of an asset.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `id`.", - "", - "- `id`: The identifier of the asset.", - "- `owner`: The new Owner of this asset.", - "", - "Emits `OwnerChanged`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_team", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "issuer", - "type": 151, - "typeName": "::Source" - }, - { - "name": "admin", - "type": 151, - "typeName": "::Source" - }, - { - "name": "freezer", - "type": 151, - "typeName": "::Source" - } - ], - "index": 13, - "docs": [ - "Change the Issuer, Admin and Freezer of an asset.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `id`.", - "", - "- `id`: The identifier of the asset to be frozen.", - "- `issuer`: The new Issuer of this asset.", - "- `admin`: The new Admin of this asset.", - "- `freezer`: The new Freezer of this asset.", - "", - "Emits `TeamChanged`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_metadata", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "name", - "type": 10, - "typeName": "Vec" - }, - { - "name": "symbol", - "type": 10, - "typeName": "Vec" - }, - { - "name": "decimals", - "type": 2, - "typeName": "u8" - } - ], - "index": 14, - "docs": [ - "Set the metadata for an asset.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `id`.", - "", - "Funds of sender are reserved according to the formula:", - "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into", - "account any already reserved funds.", - "", - "- `id`: The identifier of the asset to update.", - "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", - "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", - "- `decimals`: The number of decimals this asset uses to represent one unit.", - "", - "Emits `MetadataSet`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "clear_metadata", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - } - ], - "index": 15, - "docs": [ - "Clear the metadata for an asset.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `id`.", - "", - "Any deposit is freed for the asset owner.", - "", - "- `id`: The identifier of the asset to clear.", - "", - "Emits `MetadataCleared`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "force_set_metadata", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "name", - "type": 10, - "typeName": "Vec" - }, - { - "name": "symbol", - "type": 10, - "typeName": "Vec" - }, - { - "name": "decimals", - "type": 2, - "typeName": "u8" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 16, - "docs": [ - "Force the metadata for an asset to some value.", - "", - "Origin must be ForceOrigin.", - "", - "Any deposit is left alone.", - "", - "- `id`: The identifier of the asset to update.", - "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`.", - "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`.", - "- `decimals`: The number of decimals this asset uses to represent one unit.", - "", - "Emits `MetadataSet`.", - "", - "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively." - ] - }, - { - "name": "force_clear_metadata", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - } - ], - "index": 17, - "docs": [ - "Clear the metadata for an asset.", - "", - "Origin must be ForceOrigin.", - "", - "Any deposit is returned.", - "", - "- `id`: The identifier of the asset to clear.", - "", - "Emits `MetadataCleared`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "force_asset_status", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - }, - { - "name": "issuer", - "type": 151, - "typeName": "::Source" - }, - { - "name": "admin", - "type": 151, - "typeName": "::Source" - }, - { - "name": "freezer", - "type": 151, - "typeName": "::Source" - }, - { - "name": "min_balance", - "type": 65, - "typeName": "T::Balance" - }, - { - "name": "is_sufficient", - "type": 35, - "typeName": "bool" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 18, - "docs": [ - "Alter the attributes of a given asset.", - "", - "Origin must be `ForceOrigin`.", - "", - "- `id`: The identifier of the asset.", - "- `owner`: The new Owner of this asset.", - "- `issuer`: The new Issuer of this asset.", - "- `admin`: The new Admin of this asset.", - "- `freezer`: The new Freezer of this asset.", - "- `min_balance`: The minimum balance of this new asset that any single account must", - "have. If an account's balance is reduced below this, then it collapses to zero.", - "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient", - "value to account for the state bloat associated with its balance storage. If set to", - "`true`, then non-zero balances may be stored without a `consumer` reference (and thus", - "an ED in the Balances pallet or whatever else is used to control user-account state", - "growth).", - "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin", - "instructions.", - "", - "Emits `AssetStatusChanged` with the identity of the asset.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "approve_transfer", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "delegate", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 19, - "docs": [ - "Approve an amount of asset for transfer by a delegated third-party account.", - "", - "Origin must be Signed.", - "", - "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account", - "for the purpose of holding the approval. If some non-zero amount of assets is already", - "approved from signing account to `delegate`, then it is topped up or unreserved to", - "meet the right value.", - "", - "NOTE: The signing account does not need to own `amount` of assets at the point of", - "making this call.", - "", - "- `id`: The identifier of the asset.", - "- `delegate`: The account to delegate permission to transfer asset.", - "- `amount`: The amount of asset that may be transferred by `delegate`. If there is", - "already an approval in place, then this acts additively.", - "", - "Emits `ApprovedTransfer` on success.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "cancel_approval", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "delegate", - "type": 151, - "typeName": "::Source" - } - ], - "index": 20, - "docs": [ - "Cancel all of some asset approved for delegated transfer by a third-party account.", - "", - "Origin must be Signed and there must be an approval in place between signer and", - "`delegate`.", - "", - "Unreserves any deposit previously reserved by `approve_transfer` for the approval.", - "", - "- `id`: The identifier of the asset.", - "- `delegate`: The account delegated permission to transfer asset.", - "", - "Emits `ApprovalCancelled` on success.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "force_cancel_approval", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - }, - { - "name": "delegate", - "type": 151, - "typeName": "::Source" - } - ], - "index": 21, - "docs": [ - "Cancel all of some asset approved for delegated transfer by a third-party account.", - "", - "Origin must be either ForceOrigin or Signed origin with the signer being the Admin", - "account of the asset `id`.", - "", - "Unreserves any deposit previously reserved by `approve_transfer` for the approval.", - "", - "- `id`: The identifier of the asset.", - "- `delegate`: The account delegated permission to transfer asset.", - "", - "Emits `ApprovalCancelled` on success.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "transfer_approved", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - }, - { - "name": "destination", - "type": 151, - "typeName": "::Source" - }, - { - "name": "amount", - "type": 65, - "typeName": "T::Balance" - } - ], - "index": 22, - "docs": [ - "Transfer some asset balance from a previously delegated account to some third-party", - "account.", - "", - "Origin must be Signed and there must be an approval in place by the `owner` to the", - "signer.", - "", - "If the entire amount approved for transfer is transferred, then any deposit previously", - "reserved by `approve_transfer` is unreserved.", - "", - "- `id`: The identifier of the asset.", - "- `owner`: The account which previously approved for a transfer of at least `amount` and", - "from which the asset balance will be withdrawn.", - "- `destination`: The account to which the asset balance of `amount` will be transferred.", - "- `amount`: The amount of assets to transfer.", - "", - "Emits `TransferredApproved` on success.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "touch", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - } - ], - "index": 23, - "docs": [ - "Create an asset account for non-provider assets.", - "", - "A deposit will be taken from the signer account.", - "", - "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit", - " to be taken.", - "- `id`: The identifier of the asset for the account to be created.", - "", - "Emits `Touched` event when successful." - ] - }, - { - "name": "refund", - "fields": [ - { - "name": "id", - "type": 113, - "typeName": "T::AssetId" - }, - { - "name": "allow_burn", - "type": 35, - "typeName": "bool" - } - ], - "index": 24, - "docs": [ - "Return the deposit (if any) of an asset account.", - "", - "The origin must be Signed.", - "", - "- `id`: The identifier of the asset for the account to be created.", - "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.", - "", - "Emits `Refunded` event when successful." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 313, - "type": { - "path": [ - "pallet_assets", - "types", - "DestroyWitness" - ], - "def": { - "composite": { - "fields": [ - { - "name": "accounts", - "type": 113, - "typeName": "u32" - }, - { - "name": "sufficients", - "type": 113, - "typeName": "u32" - }, - { - "name": "approvals", - "type": 113, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 314, - "type": { - "path": [ - "pallet_lottery", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "buy_ticket", - "fields": [ - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 0, - "docs": [ - "Buy a ticket to enter the lottery.", - "", - "This extrinsic acts as a passthrough function for `call`. In all", - "situations where `call` alone would succeed, this extrinsic should", - "succeed.", - "", - "If `call` is successful, then we will attempt to purchase a ticket,", - "which may fail silently. To detect success of a ticket purchase, you", - "should listen for the `TicketBought` event.", - "", - "This extrinsic must be called by a signed origin." - ] - }, - { - "name": "set_calls", - "fields": [ - { - "name": "calls", - "type": 133, - "typeName": "Vec<::Call>" - } - ], - "index": 1, - "docs": [ - "Set calls in storage which can be used to purchase a lottery ticket.", - "", - "This function only matters if you use the `ValidateCall` implementation", - "provided by this pallet, which uses storage to determine the valid calls.", - "", - "This extrinsic must be called by the Manager origin." - ] - }, - { - "name": "start_lottery", - "fields": [ - { - "name": "price", - "type": 6, - "typeName": "BalanceOf" - }, - { - "name": "length", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "delay", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "repeat", - "type": 35, - "typeName": "bool" - } - ], - "index": 2, - "docs": [ - "Start a lottery using the provided configuration.", - "", - "This extrinsic must be called by the `ManagerOrigin`.", - "", - "Parameters:", - "", - "* `price`: The cost of a single ticket.", - "* `length`: How long the lottery should run for starting at the current block.", - "* `delay`: How long after the lottery end we should wait before picking a winner.", - "* `repeat`: If the lottery should repeat when completed." - ] - }, - { - "name": "stop_repeat", - "index": 3, - "docs": [ - "If a lottery is repeating, you can use this to stop the repeat.", - "The lottery will continue to run to completion.", - "", - "This extrinsic must be called by the `ManagerOrigin`." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 315, - "type": { - "path": [ - "pallet_gilt", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "place_bid", - "fields": [ - { - "name": "amount", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "duration", - "type": 4, - "typeName": "u32" - } - ], - "index": 0, - "docs": [ - "Place a bid for a gilt to be issued.", - "", - "Origin must be Signed, and account must have at least `amount` in free balance.", - "", - "- `amount`: The amount of the bid; these funds will be reserved. If the bid is", - "successfully elevated into an issued gilt, then these funds will continue to be", - "reserved until the gilt expires. Must be at least `MinFreeze`.", - "- `duration`: The number of periods for which the funds will be locked if the gilt is", - "issued. It will expire only after this period has elapsed after the point of issuance.", - "Must be greater than 1 and no more than `QueueCount`.", - "", - "Complexities:", - "- `Queues[duration].len()` (just take max)." - ] - }, - { - "name": "retract_bid", - "fields": [ - { - "name": "amount", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "duration", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Retract a previously placed bid.", - "", - "Origin must be Signed, and the account should have previously issued a still-active bid", - "of `amount` for `duration`.", - "", - "- `amount`: The amount of the previous bid.", - "- `duration`: The duration of the previous bid." - ] - }, - { - "name": "set_target", - "fields": [ - { - "name": "target", - "type": 316, - "typeName": "Perquintill" - } - ], - "index": 2, - "docs": [ - "Set target proportion of gilt-funds.", - "", - "Origin must be `AdminOrigin`.", - "", - "- `target`: The target proportion of effective issued funds that should be under gilts", - "at any one time." - ] - }, - { - "name": "thaw", - "fields": [ - { - "name": "index", - "type": 113, - "typeName": "ActiveIndex" - } - ], - "index": 3, - "docs": [ - "Remove an active but expired gilt. Reserved funds under gilt are freed and balance is", - "adjusted to ensure that the funds grow or shrink to maintain the equivalent proportion", - "of effective total issued funds.", - "", - "Origin must be Signed and the account must be the owner of the gilt of the given index.", - "", - "- `index`: The index of the gilt to be thawed." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 316, - "type": { - "def": { - "compact": { - "type": 317 - } - } - } - }, - { - "id": 317, - "type": { - "path": [ - "sp_arithmetic", - "per_things", - "Perquintill" - ], - "def": { - "composite": { - "fields": [ - { - "type": 8, - "typeName": "u64" - } - ] - } - } - } - }, - { - "id": 318, - "type": { - "path": [ - "pallet_uniques", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "create", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "admin", - "type": 151, - "typeName": "::Source" - } - ], - "index": 0, - "docs": [ - "Issue a new class of non-fungible assets from a public origin.", - "", - "This new asset class has no assets initially and its owner is the origin.", - "", - "The origin must be Signed and the sender must have sufficient funds free.", - "", - "`AssetDeposit` funds of sender are reserved.", - "", - "Parameters:", - "- `class`: The identifier of the new asset class. This must not be currently in use.", - "- `admin`: The admin of this class of assets. The admin is the initial address of each", - "member of the asset class's admin team.", - "", - "Emits `Created` event when successful.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "force_create", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - }, - { - "name": "free_holding", - "type": 35, - "typeName": "bool" - } - ], - "index": 1, - "docs": [ - "Issue a new class of non-fungible assets from a privileged origin.", - "", - "This new asset class has no assets initially.", - "", - "The origin must conform to `ForceOrigin`.", - "", - "Unlike `create`, no funds are reserved.", - "", - "- `class`: The identifier of the new asset. This must not be currently in use.", - "- `owner`: The owner of this class of assets. The owner has full superuser permissions", - "over this asset, but may later change and configure the permissions using", - "`transfer_ownership` and `set_team`.", - "", - "Emits `ForceCreated` event when successful.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "destroy", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "witness", - "type": 319, - "typeName": "DestroyWitness" - } - ], - "index": 2, - "docs": [ - "Destroy a class of fungible assets.", - "", - "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the", - "owner of the asset `class`.", - "", - "- `class`: The identifier of the asset class to be destroyed.", - "- `witness`: Information on the instances minted in the asset class. This must be", - "correct.", - "", - "Emits `Destroyed` event when successful.", - "", - "Weight: `O(n + m)` where:", - "- `n = witness.instances`", - "- `m = witness.instance_metadatas`", - "- `a = witness.attributes`" - ] - }, - { - "name": "mint", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - } - ], - "index": 3, - "docs": [ - "Mint an asset instance of a particular class.", - "", - "The origin must be Signed and the sender must be the Issuer of the asset `class`.", - "", - "- `class`: The class of the asset to be minted.", - "- `instance`: The instance value of the asset to be minted.", - "- `beneficiary`: The initial owner of the minted asset.", - "", - "Emits `Issued` event when successful.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "burn", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "check_owner", - "type": 320, - "typeName": "Option<::Source>" - } - ], - "index": 4, - "docs": [ - "Destroy a single asset instance.", - "", - "Origin must be Signed and the sender should be the Admin of the asset `class`.", - "", - "- `class`: The class of the asset to be burned.", - "- `instance`: The instance of the asset to be burned.", - "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the", - " asset is owned by this value.", - "", - "Emits `Burned` with the actual amount burned.", - "", - "Weight: `O(1)`", - "Modes: `check_owner.is_some()`." - ] - }, - { - "name": "transfer", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "dest", - "type": 151, - "typeName": "::Source" - } - ], - "index": 5, - "docs": [ - "Move an asset from the sender account to another.", - "", - "Origin must be Signed and the signing account must be either:", - "- the Admin of the asset `class`;", - "- the Owner of the asset `instance`;", - "- the approved delegate for the asset `instance` (in this case, the approval is reset).", - "", - "Arguments:", - "- `class`: The class of the asset to be transferred.", - "- `instance`: The instance of the asset to be transferred.", - "- `dest`: The account to receive ownership of the asset.", - "", - "Emits `Transferred`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "redeposit", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instances", - "type": 92, - "typeName": "Vec" - } - ], - "index": 6, - "docs": [ - "Reevaluate the deposits on some assets.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `class`.", - "", - "- `class`: The class of the asset to be frozen.", - "- `instances`: The instances of the asset class whose deposits will be reevaluated.", - "", - "NOTE: This exists as a best-effort function. Any asset instances which are unknown or", - "in the case that the owner account does not have reservable funds to pay for a", - "deposit increase are ignored. Generally the owner isn't going to call this on instances", - "whose existing deposit is less than the refreshed deposit as it would only cost them,", - "so it's of little consequence.", - "", - "It will still return an error in the case that the class is unknown of the signer is", - "not permitted to call it.", - "", - "Weight: `O(instances.len())`" - ] - }, - { - "name": "freeze", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - } - ], - "index": 7, - "docs": [ - "Disallow further unprivileged transfer of an asset instance.", - "", - "Origin must be Signed and the sender should be the Freezer of the asset `class`.", - "", - "- `class`: The class of the asset to be frozen.", - "- `instance`: The instance of the asset to be frozen.", - "", - "Emits `Frozen`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "thaw", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - } - ], - "index": 8, - "docs": [ - "Re-allow unprivileged transfer of an asset instance.", - "", - "Origin must be Signed and the sender should be the Freezer of the asset `class`.", - "", - "- `class`: The class of the asset to be thawed.", - "- `instance`: The instance of the asset to be thawed.", - "", - "Emits `Thawed`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "freeze_class", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 9, - "docs": [ - "Disallow further unprivileged transfers for a whole asset class.", - "", - "Origin must be Signed and the sender should be the Freezer of the asset `class`.", - "", - "- `class`: The asset class to be frozen.", - "", - "Emits `ClassFrozen`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "thaw_class", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 10, - "docs": [ - "Re-allow unprivileged transfers for a whole asset class.", - "", - "Origin must be Signed and the sender should be the Admin of the asset `class`.", - "", - "- `class`: The class to be thawed.", - "", - "Emits `ClassThawed`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "transfer_ownership", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - } - ], - "index": 11, - "docs": [ - "Change the Owner of an asset class.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `class`.", - "", - "- `class`: The asset class whose owner should be changed.", - "- `owner`: The new Owner of this asset class. They must have called", - " `set_accept_ownership` with `class` in order for this operation to succeed.", - "", - "Emits `OwnerChanged`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_team", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "issuer", - "type": 151, - "typeName": "::Source" - }, - { - "name": "admin", - "type": 151, - "typeName": "::Source" - }, - { - "name": "freezer", - "type": 151, - "typeName": "::Source" - } - ], - "index": 12, - "docs": [ - "Change the Issuer, Admin and Freezer of an asset class.", - "", - "Origin must be Signed and the sender should be the Owner of the asset `class`.", - "", - "- `class`: The asset class whose team should be changed.", - "- `issuer`: The new Issuer of this asset class.", - "- `admin`: The new Admin of this asset class.", - "- `freezer`: The new Freezer of this asset class.", - "", - "Emits `TeamChanged`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "approve_transfer", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "delegate", - "type": 151, - "typeName": "::Source" - } - ], - "index": 13, - "docs": [ - "Approve an instance to be transferred by a delegated third-party account.", - "", - "Origin must be Signed and must be the owner of the asset `instance`.", - "", - "- `class`: The class of the asset to be approved for delegated transfer.", - "- `instance`: The instance of the asset to be approved for delegated transfer.", - "- `delegate`: The account to delegate permission to transfer the asset.", - "", - "Emits `ApprovedTransfer` on success.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "cancel_approval", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "maybe_check_delegate", - "type": 320, - "typeName": "Option<::Source>" - } - ], - "index": 14, - "docs": [ - "Cancel the prior approval for the transfer of an asset by a delegate.", - "", - "Origin must be either:", - "- the `Force` origin;", - "- `Signed` with the signer being the Admin of the asset `class`;", - "- `Signed` with the signer being the Owner of the asset `instance`;", - "", - "Arguments:", - "- `class`: The class of the asset of whose approval will be cancelled.", - "- `instance`: The instance of the asset of whose approval will be cancelled.", - "- `maybe_check_delegate`: If `Some` will ensure that the given account is the one to", - " which permission of transfer is delegated.", - "", - "Emits `ApprovalCancelled` on success.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "force_asset_status", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "owner", - "type": 151, - "typeName": "::Source" - }, - { - "name": "issuer", - "type": 151, - "typeName": "::Source" - }, - { - "name": "admin", - "type": 151, - "typeName": "::Source" - }, - { - "name": "freezer", - "type": 151, - "typeName": "::Source" - }, - { - "name": "free_holding", - "type": 35, - "typeName": "bool" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 15, - "docs": [ - "Alter the attributes of a given asset.", - "", - "Origin must be `ForceOrigin`.", - "", - "- `class`: The identifier of the asset.", - "- `owner`: The new Owner of this asset.", - "- `issuer`: The new Issuer of this asset.", - "- `admin`: The new Admin of this asset.", - "- `freezer`: The new Freezer of this asset.", - "- `free_holding`: Whether a deposit is taken for holding an instance of this asset", - " class.", - "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin", - "instructions.", - "", - "Emits `AssetStatusChanged` with the identity of the asset.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_attribute", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "maybe_instance", - "type": 93, - "typeName": "Option" - }, - { - "name": "key", - "type": 94, - "typeName": "BoundedVec" - }, - { - "name": "value", - "type": 95, - "typeName": "BoundedVec" - } - ], - "index": 16, - "docs": [ - "Set an attribute for an asset class or instance.", - "", - "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", - "asset `class`.", - "", - "If the origin is Signed, then funds of signer are reserved according to the formula:", - "`MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into", - "account any already reserved funds.", - "", - "- `class`: The identifier of the asset class whose instance's metadata to set.", - "- `maybe_instance`: The identifier of the asset instance whose metadata to set.", - "- `key`: The key of the attribute.", - "- `value`: The value to which to set the attribute.", - "", - "Emits `AttributeSet`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "clear_attribute", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "maybe_instance", - "type": 93, - "typeName": "Option" - }, - { - "name": "key", - "type": 94, - "typeName": "BoundedVec" - } - ], - "index": 17, - "docs": [ - "Clear an attribute for an asset class or instance.", - "", - "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", - "asset `class`.", - "", - "Any deposit is freed for the asset class owner.", - "", - "- `class`: The identifier of the asset class whose instance's metadata to clear.", - "- `maybe_instance`: The identifier of the asset instance whose metadata to clear.", - "- `key`: The key of the attribute.", - "", - "Emits `AttributeCleared`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_metadata", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - }, - { - "name": "data", - "type": 91, - "typeName": "BoundedVec" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 18, - "docs": [ - "Set the metadata for an asset instance.", - "", - "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", - "asset `class`.", - "", - "If the origin is Signed, then funds of signer are reserved according to the formula:", - "`MetadataDepositBase + DepositPerByte * data.len` taking into", - "account any already reserved funds.", - "", - "- `class`: The identifier of the asset class whose instance's metadata to set.", - "- `instance`: The identifier of the asset instance whose metadata to set.", - "- `data`: The general information of this asset. Limited in length by `StringLimit`.", - "- `is_frozen`: Whether the metadata should be frozen against further changes.", - "", - "Emits `MetadataSet`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "clear_metadata", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "instance", - "type": 4, - "typeName": "T::InstanceId" - } - ], - "index": 19, - "docs": [ - "Clear the metadata for an asset instance.", - "", - "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the", - "asset `instance`.", - "", - "Any deposit is freed for the asset class owner.", - "", - "- `class`: The identifier of the asset class whose instance's metadata to clear.", - "- `instance`: The identifier of the asset instance whose metadata to clear.", - "", - "Emits `MetadataCleared`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_class_metadata", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - }, - { - "name": "data", - "type": 91, - "typeName": "BoundedVec" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ], - "index": 20, - "docs": [ - "Set the metadata for an asset class.", - "", - "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", - "the asset `class`.", - "", - "If the origin is `Signed`, then funds of signer are reserved according to the formula:", - "`MetadataDepositBase + DepositPerByte * data.len` taking into", - "account any already reserved funds.", - "", - "- `class`: The identifier of the asset whose metadata to update.", - "- `data`: The general information of this asset. Limited in length by `StringLimit`.", - "- `is_frozen`: Whether the metadata should be frozen against further changes.", - "", - "Emits `ClassMetadataSet`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "clear_class_metadata", - "fields": [ - { - "name": "class", - "type": 4, - "typeName": "T::ClassId" - } - ], - "index": 21, - "docs": [ - "Clear the metadata for an asset class.", - "", - "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of", - "the asset `class`.", - "", - "Any deposit is freed for the asset class owner.", - "", - "- `class`: The identifier of the asset class whose metadata to clear.", - "", - "Emits `ClassMetadataCleared`.", - "", - "Weight: `O(1)`" - ] - }, - { - "name": "set_accept_ownership", - "fields": [ - { - "name": "maybe_class", - "type": 93, - "typeName": "Option" - } - ], - "index": 22, - "docs": [ - "Set (or reset) the acceptance of ownership for a particular account.", - "", - "Origin must be `Signed` and if `maybe_class` is `Some`, then the signer must have a", - "provider reference.", - "", - "- `maybe_class`: The identifier of the asset class whose ownership the signer is willing", - " to accept, or if `None`, an indication that the signer is willing to accept no", - " ownership transferal.", - "", - "Emits `OwnershipAcceptanceChanged`." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 319, - "type": { - "path": [ - "pallet_uniques", - "types", - "DestroyWitness" - ], - "def": { - "composite": { - "fields": [ - { - "name": "instances", - "type": 113, - "typeName": "u32" - }, - { - "name": "instance_metadatas", - "type": 113, - "typeName": "u32" - }, - { - "name": "attributes", - "type": 113, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 320, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 151 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 151 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 321, - "type": { - "path": [ - "pallet_transaction_storage", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "store", - "fields": [ - { - "name": "data", - "type": 10, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Index and store data on chain. Minimum data size is 1 bytes, maximum is", - "`MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`", - "is called. # ", - "- n*log(n) of data size, as all data is pushed to an in-memory trie.", - "Additionally contains a DB write.", - "# " - ] - }, - { - "name": "renew", - "fields": [ - { - "name": "block", - "type": 4, - "typeName": "T::BlockNumber" - }, - { - "name": "index", - "type": 4, - "typeName": "u32" - } - ], - "index": 1, - "docs": [ - "Renew previously stored data. Parameters are the block number that contains", - "previous `store` or `renew` call and transaction index within that block.", - "Transaction index is emitted in the `Stored` or `Renewed` event.", - "Applies same fees as `store`.", - "# ", - "- Constant.", - "# " - ] - }, - { - "name": "check_proof", - "fields": [ - { - "name": "proof", - "type": 322, - "typeName": "TransactionStorageProof" - } - ], - "index": 2, - "docs": [ - "Check storage proof for block number `block_number() - StoragePeriod`.", - "If such block does not exist the proof is expected to be `None`.", - "# ", - "- Linear w.r.t the number of indexed transactions in the proved block for random", - " probing.", - "There's a DB read for each transaction.", - "Here we assume a maximum of 100 probed transactions.", - "# " - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 322, - "type": { - "path": [ - "sp_transaction_storage_proof", - "TransactionStorageProof" - ], - "def": { - "composite": { - "fields": [ - { - "name": "chunk", - "type": 10, - "typeName": "Vec" - }, - { - "name": "proof", - "type": 119, - "typeName": "Vec>" - } - ] - } - } - } - }, - { - "id": 323, - "type": { - "path": [ - "pallet_bags_list", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "rebag", - "fields": [ - { - "name": "dislocated", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 0, - "docs": [ - "Declare that some `dislocated` account has, through rewards or penalties, sufficiently", - "changed its score that it should properly fall into a different bag than its current", - "one.", - "", - "Anyone can call this function about any potentially dislocated account.", - "", - "Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then", - "it is a noop and fees are still collected from `origin`." - ] - }, - { - "name": "put_in_front_of", - "fields": [ - { - "name": "lighter", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 1, - "docs": [ - "Move the caller's Id directly in front of `lighter`.", - "", - "The dispatch origin for this call must be _Signed_ and can only be called by the Id of", - "the account going in front of `lighter`.", - "", - "Only works if", - "- both nodes are within the same bag,", - "- and `origin` has a greater `Score` than `lighter`." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 324, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "control_auto_migration", - "fields": [ - { - "name": "maybe_config", - "type": 325, - "typeName": "Option" - } - ], - "index": 0, - "docs": [ - "Control the automatic migration.", - "", - "The dispatch origin of this call must be [`Config::ControlOrigin`]." - ] - }, - { - "name": "continue_migrate", - "fields": [ - { - "name": "limits", - "type": 326, - "typeName": "MigrationLimits" - }, - { - "name": "real_size_upper", - "type": 4, - "typeName": "u32" - }, - { - "name": "witness_task", - "type": 327, - "typeName": "MigrationTask" - } - ], - "index": 1, - "docs": [ - "Continue the migration for the given `limits`.", - "", - "The dispatch origin of this call can be any signed account.", - "", - "This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,", - "Upon successful execution, the transaction fee is returned.", - "", - "The (potentially over-estimated) of the byte length of all the data read must be", - "provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing", - "that executing the current `MigrationTask` with the given `limits` will not exceed", - "`real_size_upper` bytes of read data.", - "", - "The `witness_task` is merely a helper to prevent the caller from being slashed or", - "generally trigger a migration that they do not intend. This parameter is just a message", - "from caller, saying that they believed `witness_task` was the last state of the", - "migration, and they only wish for their transaction to do anything, if this assumption", - "holds. In case `witness_task` does not match, the transaction fails.", - "", - "Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the", - "recommended way of doing this is to pass a `limit` that only bounds `count`, as the", - "`size` limit can always be overwritten." - ] - }, - { - "name": "migrate_custom_top", - "fields": [ - { - "name": "keys", - "type": 119, - "typeName": "Vec>" - }, - { - "name": "witness_size", - "type": 4, - "typeName": "u32" - } - ], - "index": 2, - "docs": [ - "Migrate the list of top keys by iterating each of them one by one.", - "", - "This does not affect the global migration process tracker ([`MigrationProcess`]), and", - "should only be used in case any keys are leftover due to a bug." - ] - }, - { - "name": "migrate_custom_child", - "fields": [ - { - "name": "root", - "type": 10, - "typeName": "Vec" - }, - { - "name": "child_keys", - "type": 119, - "typeName": "Vec>" - }, - { - "name": "total_size", - "type": 4, - "typeName": "u32" - } - ], - "index": 3, - "docs": [ - "Migrate the list of child keys by iterating each of them one by one.", - "", - "All of the given child keys must be present under one `child_root`.", - "", - "This does not affect the global migration process tracker ([`MigrationProcess`]), and", - "should only be used in case any keys are leftover due to a bug." - ] - }, - { - "name": "set_signed_max_limits", - "fields": [ - { - "name": "limits", - "type": 326, - "typeName": "MigrationLimits" - } - ], - "index": 4, - "docs": [ - "Set the maximum limit of the signed migration." - ] - }, - { - "name": "force_set_progress", - "fields": [ - { - "name": "progress_top", - "type": 328, - "typeName": "Progress" - }, - { - "name": "progress_child", - "type": 328, - "typeName": "Progress" - } - ], - "index": 5, - "docs": [ - "Forcefully set the progress the running migration.", - "", - "This is only useful in one case: the next key to migrate is too big to be migrated with", - "a signed account, in a parachain context, and we simply want to skip it. A reasonable", - "example of this would be `:code:`, which is both very expensive to migrate, and commonly", - "used, so probably it is already migrated.", - "", - "In case you mess things up, you can also, in principle, use this to reset the migration", - "process." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 325, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 326 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 326 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 326, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "MigrationLimits" - ], - "def": { - "composite": { - "fields": [ - { - "name": "size", - "type": 4, - "typeName": "u32" - }, - { - "name": "item", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 327, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "MigrationTask" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "progress_top", - "type": 328, - "typeName": "Progress" - }, - { - "name": "progress_child", - "type": 328, - "typeName": "Progress" - }, - { - "name": "size", - "type": 4, - "typeName": "u32" - }, - { - "name": "top_items", - "type": 4, - "typeName": "u32" - }, - { - "name": "child_items", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 328, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "Progress" - ], - "def": { - "variant": { - "variants": [ - { - "name": "ToStart", - "index": 0 - }, - { - "name": "LastKey", - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ], - "index": 1 - }, - { - "name": "Complete", - "index": 2 - } - ] - } - } - } - }, - { - "id": 329, - "type": { - "path": [ - "pallet_child_bounties", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "add_child_bounty", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "value", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "description", - "type": 10, - "typeName": "Vec" - } - ], - "index": 0, - "docs": [ - "Add a new child-bounty.", - "", - "The dispatch origin for this call must be the curator of parent", - "bounty and the parent bounty must be in \"active\" state.", - "", - "Child-bounty gets added successfully & fund gets transferred from", - "parent bounty to child-bounty account, if parent bounty has enough", - "funds, else the call fails.", - "", - "Upper bound to maximum number of active child-bounties that can be", - "added are managed via runtime trait config", - "[`Config::MaxActiveChildBountyCount`].", - "", - "If the call is success, the status of child-bounty is updated to", - "\"Added\".", - "", - "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added.", - "- `value`: Value for executing the proposal.", - "- `description`: Text description for the child-bounty." - ] - }, - { - "name": "propose_curator", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "child_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "curator", - "type": 151, - "typeName": "::Source" - }, - { - "name": "fee", - "type": 65, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "Propose curator for funded child-bounty.", - "", - "The dispatch origin for this call must be curator of parent bounty.", - "", - "Parent bounty must be in active state, for this child-bounty call to", - "work.", - "", - "Child-bounty must be in \"Added\" state, for processing the call. And", - "state of child-bounty is moved to \"CuratorProposed\" on successful", - "call completion.", - "", - "- `parent_bounty_id`: Index of parent bounty.", - "- `child_bounty_id`: Index of child bounty.", - "- `curator`: Address of child-bounty curator.", - "- `fee`: payment fee to child-bounty curator for execution." - ] - }, - { - "name": "accept_curator", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "child_bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 2, - "docs": [ - "Accept the curator role for the child-bounty.", - "", - "The dispatch origin for this call must be the curator of this", - "child-bounty.", - "", - "A deposit will be reserved from the curator and refund upon", - "successful payout or cancellation.", - "", - "Fee for curator is deducted from curator fee of parent bounty.", - "", - "Parent bounty must be in active state, for this child-bounty call to", - "work.", - "", - "Child-bounty must be in \"CuratorProposed\" state, for processing the", - "call. And state of child-bounty is moved to \"Active\" on successful", - "call completion.", - "", - "- `parent_bounty_id`: Index of parent bounty.", - "- `child_bounty_id`: Index of child bounty." - ] - }, - { - "name": "unassign_curator", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "child_bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 3, - "docs": [ - "Unassign curator from a child-bounty.", - "", - "The dispatch origin for this call can be either `RejectOrigin`, or", - "the curator of the parent bounty, or any signed origin.", - "", - "For the origin other than T::RejectOrigin and the child-bounty", - "curator, parent-bounty must be in active state, for this call to", - "work. We allow child-bounty curator and T::RejectOrigin to execute", - "this call irrespective of the parent-bounty state.", - "", - "If this function is called by the `RejectOrigin` or the", - "parent-bounty curator, we assume that the child-bounty curator is", - "malicious or inactive. As a result, child-bounty curator deposit is", - "slashed.", - "", - "If the origin is the child-bounty curator, we take this as a sign", - "that they are unable to do their job, and are willingly giving up.", - "We could slash the deposit, but for now we allow them to unreserve", - "their deposit and exit without issue. (We may want to change this if", - "it is abused.)", - "", - "Finally, the origin can be anyone iff the child-bounty curator is", - "\"inactive\". Expiry update due of parent bounty is used to estimate", - "inactive state of child-bounty curator.", - "", - "This allows anyone in the community to call out that a child-bounty", - "curator is not doing their due diligence, and we should pick a new", - "one. In this case the child-bounty curator deposit is slashed.", - "", - "State of child-bounty is moved to Added state on successful call", - "completion.", - "", - "- `parent_bounty_id`: Index of parent bounty.", - "- `child_bounty_id`: Index of child bounty." - ] - }, - { - "name": "award_child_bounty", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "child_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "beneficiary", - "type": 151, - "typeName": "::Source" - } - ], - "index": 4, - "docs": [ - "Award child-bounty to a beneficiary.", - "", - "The beneficiary will be able to claim the funds after a delay.", - "", - "The dispatch origin for this call must be the master curator or", - "curator of this child-bounty.", - "", - "Parent bounty must be in active state, for this child-bounty call to", - "work.", - "", - "Child-bounty must be in active state, for processing the call. And", - "state of child-bounty is moved to \"PendingPayout\" on successful call", - "completion.", - "", - "- `parent_bounty_id`: Index of parent bounty.", - "- `child_bounty_id`: Index of child bounty.", - "- `beneficiary`: Beneficiary account." - ] - }, - { - "name": "claim_child_bounty", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "child_bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 5, - "docs": [ - "Claim the payout from an awarded child-bounty after payout delay.", - "", - "The dispatch origin for this call may be any signed origin.", - "", - "Call works independent of parent bounty state, No need for parent", - "bounty to be in active state.", - "", - "The Beneficiary is paid out with agreed bounty value. Curator fee is", - "paid & curator deposit is unreserved.", - "", - "Child-bounty must be in \"PendingPayout\" state, for processing the", - "call. And instance of child-bounty is removed from the state on", - "successful call completion.", - "", - "- `parent_bounty_id`: Index of parent bounty.", - "- `child_bounty_id`: Index of child bounty." - ] - }, - { - "name": "close_child_bounty", - "fields": [ - { - "name": "parent_bounty_id", - "type": 113, - "typeName": "BountyIndex" - }, - { - "name": "child_bounty_id", - "type": 113, - "typeName": "BountyIndex" - } - ], - "index": 6, - "docs": [ - "Cancel a proposed or active child-bounty. Child-bounty account funds", - "are transferred to parent bounty account. The child-bounty curator", - "deposit may be unreserved if possible.", - "", - "The dispatch origin for this call must be either parent curator or", - "`T::RejectOrigin`.", - "", - "If the state of child-bounty is `Active`, curator deposit is", - "unreserved.", - "", - "If the state of child-bounty is `PendingPayout`, call fails &", - "returns `PendingPayout` error.", - "", - "For the origin other than T::RejectOrigin, parent bounty must be in", - "active state, for this child-bounty call to work. For origin", - "T::RejectOrigin execution is forced.", - "", - "Instance of child-bounty is removed from the state on successful", - "call completion.", - "", - "- `parent_bounty_id`: Index of parent bounty.", - "- `child_bounty_id`: Index of child bounty." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 330, - "type": { - "path": [ - "pallet_referenda", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "submit", - "fields": [ - { - "name": "proposal_origin", - "type": 331, - "typeName": "PalletsOriginOf" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "enactment_moment", - "type": 336, - "typeName": "DispatchTime" - } - ], - "index": 0, - "docs": [ - "Propose a referendum on a privileged action.", - "", - "- `origin`: must be `Signed` and the account must have `SubmissionDeposit` funds", - " available.", - "- `proposal_origin`: The origin from which the proposal should be executed.", - "- `proposal_hash`: The hash of the proposal preimage.", - "- `enactment_moment`: The moment that the proposal should be enacted.", - "", - "Emits `Submitted`." - ] - }, - { - "name": "place_decision_deposit", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 1, - "docs": [ - "Post the Decision Deposit for a referendum.", - "", - "- `origin`: must be `Signed` and the account must have funds available for the", - " referendum's track's Decision Deposit.", - "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be", - " posted.", - "", - "Emits `DecisionDepositPlaced`." - ] - }, - { - "name": "refund_decision_deposit", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 2, - "docs": [ - "Refund the Decision Deposit for a closed referendum back to the depositor.", - "", - "- `origin`: must be `Signed` or `Root`.", - "- `index`: The index of a closed referendum whose Decision Deposit has not yet been", - " refunded.", - "", - "Emits `DecisionDepositRefunded`." - ] - }, - { - "name": "cancel", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 3, - "docs": [ - "Cancel an ongoing referendum.", - "", - "- `origin`: must be the `CancelOrigin`.", - "- `index`: The index of the referendum to be cancelled.", - "", - "Emits `Cancelled`." - ] - }, - { - "name": "kill", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 4, - "docs": [ - "Cancel an ongoing referendum and slash the deposits.", - "", - "- `origin`: must be the `KillOrigin`.", - "- `index`: The index of the referendum to be cancelled.", - "", - "Emits `Killed` and `DepositSlashed`." - ] - }, - { - "name": "nudge_referendum", - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ReferendumIndex" - } - ], - "index": 5, - "docs": [ - "Advance a referendum onto its next logical state. Only used internally.", - "", - "- `origin`: must be `Root`.", - "- `index`: the referendum to be advanced." - ] - }, - { - "name": "one_fewer_deciding", - "fields": [ - { - "name": "track", - "type": 2, - "typeName": "TrackIdOf" - } - ], - "index": 6, - "docs": [ - "Advance a track onto its next logical state. Only used internally.", - "", - "- `origin`: must be `Root`.", - "- `track`: the track to be advanced.", - "", - "Action item for when there is now one fewer referendum in the deciding phase and the", - "`DecidingCount` is not yet updated. This means that we should either:", - "- begin deciding another referendum (and leave `DecidingCount` alone); or", - "- decrement `DecidingCount`." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 331, - "type": { - "path": [ - "node_runtime", - "OriginCaller" - ], - "def": { - "variant": { - "variants": [ - { - "name": "system", - "fields": [ - { - "type": 332, - "typeName": "frame_system::Origin" - } - ], - "index": 0 - }, - { - "name": "Council", - "fields": [ - { - "type": 333, - "typeName": "pallet_collective::Origin" - } - ], - "index": 13 - }, - { - "name": "TechnicalCommittee", - "fields": [ - { - "type": 334, - "typeName": "pallet_collective::Origin" - } - ], - "index": 14 - }, - { - "name": "Void", - "fields": [ - { - "type": 335, - "typeName": "self::sp_api_hidden_includes_construct_runtime::hidden_include::Void" - } - ], - "index": 3 - } - ] - } - } - } - }, - { - "id": 332, - "type": { - "path": [ - "frame_support", - "dispatch", - "RawOrigin" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Root", - "index": 0 - }, - { - "name": "Signed", - "fields": [ - { - "type": 0, - "typeName": "AccountId" - } - ], - "index": 1 - }, - { - "name": "None", - "index": 2 - } - ] - } - } - } - }, - { - "id": 333, - "type": { - "path": [ - "pallet_collective", - "RawOrigin" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Members", - "fields": [ - { - "type": 4, - "typeName": "MemberCount" - }, - { - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 0 - }, - { - "name": "Member", - "fields": [ - { - "type": 0, - "typeName": "AccountId" - } - ], - "index": 1 - }, - { - "name": "_Phantom", - "index": 2 - } - ] - } - } - } - }, - { - "id": 334, - "type": { - "path": [ - "pallet_collective", - "RawOrigin" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Members", - "fields": [ - { - "type": 4, - "typeName": "MemberCount" - }, - { - "type": 4, - "typeName": "MemberCount" - } - ], - "index": 0 - }, - { - "name": "Member", - "fields": [ - { - "type": 0, - "typeName": "AccountId" - } - ], - "index": 1 - }, - { - "name": "_Phantom", - "index": 2 - } - ] - } - } - } - }, - { - "id": 335, - "type": { - "path": [ - "sp_core", - "Void" - ], - "def": { - "variant": {} - } - } - }, - { - "id": 336, - "type": { - "path": [ - "frame_support", - "traits", - "schedule", - "DispatchTime" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "At", - "fields": [ - { - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 0 - }, - { - "name": "After", - "fields": [ - { - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 337, - "type": { - "path": [ - "pallet_conviction_voting", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "vote", - "fields": [ - { - "name": "poll_index", - "type": 113, - "typeName": "PollIndexOf" - }, - { - "name": "vote", - "type": 338, - "typeName": "AccountVote>" - } - ], - "index": 0, - "docs": [ - "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;", - "otherwise it is a vote to keep the status quo.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `poll_index`: The index of the poll to vote for.", - "- `vote`: The vote configuration.", - "", - "Weight: `O(R)` where R is the number of polls the voter has voted on." - ] - }, - { - "name": "delegate", - "fields": [ - { - "name": "class", - "type": 2, - "typeName": "ClassOf" - }, - { - "name": "to", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "conviction", - "type": 340, - "typeName": "Conviction" - }, - { - "name": "balance", - "type": 6, - "typeName": "BalanceOf" - } - ], - "index": 1, - "docs": [ - "Delegate the voting power (with some given conviction) of the sending account for a", - "particular class of polls.", - "", - "The balance delegated is locked for as long as it's delegated, and thereafter for the", - "time appropriate for the conviction's lock period.", - "", - "The dispatch origin of this call must be _Signed_, and the signing account must either:", - " - be delegating already; or", - " - have no voting activity (if there is, then it will need to be removed/consolidated", - " through `reap_vote` or `unvote`).", - "", - "- `to`: The account whose voting the `target` account's voting power will follow.", - "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls", - " to this function are required.", - "- `conviction`: The conviction that will be attached to the delegated votes. When the", - " account is undelegated, the funds will be locked for the corresponding period.", - "- `balance`: The amount of the account's balance to be used in delegating. This must not", - " be more than the account's current balance.", - "", - "Emits `Delegated`.", - "", - "Weight: `O(R)` where R is the number of polls the voter delegating to has", - " voted on. Weight is initially charged as if maximum votes, but is refunded later." - ] - }, - { - "name": "undelegate", - "fields": [ - { - "name": "class", - "type": 2, - "typeName": "ClassOf" - } - ], - "index": 2, - "docs": [ - "Undelegate the voting power of the sending account for a particular class of polls.", - "", - "Tokens may be unlocked following once an amount of time consistent with the lock period", - "of the conviction with which the delegation was issued.", - "", - "The dispatch origin of this call must be _Signed_ and the signing account must be", - "currently delegating.", - "", - "- `class`: The class of polls to remove the delegation from.", - "", - "Emits `Undelegated`.", - "", - "Weight: `O(R)` where R is the number of polls the voter delegating to has", - " voted on. Weight is initially charged as if maximum votes, but is refunded later." - ] - }, - { - "name": "unlock", - "fields": [ - { - "name": "class", - "type": 2, - "typeName": "ClassOf" - }, - { - "name": "target", - "type": 0, - "typeName": "T::AccountId" - } - ], - "index": 3, - "docs": [ - "Remove the lock caused prior voting/delegating which has expired within a particluar", - "class.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `class`: The class of polls to unlock.", - "- `target`: The account to remove the lock on.", - "", - "Weight: `O(R)` with R number of vote of target." - ] - }, - { - "name": "remove_vote", - "fields": [ - { - "name": "class", - "type": 341, - "typeName": "Option>" - }, - { - "name": "index", - "type": 4, - "typeName": "PollIndexOf" - } - ], - "index": 4, - "docs": [ - "Remove a vote for a poll.", - "", - "If:", - "- the poll was cancelled, or", - "- the poll is ongoing, or", - "- the poll has ended such that", - " - the vote of the account was in opposition to the result; or", - " - there was no conviction to the account's vote; or", - " - the account made a split vote", - "...then the vote is removed cleanly and a following call to `unlock` may result in more", - "funds being available.", - "", - "If, however, the poll has ended and:", - "- it finished corresponding to the vote of the account, and", - "- the account made a standard vote with conviction, and", - "- the lock period of the conviction is not over", - "...then the lock will be aggregated into the overall account's lock, which may involve", - "*overlocking* (where the two locks are combined into a single lock that is the maximum", - "of both the amount locked and the time is it locked for).", - "", - "The dispatch origin of this call must be _Signed_, and the signer must have a vote", - "registered for poll `index`.", - "", - "- `index`: The index of poll of the vote to be removed.", - "- `class`: Optional parameter, if given it indicates the class of the poll. For polls", - " which have finished or are cancelled, this must be `Some`.", - "", - "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.", - " Weight is calculated for the maximum number of vote." - ] - }, - { - "name": "remove_other_vote", - "fields": [ - { - "name": "target", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "class", - "type": 2, - "typeName": "ClassOf" - }, - { - "name": "index", - "type": 4, - "typeName": "PollIndexOf" - } - ], - "index": 5, - "docs": [ - "Remove a vote for a poll.", - "", - "If the `target` is equal to the signer, then this function is exactly equivalent to", - "`remove_vote`. If not equal to the signer, then the vote must have expired,", - "either because the poll was cancelled, because the voter lost the poll or", - "because the conviction period is over.", - "", - "The dispatch origin of this call must be _Signed_.", - "", - "- `target`: The account of the vote to be removed; this account must have voted for poll", - " `index`.", - "- `index`: The index of poll of the vote to be removed.", - "- `class`: The class of the poll.", - "", - "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.", - " Weight is calculated for the maximum number of vote." - ] - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 338, - "type": { - "path": [ - "pallet_conviction_voting", - "vote", - "AccountVote" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Standard", - "fields": [ - { - "name": "vote", - "type": 339, - "typeName": "Vote" - }, - { - "name": "balance", - "type": 6, - "typeName": "Balance" - } - ], - "index": 0 - }, - { - "name": "Split", - "fields": [ - { - "name": "aye", - "type": 6, - "typeName": "Balance" - }, - { - "name": "nay", - "type": 6, - "typeName": "Balance" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 339, - "type": { - "path": [ - "pallet_conviction_voting", - "vote", - "Vote" - ], - "def": { - "composite": { - "fields": [ - { - "type": 2 - } - ] - } - } - } - }, - { - "id": 340, - "type": { - "path": [ - "pallet_conviction_voting", - "conviction", - "Conviction" - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Locked1x", - "index": 1 - }, - { - "name": "Locked2x", - "index": 2 - }, - { - "name": "Locked3x", - "index": 3 - }, - { - "name": "Locked4x", - "index": 4 - }, - { - "name": "Locked5x", - "index": 5 - }, - { - "name": "Locked6x", - "index": 6 - } - ] - } - } - } - }, - { - "id": 341, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 2 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 2 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 342, - "type": { - "path": [ - "pallet_whitelist", - "pallet", - "Call" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "whitelist_call", - "fields": [ - { - "name": "call_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 0 - }, - { - "name": "remove_whitelisted_call", - "fields": [ - { - "name": "call_hash", - "type": 9, - "typeName": "T::Hash" - } - ], - "index": 1 - }, - { - "name": "dispatch_whitelisted_call", - "fields": [ - { - "name": "call_hash", - "type": 9, - "typeName": "T::Hash" - }, - { - "name": "call_weight_witness", - "type": 8, - "typeName": "Weight" - } - ], - "index": 2 - }, - { - "name": "dispatch_whitelisted_call_with_preimage", - "fields": [ - { - "name": "call", - "type": 134, - "typeName": "Box<::Call>" - } - ], - "index": 3 - } - ] - } - }, - "docs": [ - "Contains one variant per dispatchable that can be called by an extrinsic." - ] - } - }, - { - "id": 343, - "type": { - "path": [ - "pallet_utility", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "TooManyCalls", - "index": 0, - "docs": [ - "Too many calls batched." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 344, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 345 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 346, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 345, - "type": { - "def": { - "tuple": [ - 139, - 8 - ] - } - } - }, - { - "id": 346, - "type": { - "def": { - "sequence": { - "type": 345 - } - } - } - }, - { - "id": 347, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 1 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 348, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 348, - "type": { - "def": { - "sequence": { - "type": 1 - } - } - } - }, - { - "id": 349, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 1 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 1 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 350, - "type": { - "path": [ - "sp_consensus_babe", - "BabeEpochConfiguration" - ], - "def": { - "composite": { - "fields": [ - { - "name": "c", - "type": 143, - "typeName": "(u64, u64)" - }, - { - "name": "allowed_slots", - "type": 144, - "typeName": "AllowedSlots" - } - ] - } - } - } - }, - { - "id": 351, - "type": { - "path": [ - "pallet_babe", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InvalidEquivocationProof", - "index": 0, - "docs": [ - "An equivocation proof provided as part of an equivocation report is invalid." - ] - }, - { - "name": "InvalidKeyOwnershipProof", - "index": 1, - "docs": [ - "A key ownership proof provided as part of an equivocation report is invalid." - ] - }, - { - "name": "DuplicateOffenceReport", - "index": 2, - "docs": [ - "A given equivocation report is valid but already previously reported." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 352, - "type": { - "def": { - "sequence": { - "type": 353 - } - } - } - }, - { - "id": 353, - "type": { - "path": [ - "pallet_authorship", - "UncleEntryItem" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Hash", - "type": 9 - }, - { - "name": "Author", - "type": 0 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InclusionHeight", - "fields": [ - { - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 0 - }, - { - "name": "Uncle", - "fields": [ - { - "type": 9, - "typeName": "Hash" - }, - { - "type": 58, - "typeName": "Option" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 354, - "type": { - "path": [ - "pallet_authorship", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InvalidUncleParent", - "index": 0, - "docs": [ - "The uncle parent not in the chain." - ] - }, - { - "name": "UnclesAlreadySet", - "index": 1, - "docs": [ - "Uncles already set in the block." - ] - }, - { - "name": "TooManyUncles", - "index": 2, - "docs": [ - "Too many uncles." - ] - }, - { - "name": "GenesisUncle", - "index": 3, - "docs": [ - "The uncle is genesis." - ] - }, - { - "name": "TooHighUncle", - "index": 4, - "docs": [ - "The uncle is too high in chain." - ] - }, - { - "name": "UncleAlreadyIncluded", - "index": 5, - "docs": [ - "The uncle is already included." - ] - }, - { - "name": "OldUncle", - "index": 6, - "docs": [ - "The uncle isn't recent enough to be included." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 355, - "type": { - "def": { - "tuple": [ - 0, - 6, - 35 - ] - } - } - }, - { - "id": 356, - "type": { - "path": [ - "pallet_indices", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotAssigned", - "index": 0, - "docs": [ - "The index was not already assigned." - ] - }, - { - "name": "NotOwner", - "index": 1, - "docs": [ - "The index is assigned to another account." - ] - }, - { - "name": "InUse", - "index": 2, - "docs": [ - "The index was not available." - ] - }, - { - "name": "NotTransfer", - "index": 3, - "docs": [ - "The source and destination accounts are identical." - ] - }, - { - "name": "Permanent", - "index": 4, - "docs": [ - "The index is permanent and may not be freed/changed." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 357, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 358 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 360, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 358, - "type": { - "path": [ - "pallet_balances", - "BalanceLock" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "id", - "type": 130, - "typeName": "LockIdentifier" - }, - { - "name": "amount", - "type": 6, - "typeName": "Balance" - }, - { - "name": "reasons", - "type": 359, - "typeName": "Reasons" - } - ] - } - } - } - }, - { - "id": 359, - "type": { - "path": [ - "pallet_balances", - "Reasons" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Fee", - "index": 0 - }, - { - "name": "Misc", - "index": 1 - }, - { - "name": "All", - "index": 2 - } - ] - } - } - } - }, - { - "id": 360, - "type": { - "def": { - "sequence": { - "type": 358 - } - } - } - }, - { - "id": 361, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 362 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 363, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 362, - "type": { - "path": [ - "pallet_balances", - "ReserveData" - ], - "params": [ - { - "name": "ReserveIdentifier", - "type": 130 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "id", - "type": 130, - "typeName": "ReserveIdentifier" - }, - { - "name": "amount", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 363, - "type": { - "def": { - "sequence": { - "type": 362 - } - } - } - }, - { - "id": 364, - "type": { - "path": [ - "pallet_balances", - "Releases" - ], - "def": { - "variant": { - "variants": [ - { - "name": "V1_0_0", - "index": 0 - }, - { - "name": "V2_0_0", - "index": 1 - } - ] - } - } - } - }, - { - "id": 365, - "type": { - "path": [ - "pallet_balances", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "VestingBalance", - "index": 0, - "docs": [ - "Vesting balance too high to send value" - ] - }, - { - "name": "LiquidityRestrictions", - "index": 1, - "docs": [ - "Account liquidity restrictions prevent withdrawal" - ] - }, - { - "name": "InsufficientBalance", - "index": 2, - "docs": [ - "Balance too low to send value" - ] - }, - { - "name": "ExistentialDeposit", - "index": 3, - "docs": [ - "Value too low to create account due to existential deposit" - ] - }, - { - "name": "KeepAlive", - "index": 4, - "docs": [ - "Transfer/payment would kill account" - ] - }, - { - "name": "ExistingVestingSchedule", - "index": 5, - "docs": [ - "A vesting schedule already exists for this account" - ] - }, - { - "name": "DeadAccount", - "index": 6, - "docs": [ - "Beneficiary account must pre-exist" - ] - }, - { - "name": "TooManyReserves", - "index": 7, - "docs": [ - "Number of named reserves exceed MaxReserves" - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 366, - "type": { - "path": [ - "sp_arithmetic", - "fixed_point", - "FixedU128" - ], - "def": { - "composite": { - "fields": [ - { - "type": 6, - "typeName": "u128" - } - ] - } - } - } - }, - { - "id": 367, - "type": { - "path": [ - "pallet_transaction_payment", - "Releases" - ], - "def": { - "variant": { - "variants": [ - { - "name": "V1Ancient", - "index": 0 - }, - { - "name": "V2", - "index": 1 - } - ] - } - } - } - }, - { - "id": 368, - "type": { - "def": { - "sequence": { - "type": 369 - } - } - } - }, - { - "id": 369, - "type": { - "path": [ - "frame_support", - "weights", - "WeightToFeeCoefficient" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "coeff_integer", - "type": 6, - "typeName": "Balance" - }, - { - "name": "coeff_frac", - "type": 116, - "typeName": "Perbill" - }, - { - "name": "negative", - "type": 35, - "typeName": "bool" - }, - { - "name": "degree", - "type": 2, - "typeName": "u8" - } - ] - } - } - } - }, - { - "id": 370, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "Phase" - ], - "params": [ - { - "name": "Bn", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Off", - "index": 0 - }, - { - "name": "Signed", - "index": 1 - }, - { - "name": "Unsigned", - "fields": [ - { - "type": 371, - "typeName": "(bool, Bn)" - } - ], - "index": 2 - }, - { - "name": "Emergency", - "index": 3 - } - ] - } - } - } - }, - { - "id": 371, - "type": { - "def": { - "tuple": [ - 35, - 4 - ] - } - } - }, - { - "id": 372, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "ReadySolution" - ], - "params": [ - { - "name": "A", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "supports", - "type": 209, - "typeName": "Supports" - }, - { - "name": "score", - "type": 206, - "typeName": "ElectionScore" - }, - { - "name": "compute", - "type": 34, - "typeName": "ElectionCompute" - } - ] - } - } - } - }, - { - "id": 373, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "RoundSnapshot" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "voters", - "type": 374, - "typeName": "Vec>" - }, - { - "name": "targets", - "type": 40, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 374, - "type": { - "def": { - "sequence": { - "type": 375 - } - } - } - }, - { - "id": 375, - "type": { - "def": { - "tuple": [ - 0, - 8, - 376 - ] - } - } - }, - { - "id": 376, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 0 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 40, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 377, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_btree_map", - "BoundedBTreeMap" - ], - "params": [ - { - "name": "K", - "type": 206 - }, - { - "name": "V", - "type": 4 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 378, - "typeName": "BTreeMap" - } - ] - } - } - } - }, - { - "id": 378, - "type": { - "path": [ - "BTreeMap" - ], - "params": [ - { - "name": "K", - "type": 206 - }, - { - "name": "V", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 379 - } - ] - } - } - } - }, - { - "id": 379, - "type": { - "def": { - "sequence": { - "type": 380 - } - } - } - }, - { - "id": 380, - "type": { - "def": { - "tuple": [ - 206, - 4 - ] - } - } - }, - { - "id": 381, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "signed", - "SignedSubmission" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "Solution", - "type": 155 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "raw_solution", - "type": 154, - "typeName": "RawSolution" - }, - { - "name": "reward", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 382, - "type": { - "path": [ - "pallet_election_provider_multi_phase", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "PreDispatchEarlySubmission", - "index": 0, - "docs": [ - "Submission was too early." - ] - }, - { - "name": "PreDispatchWrongWinnerCount", - "index": 1, - "docs": [ - "Wrong number of winners presented." - ] - }, - { - "name": "PreDispatchWeakSubmission", - "index": 2, - "docs": [ - "Submission was too weak, score-wise." - ] - }, - { - "name": "SignedQueueFull", - "index": 3, - "docs": [ - "The queue was full, and the solution was not better than any of the existing ones." - ] - }, - { - "name": "SignedCannotPayDeposit", - "index": 4, - "docs": [ - "The origin failed to pay the deposit." - ] - }, - { - "name": "SignedInvalidWitness", - "index": 5, - "docs": [ - "Witness data to dispatchable is invalid." - ] - }, - { - "name": "SignedTooMuchWeight", - "index": 6, - "docs": [ - "The signed submission consumes too much weight" - ] - }, - { - "name": "OcwCallWrongEra", - "index": 7, - "docs": [ - "OCW submitted solution for wrong round" - ] - }, - { - "name": "MissingSnapshotMetadata", - "index": 8, - "docs": [ - "Snapshot metadata should exist but didn't." - ] - }, - { - "name": "InvalidSubmissionIndex", - "index": 9, - "docs": [ - "`Self::insert_submission` returned an invalid index." - ] - }, - { - "name": "CallNotAllowed", - "index": 10, - "docs": [ - "The call is not allowed at this point." - ] - }, - { - "name": "FallbackFailed", - "index": 11, - "docs": [ - "The fallback failed" - ] - } - ] - } - }, - "docs": [ - "Error of the pallet that can be returned in response to dispatches." - ] - } - }, - { - "id": 383, - "type": { - "path": [ - "pallet_staking", - "StakingLedger" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "stash", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "total", - "type": 65, - "typeName": "Balance" - }, - { - "name": "active", - "type": 65, - "typeName": "Balance" - }, - { - "name": "unlocking", - "type": 384, - "typeName": "BoundedVec, MaxUnlockingChunks>" - }, - { - "name": "claimed_rewards", - "type": 92, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 384, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 385 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 386, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 385, - "type": { - "path": [ - "pallet_staking", - "UnlockChunk" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "value", - "type": 65, - "typeName": "Balance" - }, - { - "name": "era", - "type": 113, - "typeName": "EraIndex" - } - ] - } - } - } - }, - { - "id": 386, - "type": { - "def": { - "sequence": { - "type": 385 - } - } - } - }, - { - "id": 387, - "type": { - "path": [ - "pallet_staking", - "Nominations" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "targets", - "type": 376, - "typeName": "BoundedVec" - }, - { - "name": "submitted_in", - "type": 4, - "typeName": "EraIndex" - }, - { - "name": "suppressed", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 388, - "type": { - "path": [ - "pallet_staking", - "ActiveEraInfo" - ], - "def": { - "composite": { - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "EraIndex" - }, - { - "name": "start", - "type": 107, - "typeName": "Option" - } - ] - } - } - } - }, - { - "id": 389, - "type": { - "def": { - "tuple": [ - 4, - 0 - ] - } - } - }, - { - "id": 390, - "type": { - "path": [ - "pallet_staking", - "EraRewardPoints" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "total", - "type": 4, - "typeName": "RewardPoint" - }, - { - "name": "individual", - "type": 391, - "typeName": "BTreeMap" - } - ] - } - } - } - }, - { - "id": 391, - "type": { - "path": [ - "BTreeMap" - ], - "params": [ - { - "name": "K", - "type": 0 - }, - { - "name": "V", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 392 - } - ] - } - } - } - }, - { - "id": 392, - "type": { - "def": { - "sequence": { - "type": 393 - } - } - } - }, - { - "id": 393, - "type": { - "def": { - "tuple": [ - 0, - 4 - ] - } - } - }, - { - "id": 394, - "type": { - "path": [ - "pallet_staking", - "Forcing" - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotForcing", - "index": 0 - }, - { - "name": "ForceNew", - "index": 1 - }, - { - "name": "ForceNone", - "index": 2 - }, - { - "name": "ForceAlways", - "index": 3 - } - ] - } - } - } - }, - { - "id": 395, - "type": { - "def": { - "sequence": { - "type": 396 - } - } - } - }, - { - "id": 396, - "type": { - "path": [ - "pallet_staking", - "UnappliedSlash" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "validator", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "own", - "type": 6, - "typeName": "Balance" - }, - { - "name": "others", - "type": 47, - "typeName": "Vec<(AccountId, Balance)>" - }, - { - "name": "reporters", - "type": 40, - "typeName": "Vec" - }, - { - "name": "payout", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 397, - "type": { - "def": { - "tuple": [ - 116, - 6 - ] - } - } - }, - { - "id": 398, - "type": { - "path": [ - "pallet_staking", - "slashing", - "SlashingSpans" - ], - "def": { - "composite": { - "fields": [ - { - "name": "span_index", - "type": 4, - "typeName": "SpanIndex" - }, - { - "name": "last_start", - "type": 4, - "typeName": "EraIndex" - }, - { - "name": "last_nonzero_slash", - "type": 4, - "typeName": "EraIndex" - }, - { - "name": "prior", - "type": 92, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 399, - "type": { - "path": [ - "pallet_staking", - "slashing", - "SpanRecord" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "slashed", - "type": 6, - "typeName": "Balance" - }, - { - "name": "paid_out", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 400, - "type": { - "def": { - "sequence": { - "type": 401 - } - } - } - }, - { - "id": 401, - "type": { - "def": { - "tuple": [ - 4, - 35 - ] - } - } - }, - { - "id": 402, - "type": { - "path": [ - "pallet_staking", - "Releases" - ], - "def": { - "variant": { - "variants": [ - { - "name": "V1_0_0Ancient", - "index": 0 - }, - { - "name": "V2_0_0", - "index": 1 - }, - { - "name": "V3_0_0", - "index": 2 - }, - { - "name": "V4_0_0", - "index": 3 - }, - { - "name": "V5_0_0", - "index": 4 - }, - { - "name": "V6_0_0", - "index": 5 - }, - { - "name": "V7_0_0", - "index": 6 - }, - { - "name": "V8_0_0", - "index": 7 - }, - { - "name": "V9_0_0", - "index": 8 - } - ] - } - } - } - }, - { - "id": 403, - "type": { - "path": [ - "pallet_staking", - "pallet", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotController", - "index": 0, - "docs": [ - "Not a controller account." - ] - }, - { - "name": "NotStash", - "index": 1, - "docs": [ - "Not a stash account." - ] - }, - { - "name": "AlreadyBonded", - "index": 2, - "docs": [ - "Stash is already bonded." - ] - }, - { - "name": "AlreadyPaired", - "index": 3, - "docs": [ - "Controller is already paired." - ] - }, - { - "name": "EmptyTargets", - "index": 4, - "docs": [ - "Targets cannot be empty." - ] - }, - { - "name": "DuplicateIndex", - "index": 5, - "docs": [ - "Duplicate index." - ] - }, - { - "name": "InvalidSlashIndex", - "index": 6, - "docs": [ - "Slash record index out of bounds." - ] - }, - { - "name": "InsufficientBond", - "index": 7, - "docs": [ - "Cannot have a validator or nominator role, with value less than the minimum defined by", - "governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the", - "intention, `chill` first to remove one's role as validator/nominator." - ] - }, - { - "name": "NoMoreChunks", - "index": 8, - "docs": [ - "Can not schedule more unlock chunks." - ] - }, - { - "name": "NoUnlockChunk", - "index": 9, - "docs": [ - "Can not rebond without unlocking chunks." - ] - }, - { - "name": "FundedTarget", - "index": 10, - "docs": [ - "Attempting to target a stash that still has funds." - ] - }, - { - "name": "InvalidEraToReward", - "index": 11, - "docs": [ - "Invalid era to reward." - ] - }, - { - "name": "InvalidNumberOfNominations", - "index": 12, - "docs": [ - "Invalid number of nominations." - ] - }, - { - "name": "NotSortedAndUnique", - "index": 13, - "docs": [ - "Items are not sorted and unique." - ] - }, - { - "name": "AlreadyClaimed", - "index": 14, - "docs": [ - "Rewards for this era have already been claimed for this validator." - ] - }, - { - "name": "IncorrectHistoryDepth", - "index": 15, - "docs": [ - "Incorrect previous history depth input provided." - ] - }, - { - "name": "IncorrectSlashingSpans", - "index": 16, - "docs": [ - "Incorrect number of slashing spans provided." - ] - }, - { - "name": "BadState", - "index": 17, - "docs": [ - "Internal state has become somehow corrupted and the operation cannot continue." - ] - }, - { - "name": "TooManyTargets", - "index": 18, - "docs": [ - "Too many nomination targets supplied." - ] - }, - { - "name": "BadTarget", - "index": 19, - "docs": [ - "A nomination target was supplied that was blocked or otherwise not a validator." - ] - }, - { - "name": "CannotChillOther", - "index": 20, - "docs": [ - "The user has enough bond and thus cannot be chilled forcefully by an external person." - ] - }, - { - "name": "TooManyNominators", - "index": 21, - "docs": [ - "There are too many nominators in the system. Governance needs to adjust the staking", - "settings to keep things safe for the runtime." - ] - }, - { - "name": "TooManyValidators", - "index": 22, - "docs": [ - "There are too many validators in the system. Governance needs to adjust the staking", - "settings to keep things safe for the runtime." - ] - }, - { - "name": "CommissionTooLow", - "index": 23, - "docs": [ - "Commission is too low. Must be at least `MinCommission`." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 404, - "type": { - "def": { - "sequence": { - "type": 405 - } - } - } - }, - { - "id": 405, - "type": { - "def": { - "tuple": [ - 0, - 223 - ] - } - } - }, - { - "id": 406, - "type": { - "def": { - "tuple": [ - 407, - 10 - ] - } - } - }, - { - "id": 407, - "type": { - "path": [ - "sp_core", - "crypto", - "KeyTypeId" - ], - "def": { - "composite": { - "fields": [ - { - "type": 14, - "typeName": "[u8; 4]" - } - ] - } - } - } - }, - { - "id": 408, - "type": { - "path": [ - "pallet_session", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InvalidProof", - "index": 0, - "docs": [ - "Invalid ownership proof." - ] - }, - { - "name": "NoAssociatedValidatorId", - "index": 1, - "docs": [ - "No associated validator ID for account." - ] - }, - { - "name": "DuplicatedKey", - "index": 2, - "docs": [ - "Registered duplicate key." - ] - }, - { - "name": "NoKeys", - "index": 3, - "docs": [ - "No keys are associated with this account." - ] - }, - { - "name": "NoAccount", - "index": 4, - "docs": [ - "Key setting account is not live, so it's impossible to associate keys." - ] - } - ] - } - }, - "docs": [ - "Error for the session pallet." - ] - } - }, - { - "id": 409, - "type": { - "def": { - "sequence": { - "type": 410 - } - } - } - }, - { - "id": 410, - "type": { - "def": { - "tuple": [ - 4, - 9, - 0 - ] - } - } - }, - { - "id": 411, - "type": { - "def": { - "tuple": [ - 40, - 6 - ] - } - } - }, - { - "id": 412, - "type": { - "path": [ - "pallet_democracy", - "PreimageStatus" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Missing", - "fields": [ - { - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 0 - }, - { - "name": "Available", - "fields": [ - { - "name": "data", - "type": 10, - "typeName": "Vec" - }, - { - "name": "provider", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "since", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "expiry", - "type": 93, - "typeName": "Option" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 413, - "type": { - "path": [ - "pallet_democracy", - "types", - "ReferendumInfo" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Hash", - "type": 9 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Ongoing", - "fields": [ - { - "type": 414, - "typeName": "ReferendumStatus" - } - ], - "index": 0 - }, - { - "name": "Finished", - "fields": [ - { - "name": "approved", - "type": 35, - "typeName": "bool" - }, - { - "name": "end", - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 414, - "type": { - "path": [ - "pallet_democracy", - "types", - "ReferendumStatus" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Hash", - "type": 9 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "end", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "Hash" - }, - { - "name": "threshold", - "type": 41, - "typeName": "VoteThreshold" - }, - { - "name": "delay", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "tally", - "type": 415, - "typeName": "Tally" - } - ] - } - } - } - }, - { - "id": 415, - "type": { - "path": [ - "pallet_democracy", - "types", - "Tally" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "ayes", - "type": 6, - "typeName": "Balance" - }, - { - "name": "nays", - "type": 6, - "typeName": "Balance" - }, - { - "name": "turnout", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 416, - "type": { - "path": [ - "pallet_democracy", - "vote", - "Voting" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Direct", - "fields": [ - { - "name": "votes", - "type": 417, - "typeName": "Vec<(ReferendumIndex, AccountVote)>" - }, - { - "name": "delegations", - "type": 419, - "typeName": "Delegations" - }, - { - "name": "prior", - "type": 420, - "typeName": "PriorLock" - } - ], - "index": 0 - }, - { - "name": "Delegating", - "fields": [ - { - "name": "balance", - "type": 6, - "typeName": "Balance" - }, - { - "name": "target", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "conviction", - "type": 226, - "typeName": "Conviction" - }, - { - "name": "delegations", - "type": 419, - "typeName": "Delegations" - }, - { - "name": "prior", - "type": 420, - "typeName": "PriorLock" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 417, - "type": { - "def": { - "sequence": { - "type": 418 - } - } - } - }, - { - "id": 418, - "type": { - "def": { - "tuple": [ - 4, - 42 - ] - } - } - }, - { - "id": 419, - "type": { - "path": [ - "pallet_democracy", - "types", - "Delegations" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "votes", - "type": 6, - "typeName": "Balance" - }, - { - "name": "capital", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 420, - "type": { - "path": [ - "pallet_democracy", - "vote", - "PriorLock" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 4, - "typeName": "BlockNumber" - }, - { - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 421, - "type": { - "def": { - "tuple": [ - 9, - 41 - ] - } - } - }, - { - "id": 422, - "type": { - "def": { - "tuple": [ - 4, - 40 - ] - } - } - }, - { - "id": 423, - "type": { - "path": [ - "pallet_democracy", - "Releases" - ], - "def": { - "variant": { - "variants": [ - { - "name": "V1", - "index": 0 - } - ] - } - } - } - }, - { - "id": 424, - "type": { - "path": [ - "pallet_democracy", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "ValueLow", - "index": 0, - "docs": [ - "Value too low" - ] - }, - { - "name": "ProposalMissing", - "index": 1, - "docs": [ - "Proposal does not exist" - ] - }, - { - "name": "AlreadyCanceled", - "index": 2, - "docs": [ - "Cannot cancel the same proposal twice" - ] - }, - { - "name": "DuplicateProposal", - "index": 3, - "docs": [ - "Proposal already made" - ] - }, - { - "name": "ProposalBlacklisted", - "index": 4, - "docs": [ - "Proposal still blacklisted" - ] - }, - { - "name": "NotSimpleMajority", - "index": 5, - "docs": [ - "Next external proposal not simple majority" - ] - }, - { - "name": "InvalidHash", - "index": 6, - "docs": [ - "Invalid hash" - ] - }, - { - "name": "NoProposal", - "index": 7, - "docs": [ - "No external proposal" - ] - }, - { - "name": "AlreadyVetoed", - "index": 8, - "docs": [ - "Identity may not veto a proposal twice" - ] - }, - { - "name": "DuplicatePreimage", - "index": 9, - "docs": [ - "Preimage already noted" - ] - }, - { - "name": "NotImminent", - "index": 10, - "docs": [ - "Not imminent" - ] - }, - { - "name": "TooEarly", - "index": 11, - "docs": [ - "Too early" - ] - }, - { - "name": "Imminent", - "index": 12, - "docs": [ - "Imminent" - ] - }, - { - "name": "PreimageMissing", - "index": 13, - "docs": [ - "Preimage not found" - ] - }, - { - "name": "ReferendumInvalid", - "index": 14, - "docs": [ - "Vote given for invalid referendum" - ] - }, - { - "name": "PreimageInvalid", - "index": 15, - "docs": [ - "Invalid preimage" - ] - }, - { - "name": "NoneWaiting", - "index": 16, - "docs": [ - "No proposals waiting" - ] - }, - { - "name": "NotVoter", - "index": 17, - "docs": [ - "The given account did not vote on the referendum." - ] - }, - { - "name": "NoPermission", - "index": 18, - "docs": [ - "The actor has no permission to conduct the action." - ] - }, - { - "name": "AlreadyDelegating", - "index": 19, - "docs": [ - "The account is already delegating." - ] - }, - { - "name": "InsufficientFunds", - "index": 20, - "docs": [ - "Too high a balance was provided that the account cannot afford." - ] - }, - { - "name": "NotDelegating", - "index": 21, - "docs": [ - "The account is not currently delegating." - ] - }, - { - "name": "VotesExist", - "index": 22, - "docs": [ - "The account currently has votes attached to it and the operation cannot succeed until", - "these are removed, either through `unvote` or `reap_vote`." - ] - }, - { - "name": "InstantNotAllowed", - "index": 23, - "docs": [ - "The instant referendum origin is currently disallowed." - ] - }, - { - "name": "Nonsense", - "index": 24, - "docs": [ - "Delegation to oneself makes no sense." - ] - }, - { - "name": "WrongUpperBound", - "index": 25, - "docs": [ - "Invalid upper bound." - ] - }, - { - "name": "MaxVotesReached", - "index": 26, - "docs": [ - "Maximum number of votes reached." - ] - }, - { - "name": "TooManyProposals", - "index": 27, - "docs": [ - "Maximum number of proposals reached." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 425, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 9 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 110, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 426, - "type": { - "path": [ - "pallet_collective", - "Votes" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "index", - "type": 4, - "typeName": "ProposalIndex" - }, - { - "name": "threshold", - "type": 4, - "typeName": "MemberCount" - }, - { - "name": "ayes", - "type": 40, - "typeName": "Vec" - }, - { - "name": "nays", - "type": 40, - "typeName": "Vec" - }, - { - "name": "end", - "type": 4, - "typeName": "BlockNumber" - } - ] - } - } - } - }, - { - "id": 427, - "type": { - "path": [ - "pallet_collective", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotMember", - "index": 0, - "docs": [ - "Account is not a member" - ] - }, - { - "name": "DuplicateProposal", - "index": 1, - "docs": [ - "Duplicate proposals not allowed" - ] - }, - { - "name": "ProposalMissing", - "index": 2, - "docs": [ - "Proposal must exist" - ] - }, - { - "name": "WrongIndex", - "index": 3, - "docs": [ - "Mismatched index" - ] - }, - { - "name": "DuplicateVote", - "index": 4, - "docs": [ - "Duplicate vote ignored" - ] - }, - { - "name": "AlreadyInitialized", - "index": 5, - "docs": [ - "Members are already initialized!" - ] - }, - { - "name": "TooEarly", - "index": 6, - "docs": [ - "The close call was made too early, before the end of the voting." - ] - }, - { - "name": "TooManyProposals", - "index": 7, - "docs": [ - "There can only be a maximum of `MaxProposals` active proposals." - ] - }, - { - "name": "WrongProposalWeight", - "index": 8, - "docs": [ - "The given weight bound for the proposal was too low." - ] - }, - { - "name": "WrongProposalLength", - "index": 9, - "docs": [ - "The given length bound for the proposal was too low." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 428, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 9 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 110, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 429, - "type": { - "path": [ - "pallet_collective", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotMember", - "index": 0, - "docs": [ - "Account is not a member" - ] - }, - { - "name": "DuplicateProposal", - "index": 1, - "docs": [ - "Duplicate proposals not allowed" - ] - }, - { - "name": "ProposalMissing", - "index": 2, - "docs": [ - "Proposal must exist" - ] - }, - { - "name": "WrongIndex", - "index": 3, - "docs": [ - "Mismatched index" - ] - }, - { - "name": "DuplicateVote", - "index": 4, - "docs": [ - "Duplicate vote ignored" - ] - }, - { - "name": "AlreadyInitialized", - "index": 5, - "docs": [ - "Members are already initialized!" - ] - }, - { - "name": "TooEarly", - "index": 6, - "docs": [ - "The close call was made too early, before the end of the voting." - ] - }, - { - "name": "TooManyProposals", - "index": 7, - "docs": [ - "There can only be a maximum of `MaxProposals` active proposals." - ] - }, - { - "name": "WrongProposalWeight", - "index": 8, - "docs": [ - "The given weight bound for the proposal was too low." - ] - }, - { - "name": "WrongProposalLength", - "index": 9, - "docs": [ - "The given length bound for the proposal was too low." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 430, - "type": { - "def": { - "sequence": { - "type": 431 - } - } - } - }, - { - "id": 431, - "type": { - "path": [ - "pallet_elections_phragmen", - "SeatHolder" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "stake", - "type": 6, - "typeName": "Balance" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 432, - "type": { - "path": [ - "pallet_elections_phragmen", - "Voter" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "votes", - "type": 40, - "typeName": "Vec" - }, - { - "name": "stake", - "type": 6, - "typeName": "Balance" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 433, - "type": { - "path": [ - "pallet_elections_phragmen", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "UnableToVote", - "index": 0, - "docs": [ - "Cannot vote when no candidates or members exist." - ] - }, - { - "name": "NoVotes", - "index": 1, - "docs": [ - "Must vote for at least one candidate." - ] - }, - { - "name": "TooManyVotes", - "index": 2, - "docs": [ - "Cannot vote more than candidates." - ] - }, - { - "name": "MaximumVotesExceeded", - "index": 3, - "docs": [ - "Cannot vote more than maximum allowed." - ] - }, - { - "name": "LowBalance", - "index": 4, - "docs": [ - "Cannot vote with stake less than minimum balance." - ] - }, - { - "name": "UnableToPayBond", - "index": 5, - "docs": [ - "Voter can not pay voting bond." - ] - }, - { - "name": "MustBeVoter", - "index": 6, - "docs": [ - "Must be a voter." - ] - }, - { - "name": "ReportSelf", - "index": 7, - "docs": [ - "Cannot report self." - ] - }, - { - "name": "DuplicatedCandidate", - "index": 8, - "docs": [ - "Duplicated candidate submission." - ] - }, - { - "name": "MemberSubmit", - "index": 9, - "docs": [ - "Member cannot re-submit candidacy." - ] - }, - { - "name": "RunnerUpSubmit", - "index": 10, - "docs": [ - "Runner cannot re-submit candidacy." - ] - }, - { - "name": "InsufficientCandidateFunds", - "index": 11, - "docs": [ - "Candidate does not have enough funds." - ] - }, - { - "name": "NotMember", - "index": 12, - "docs": [ - "Not a member." - ] - }, - { - "name": "InvalidWitnessData", - "index": 13, - "docs": [ - "The provided count of number of candidates is incorrect." - ] - }, - { - "name": "InvalidVoteCount", - "index": 14, - "docs": [ - "The provided count of number of votes is incorrect." - ] - }, - { - "name": "InvalidRenouncing", - "index": 15, - "docs": [ - "The renouncing origin presented a wrong `Renouncing` parameter." - ] - }, - { - "name": "InvalidReplacement", - "index": 16, - "docs": [ - "Prediction regarding replacement after member removal is wrong." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 434, - "type": { - "path": [ - "pallet_membership", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "AlreadyMember", - "index": 0, - "docs": [ - "Already a member." - ] - }, - { - "name": "NotMember", - "index": 1, - "docs": [ - "Not a member." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 435, - "type": { - "path": [ - "pallet_grandpa", - "StoredState" - ], - "params": [ - { - "name": "N", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Live", - "index": 0 - }, - { - "name": "PendingPause", - "fields": [ - { - "name": "scheduled_at", - "type": 4, - "typeName": "N" - }, - { - "name": "delay", - "type": 4, - "typeName": "N" - } - ], - "index": 1 - }, - { - "name": "Paused", - "index": 2 - }, - { - "name": "PendingResume", - "fields": [ - { - "name": "scheduled_at", - "type": 4, - "typeName": "N" - }, - { - "name": "delay", - "type": 4, - "typeName": "N" - } - ], - "index": 3 - } - ] - } - } - } - }, - { - "id": 436, - "type": { - "path": [ - "pallet_grandpa", - "StoredPendingChange" - ], - "params": [ - { - "name": "N", - "type": 4 - }, - { - "name": "Limit", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "scheduled_at", - "type": 4, - "typeName": "N" - }, - { - "name": "delay", - "type": 4, - "typeName": "N" - }, - { - "name": "next_authorities", - "type": 437, - "typeName": "BoundedAuthorityList" - }, - { - "name": "forced", - "type": 93, - "typeName": "Option" - } - ] - } - } - } - }, - { - "id": 437, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 52 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 51, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 438, - "type": { - "path": [ - "pallet_grandpa", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "PauseFailed", - "index": 0, - "docs": [ - "Attempt to signal GRANDPA pause when the authority set isn't live", - "(either paused or already pending pause)." - ] - }, - { - "name": "ResumeFailed", - "index": 1, - "docs": [ - "Attempt to signal GRANDPA resume when the authority set isn't paused", - "(either live or already pending resume)." - ] - }, - { - "name": "ChangePending", - "index": 2, - "docs": [ - "Attempt to signal GRANDPA change with one already pending." - ] - }, - { - "name": "TooSoon", - "index": 3, - "docs": [ - "Cannot signal forced change so soon after last." - ] - }, - { - "name": "InvalidKeyOwnershipProof", - "index": 4, - "docs": [ - "A key ownership proof provided as part of an equivocation report is invalid." - ] - }, - { - "name": "InvalidEquivocationProof", - "index": 5, - "docs": [ - "An equivocation proof provided as part of an equivocation report is invalid." - ] - }, - { - "name": "DuplicateOffenceReport", - "index": 6, - "docs": [ - "A given equivocation report is valid but already previously reported." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 439, - "type": { - "path": [ - "pallet_treasury", - "Proposal" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "proposer", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "value", - "type": 6, - "typeName": "Balance" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "bond", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 440, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 4 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 92, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 441, - "type": { - "path": [ - "sp_arithmetic", - "per_things", - "Permill" - ], - "def": { - "composite": { - "fields": [ - { - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 442, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 6 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 443, - "type": { - "path": [ - "frame_support", - "PalletId" - ], - "def": { - "composite": { - "fields": [ - { - "type": 130, - "typeName": "[u8; 8]" - } - ] - } - } - } - }, - { - "id": 444, - "type": { - "path": [ - "pallet_treasury", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InsufficientProposersBalance", - "index": 0, - "docs": [ - "Proposer's balance is too low." - ] - }, - { - "name": "InvalidIndex", - "index": 1, - "docs": [ - "No proposal or bounty at that index." - ] - }, - { - "name": "TooManyApprovals", - "index": 2, - "docs": [ - "Too many approvals in the queue." - ] - } - ] - } - }, - "docs": [ - "Error for the treasury pallet." - ] - } - }, - { - "id": 445, - "type": { - "path": [ - "pallet_contracts", - "wasm", - "PrefabWasmModule" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "instruction_weights_version", - "type": 113, - "typeName": "u32" - }, - { - "name": "initial", - "type": 113, - "typeName": "u32" - }, - { - "name": "maximum", - "type": 113, - "typeName": "u32" - }, - { - "name": "code", - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 446, - "type": { - "path": [ - "pallet_contracts", - "wasm", - "OwnerInfo" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "owner", - "type": 0, - "typeName": "AccountIdOf" - }, - { - "name": "deposit", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "refcount", - "type": 146, - "typeName": "u64" - } - ] - } - } - } - }, - { - "id": 447, - "type": { - "path": [ - "pallet_contracts", - "storage", - "RawContractInfo" - ], - "params": [ - { - "name": "CodeHash", - "type": 9 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "trie_id", - "type": 10, - "typeName": "TrieId" - }, - { - "name": "code_hash", - "type": 9, - "typeName": "CodeHash" - }, - { - "name": "storage_deposit", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 448, - "type": { - "def": { - "sequence": { - "type": 449 - } - } - } - }, - { - "id": 449, - "type": { - "path": [ - "pallet_contracts", - "storage", - "DeletedContract" - ], - "def": { - "composite": { - "fields": [ - { - "name": "trie_id", - "type": 10, - "typeName": "TrieId" - } - ] - } - } - } - }, - { - "id": 450, - "type": { - "path": [ - "pallet_contracts", - "schedule", - "Schedule" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "limits", - "type": 451, - "typeName": "Limits" - }, - { - "name": "instruction_weights", - "type": 452, - "typeName": "InstructionWeights" - }, - { - "name": "host_fn_weights", - "type": 453, - "typeName": "HostFnWeights" - } - ] - } - } - } - }, - { - "id": 451, - "type": { - "path": [ - "pallet_contracts", - "schedule", - "Limits" - ], - "def": { - "composite": { - "fields": [ - { - "name": "event_topics", - "type": 4, - "typeName": "u32" - }, - { - "name": "stack_height", - "type": 93, - "typeName": "Option" - }, - { - "name": "globals", - "type": 4, - "typeName": "u32" - }, - { - "name": "parameters", - "type": 4, - "typeName": "u32" - }, - { - "name": "memory_pages", - "type": 4, - "typeName": "u32" - }, - { - "name": "table_size", - "type": 4, - "typeName": "u32" - }, - { - "name": "br_table_size", - "type": 4, - "typeName": "u32" - }, - { - "name": "subject_len", - "type": 4, - "typeName": "u32" - }, - { - "name": "call_depth", - "type": 4, - "typeName": "u32" - }, - { - "name": "payload_len", - "type": 4, - "typeName": "u32" - }, - { - "name": "code_len", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 452, - "type": { - "path": [ - "pallet_contracts", - "schedule", - "InstructionWeights" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "version", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64const", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64load", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64store", - "type": 4, - "typeName": "u32" - }, - { - "name": "select", - "type": 4, - "typeName": "u32" - }, - { - "name": "r#if", - "type": 4, - "typeName": "u32" - }, - { - "name": "br", - "type": 4, - "typeName": "u32" - }, - { - "name": "br_if", - "type": 4, - "typeName": "u32" - }, - { - "name": "br_table", - "type": 4, - "typeName": "u32" - }, - { - "name": "br_table_per_entry", - "type": 4, - "typeName": "u32" - }, - { - "name": "call", - "type": 4, - "typeName": "u32" - }, - { - "name": "call_indirect", - "type": 4, - "typeName": "u32" - }, - { - "name": "call_indirect_per_param", - "type": 4, - "typeName": "u32" - }, - { - "name": "local_get", - "type": 4, - "typeName": "u32" - }, - { - "name": "local_set", - "type": 4, - "typeName": "u32" - }, - { - "name": "local_tee", - "type": 4, - "typeName": "u32" - }, - { - "name": "global_get", - "type": 4, - "typeName": "u32" - }, - { - "name": "global_set", - "type": 4, - "typeName": "u32" - }, - { - "name": "memory_current", - "type": 4, - "typeName": "u32" - }, - { - "name": "memory_grow", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64clz", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64ctz", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64popcnt", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64eqz", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64extendsi32", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64extendui32", - "type": 4, - "typeName": "u32" - }, - { - "name": "i32wrapi64", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64eq", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64ne", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64lts", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64ltu", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64gts", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64gtu", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64les", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64leu", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64ges", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64geu", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64add", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64sub", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64mul", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64divs", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64divu", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64rems", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64remu", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64and", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64or", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64xor", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64shl", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64shrs", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64shru", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64rotl", - "type": 4, - "typeName": "u32" - }, - { - "name": "i64rotr", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 453, - "type": { - "path": [ - "pallet_contracts", - "schedule", - "HostFnWeights" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "caller", - "type": 8, - "typeName": "Weight" - }, - { - "name": "is_contract", - "type": 8, - "typeName": "Weight" - }, - { - "name": "code_hash", - "type": 8, - "typeName": "Weight" - }, - { - "name": "own_code_hash", - "type": 8, - "typeName": "Weight" - }, - { - "name": "caller_is_origin", - "type": 8, - "typeName": "Weight" - }, - { - "name": "address", - "type": 8, - "typeName": "Weight" - }, - { - "name": "gas_left", - "type": 8, - "typeName": "Weight" - }, - { - "name": "balance", - "type": 8, - "typeName": "Weight" - }, - { - "name": "value_transferred", - "type": 8, - "typeName": "Weight" - }, - { - "name": "minimum_balance", - "type": 8, - "typeName": "Weight" - }, - { - "name": "block_number", - "type": 8, - "typeName": "Weight" - }, - { - "name": "now", - "type": 8, - "typeName": "Weight" - }, - { - "name": "weight_to_fee", - "type": 8, - "typeName": "Weight" - }, - { - "name": "gas", - "type": 8, - "typeName": "Weight" - }, - { - "name": "input", - "type": 8, - "typeName": "Weight" - }, - { - "name": "input_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "r#return", - "type": 8, - "typeName": "Weight" - }, - { - "name": "return_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "terminate", - "type": 8, - "typeName": "Weight" - }, - { - "name": "random", - "type": 8, - "typeName": "Weight" - }, - { - "name": "deposit_event", - "type": 8, - "typeName": "Weight" - }, - { - "name": "deposit_event_per_topic", - "type": 8, - "typeName": "Weight" - }, - { - "name": "deposit_event_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "debug_message", - "type": 8, - "typeName": "Weight" - }, - { - "name": "set_storage", - "type": 8, - "typeName": "Weight" - }, - { - "name": "set_storage_per_new_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "set_storage_per_old_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "set_code_hash", - "type": 8, - "typeName": "Weight" - }, - { - "name": "clear_storage", - "type": 8, - "typeName": "Weight" - }, - { - "name": "clear_storage_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "contains_storage", - "type": 8, - "typeName": "Weight" - }, - { - "name": "contains_storage_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "get_storage", - "type": 8, - "typeName": "Weight" - }, - { - "name": "get_storage_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "take_storage", - "type": 8, - "typeName": "Weight" - }, - { - "name": "take_storage_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "transfer", - "type": 8, - "typeName": "Weight" - }, - { - "name": "call", - "type": 8, - "typeName": "Weight" - }, - { - "name": "delegate_call", - "type": 8, - "typeName": "Weight" - }, - { - "name": "call_transfer_surcharge", - "type": 8, - "typeName": "Weight" - }, - { - "name": "call_per_cloned_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "instantiate", - "type": 8, - "typeName": "Weight" - }, - { - "name": "instantiate_transfer_surcharge", - "type": 8, - "typeName": "Weight" - }, - { - "name": "instantiate_per_salt_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_sha2_256", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_sha2_256_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_keccak_256", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_keccak_256_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_blake2_256", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_blake2_256_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_blake2_128", - "type": 8, - "typeName": "Weight" - }, - { - "name": "hash_blake2_128_per_byte", - "type": 8, - "typeName": "Weight" - }, - { - "name": "ecdsa_recover", - "type": 8, - "typeName": "Weight" - } - ] - } - } - } - }, - { - "id": 454, - "type": { - "path": [ - "pallet_contracts", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InvalidScheduleVersion", - "index": 0, - "docs": [ - "A new schedule must have a greater version than the current one." - ] - }, - { - "name": "InvalidCallFlags", - "index": 1, - "docs": [ - "Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`." - ] - }, - { - "name": "OutOfGas", - "index": 2, - "docs": [ - "The executed contract exhausted its gas limit." - ] - }, - { - "name": "OutputBufferTooSmall", - "index": 3, - "docs": [ - "The output buffer supplied to a contract API call was too small." - ] - }, - { - "name": "TransferFailed", - "index": 4, - "docs": [ - "Performing the requested transfer failed. Probably because there isn't enough", - "free balance in the sender's account." - ] - }, - { - "name": "MaxCallDepthReached", - "index": 5, - "docs": [ - "Performing a call was denied because the calling depth reached the limit", - "of what is specified in the schedule." - ] - }, - { - "name": "ContractNotFound", - "index": 6, - "docs": [ - "No contract was found at the specified address." - ] - }, - { - "name": "CodeTooLarge", - "index": 7, - "docs": [ - "The code supplied to `instantiate_with_code` exceeds the limit specified in the", - "current schedule." - ] - }, - { - "name": "CodeNotFound", - "index": 8, - "docs": [ - "No code could be found at the supplied code hash." - ] - }, - { - "name": "OutOfBounds", - "index": 9, - "docs": [ - "A buffer outside of sandbox memory was passed to a contract API function." - ] - }, - { - "name": "DecodingFailed", - "index": 10, - "docs": [ - "Input passed to a contract API function failed to decode as expected type." - ] - }, - { - "name": "ContractTrapped", - "index": 11, - "docs": [ - "Contract trapped during execution." - ] - }, - { - "name": "ValueTooLarge", - "index": 12, - "docs": [ - "The size defined in `T::MaxValueSize` was exceeded." - ] - }, - { - "name": "TerminatedWhileReentrant", - "index": 13, - "docs": [ - "Termination of a contract is not allowed while the contract is already", - "on the call stack. Can be triggered by `seal_terminate`." - ] - }, - { - "name": "InputForwarded", - "index": 14, - "docs": [ - "`seal_call` forwarded this contracts input. It therefore is no longer available." - ] - }, - { - "name": "RandomSubjectTooLong", - "index": 15, - "docs": [ - "The subject passed to `seal_random` exceeds the limit." - ] - }, - { - "name": "TooManyTopics", - "index": 16, - "docs": [ - "The amount of topics passed to `seal_deposit_events` exceeds the limit." - ] - }, - { - "name": "DuplicateTopics", - "index": 17, - "docs": [ - "The topics passed to `seal_deposit_events` contains at least one duplicate." - ] - }, - { - "name": "NoChainExtension", - "index": 18, - "docs": [ - "The chain does not provide a chain extension. Calling the chain extension results", - "in this error. Note that this usually shouldn't happen as deploying such contracts", - "is rejected." - ] - }, - { - "name": "DeletionQueueFull", - "index": 19, - "docs": [ - "Removal of a contract failed because the deletion queue is full.", - "", - "This can happen when calling `seal_terminate`.", - "The queue is filled by deleting contracts and emptied by a fixed amount each block.", - "Trying again during another block is the only way to resolve this issue." - ] - }, - { - "name": "DuplicateContract", - "index": 20, - "docs": [ - "A contract with the same AccountId already exists." - ] - }, - { - "name": "TerminatedInConstructor", - "index": 21, - "docs": [ - "A contract self destructed in its constructor.", - "", - "This can be triggered by a call to `seal_terminate`." - ] - }, - { - "name": "DebugMessageInvalidUTF8", - "index": 22, - "docs": [ - "The debug message specified to `seal_debug_message` does contain invalid UTF-8." - ] - }, - { - "name": "ReentranceDenied", - "index": 23, - "docs": [ - "A call tried to invoke a contract that is flagged as non-reentrant." - ] - }, - { - "name": "StorageDepositNotEnoughFunds", - "index": 24, - "docs": [ - "Origin doesn't have enough balance to pay the required storage deposits." - ] - }, - { - "name": "StorageDepositLimitExhausted", - "index": 25, - "docs": [ - "More storage was created than allowed by the storage deposit limit." - ] - }, - { - "name": "CodeInUse", - "index": 26, - "docs": [ - "Code removal was denied because the code is still in use by at least one contract." - ] - }, - { - "name": "ContractReverted", - "index": 27, - "docs": [ - "The contract ran to completion but decided to revert its storage changes.", - "Please note that this error is only returned from extrinsics. When called directly", - "or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags", - "to determine whether a reversion has taken place." - ] - }, - { - "name": "CodeRejected", - "index": 28, - "docs": [ - "The contract's code was found to be invalid during validation or instrumentation.", - "A more detailed error can be found on the node console if debug messages are enabled", - "or in the debug buffer which is returned to RPC clients." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 455, - "type": { - "path": [ - "pallet_sudo", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "RequireSudo", - "index": 0, - "docs": [ - "Sender must be the Sudo account" - ] - } - ] - } - }, - "docs": [ - "Error for the Sudo pallet" - ] - } - }, - { - "id": 456, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 60 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 457, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 457, - "type": { - "def": { - "sequence": { - "type": 60 - } - } - } - }, - { - "id": 458, - "type": { - "path": [ - "frame_support", - "traits", - "misc", - "WrapperOpaque" - ], - "params": [ - { - "name": "T", - "type": 459 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 113 - }, - { - "type": 459, - "typeName": "T" - } - ] - } - } - } - }, - { - "id": 459, - "type": { - "path": [ - "pallet_im_online", - "BoundedOpaqueNetworkState" - ], - "params": [ - { - "name": "PeerIdEncodingLimit", - "type": null - }, - { - "name": "MultiAddrEncodingLimit", - "type": null - }, - { - "name": "AddressesLimit", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "peer_id", - "type": 460, - "typeName": "WeakBoundedVec" - }, - { - "name": "external_addresses", - "type": 461, - "typeName": "WeakBoundedVec, AddressesLimit\n>" - } - ] - } - } - } - }, - { - "id": 460, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 461, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 460 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 462, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 462, - "type": { - "def": { - "sequence": { - "type": 460 - } - } - } - }, - { - "id": 463, - "type": { - "path": [ - "pallet_im_online", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InvalidKey", - "index": 0, - "docs": [ - "Non existent public key." - ] - }, - { - "name": "DuplicatedHeartbeat", - "index": 1, - "docs": [ - "Duplicated heartbeat." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 464, - "type": { - "path": [ - "frame_support", - "storage", - "weak_bounded_vec", - "WeakBoundedVec" - ], - "params": [ - { - "name": "T", - "type": 224 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 465, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 465, - "type": { - "def": { - "sequence": { - "type": 224 - } - } - } - }, - { - "id": 466, - "type": { - "path": [ - "sp_staking", - "offence", - "OffenceDetails" - ], - "params": [ - { - "name": "Reporter", - "type": 0 - }, - { - "name": "Offender", - "type": 63 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "offender", - "type": 63, - "typeName": "Offender" - }, - { - "name": "reporters", - "type": 40, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 467, - "type": { - "def": { - "tuple": [ - 69, - 10 - ] - } - } - }, - { - "id": 468, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 9 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 110, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 469, - "type": { - "path": [ - "pallet_identity", - "types", - "Registration" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "MaxJudgements", - "type": null - }, - { - "name": "MaxAdditionalFields", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "judgements", - "type": 470, - "typeName": "BoundedVec<(RegistrarIndex, Judgement), MaxJudgements>" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "info", - "type": 257, - "typeName": "IdentityInfo" - } - ] - } - } - } - }, - { - "id": 470, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 471 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 472, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 471, - "type": { - "def": { - "tuple": [ - 4, - 295 - ] - } - } - }, - { - "id": 472, - "type": { - "def": { - "sequence": { - "type": 471 - } - } - } - }, - { - "id": 473, - "type": { - "def": { - "tuple": [ - 6, - 474 - ] - } - } - }, - { - "id": 474, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 0 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 40, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 475, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 476 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 478, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 476, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 477 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 477 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 477, - "type": { - "path": [ - "pallet_identity", - "types", - "RegistrarInfo" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "account", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "fee", - "type": 6, - "typeName": "Balance" - }, - { - "name": "fields", - "type": 293, - "typeName": "IdentityFields" - } - ] - } - } - } - }, - { - "id": 478, - "type": { - "def": { - "sequence": { - "type": 476 - } - } - } - }, - { - "id": 479, - "type": { - "path": [ - "pallet_identity", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "TooManySubAccounts", - "index": 0, - "docs": [ - "Too many subs-accounts." - ] - }, - { - "name": "NotFound", - "index": 1, - "docs": [ - "Account isn't found." - ] - }, - { - "name": "NotNamed", - "index": 2, - "docs": [ - "Account isn't named." - ] - }, - { - "name": "EmptyIndex", - "index": 3, - "docs": [ - "Empty index." - ] - }, - { - "name": "FeeChanged", - "index": 4, - "docs": [ - "Fee is changed." - ] - }, - { - "name": "NoIdentity", - "index": 5, - "docs": [ - "No identity found." - ] - }, - { - "name": "StickyJudgement", - "index": 6, - "docs": [ - "Sticky judgement." - ] - }, - { - "name": "JudgementGiven", - "index": 7, - "docs": [ - "Judgement given." - ] - }, - { - "name": "InvalidJudgement", - "index": 8, - "docs": [ - "Invalid judgement." - ] - }, - { - "name": "InvalidIndex", - "index": 9, - "docs": [ - "The index is invalid." - ] - }, - { - "name": "InvalidTarget", - "index": 10, - "docs": [ - "The target is invalid." - ] - }, - { - "name": "TooManyFields", - "index": 11, - "docs": [ - "Too many additional fields." - ] - }, - { - "name": "TooManyRegistrars", - "index": 12, - "docs": [ - "Maximum amount of registrars reached. Cannot add any more." - ] - }, - { - "name": "AlreadyClaimed", - "index": 13, - "docs": [ - "Account ID is already named." - ] - }, - { - "name": "NotSub", - "index": 14, - "docs": [ - "Sender is not a sub-account." - ] - }, - { - "name": "NotOwned", - "index": 15, - "docs": [ - "Sub-account isn't owned by sender." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 480, - "type": { - "def": { - "sequence": { - "type": 481 - } - } - } - }, - { - "id": 481, - "type": { - "path": [ - "pallet_society", - "Bid" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "kind", - "type": 482, - "typeName": "BidKind" - }, - { - "name": "value", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 482, - "type": { - "path": [ - "pallet_society", - "BidKind" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Deposit", - "fields": [ - { - "type": 6, - "typeName": "Balance" - } - ], - "index": 0 - }, - { - "name": "Vouch", - "fields": [ - { - "type": 0, - "typeName": "AccountId" - }, - { - "type": 6, - "typeName": "Balance" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 483, - "type": { - "def": { - "tuple": [ - 6, - 482 - ] - } - } - }, - { - "id": 484, - "type": { - "path": [ - "pallet_society", - "VouchingStatus" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Vouching", - "index": 0 - }, - { - "name": "Banned", - "index": 1 - } - ] - } - } - } - }, - { - "id": 485, - "type": { - "def": { - "sequence": { - "type": 486 - } - } - } - }, - { - "id": 486, - "type": { - "def": { - "tuple": [ - 4, - 6 - ] - } - } - }, - { - "id": 487, - "type": { - "def": { - "tuple": [ - 0, - 0 - ] - } - } - }, - { - "id": 488, - "type": { - "path": [ - "pallet_society", - "Vote" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Skeptic", - "index": 0 - }, - { - "name": "Reject", - "index": 1 - }, - { - "name": "Approve", - "index": 2 - } - ] - } - } - } - }, - { - "id": 489, - "type": { - "path": [ - "pallet_society", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "BadPosition", - "index": 0, - "docs": [ - "An incorrect position was provided." - ] - }, - { - "name": "NotMember", - "index": 1, - "docs": [ - "User is not a member." - ] - }, - { - "name": "AlreadyMember", - "index": 2, - "docs": [ - "User is already a member." - ] - }, - { - "name": "Suspended", - "index": 3, - "docs": [ - "User is suspended." - ] - }, - { - "name": "NotSuspended", - "index": 4, - "docs": [ - "User is not suspended." - ] - }, - { - "name": "NoPayout", - "index": 5, - "docs": [ - "Nothing to payout." - ] - }, - { - "name": "AlreadyFounded", - "index": 6, - "docs": [ - "Society already founded." - ] - }, - { - "name": "InsufficientPot", - "index": 7, - "docs": [ - "Not enough in pot to accept candidate." - ] - }, - { - "name": "AlreadyVouching", - "index": 8, - "docs": [ - "Member is already vouching or banned from vouching again." - ] - }, - { - "name": "NotVouching", - "index": 9, - "docs": [ - "Member is not vouching." - ] - }, - { - "name": "Head", - "index": 10, - "docs": [ - "Cannot remove the head of the chain." - ] - }, - { - "name": "Founder", - "index": 11, - "docs": [ - "Cannot remove the founder." - ] - }, - { - "name": "AlreadyBid", - "index": 12, - "docs": [ - "User has already made a bid." - ] - }, - { - "name": "AlreadyCandidate", - "index": 13, - "docs": [ - "User is already a candidate." - ] - }, - { - "name": "NotCandidate", - "index": 14, - "docs": [ - "User is not a candidate." - ] - }, - { - "name": "MaxMembers", - "index": 15, - "docs": [ - "Too many members in the society." - ] - }, - { - "name": "NotFounder", - "index": 16, - "docs": [ - "The caller is not the founder." - ] - }, - { - "name": "NotHead", - "index": 17, - "docs": [ - "The caller is not the head." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 490, - "type": { - "path": [ - "pallet_recovery", - "RecoveryConfig" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "Friends", - "type": 491 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "delay_period", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "friends", - "type": 491, - "typeName": "Friends" - }, - { - "name": "threshold", - "type": 81, - "typeName": "u16" - } - ] - } - } - } - }, - { - "id": 491, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 0 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 40, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 492, - "type": { - "path": [ - "pallet_recovery", - "ActiveRecovery" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "Friends", - "type": 491 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "created", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "friends", - "type": 491, - "typeName": "Friends" - } - ] - } - } - } - }, - { - "id": 493, - "type": { - "path": [ - "pallet_recovery", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotAllowed", - "index": 0, - "docs": [ - "User is not allowed to make a call on behalf of this account" - ] - }, - { - "name": "ZeroThreshold", - "index": 1, - "docs": [ - "Threshold must be greater than zero" - ] - }, - { - "name": "NotEnoughFriends", - "index": 2, - "docs": [ - "Friends list must be greater than zero and threshold" - ] - }, - { - "name": "MaxFriends", - "index": 3, - "docs": [ - "Friends list must be less than max friends" - ] - }, - { - "name": "NotSorted", - "index": 4, - "docs": [ - "Friends list must be sorted and free of duplicates" - ] - }, - { - "name": "NotRecoverable", - "index": 5, - "docs": [ - "This account is not set up for recovery" - ] - }, - { - "name": "AlreadyRecoverable", - "index": 6, - "docs": [ - "This account is already set up for recovery" - ] - }, - { - "name": "AlreadyStarted", - "index": 7, - "docs": [ - "A recovery process has already started for this account" - ] - }, - { - "name": "NotStarted", - "index": 8, - "docs": [ - "A recovery process has not started for this rescuer" - ] - }, - { - "name": "NotFriend", - "index": 9, - "docs": [ - "This account is not a friend who can vouch" - ] - }, - { - "name": "DelayPeriod", - "index": 10, - "docs": [ - "The friend must wait until the delay period to vouch for this recovery" - ] - }, - { - "name": "AlreadyVouched", - "index": 11, - "docs": [ - "This user has already vouched for this recovery" - ] - }, - { - "name": "Threshold", - "index": 12, - "docs": [ - "The threshold for recovering this account has not been met" - ] - }, - { - "name": "StillActive", - "index": 13, - "docs": [ - "There are still active recovery attempts that need to be closed" - ] - }, - { - "name": "AlreadyProxy", - "index": 14, - "docs": [ - "This account is already set up for recovery" - ] - }, - { - "name": "BadState", - "index": 15, - "docs": [ - "Some internal state is broken." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 494, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 300 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 495, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 495, - "type": { - "def": { - "sequence": { - "type": 300 - } - } - } - }, - { - "id": 496, - "type": { - "path": [ - "pallet_vesting", - "Releases" - ], - "def": { - "variant": { - "variants": [ - { - "name": "V0", - "index": 0 - }, - { - "name": "V1", - "index": 1 - } - ] - } - } - } - }, - { - "id": 497, - "type": { - "path": [ - "pallet_vesting", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotVesting", - "index": 0, - "docs": [ - "The account given is not vesting." - ] - }, - { - "name": "AtMaxVestingSchedules", - "index": 1, - "docs": [ - "The account already has `MaxVestingSchedules` count of schedules and thus", - "cannot add another one. Consider merging existing schedules in order to add another." - ] - }, - { - "name": "AmountLow", - "index": 2, - "docs": [ - "Amount being transferred is too low to create a vesting schedule." - ] - }, - { - "name": "ScheduleIndexOutOfBounds", - "index": 3, - "docs": [ - "An index was out of bounds of the vesting schedules." - ] - }, - { - "name": "InvalidScheduleParams", - "index": 4, - "docs": [ - "Failed to create a new schedule because some parameter was invalid." - ] - } - ] - } - }, - "docs": [ - "Error for the vesting pallet." - ] - } - }, - { - "id": 498, - "type": { - "def": { - "sequence": { - "type": 499 - } - } - } - }, - { - "id": 499, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 500 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 500 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 500, - "type": { - "path": [ - "pallet_scheduler", - "ScheduledV3" - ], - "params": [ - { - "name": "Call", - "type": 303 - }, - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "PalletsOrigin", - "type": 331 - }, - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "maybe_id", - "type": 76, - "typeName": "Option>" - }, - { - "name": "priority", - "type": 2, - "typeName": "schedule::Priority" - }, - { - "name": "call", - "type": 303, - "typeName": "Call" - }, - { - "name": "maybe_periodic", - "type": 302, - "typeName": "Option>" - }, - { - "name": "origin", - "type": 331, - "typeName": "PalletsOrigin" - } - ] - } - } - } - }, - { - "id": 501, - "type": { - "path": [ - "pallet_scheduler", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "FailedToSchedule", - "index": 0, - "docs": [ - "Failed to schedule a call" - ] - }, - { - "name": "NotFound", - "index": 1, - "docs": [ - "Cannot find the scheduled call." - ] - }, - { - "name": "TargetBlockNumberInPast", - "index": 2, - "docs": [ - "Given target block number is in the past." - ] - }, - { - "name": "RescheduleNoChange", - "index": 3, - "docs": [ - "Reschedule failed because it does not change scheduled time." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 502, - "type": { - "path": [ - "pallet_preimage", - "RequestStatus" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Unrequested", - "fields": [ - { - "type": 503, - "typeName": "Option<(AccountId, Balance)>" - } - ], - "index": 0 - }, - { - "name": "Requested", - "fields": [ - { - "type": 4, - "typeName": "u32" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 503, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 48 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 48 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 504, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 505, - "type": { - "path": [ - "pallet_preimage", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "TooLarge", - "index": 0, - "docs": [ - "Preimage is too large to store on-chain." - ] - }, - { - "name": "AlreadyNoted", - "index": 1, - "docs": [ - "Preimage has already been noted on-chain." - ] - }, - { - "name": "NotAuthorized", - "index": 2, - "docs": [ - "The user is not authorized to perform this action." - ] - }, - { - "name": "NotNoted", - "index": 3, - "docs": [ - "The preimage cannot be removed since it has not yet been noted." - ] - }, - { - "name": "Requested", - "index": 4, - "docs": [ - "A preimage may not be removed when there are outstanding requests." - ] - }, - { - "name": "NotRequested", - "index": 5, - "docs": [ - "The preimage request cannot be removed since no outstanding requests exist." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 506, - "type": { - "def": { - "tuple": [ - 507, - 6 - ] - } - } - }, - { - "id": 507, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 508 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 509, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 508, - "type": { - "path": [ - "pallet_proxy", - "ProxyDefinition" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "ProxyType", - "type": 80 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "delegate", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "proxy_type", - "type": 80, - "typeName": "ProxyType" - }, - { - "name": "delay", - "type": 4, - "typeName": "BlockNumber" - } - ] - } - } - } - }, - { - "id": 509, - "type": { - "def": { - "sequence": { - "type": 508 - } - } - } - }, - { - "id": 510, - "type": { - "def": { - "tuple": [ - 511, - 6 - ] - } - } - }, - { - "id": 511, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 512 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 513, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 512, - "type": { - "path": [ - "pallet_proxy", - "Announcement" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Hash", - "type": 9 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "real", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "call_hash", - "type": 9, - "typeName": "Hash" - }, - { - "name": "height", - "type": 4, - "typeName": "BlockNumber" - } - ] - } - } - } - }, - { - "id": 513, - "type": { - "def": { - "sequence": { - "type": 512 - } - } - } - }, - { - "id": 514, - "type": { - "path": [ - "pallet_proxy", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "TooMany", - "index": 0, - "docs": [ - "There are too many proxies registered or too many announcements pending." - ] - }, - { - "name": "NotFound", - "index": 1, - "docs": [ - "Proxy registration not found." - ] - }, - { - "name": "NotProxy", - "index": 2, - "docs": [ - "Sender is not a proxy of the account to be proxied." - ] - }, - { - "name": "Unproxyable", - "index": 3, - "docs": [ - "A call which is incompatible with the proxy type's filter was attempted." - ] - }, - { - "name": "Duplicate", - "index": 4, - "docs": [ - "Account is already a proxy." - ] - }, - { - "name": "NoPermission", - "index": 5, - "docs": [ - "Call may not be made by proxy because it may escalate its privileges." - ] - }, - { - "name": "Unannounced", - "index": 6, - "docs": [ - "Announcement, if made at all, was made too recently." - ] - }, - { - "name": "NoSelfProxy", - "index": 7, - "docs": [ - "Cannot add self as proxy." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 515, - "type": { - "def": { - "tuple": [ - 0, - 1 - ] - } - } - }, - { - "id": 516, - "type": { - "path": [ - "pallet_multisig", - "Multisig" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "when", - "type": 83, - "typeName": "Timepoint" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "depositor", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "approvals", - "type": 40, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 517, - "type": { - "def": { - "tuple": [ - 309, - 0, - 6 - ] - } - } - }, - { - "id": 518, - "type": { - "path": [ - "pallet_multisig", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "MinimumThreshold", - "index": 0, - "docs": [ - "Threshold must be 2 or greater." - ] - }, - { - "name": "AlreadyApproved", - "index": 1, - "docs": [ - "Call is already approved by this signatory." - ] - }, - { - "name": "NoApprovalsNeeded", - "index": 2, - "docs": [ - "Call doesn't need any (more) approvals." - ] - }, - { - "name": "TooFewSignatories", - "index": 3, - "docs": [ - "There are too few signatories in the list." - ] - }, - { - "name": "TooManySignatories", - "index": 4, - "docs": [ - "There are too many signatories in the list." - ] - }, - { - "name": "SignatoriesOutOfOrder", - "index": 5, - "docs": [ - "The signatories were provided out of order; they should be ordered." - ] - }, - { - "name": "SenderInSignatories", - "index": 6, - "docs": [ - "The sender was contained in the other signatories; it shouldn't be." - ] - }, - { - "name": "NotFound", - "index": 7, - "docs": [ - "Multisig operation not found when attempting to cancel." - ] - }, - { - "name": "NotOwner", - "index": 8, - "docs": [ - "Only the account that originally created the multisig is able to cancel it." - ] - }, - { - "name": "NoTimepoint", - "index": 9, - "docs": [ - "No timepoint was given, yet the multisig operation is already underway." - ] - }, - { - "name": "WrongTimepoint", - "index": 10, - "docs": [ - "A different timepoint was given to the multisig operation that is underway." - ] - }, - { - "name": "UnexpectedTimepoint", - "index": 11, - "docs": [ - "A timepoint was given, yet no multisig operation is underway." - ] - }, - { - "name": "MaxWeightTooLow", - "index": 12, - "docs": [ - "The maximum weight information provided was too low." - ] - }, - { - "name": "AlreadyStored", - "index": 13, - "docs": [ - "The data to be stored is already stored." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 519, - "type": { - "path": [ - "pallet_bounties", - "Bounty" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "proposer", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "value", - "type": 6, - "typeName": "Balance" - }, - { - "name": "fee", - "type": 6, - "typeName": "Balance" - }, - { - "name": "curator_deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "bond", - "type": 6, - "typeName": "Balance" - }, - { - "name": "status", - "type": 520, - "typeName": "BountyStatus" - } - ] - } - } - } - }, - { - "id": 520, - "type": { - "path": [ - "pallet_bounties", - "BountyStatus" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Proposed", - "index": 0 - }, - { - "name": "Approved", - "index": 1 - }, - { - "name": "Funded", - "index": 2 - }, - { - "name": "CuratorProposed", - "fields": [ - { - "name": "curator", - "type": 0, - "typeName": "AccountId" - } - ], - "index": 3 - }, - { - "name": "Active", - "fields": [ - { - "name": "curator", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "update_due", - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 4 - }, - { - "name": "PendingPayout", - "fields": [ - { - "name": "curator", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "unlock_at", - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 5 - } - ] - } - } - } - }, - { - "id": 521, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 2 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 522, - "type": { - "path": [ - "pallet_bounties", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InsufficientProposersBalance", - "index": 0, - "docs": [ - "Proposer's balance is too low." - ] - }, - { - "name": "InvalidIndex", - "index": 1, - "docs": [ - "No proposal or bounty at that index." - ] - }, - { - "name": "ReasonTooBig", - "index": 2, - "docs": [ - "The reason given is just too big." - ] - }, - { - "name": "UnexpectedStatus", - "index": 3, - "docs": [ - "The bounty status is unexpected." - ] - }, - { - "name": "RequireCurator", - "index": 4, - "docs": [ - "Require bounty curator." - ] - }, - { - "name": "InvalidValue", - "index": 5, - "docs": [ - "Invalid bounty value." - ] - }, - { - "name": "InvalidFee", - "index": 6, - "docs": [ - "Invalid bounty fee." - ] - }, - { - "name": "PendingPayout", - "index": 7, - "docs": [ - "A bounty payout is pending.", - "To cancel the bounty, you must unassign and slash the curator." - ] - }, - { - "name": "Premature", - "index": 8, - "docs": [ - "The bounties cannot be claimed/closed because it's still in the countdown period." - ] - }, - { - "name": "HasActiveChildBounty", - "index": 9, - "docs": [ - "The bounty cannot be closed because it has active child-bounties." - ] - }, - { - "name": "TooManyQueued", - "index": 10, - "docs": [ - "Too many approvals are already queued." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 523, - "type": { - "path": [ - "pallet_tips", - "OpenTip" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Hash", - "type": 9 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "reason", - "type": 9, - "typeName": "Hash" - }, - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "finder", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "closes", - "type": 93, - "typeName": "Option" - }, - { - "name": "tips", - "type": 47, - "typeName": "Vec<(AccountId, Balance)>" - }, - { - "name": "finders_fee", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 524, - "type": { - "path": [ - "pallet_tips", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "ReasonTooBig", - "index": 0, - "docs": [ - "The reason given is just too big." - ] - }, - { - "name": "AlreadyKnown", - "index": 1, - "docs": [ - "The tip was already found/started." - ] - }, - { - "name": "UnknownTip", - "index": 2, - "docs": [ - "The tip hash is unknown." - ] - }, - { - "name": "NotFinder", - "index": 3, - "docs": [ - "The account attempting to retract the tip is not the finder of the tip." - ] - }, - { - "name": "StillOpen", - "index": 4, - "docs": [ - "The tip cannot be claimed/closed because there are not enough tippers yet." - ] - }, - { - "name": "Premature", - "index": 5, - "docs": [ - "The tip cannot be claimed/closed because it's still in the countdown period." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 525, - "type": { - "path": [ - "pallet_assets", - "types", - "AssetDetails" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "DepositBalance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "owner", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "issuer", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "admin", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "freezer", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "supply", - "type": 6, - "typeName": "Balance" - }, - { - "name": "deposit", - "type": 6, - "typeName": "DepositBalance" - }, - { - "name": "min_balance", - "type": 6, - "typeName": "Balance" - }, - { - "name": "is_sufficient", - "type": 35, - "typeName": "bool" - }, - { - "name": "accounts", - "type": 4, - "typeName": "u32" - }, - { - "name": "sufficients", - "type": 4, - "typeName": "u32" - }, - { - "name": "approvals", - "type": 4, - "typeName": "u32" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 526, - "type": { - "path": [ - "pallet_assets", - "types", - "AssetAccount" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "DepositBalance", - "type": 6 - }, - { - "name": "Extra", - "type": 29 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "balance", - "type": 6, - "typeName": "Balance" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - }, - { - "name": "reason", - "type": 527, - "typeName": "ExistenceReason" - }, - { - "name": "extra", - "type": 29, - "typeName": "Extra" - } - ] - } - } - } - }, - { - "id": 527, - "type": { - "path": [ - "pallet_assets", - "types", - "ExistenceReason" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Consumer", - "index": 0 - }, - { - "name": "Sufficient", - "index": 1 - }, - { - "name": "DepositHeld", - "fields": [ - { - "type": 6, - "typeName": "Balance" - } - ], - "index": 2 - }, - { - "name": "DepositRefunded", - "index": 3 - } - ] - } - } - } - }, - { - "id": 528, - "type": { - "def": { - "tuple": [ - 4, - 0, - 0 - ] - } - } - }, - { - "id": 529, - "type": { - "path": [ - "pallet_assets", - "types", - "Approval" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "DepositBalance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "amount", - "type": 6, - "typeName": "Balance" - }, - { - "name": "deposit", - "type": 6, - "typeName": "DepositBalance" - } - ] - } - } - } - }, - { - "id": 530, - "type": { - "path": [ - "pallet_assets", - "types", - "AssetMetadata" - ], - "params": [ - { - "name": "DepositBalance", - "type": 6 - }, - { - "name": "BoundedString", - "type": 91 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "deposit", - "type": 6, - "typeName": "DepositBalance" - }, - { - "name": "name", - "type": 91, - "typeName": "BoundedString" - }, - { - "name": "symbol", - "type": 91, - "typeName": "BoundedString" - }, - { - "name": "decimals", - "type": 2, - "typeName": "u8" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 531, - "type": { - "path": [ - "pallet_assets", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "BalanceLow", - "index": 0, - "docs": [ - "Account balance must be greater than or equal to the transfer amount." - ] - }, - { - "name": "NoAccount", - "index": 1, - "docs": [ - "The account to alter does not exist." - ] - }, - { - "name": "NoPermission", - "index": 2, - "docs": [ - "The signing account has no permission to do the operation." - ] - }, - { - "name": "Unknown", - "index": 3, - "docs": [ - "The given asset ID is unknown." - ] - }, - { - "name": "Frozen", - "index": 4, - "docs": [ - "The origin account is frozen." - ] - }, - { - "name": "InUse", - "index": 5, - "docs": [ - "The asset ID is already taken." - ] - }, - { - "name": "BadWitness", - "index": 6, - "docs": [ - "Invalid witness data given." - ] - }, - { - "name": "MinBalanceZero", - "index": 7, - "docs": [ - "Minimum balance should be non-zero." - ] - }, - { - "name": "NoProvider", - "index": 8, - "docs": [ - "Unable to increment the consumer reference counters on the account. Either no provider", - "reference exists to allow a non-zero balance of a non-self-sufficient asset, or the", - "maximum number of consumers has been reached." - ] - }, - { - "name": "BadMetadata", - "index": 9, - "docs": [ - "Invalid metadata given." - ] - }, - { - "name": "Unapproved", - "index": 10, - "docs": [ - "No approval exists that would allow the transfer." - ] - }, - { - "name": "WouldDie", - "index": 11, - "docs": [ - "The source account would not survive the transfer and it needs to stay alive." - ] - }, - { - "name": "AlreadyExists", - "index": 12, - "docs": [ - "The asset-account already exists." - ] - }, - { - "name": "NoDeposit", - "index": 13, - "docs": [ - "The asset-account doesn't have an associated deposit." - ] - }, - { - "name": "WouldBurn", - "index": 14, - "docs": [ - "The operation would result in funds being burned." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 532, - "type": { - "path": [ - "pallet_lottery", - "LotteryConfig" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "price", - "type": 6, - "typeName": "Balance" - }, - { - "name": "start", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "length", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "delay", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "repeat", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 533, - "type": { - "def": { - "tuple": [ - 4, - 534 - ] - } - } - }, - { - "id": 534, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 88 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 535, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 535, - "type": { - "def": { - "sequence": { - "type": 88 - } - } - } - }, - { - "id": 536, - "type": { - "path": [ - "pallet_lottery", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotConfigured", - "index": 0, - "docs": [ - "A lottery has not been configured." - ] - }, - { - "name": "InProgress", - "index": 1, - "docs": [ - "A lottery is already in progress." - ] - }, - { - "name": "AlreadyEnded", - "index": 2, - "docs": [ - "A lottery has already ended." - ] - }, - { - "name": "InvalidCall", - "index": 3, - "docs": [ - "The call is not valid for an open lottery." - ] - }, - { - "name": "AlreadyParticipating", - "index": 4, - "docs": [ - "You are already participating in the lottery with this call." - ] - }, - { - "name": "TooManyCalls", - "index": 5, - "docs": [ - "Too many calls for a single lottery." - ] - }, - { - "name": "EncodingFailed", - "index": 6, - "docs": [ - "Failed to encode calls" - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 537, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 486 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 485, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 538, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 539 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 540, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 539, - "type": { - "path": [ - "pallet_gilt", - "pallet", - "GiltBid" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "amount", - "type": 6, - "typeName": "Balance" - }, - { - "name": "who", - "type": 0, - "typeName": "AccountId" - } - ] - } - } - } - }, - { - "id": 540, - "type": { - "def": { - "sequence": { - "type": 539 - } - } - } - }, - { - "id": 541, - "type": { - "path": [ - "pallet_gilt", - "pallet", - "ActiveGiltsTotal" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "frozen", - "type": 6, - "typeName": "Balance" - }, - { - "name": "proportion", - "type": 317, - "typeName": "Perquintill" - }, - { - "name": "index", - "type": 4, - "typeName": "ActiveIndex" - }, - { - "name": "target", - "type": 317, - "typeName": "Perquintill" - } - ] - } - } - } - }, - { - "id": 542, - "type": { - "path": [ - "pallet_gilt", - "pallet", - "ActiveGilt" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "proportion", - "type": 317, - "typeName": "Perquintill" - }, - { - "name": "amount", - "type": 6, - "typeName": "Balance" - }, - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "expiry", - "type": 4, - "typeName": "BlockNumber" - } - ] - } - } - } - }, - { - "id": 543, - "type": { - "path": [ - "pallet_gilt", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "DurationTooSmall", - "index": 0, - "docs": [ - "The duration of the bid is less than one." - ] - }, - { - "name": "DurationTooBig", - "index": 1, - "docs": [ - "The duration is the bid is greater than the number of queues." - ] - }, - { - "name": "AmountTooSmall", - "index": 2, - "docs": [ - "The amount of the bid is less than the minimum allowed." - ] - }, - { - "name": "BidTooLow", - "index": 3, - "docs": [ - "The queue for the bid's duration is full and the amount bid is too low to get in", - "through replacing an existing bid." - ] - }, - { - "name": "Unknown", - "index": 4, - "docs": [ - "Gilt index is unknown." - ] - }, - { - "name": "NotOwner", - "index": 5, - "docs": [ - "Not the owner of the gilt." - ] - }, - { - "name": "NotExpired", - "index": 6, - "docs": [ - "Gilt not yet at expiry date." - ] - }, - { - "name": "NotFound", - "index": 7, - "docs": [ - "The given bid for retraction is not found." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 544, - "type": { - "path": [ - "pallet_uniques", - "types", - "ClassDetails" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "DepositBalance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "owner", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "issuer", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "admin", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "freezer", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "total_deposit", - "type": 6, - "typeName": "DepositBalance" - }, - { - "name": "free_holding", - "type": 35, - "typeName": "bool" - }, - { - "name": "instances", - "type": 4, - "typeName": "u32" - }, - { - "name": "instance_metadatas", - "type": 4, - "typeName": "u32" - }, - { - "name": "attributes", - "type": 4, - "typeName": "u32" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 545, - "type": { - "def": { - "tuple": [ - 0, - 4, - 4 - ] - } - } - }, - { - "id": 546, - "type": { - "path": [ - "pallet_uniques", - "types", - "InstanceDetails" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "DepositBalance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "owner", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "approved", - "type": 58, - "typeName": "Option" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - }, - { - "name": "deposit", - "type": 6, - "typeName": "DepositBalance" - } - ] - } - } - } - }, - { - "id": 547, - "type": { - "path": [ - "pallet_uniques", - "types", - "ClassMetadata" - ], - "params": [ - { - "name": "DepositBalance", - "type": 6 - }, - { - "name": "StringLimit", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "deposit", - "type": 6, - "typeName": "DepositBalance" - }, - { - "name": "data", - "type": 91, - "typeName": "BoundedVec" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 548, - "type": { - "path": [ - "pallet_uniques", - "types", - "InstanceMetadata" - ], - "params": [ - { - "name": "DepositBalance", - "type": 6 - }, - { - "name": "StringLimit", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "deposit", - "type": 6, - "typeName": "DepositBalance" - }, - { - "name": "data", - "type": 91, - "typeName": "BoundedVec" - }, - { - "name": "is_frozen", - "type": 35, - "typeName": "bool" - } - ] - } - } - } - }, - { - "id": 549, - "type": { - "def": { - "tuple": [ - 4, - 93, - 94 - ] - } - } - }, - { - "id": 550, - "type": { - "def": { - "tuple": [ - 95, - 6 - ] - } - } - }, - { - "id": 551, - "type": { - "path": [ - "pallet_uniques", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NoPermission", - "index": 0, - "docs": [ - "The signing account has no permission to do the operation." - ] - }, - { - "name": "UnknownClass", - "index": 1, - "docs": [ - "The given asset ID is unknown." - ] - }, - { - "name": "AlreadyExists", - "index": 2, - "docs": [ - "The asset instance ID has already been used for an asset." - ] - }, - { - "name": "WrongOwner", - "index": 3, - "docs": [ - "The owner turned out to be different to what was expected." - ] - }, - { - "name": "BadWitness", - "index": 4, - "docs": [ - "Invalid witness data given." - ] - }, - { - "name": "InUse", - "index": 5, - "docs": [ - "The asset ID is already taken." - ] - }, - { - "name": "Frozen", - "index": 6, - "docs": [ - "The asset instance or class is frozen." - ] - }, - { - "name": "WrongDelegate", - "index": 7, - "docs": [ - "The delegate turned out to be different to what was expected." - ] - }, - { - "name": "NoDelegate", - "index": 8, - "docs": [ - "There is no delegate approved." - ] - }, - { - "name": "Unapproved", - "index": 9, - "docs": [ - "No approval exists that would allow the transfer." - ] - }, - { - "name": "Unaccepted", - "index": 10, - "docs": [ - "The named owner has not signed ownership of the class is acceptable." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 552, - "type": { - "def": { - "sequence": { - "type": 553 - } - } - } - }, - { - "id": 553, - "type": { - "path": [ - "pallet_transaction_storage", - "TransactionInfo" - ], - "def": { - "composite": { - "fields": [ - { - "name": "chunk_root", - "type": 9, - "typeName": "::Output" - }, - { - "name": "content_hash", - "type": 9, - "typeName": "::Output" - }, - { - "name": "size", - "type": 4, - "typeName": "u32" - }, - { - "name": "block_chunks", - "type": 4, - "typeName": "u32" - } - ] - } - } - } - }, - { - "id": 554, - "type": { - "path": [ - "pallet_transaction_storage", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "InsufficientFunds", - "index": 0, - "docs": [ - "Insufficient account balance." - ] - }, - { - "name": "NotConfigured", - "index": 1, - "docs": [ - "Invalid configuration." - ] - }, - { - "name": "RenewedNotFound", - "index": 2, - "docs": [ - "Renewed extrinsic is not found." - ] - }, - { - "name": "EmptyTransaction", - "index": 3, - "docs": [ - "Attempting to store empty transaction" - ] - }, - { - "name": "UnexpectedProof", - "index": 4, - "docs": [ - "Proof was not expected in this block." - ] - }, - { - "name": "InvalidProof", - "index": 5, - "docs": [ - "Proof failed verification." - ] - }, - { - "name": "MissingProof", - "index": 6, - "docs": [ - "Missing storage proof." - ] - }, - { - "name": "MissingStateData", - "index": 7, - "docs": [ - "Unable to verify proof becasue state data is missing." - ] - }, - { - "name": "DoubleCheck", - "index": 8, - "docs": [ - "Double proof check in the block." - ] - }, - { - "name": "ProofNotChecked", - "index": 9, - "docs": [ - "Storage proof was not checked in the block." - ] - }, - { - "name": "TransactionTooLarge", - "index": 10, - "docs": [ - "Transaction is too large." - ] - }, - { - "name": "TooManyTransactions", - "index": 11, - "docs": [ - "Too many transactions in the block." - ] - }, - { - "name": "BadContext", - "index": 12, - "docs": [ - "Attempted to call `store` outside of block execution." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 555, - "type": { - "path": [ - "pallet_bags_list", - "list", - "Node" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "id", - "type": 0, - "typeName": "T::AccountId" - }, - { - "name": "prev", - "type": 58, - "typeName": "Option" - }, - { - "name": "next", - "type": 58, - "typeName": "Option" - }, - { - "name": "bag_upper", - "type": 8, - "typeName": "T::Score" - } - ] - } - } - } - }, - { - "id": 556, - "type": { - "path": [ - "pallet_bags_list", - "list", - "Bag" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "head", - "type": 58, - "typeName": "Option" - }, - { - "name": "tail", - "type": 58, - "typeName": "Option" - } - ] - } - } - } - }, - { - "id": 557, - "type": { - "def": { - "sequence": { - "type": 8 - } - } - } - }, - { - "id": 558, - "type": { - "path": [ - "pallet_bags_list", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotInSameBag", - "index": 0, - "docs": [ - "Attempted to place node in front of a node in another bag." - ] - }, - { - "name": "IdNotFound", - "index": 1, - "docs": [ - "Id not found in list." - ] - }, - { - "name": "NotHeavier", - "index": 2, - "docs": [ - "An Id does not have a greater score than another Id." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 559, - "type": { - "path": [ - "pallet_state_trie_migration", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "MaxSignedLimits", - "index": 0, - "docs": [ - "max signed limits not respected." - ] - }, - { - "name": "NotEnoughFunds", - "index": 1, - "docs": [ - "submitter does not have enough funds." - ] - }, - { - "name": "BadWitness", - "index": 2, - "docs": [ - "bad witness data provided." - ] - }, - { - "name": "SizeUpperBoundExceeded", - "index": 3, - "docs": [ - "upper bound of size is exceeded," - ] - }, - { - "name": "SignedMigrationNotAllowed", - "index": 4, - "docs": [ - "Signed migration is not allowed because the maximum limit is not set yet." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 560, - "type": { - "path": [ - "pallet_child_bounties", - "ChildBounty" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "parent_bounty", - "type": 4, - "typeName": "BountyIndex" - }, - { - "name": "value", - "type": 6, - "typeName": "Balance" - }, - { - "name": "fee", - "type": 6, - "typeName": "Balance" - }, - { - "name": "curator_deposit", - "type": 6, - "typeName": "Balance" - }, - { - "name": "status", - "type": 561, - "typeName": "ChildBountyStatus" - } - ] - } - } - } - }, - { - "id": 561, - "type": { - "path": [ - "pallet_child_bounties", - "ChildBountyStatus" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Added", - "index": 0 - }, - { - "name": "CuratorProposed", - "fields": [ - { - "name": "curator", - "type": 0, - "typeName": "AccountId" - } - ], - "index": 1 - }, - { - "name": "Active", - "fields": [ - { - "name": "curator", - "type": 0, - "typeName": "AccountId" - } - ], - "index": 2 - }, - { - "name": "PendingPayout", - "fields": [ - { - "name": "curator", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "beneficiary", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "unlock_at", - "type": 4, - "typeName": "BlockNumber" - } - ], - "index": 3 - } - ] - } - } - } - }, - { - "id": 562, - "type": { - "path": [ - "pallet_child_bounties", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "ParentBountyNotActive", - "index": 0, - "docs": [ - "The parent bounty is not in active state." - ] - }, - { - "name": "InsufficientBountyBalance", - "index": 1, - "docs": [ - "The bounty balance is not enough to add new child-bounty." - ] - }, - { - "name": "TooManyChildBounties", - "index": 2, - "docs": [ - "Number of child-bounties exceeds limit `MaxActiveChildBountyCount`." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 563, - "type": { - "path": [ - "pallet_referenda", - "types", - "ReferendumInfo" - ], - "params": [ - { - "name": "TrackId", - "type": 2 - }, - { - "name": "Origin", - "type": 331 - }, - { - "name": "Moment", - "type": 4 - }, - { - "name": "Hash", - "type": 9 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "Tally", - "type": 102 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "ScheduleAddress", - "type": 75 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Ongoing", - "fields": [ - { - "type": 564, - "typeName": "ReferendumStatus" - } - ], - "index": 0 - }, - { - "name": "Approved", - "fields": [ - { - "type": 4, - "typeName": "Moment" - }, - { - "type": 565, - "typeName": "Deposit" - }, - { - "type": 566, - "typeName": "Option>" - } - ], - "index": 1 - }, - { - "name": "Rejected", - "fields": [ - { - "type": 4, - "typeName": "Moment" - }, - { - "type": 565, - "typeName": "Deposit" - }, - { - "type": 566, - "typeName": "Option>" - } - ], - "index": 2 - }, - { - "name": "Cancelled", - "fields": [ - { - "type": 4, - "typeName": "Moment" - }, - { - "type": 565, - "typeName": "Deposit" - }, - { - "type": 566, - "typeName": "Option>" - } - ], - "index": 3 - }, - { - "name": "TimedOut", - "fields": [ - { - "type": 4, - "typeName": "Moment" - }, - { - "type": 565, - "typeName": "Deposit" - }, - { - "type": 566, - "typeName": "Option>" - } - ], - "index": 4 - }, - { - "name": "Killed", - "fields": [ - { - "type": 4, - "typeName": "Moment" - } - ], - "index": 5 - } - ] - } - } - } - }, - { - "id": 564, - "type": { - "path": [ - "pallet_referenda", - "types", - "ReferendumStatus" - ], - "params": [ - { - "name": "TrackId", - "type": 2 - }, - { - "name": "Origin", - "type": 331 - }, - { - "name": "Moment", - "type": 4 - }, - { - "name": "Hash", - "type": 9 - }, - { - "name": "Balance", - "type": 6 - }, - { - "name": "Tally", - "type": 102 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "ScheduleAddress", - "type": 75 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "track", - "type": 2, - "typeName": "TrackId" - }, - { - "name": "origin", - "type": 331, - "typeName": "Origin" - }, - { - "name": "proposal_hash", - "type": 9, - "typeName": "Hash" - }, - { - "name": "enactment", - "type": 336, - "typeName": "DispatchTime" - }, - { - "name": "submitted", - "type": 4, - "typeName": "Moment" - }, - { - "name": "submission_deposit", - "type": 565, - "typeName": "Deposit" - }, - { - "name": "decision_deposit", - "type": 566, - "typeName": "Option>" - }, - { - "name": "deciding", - "type": 567, - "typeName": "Option>" - }, - { - "name": "tally", - "type": 102, - "typeName": "Tally" - }, - { - "name": "in_queue", - "type": 35, - "typeName": "bool" - }, - { - "name": "alarm", - "type": 569, - "typeName": "Option<(Moment, ScheduleAddress)>" - } - ] - } - } - } - }, - { - "id": 565, - "type": { - "path": [ - "pallet_referenda", - "types", - "Deposit" - ], - "params": [ - { - "name": "AccountId", - "type": 0 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "who", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "amount", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 566, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 565 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 565 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 567, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 568 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 568 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 568, - "type": { - "path": [ - "pallet_referenda", - "types", - "DecidingStatus" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "since", - "type": 4, - "typeName": "BlockNumber" - }, - { - "name": "confirming", - "type": 93, - "typeName": "Option" - } - ] - } - } - } - }, - { - "id": 569, - "type": { - "path": [ - "Option" - ], - "params": [ - { - "name": "T", - "type": 570 - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "None", - "index": 0 - }, - { - "name": "Some", - "fields": [ - { - "type": 570 - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 570, - "type": { - "def": { - "tuple": [ - 4, - 75 - ] - } - } - }, - { - "id": 571, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 486 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 485, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 572, - "type": { - "path": [ - "pallet_referenda", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotOngoing", - "index": 0, - "docs": [ - "Referendum is not ongoing." - ] - }, - { - "name": "HasDeposit", - "index": 1, - "docs": [ - "Referendum's decision deposit is already paid." - ] - }, - { - "name": "BadTrack", - "index": 2, - "docs": [ - "The track identifier given was invalid." - ] - }, - { - "name": "Full", - "index": 3, - "docs": [ - "There are already a full complement of referendums in progress for this track." - ] - }, - { - "name": "QueueEmpty", - "index": 4, - "docs": [ - "The queue of the track is empty." - ] - }, - { - "name": "BadReferendum", - "index": 5, - "docs": [ - "The referendum index provided is invalid in this context." - ] - }, - { - "name": "NothingToDo", - "index": 6, - "docs": [ - "There was nothing to do in the advancement." - ] - }, - { - "name": "NoTrack", - "index": 7, - "docs": [ - "No track exists for the proposal origin." - ] - }, - { - "name": "Unfinished", - "index": 8, - "docs": [ - "Any deposit cannot be refunded until after the decision is over." - ] - }, - { - "name": "NoPermission", - "index": 9, - "docs": [ - "The deposit refunder is not the depositor." - ] - }, - { - "name": "NoDeposit", - "index": 10, - "docs": [ - "The deposit cannot be refunded since none was made." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 573, - "type": { - "def": { - "tuple": [ - 0, - 2 - ] - } - } - }, - { - "id": 574, - "type": { - "path": [ - "pallet_conviction_voting", - "vote", - "Voting" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "PollIndex", - "type": 4 - }, - { - "name": "MaxVotes", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "Casting", - "fields": [ - { - "type": 575, - "typeName": "Casting" - } - ], - "index": 0 - }, - { - "name": "Delegating", - "fields": [ - { - "type": 581, - "typeName": "Delegating" - } - ], - "index": 1 - } - ] - } - } - } - }, - { - "id": 575, - "type": { - "path": [ - "pallet_conviction_voting", - "vote", - "Casting" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "PollIndex", - "type": 4 - }, - { - "name": "MaxVotes", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "votes", - "type": 576, - "typeName": "BoundedVec<(PollIndex, AccountVote), MaxVotes>" - }, - { - "name": "delegations", - "type": 579, - "typeName": "Delegations" - }, - { - "name": "prior", - "type": 580, - "typeName": "PriorLock" - } - ] - } - } - } - }, - { - "id": 576, - "type": { - "path": [ - "frame_support", - "storage", - "bounded_vec", - "BoundedVec" - ], - "params": [ - { - "name": "T", - "type": 577 - }, - { - "name": "S", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 578, - "typeName": "Vec" - } - ] - } - } - } - }, - { - "id": 577, - "type": { - "def": { - "tuple": [ - 4, - 338 - ] - } - } - }, - { - "id": 578, - "type": { - "def": { - "sequence": { - "type": 577 - } - } - } - }, - { - "id": 579, - "type": { - "path": [ - "pallet_conviction_voting", - "types", - "Delegations" - ], - "params": [ - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "votes", - "type": 6, - "typeName": "Balance" - }, - { - "name": "capital", - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 580, - "type": { - "path": [ - "pallet_conviction_voting", - "vote", - "PriorLock" - ], - "params": [ - { - "name": "BlockNumber", - "type": 4 - }, - { - "name": "Balance", - "type": 6 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 4, - "typeName": "BlockNumber" - }, - { - "type": 6, - "typeName": "Balance" - } - ] - } - } - } - }, - { - "id": 581, - "type": { - "path": [ - "pallet_conviction_voting", - "vote", - "Delegating" - ], - "params": [ - { - "name": "Balance", - "type": 6 - }, - { - "name": "AccountId", - "type": 0 - }, - { - "name": "BlockNumber", - "type": 4 - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "balance", - "type": 6, - "typeName": "Balance" - }, - { - "name": "target", - "type": 0, - "typeName": "AccountId" - }, - { - "name": "conviction", - "type": 340, - "typeName": "Conviction" - }, - { - "name": "delegations", - "type": 579, - "typeName": "Delegations" - }, - { - "name": "prior", - "type": 580, - "typeName": "PriorLock" - } - ] - } - } - } - }, - { - "id": 582, - "type": { - "def": { - "sequence": { - "type": 583 - } - } - } - }, - { - "id": 583, - "type": { - "def": { - "tuple": [ - 2, - 6 - ] - } - } - }, - { - "id": 584, - "type": { - "path": [ - "pallet_conviction_voting", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - }, - { - "name": "I", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "NotOngoing", - "index": 0, - "docs": [ - "Poll is not ongoing." - ] - }, - { - "name": "NotVoter", - "index": 1, - "docs": [ - "The given account did not vote on the poll." - ] - }, - { - "name": "NoPermission", - "index": 2, - "docs": [ - "The actor has no permission to conduct the action." - ] - }, - { - "name": "NoPermissionYet", - "index": 3, - "docs": [ - "The actor has no permission to conduct the action right now but will do in the future." - ] - }, - { - "name": "AlreadyDelegating", - "index": 4, - "docs": [ - "The account is already delegating." - ] - }, - { - "name": "AlreadyVoting", - "index": 5, - "docs": [ - "The account currently has votes attached to it and the operation cannot succeed until", - "these are removed, either through `unvote` or `reap_vote`." - ] - }, - { - "name": "InsufficientFunds", - "index": 6, - "docs": [ - "Too high a balance was provided that the account cannot afford." - ] - }, - { - "name": "NotDelegating", - "index": 7, - "docs": [ - "The account is not currently delegating." - ] - }, - { - "name": "Nonsense", - "index": 8, - "docs": [ - "Delegation to oneself makes no sense." - ] - }, - { - "name": "MaxVotesReached", - "index": 9, - "docs": [ - "Maximum number of votes reached." - ] - }, - { - "name": "ClassNeeded", - "index": 10, - "docs": [ - "The class must be supplied since it is not easily determinable from the state." - ] - }, - { - "name": "BadClass", - "index": 11, - "docs": [ - "The class ID supplied is invalid." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 585, - "type": { - "path": [ - "pallet_whitelist", - "pallet", - "Error" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "variant": { - "variants": [ - { - "name": "UnavailablePreImage", - "index": 0, - "docs": [ - "The preimage of the call hash could not be loaded." - ] - }, - { - "name": "UndecodableCall", - "index": 1, - "docs": [ - "The call could not be decoded." - ] - }, - { - "name": "InvalidCallWeightWitness", - "index": 2, - "docs": [ - "The weight of the decoded call was higher than the witness." - ] - }, - { - "name": "CallIsNotWhitelisted", - "index": 3, - "docs": [ - "The call was not whitelisted." - ] - }, - { - "name": "CallAlreadyWhitelisted", - "index": 4, - "docs": [ - "The call was already whitelisted; No-Op." - ] - } - ] - } - }, - "docs": [ - "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t" - ] - } - }, - { - "id": 586, - "type": { - "path": [ - "sp_runtime", - "generic", - "unchecked_extrinsic", - "UncheckedExtrinsic" - ], - "params": [ - { - "name": "Address", - "type": 151 - }, - { - "name": "Call", - "type": 134 - }, - { - "name": "Signature", - "type": 587 - }, - { - "name": "Extra", - "type": 590 - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 10 - } - ] - } - } - } - }, - { - "id": 587, - "type": { - "path": [ - "sp_runtime", - "MultiSignature" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Ed25519", - "fields": [ - { - "type": 238, - "typeName": "ed25519::Signature" - } - ], - "index": 0 - }, - { - "name": "Sr25519", - "fields": [ - { - "type": 255, - "typeName": "sr25519::Signature" - } - ], - "index": 1 - }, - { - "name": "Ecdsa", - "fields": [ - { - "type": 588, - "typeName": "ecdsa::Signature" - } - ], - "index": 2 - } - ] - } - } - } - }, - { - "id": 588, - "type": { - "path": [ - "sp_core", - "ecdsa", - "Signature" - ], - "def": { - "composite": { - "fields": [ - { - "type": 589, - "typeName": "[u8; 65]" - } - ] - } - } - } - }, - { - "id": 589, - "type": { - "def": { - "array": { - "len": 65, - "type": 2 - } - } - } - }, - { - "id": 590, - "type": { - "def": { - "tuple": [ - 591, - 592, - 593, - 594, - 595, - 597, - 598, - 599 - ] - } - } - }, - { - "id": 591, - "type": { - "path": [ - "frame_system", - "extensions", - "check_non_zero_sender", - "CheckNonZeroSender" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": {} - } - } - }, - { - "id": 592, - "type": { - "path": [ - "frame_system", - "extensions", - "check_spec_version", - "CheckSpecVersion" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": {} - } - } - }, - { - "id": 593, - "type": { - "path": [ - "frame_system", - "extensions", - "check_tx_version", - "CheckTxVersion" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": {} - } - } - }, - { - "id": 594, - "type": { - "path": [ - "frame_system", - "extensions", - "check_genesis", - "CheckGenesis" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": {} - } - } - }, - { - "id": 595, - "type": { - "path": [ - "frame_system", - "extensions", - "check_mortality", - "CheckMortality" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 596, - "typeName": "Era" - } - ] - } - } - } - }, - { - "id": 596, - "type": { - "path": [ - "sp_runtime", - "generic", - "era", - "Era" - ], - "def": { - "variant": { - "variants": [ - { - "name": "Immortal", - "index": 0 - }, - { - "name": "Mortal1", - "fields": [ - { - "type": 2 - } - ], - "index": 1 - }, - { - "name": "Mortal2", - "fields": [ - { - "type": 2 - } - ], - "index": 2 - }, - { - "name": "Mortal3", - "fields": [ - { - "type": 2 - } - ], - "index": 3 - }, - { - "name": "Mortal4", - "fields": [ - { - "type": 2 - } - ], - "index": 4 - }, - { - "name": "Mortal5", - "fields": [ - { - "type": 2 - } - ], - "index": 5 - }, - { - "name": "Mortal6", - "fields": [ - { - "type": 2 - } - ], - "index": 6 - }, - { - "name": "Mortal7", - "fields": [ - { - "type": 2 - } - ], - "index": 7 - }, - { - "name": "Mortal8", - "fields": [ - { - "type": 2 - } - ], - "index": 8 - }, - { - "name": "Mortal9", - "fields": [ - { - "type": 2 - } - ], - "index": 9 - }, - { - "name": "Mortal10", - "fields": [ - { - "type": 2 - } - ], - "index": 10 - }, - { - "name": "Mortal11", - "fields": [ - { - "type": 2 - } - ], - "index": 11 - }, - { - "name": "Mortal12", - "fields": [ - { - "type": 2 - } - ], - "index": 12 - }, - { - "name": "Mortal13", - "fields": [ - { - "type": 2 - } - ], - "index": 13 - }, - { - "name": "Mortal14", - "fields": [ - { - "type": 2 - } - ], - "index": 14 - }, - { - "name": "Mortal15", - "fields": [ - { - "type": 2 - } - ], - "index": 15 - }, - { - "name": "Mortal16", - "fields": [ - { - "type": 2 - } - ], - "index": 16 - }, - { - "name": "Mortal17", - "fields": [ - { - "type": 2 - } - ], - "index": 17 - }, - { - "name": "Mortal18", - "fields": [ - { - "type": 2 - } - ], - "index": 18 - }, - { - "name": "Mortal19", - "fields": [ - { - "type": 2 - } - ], - "index": 19 - }, - { - "name": "Mortal20", - "fields": [ - { - "type": 2 - } - ], - "index": 20 - }, - { - "name": "Mortal21", - "fields": [ - { - "type": 2 - } - ], - "index": 21 - }, - { - "name": "Mortal22", - "fields": [ - { - "type": 2 - } - ], - "index": 22 - }, - { - "name": "Mortal23", - "fields": [ - { - "type": 2 - } - ], - "index": 23 - }, - { - "name": "Mortal24", - "fields": [ - { - "type": 2 - } - ], - "index": 24 - }, - { - "name": "Mortal25", - "fields": [ - { - "type": 2 - } - ], - "index": 25 - }, - { - "name": "Mortal26", - "fields": [ - { - "type": 2 - } - ], - "index": 26 - }, - { - "name": "Mortal27", - "fields": [ - { - "type": 2 - } - ], - "index": 27 - }, - { - "name": "Mortal28", - "fields": [ - { - "type": 2 - } - ], - "index": 28 - }, - { - "name": "Mortal29", - "fields": [ - { - "type": 2 - } - ], - "index": 29 - }, - { - "name": "Mortal30", - "fields": [ - { - "type": 2 - } - ], - "index": 30 - }, - { - "name": "Mortal31", - "fields": [ - { - "type": 2 - } - ], - "index": 31 - }, - { - "name": "Mortal32", - "fields": [ - { - "type": 2 - } - ], - "index": 32 - }, - { - "name": "Mortal33", - "fields": [ - { - "type": 2 - } - ], - "index": 33 - }, - { - "name": "Mortal34", - "fields": [ - { - "type": 2 - } - ], - "index": 34 - }, - { - "name": "Mortal35", - "fields": [ - { - "type": 2 - } - ], - "index": 35 - }, - { - "name": "Mortal36", - "fields": [ - { - "type": 2 - } - ], - "index": 36 - }, - { - "name": "Mortal37", - "fields": [ - { - "type": 2 - } - ], - "index": 37 - }, - { - "name": "Mortal38", - "fields": [ - { - "type": 2 - } - ], - "index": 38 - }, - { - "name": "Mortal39", - "fields": [ - { - "type": 2 - } - ], - "index": 39 - }, - { - "name": "Mortal40", - "fields": [ - { - "type": 2 - } - ], - "index": 40 - }, - { - "name": "Mortal41", - "fields": [ - { - "type": 2 - } - ], - "index": 41 - }, - { - "name": "Mortal42", - "fields": [ - { - "type": 2 - } - ], - "index": 42 - }, - { - "name": "Mortal43", - "fields": [ - { - "type": 2 - } - ], - "index": 43 - }, - { - "name": "Mortal44", - "fields": [ - { - "type": 2 - } - ], - "index": 44 - }, - { - "name": "Mortal45", - "fields": [ - { - "type": 2 - } - ], - "index": 45 - }, - { - "name": "Mortal46", - "fields": [ - { - "type": 2 - } - ], - "index": 46 - }, - { - "name": "Mortal47", - "fields": [ - { - "type": 2 - } - ], - "index": 47 - }, - { - "name": "Mortal48", - "fields": [ - { - "type": 2 - } - ], - "index": 48 - }, - { - "name": "Mortal49", - "fields": [ - { - "type": 2 - } - ], - "index": 49 - }, - { - "name": "Mortal50", - "fields": [ - { - "type": 2 - } - ], - "index": 50 - }, - { - "name": "Mortal51", - "fields": [ - { - "type": 2 - } - ], - "index": 51 - }, - { - "name": "Mortal52", - "fields": [ - { - "type": 2 - } - ], - "index": 52 - }, - { - "name": "Mortal53", - "fields": [ - { - "type": 2 - } - ], - "index": 53 - }, - { - "name": "Mortal54", - "fields": [ - { - "type": 2 - } - ], - "index": 54 - }, - { - "name": "Mortal55", - "fields": [ - { - "type": 2 - } - ], - "index": 55 - }, - { - "name": "Mortal56", - "fields": [ - { - "type": 2 - } - ], - "index": 56 - }, - { - "name": "Mortal57", - "fields": [ - { - "type": 2 - } - ], - "index": 57 - }, - { - "name": "Mortal58", - "fields": [ - { - "type": 2 - } - ], - "index": 58 - }, - { - "name": "Mortal59", - "fields": [ - { - "type": 2 - } - ], - "index": 59 - }, - { - "name": "Mortal60", - "fields": [ - { - "type": 2 - } - ], - "index": 60 - }, - { - "name": "Mortal61", - "fields": [ - { - "type": 2 - } - ], - "index": 61 - }, - { - "name": "Mortal62", - "fields": [ - { - "type": 2 - } - ], - "index": 62 - }, - { - "name": "Mortal63", - "fields": [ - { - "type": 2 - } - ], - "index": 63 - }, - { - "name": "Mortal64", - "fields": [ - { - "type": 2 - } - ], - "index": 64 - }, - { - "name": "Mortal65", - "fields": [ - { - "type": 2 - } - ], - "index": 65 - }, - { - "name": "Mortal66", - "fields": [ - { - "type": 2 - } - ], - "index": 66 - }, - { - "name": "Mortal67", - "fields": [ - { - "type": 2 - } - ], - "index": 67 - }, - { - "name": "Mortal68", - "fields": [ - { - "type": 2 - } - ], - "index": 68 - }, - { - "name": "Mortal69", - "fields": [ - { - "type": 2 - } - ], - "index": 69 - }, - { - "name": "Mortal70", - "fields": [ - { - "type": 2 - } - ], - "index": 70 - }, - { - "name": "Mortal71", - "fields": [ - { - "type": 2 - } - ], - "index": 71 - }, - { - "name": "Mortal72", - "fields": [ - { - "type": 2 - } - ], - "index": 72 - }, - { - "name": "Mortal73", - "fields": [ - { - "type": 2 - } - ], - "index": 73 - }, - { - "name": "Mortal74", - "fields": [ - { - "type": 2 - } - ], - "index": 74 - }, - { - "name": "Mortal75", - "fields": [ - { - "type": 2 - } - ], - "index": 75 - }, - { - "name": "Mortal76", - "fields": [ - { - "type": 2 - } - ], - "index": 76 - }, - { - "name": "Mortal77", - "fields": [ - { - "type": 2 - } - ], - "index": 77 - }, - { - "name": "Mortal78", - "fields": [ - { - "type": 2 - } - ], - "index": 78 - }, - { - "name": "Mortal79", - "fields": [ - { - "type": 2 - } - ], - "index": 79 - }, - { - "name": "Mortal80", - "fields": [ - { - "type": 2 - } - ], - "index": 80 - }, - { - "name": "Mortal81", - "fields": [ - { - "type": 2 - } - ], - "index": 81 - }, - { - "name": "Mortal82", - "fields": [ - { - "type": 2 - } - ], - "index": 82 - }, - { - "name": "Mortal83", - "fields": [ - { - "type": 2 - } - ], - "index": 83 - }, - { - "name": "Mortal84", - "fields": [ - { - "type": 2 - } - ], - "index": 84 - }, - { - "name": "Mortal85", - "fields": [ - { - "type": 2 - } - ], - "index": 85 - }, - { - "name": "Mortal86", - "fields": [ - { - "type": 2 - } - ], - "index": 86 - }, - { - "name": "Mortal87", - "fields": [ - { - "type": 2 - } - ], - "index": 87 - }, - { - "name": "Mortal88", - "fields": [ - { - "type": 2 - } - ], - "index": 88 - }, - { - "name": "Mortal89", - "fields": [ - { - "type": 2 - } - ], - "index": 89 - }, - { - "name": "Mortal90", - "fields": [ - { - "type": 2 - } - ], - "index": 90 - }, - { - "name": "Mortal91", - "fields": [ - { - "type": 2 - } - ], - "index": 91 - }, - { - "name": "Mortal92", - "fields": [ - { - "type": 2 - } - ], - "index": 92 - }, - { - "name": "Mortal93", - "fields": [ - { - "type": 2 - } - ], - "index": 93 - }, - { - "name": "Mortal94", - "fields": [ - { - "type": 2 - } - ], - "index": 94 - }, - { - "name": "Mortal95", - "fields": [ - { - "type": 2 - } - ], - "index": 95 - }, - { - "name": "Mortal96", - "fields": [ - { - "type": 2 - } - ], - "index": 96 - }, - { - "name": "Mortal97", - "fields": [ - { - "type": 2 - } - ], - "index": 97 - }, - { - "name": "Mortal98", - "fields": [ - { - "type": 2 - } - ], - "index": 98 - }, - { - "name": "Mortal99", - "fields": [ - { - "type": 2 - } - ], - "index": 99 - }, - { - "name": "Mortal100", - "fields": [ - { - "type": 2 - } - ], - "index": 100 - }, - { - "name": "Mortal101", - "fields": [ - { - "type": 2 - } - ], - "index": 101 - }, - { - "name": "Mortal102", - "fields": [ - { - "type": 2 - } - ], - "index": 102 - }, - { - "name": "Mortal103", - "fields": [ - { - "type": 2 - } - ], - "index": 103 - }, - { - "name": "Mortal104", - "fields": [ - { - "type": 2 - } - ], - "index": 104 - }, - { - "name": "Mortal105", - "fields": [ - { - "type": 2 - } - ], - "index": 105 - }, - { - "name": "Mortal106", - "fields": [ - { - "type": 2 - } - ], - "index": 106 - }, - { - "name": "Mortal107", - "fields": [ - { - "type": 2 - } - ], - "index": 107 - }, - { - "name": "Mortal108", - "fields": [ - { - "type": 2 - } - ], - "index": 108 - }, - { - "name": "Mortal109", - "fields": [ - { - "type": 2 - } - ], - "index": 109 - }, - { - "name": "Mortal110", - "fields": [ - { - "type": 2 - } - ], - "index": 110 - }, - { - "name": "Mortal111", - "fields": [ - { - "type": 2 - } - ], - "index": 111 - }, - { - "name": "Mortal112", - "fields": [ - { - "type": 2 - } - ], - "index": 112 - }, - { - "name": "Mortal113", - "fields": [ - { - "type": 2 - } - ], - "index": 113 - }, - { - "name": "Mortal114", - "fields": [ - { - "type": 2 - } - ], - "index": 114 - }, - { - "name": "Mortal115", - "fields": [ - { - "type": 2 - } - ], - "index": 115 - }, - { - "name": "Mortal116", - "fields": [ - { - "type": 2 - } - ], - "index": 116 - }, - { - "name": "Mortal117", - "fields": [ - { - "type": 2 - } - ], - "index": 117 - }, - { - "name": "Mortal118", - "fields": [ - { - "type": 2 - } - ], - "index": 118 - }, - { - "name": "Mortal119", - "fields": [ - { - "type": 2 - } - ], - "index": 119 - }, - { - "name": "Mortal120", - "fields": [ - { - "type": 2 - } - ], - "index": 120 - }, - { - "name": "Mortal121", - "fields": [ - { - "type": 2 - } - ], - "index": 121 - }, - { - "name": "Mortal122", - "fields": [ - { - "type": 2 - } - ], - "index": 122 - }, - { - "name": "Mortal123", - "fields": [ - { - "type": 2 - } - ], - "index": 123 - }, - { - "name": "Mortal124", - "fields": [ - { - "type": 2 - } - ], - "index": 124 - }, - { - "name": "Mortal125", - "fields": [ - { - "type": 2 - } - ], - "index": 125 - }, - { - "name": "Mortal126", - "fields": [ - { - "type": 2 - } - ], - "index": 126 - }, - { - "name": "Mortal127", - "fields": [ - { - "type": 2 - } - ], - "index": 127 - }, - { - "name": "Mortal128", - "fields": [ - { - "type": 2 - } - ], - "index": 128 - }, - { - "name": "Mortal129", - "fields": [ - { - "type": 2 - } - ], - "index": 129 - }, - { - "name": "Mortal130", - "fields": [ - { - "type": 2 - } - ], - "index": 130 - }, - { - "name": "Mortal131", - "fields": [ - { - "type": 2 - } - ], - "index": 131 - }, - { - "name": "Mortal132", - "fields": [ - { - "type": 2 - } - ], - "index": 132 - }, - { - "name": "Mortal133", - "fields": [ - { - "type": 2 - } - ], - "index": 133 - }, - { - "name": "Mortal134", - "fields": [ - { - "type": 2 - } - ], - "index": 134 - }, - { - "name": "Mortal135", - "fields": [ - { - "type": 2 - } - ], - "index": 135 - }, - { - "name": "Mortal136", - "fields": [ - { - "type": 2 - } - ], - "index": 136 - }, - { - "name": "Mortal137", - "fields": [ - { - "type": 2 - } - ], - "index": 137 - }, - { - "name": "Mortal138", - "fields": [ - { - "type": 2 - } - ], - "index": 138 - }, - { - "name": "Mortal139", - "fields": [ - { - "type": 2 - } - ], - "index": 139 - }, - { - "name": "Mortal140", - "fields": [ - { - "type": 2 - } - ], - "index": 140 - }, - { - "name": "Mortal141", - "fields": [ - { - "type": 2 - } - ], - "index": 141 - }, - { - "name": "Mortal142", - "fields": [ - { - "type": 2 - } - ], - "index": 142 - }, - { - "name": "Mortal143", - "fields": [ - { - "type": 2 - } - ], - "index": 143 - }, - { - "name": "Mortal144", - "fields": [ - { - "type": 2 - } - ], - "index": 144 - }, - { - "name": "Mortal145", - "fields": [ - { - "type": 2 - } - ], - "index": 145 - }, - { - "name": "Mortal146", - "fields": [ - { - "type": 2 - } - ], - "index": 146 - }, - { - "name": "Mortal147", - "fields": [ - { - "type": 2 - } - ], - "index": 147 - }, - { - "name": "Mortal148", - "fields": [ - { - "type": 2 - } - ], - "index": 148 - }, - { - "name": "Mortal149", - "fields": [ - { - "type": 2 - } - ], - "index": 149 - }, - { - "name": "Mortal150", - "fields": [ - { - "type": 2 - } - ], - "index": 150 - }, - { - "name": "Mortal151", - "fields": [ - { - "type": 2 - } - ], - "index": 151 - }, - { - "name": "Mortal152", - "fields": [ - { - "type": 2 - } - ], - "index": 152 - }, - { - "name": "Mortal153", - "fields": [ - { - "type": 2 - } - ], - "index": 153 - }, - { - "name": "Mortal154", - "fields": [ - { - "type": 2 - } - ], - "index": 154 - }, - { - "name": "Mortal155", - "fields": [ - { - "type": 2 - } - ], - "index": 155 - }, - { - "name": "Mortal156", - "fields": [ - { - "type": 2 - } - ], - "index": 156 - }, - { - "name": "Mortal157", - "fields": [ - { - "type": 2 - } - ], - "index": 157 - }, - { - "name": "Mortal158", - "fields": [ - { - "type": 2 - } - ], - "index": 158 - }, - { - "name": "Mortal159", - "fields": [ - { - "type": 2 - } - ], - "index": 159 - }, - { - "name": "Mortal160", - "fields": [ - { - "type": 2 - } - ], - "index": 160 - }, - { - "name": "Mortal161", - "fields": [ - { - "type": 2 - } - ], - "index": 161 - }, - { - "name": "Mortal162", - "fields": [ - { - "type": 2 - } - ], - "index": 162 - }, - { - "name": "Mortal163", - "fields": [ - { - "type": 2 - } - ], - "index": 163 - }, - { - "name": "Mortal164", - "fields": [ - { - "type": 2 - } - ], - "index": 164 - }, - { - "name": "Mortal165", - "fields": [ - { - "type": 2 - } - ], - "index": 165 - }, - { - "name": "Mortal166", - "fields": [ - { - "type": 2 - } - ], - "index": 166 - }, - { - "name": "Mortal167", - "fields": [ - { - "type": 2 - } - ], - "index": 167 - }, - { - "name": "Mortal168", - "fields": [ - { - "type": 2 - } - ], - "index": 168 - }, - { - "name": "Mortal169", - "fields": [ - { - "type": 2 - } - ], - "index": 169 - }, - { - "name": "Mortal170", - "fields": [ - { - "type": 2 - } - ], - "index": 170 - }, - { - "name": "Mortal171", - "fields": [ - { - "type": 2 - } - ], - "index": 171 - }, - { - "name": "Mortal172", - "fields": [ - { - "type": 2 - } - ], - "index": 172 - }, - { - "name": "Mortal173", - "fields": [ - { - "type": 2 - } - ], - "index": 173 - }, - { - "name": "Mortal174", - "fields": [ - { - "type": 2 - } - ], - "index": 174 - }, - { - "name": "Mortal175", - "fields": [ - { - "type": 2 - } - ], - "index": 175 - }, - { - "name": "Mortal176", - "fields": [ - { - "type": 2 - } - ], - "index": 176 - }, - { - "name": "Mortal177", - "fields": [ - { - "type": 2 - } - ], - "index": 177 - }, - { - "name": "Mortal178", - "fields": [ - { - "type": 2 - } - ], - "index": 178 - }, - { - "name": "Mortal179", - "fields": [ - { - "type": 2 - } - ], - "index": 179 - }, - { - "name": "Mortal180", - "fields": [ - { - "type": 2 - } - ], - "index": 180 - }, - { - "name": "Mortal181", - "fields": [ - { - "type": 2 - } - ], - "index": 181 - }, - { - "name": "Mortal182", - "fields": [ - { - "type": 2 - } - ], - "index": 182 - }, - { - "name": "Mortal183", - "fields": [ - { - "type": 2 - } - ], - "index": 183 - }, - { - "name": "Mortal184", - "fields": [ - { - "type": 2 - } - ], - "index": 184 - }, - { - "name": "Mortal185", - "fields": [ - { - "type": 2 - } - ], - "index": 185 - }, - { - "name": "Mortal186", - "fields": [ - { - "type": 2 - } - ], - "index": 186 - }, - { - "name": "Mortal187", - "fields": [ - { - "type": 2 - } - ], - "index": 187 - }, - { - "name": "Mortal188", - "fields": [ - { - "type": 2 - } - ], - "index": 188 - }, - { - "name": "Mortal189", - "fields": [ - { - "type": 2 - } - ], - "index": 189 - }, - { - "name": "Mortal190", - "fields": [ - { - "type": 2 - } - ], - "index": 190 - }, - { - "name": "Mortal191", - "fields": [ - { - "type": 2 - } - ], - "index": 191 - }, - { - "name": "Mortal192", - "fields": [ - { - "type": 2 - } - ], - "index": 192 - }, - { - "name": "Mortal193", - "fields": [ - { - "type": 2 - } - ], - "index": 193 - }, - { - "name": "Mortal194", - "fields": [ - { - "type": 2 - } - ], - "index": 194 - }, - { - "name": "Mortal195", - "fields": [ - { - "type": 2 - } - ], - "index": 195 - }, - { - "name": "Mortal196", - "fields": [ - { - "type": 2 - } - ], - "index": 196 - }, - { - "name": "Mortal197", - "fields": [ - { - "type": 2 - } - ], - "index": 197 - }, - { - "name": "Mortal198", - "fields": [ - { - "type": 2 - } - ], - "index": 198 - }, - { - "name": "Mortal199", - "fields": [ - { - "type": 2 - } - ], - "index": 199 - }, - { - "name": "Mortal200", - "fields": [ - { - "type": 2 - } - ], - "index": 200 - }, - { - "name": "Mortal201", - "fields": [ - { - "type": 2 - } - ], - "index": 201 - }, - { - "name": "Mortal202", - "fields": [ - { - "type": 2 - } - ], - "index": 202 - }, - { - "name": "Mortal203", - "fields": [ - { - "type": 2 - } - ], - "index": 203 - }, - { - "name": "Mortal204", - "fields": [ - { - "type": 2 - } - ], - "index": 204 - }, - { - "name": "Mortal205", - "fields": [ - { - "type": 2 - } - ], - "index": 205 - }, - { - "name": "Mortal206", - "fields": [ - { - "type": 2 - } - ], - "index": 206 - }, - { - "name": "Mortal207", - "fields": [ - { - "type": 2 - } - ], - "index": 207 - }, - { - "name": "Mortal208", - "fields": [ - { - "type": 2 - } - ], - "index": 208 - }, - { - "name": "Mortal209", - "fields": [ - { - "type": 2 - } - ], - "index": 209 - }, - { - "name": "Mortal210", - "fields": [ - { - "type": 2 - } - ], - "index": 210 - }, - { - "name": "Mortal211", - "fields": [ - { - "type": 2 - } - ], - "index": 211 - }, - { - "name": "Mortal212", - "fields": [ - { - "type": 2 - } - ], - "index": 212 - }, - { - "name": "Mortal213", - "fields": [ - { - "type": 2 - } - ], - "index": 213 - }, - { - "name": "Mortal214", - "fields": [ - { - "type": 2 - } - ], - "index": 214 - }, - { - "name": "Mortal215", - "fields": [ - { - "type": 2 - } - ], - "index": 215 - }, - { - "name": "Mortal216", - "fields": [ - { - "type": 2 - } - ], - "index": 216 - }, - { - "name": "Mortal217", - "fields": [ - { - "type": 2 - } - ], - "index": 217 - }, - { - "name": "Mortal218", - "fields": [ - { - "type": 2 - } - ], - "index": 218 - }, - { - "name": "Mortal219", - "fields": [ - { - "type": 2 - } - ], - "index": 219 - }, - { - "name": "Mortal220", - "fields": [ - { - "type": 2 - } - ], - "index": 220 - }, - { - "name": "Mortal221", - "fields": [ - { - "type": 2 - } - ], - "index": 221 - }, - { - "name": "Mortal222", - "fields": [ - { - "type": 2 - } - ], - "index": 222 - }, - { - "name": "Mortal223", - "fields": [ - { - "type": 2 - } - ], - "index": 223 - }, - { - "name": "Mortal224", - "fields": [ - { - "type": 2 - } - ], - "index": 224 - }, - { - "name": "Mortal225", - "fields": [ - { - "type": 2 - } - ], - "index": 225 - }, - { - "name": "Mortal226", - "fields": [ - { - "type": 2 - } - ], - "index": 226 - }, - { - "name": "Mortal227", - "fields": [ - { - "type": 2 - } - ], - "index": 227 - }, - { - "name": "Mortal228", - "fields": [ - { - "type": 2 - } - ], - "index": 228 - }, - { - "name": "Mortal229", - "fields": [ - { - "type": 2 - } - ], - "index": 229 - }, - { - "name": "Mortal230", - "fields": [ - { - "type": 2 - } - ], - "index": 230 - }, - { - "name": "Mortal231", - "fields": [ - { - "type": 2 - } - ], - "index": 231 - }, - { - "name": "Mortal232", - "fields": [ - { - "type": 2 - } - ], - "index": 232 - }, - { - "name": "Mortal233", - "fields": [ - { - "type": 2 - } - ], - "index": 233 - }, - { - "name": "Mortal234", - "fields": [ - { - "type": 2 - } - ], - "index": 234 - }, - { - "name": "Mortal235", - "fields": [ - { - "type": 2 - } - ], - "index": 235 - }, - { - "name": "Mortal236", - "fields": [ - { - "type": 2 - } - ], - "index": 236 - }, - { - "name": "Mortal237", - "fields": [ - { - "type": 2 - } - ], - "index": 237 - }, - { - "name": "Mortal238", - "fields": [ - { - "type": 2 - } - ], - "index": 238 - }, - { - "name": "Mortal239", - "fields": [ - { - "type": 2 - } - ], - "index": 239 - }, - { - "name": "Mortal240", - "fields": [ - { - "type": 2 - } - ], - "index": 240 - }, - { - "name": "Mortal241", - "fields": [ - { - "type": 2 - } - ], - "index": 241 - }, - { - "name": "Mortal242", - "fields": [ - { - "type": 2 - } - ], - "index": 242 - }, - { - "name": "Mortal243", - "fields": [ - { - "type": 2 - } - ], - "index": 243 - }, - { - "name": "Mortal244", - "fields": [ - { - "type": 2 - } - ], - "index": 244 - }, - { - "name": "Mortal245", - "fields": [ - { - "type": 2 - } - ], - "index": 245 - }, - { - "name": "Mortal246", - "fields": [ - { - "type": 2 - } - ], - "index": 246 - }, - { - "name": "Mortal247", - "fields": [ - { - "type": 2 - } - ], - "index": 247 - }, - { - "name": "Mortal248", - "fields": [ - { - "type": 2 - } - ], - "index": 248 - }, - { - "name": "Mortal249", - "fields": [ - { - "type": 2 - } - ], - "index": 249 - }, - { - "name": "Mortal250", - "fields": [ - { - "type": 2 - } - ], - "index": 250 - }, - { - "name": "Mortal251", - "fields": [ - { - "type": 2 - } - ], - "index": 251 - }, - { - "name": "Mortal252", - "fields": [ - { - "type": 2 - } - ], - "index": 252 - }, - { - "name": "Mortal253", - "fields": [ - { - "type": 2 - } - ], - "index": 253 - }, - { - "name": "Mortal254", - "fields": [ - { - "type": 2 - } - ], - "index": 254 - }, - { - "name": "Mortal255", - "fields": [ - { - "type": 2 - } - ], - "index": 255 - } - ] - } - } - } - }, - { - "id": 597, - "type": { - "path": [ - "frame_system", - "extensions", - "check_nonce", - "CheckNonce" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "type": 113, - "typeName": "T::Index" - } - ] - } - } - } - }, - { - "id": 598, - "type": { - "path": [ - "frame_system", - "extensions", - "check_weight", - "CheckWeight" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": {} - } - } - }, - { - "id": 599, - "type": { - "path": [ - "pallet_asset_tx_payment", - "ChargeAssetTxPayment" - ], - "params": [ - { - "name": "T", - "type": null - } - ], - "def": { - "composite": { - "fields": [ - { - "name": "tip", - "type": 65, - "typeName": "BalanceOf" - }, - { - "name": "asset_id", - "type": 93, - "typeName": "Option>" - } - ] - } - } - } - }, - { - "id": 600, - "type": { - "path": [ - "node_runtime", - "Runtime" - ], - "def": { - "composite": {} - } - } - } - ] - }, - "pallets": [ - { - "name": "System", - "storage": { - "prefix": "System", - "entries": [ - { - "name": "Account", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 3 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The full account information for a particular account ID." - ] - }, - { - "name": "ExtrinsicCount", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " Total extrinsics count for the current block." - ] - }, - { - "name": "BlockWeight", - "modifier": "Default", - "ty": { - "Plain": 7 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The current weight for the block." - ] - }, - { - "name": "AllExtrinsicsLen", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " Total length (in bytes) for all extrinsics put together, for the current block." - ] - }, - { - "name": "BlockHash", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 9 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Map of block numbers to block hashes." - ] - }, - { - "name": "ExtrinsicData", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 10 - } - }, - "default": [ - 0 - ], - "docs": [ - " Extrinsics data for the current block (maps an extrinsic's index to its data)." - ] - }, - { - "name": "Number", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The current block number being processed. Set by `execute_block`." - ] - }, - { - "name": "ParentHash", - "modifier": "Default", - "ty": { - "Plain": 9 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Hash of the previous block." - ] - }, - { - "name": "Digest", - "modifier": "Default", - "ty": { - "Plain": 11 - }, - "default": [ - 0 - ], - "docs": [ - " Digest of the current block, also part of the block header." - ] - }, - { - "name": "Events", - "modifier": "Default", - "ty": { - "Plain": 15 - }, - "default": [ - 0 - ], - "docs": [ - " Events deposited for the current block.", - "", - " NOTE: This storage item is explicitly unbounded since it is never intended to be read", - " from within the runtime." - ] - }, - { - "name": "EventCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The number of events in the `Events` list." - ] - }, - { - "name": "EventTopics", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 9, - "value": 111 - } - }, - "default": [ - 0 - ], - "docs": [ - " Mapping between a topic (represented by T::Hash) and a vector of indexes", - " of events in the `>` list.", - "", - " All topic vectors have deterministic storage locations depending on the topic. This", - " allows light-clients to leverage the changes trie storage tracking mechanism and", - " in case of changes fetch the list of events of interest.", - "", - " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just", - " the `EventIndex` then in case if the topic has the same contents on the next block", - " no notification will be triggered thus the event might be lost." - ] - }, - { - "name": "LastRuntimeUpgrade", - "modifier": "Optional", - "ty": { - "Plain": 112 - }, - "default": [ - 0 - ], - "docs": [ - " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened." - ] - }, - { - "name": "UpgradedToU32RefCount", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not." - ] - }, - { - "name": "UpgradedToTripleRefCount", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False", - " (default) if not." - ] - }, - { - "name": "ExecutionPhase", - "modifier": "Optional", - "ty": { - "Plain": 109 - }, - "default": [ - 0 - ], - "docs": [ - " The execution phase of the block." - ] - } - ] - }, - "calls": { - "ty": 115 - }, - "event": { - "ty": 18 - }, - "constants": [ - { - "name": "BlockWeights", - "ty": 120, - "value": [ - 0, - 242, - 5, - 42, - 1, - 0, - 0, - 0, - 0, - 32, - 74, - 169, - 209, - 1, - 0, - 0, - 64, - 89, - 115, - 7, - 0, - 0, - 0, - 0, - 1, - 192, - 110, - 150, - 166, - 46, - 1, - 0, - 0, - 1, - 0, - 152, - 247, - 62, - 93, - 1, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 64, - 89, - 115, - 7, - 0, - 0, - 0, - 0, - 1, - 192, - 246, - 232, - 16, - 163, - 1, - 0, - 0, - 1, - 0, - 32, - 74, - 169, - 209, - 1, - 0, - 0, - 1, - 0, - 136, - 82, - 106, - 116, - 0, - 0, - 0, - 64, - 89, - 115, - 7, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Block & extrinsics weights: base values and limits." - ] - }, - { - "name": "BlockLength", - "ty": 123, - "value": [ - 0, - 0, - 60, - 0, - 0, - 0, - 80, - 0, - 0, - 0, - 80, - 0 - ], - "docs": [ - " The maximum length of a block (in bytes)." - ] - }, - { - "name": "BlockHashCount", - "ty": 4, - "value": [ - 96, - 9, - 0, - 0 - ], - "docs": [ - " Maximum number of block number to block hash mappings to keep (oldest pruned first)." - ] - }, - { - "name": "DbWeight", - "ty": 125, - "value": [ - 64, - 120, - 125, - 1, - 0, - 0, - 0, - 0, - 0, - 225, - 245, - 5, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The weight of runtime database operations the runtime can invoke." - ] - }, - { - "name": "Version", - "ty": 126, - "value": [ - 16, - 110, - 111, - 100, - 101, - 56, - 115, - 117, - 98, - 115, - 116, - 114, - 97, - 116, - 101, - 45, - 110, - 111, - 100, - 101, - 10, - 0, - 0, - 0, - 12, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 52, - 223, - 106, - 203, - 104, - 153, - 7, - 96, - 155, - 4, - 0, - 0, - 0, - 55, - 227, - 151, - 252, - 124, - 145, - 245, - 228, - 1, - 0, - 0, - 0, - 64, - 254, - 58, - 212, - 1, - 248, - 149, - 154, - 6, - 0, - 0, - 0, - 210, - 188, - 152, - 151, - 238, - 208, - 143, - 21, - 3, - 0, - 0, - 0, - 247, - 139, - 39, - 139, - 229, - 63, - 69, - 76, - 2, - 0, - 0, - 0, - 237, - 153, - 197, - 172, - 178, - 94, - 237, - 245, - 3, - 0, - 0, - 0, - 203, - 202, - 37, - 227, - 159, - 20, - 35, - 135, - 2, - 0, - 0, - 0, - 104, - 122, - 212, - 74, - 211, - 127, - 3, - 194, - 1, - 0, - 0, - 0, - 188, - 157, - 137, - 144, - 79, - 91, - 146, - 63, - 1, - 0, - 0, - 0, - 104, - 182, - 107, - 161, - 34, - 201, - 63, - 167, - 1, - 0, - 0, - 0, - 55, - 200, - 187, - 19, - 80, - 169, - 162, - 168, - 1, - 0, - 0, - 0, - 145, - 213, - 223, - 24, - 176, - 210, - 207, - 88, - 1, - 0, - 0, - 0, - 171, - 60, - 5, - 114, - 41, - 31, - 235, - 139, - 1, - 0, - 0, - 0, - 2, - 0, - 0, - 0, - 1 - ], - "docs": [ - " Get the chain's current version." - ] - }, - { - "name": "SS58Prefix", - "ty": 81, - "value": [ - 42, - 0 - ], - "docs": [ - " The designated SS85 prefix of this chain.", - "", - " This replaces the \"ss58Format\" property declared in the chain spec. Reason is", - " that the runtime should know about the prefix in order to make use of it as", - " an identifier of the chain." - ] - } - ], - "error": { - "ty": 131 - }, - "index": 0 - }, - { - "name": "Utility", - "storage": null, - "calls": { - "ty": 132 - }, - "event": { - "ty": 27 - }, - "constants": [ - { - "name": "batched_calls_limit", - "ty": 4, - "value": [ - 170, - 42, - 0, - 0 - ], - "docs": [ - " The limit on the number of batched calls." - ] - } - ], - "error": { - "ty": 343 - }, - "index": 1 - }, - { - "name": "Babe", - "storage": { - "prefix": "Babe", - "entries": [ - { - "name": "EpochIndex", - "modifier": "Default", - "ty": { - "Plain": 8 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Current epoch index." - ] - }, - { - "name": "Authorities", - "modifier": "Default", - "ty": { - "Plain": 344 - }, - "default": [ - 0 - ], - "docs": [ - " Current epoch authorities." - ] - }, - { - "name": "GenesisSlot", - "modifier": "Default", - "ty": { - "Plain": 140 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The slot at which the first epoch actually started. This is 0", - " until the first block of the chain." - ] - }, - { - "name": "CurrentSlot", - "modifier": "Default", - "ty": { - "Plain": 140 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Current slot number." - ] - }, - { - "name": "Randomness", - "modifier": "Default", - "ty": { - "Plain": 1 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The epoch randomness for the *current* epoch.", - "", - " # Security", - "", - " This MUST NOT be used for gambling, as it can be influenced by a", - " malicious validator in the short term. It MAY be used in many", - " cryptographic protocols, however, so long as one remembers that this", - " (like everything else on-chain) it is public. For example, it can be", - " used where a number is needed that cannot have been chosen by an", - " adversary, for purposes such as public-coin zero-knowledge proofs." - ] - }, - { - "name": "PendingEpochConfigChange", - "modifier": "Optional", - "ty": { - "Plain": 142 - }, - "default": [ - 0 - ], - "docs": [ - " Pending epoch configuration change that will be applied when the next epoch is enacted." - ] - }, - { - "name": "NextRandomness", - "modifier": "Default", - "ty": { - "Plain": 1 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Next epoch randomness." - ] - }, - { - "name": "NextAuthorities", - "modifier": "Default", - "ty": { - "Plain": 344 - }, - "default": [ - 0 - ], - "docs": [ - " Next epoch authorities." - ] - }, - { - "name": "SegmentIndex", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Randomness under construction.", - "", - " We make a trade-off between storage accesses and list length.", - " We store the under-construction randomness in segments of up to", - " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`.", - "", - " Once a segment reaches this length, we begin the next one.", - " We reset all segments and return to `0` at the beginning of every", - " epoch." - ] - }, - { - "name": "UnderConstruction", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 347 - } - }, - "default": [ - 0 - ], - "docs": [ - " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay." - ] - }, - { - "name": "Initialized", - "modifier": "Optional", - "ty": { - "Plain": 349 - }, - "default": [ - 0 - ], - "docs": [ - " Temporary value (cleared at block finalization) which is `Some`", - " if per-block initialization has already been called for current block." - ] - }, - { - "name": "AuthorVrfRandomness", - "modifier": "Default", - "ty": { - "Plain": 349 - }, - "default": [ - 0 - ], - "docs": [ - " This field should always be populated during block processing unless", - " secondary plain slots are enabled (which don't contain a VRF output).", - "", - " It is set in `on_initialize`, before it will contain the value from the last block." - ] - }, - { - "name": "EpochStart", - "modifier": "Default", - "ty": { - "Plain": 75 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The block numbers when the last and current epoch have started, respectively `N-1` and", - " `N`.", - " NOTE: We track this is in order to annotate the block number when a given pool of", - " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in", - " slots, which may be skipped, the block numbers may not line up with the slot numbers." - ] - }, - { - "name": "Lateness", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " How late the current block is compared to its parent.", - "", - " This entry is populated as part of block execution and is cleaned up", - " on block finalization. Querying this storage entry outside of block", - " execution context should always yield zero." - ] - }, - { - "name": "EpochConfig", - "modifier": "Optional", - "ty": { - "Plain": 350 - }, - "default": [ - 0 - ], - "docs": [ - " The configuration for the current epoch. Should never be `None` as it is initialized in", - " genesis." - ] - }, - { - "name": "NextEpochConfig", - "modifier": "Optional", - "ty": { - "Plain": 350 - }, - "default": [ - 0 - ], - "docs": [ - " The configuration for the next epoch, `None` if the config will not change", - " (you can fallback to `EpochConfig` instead in that case)." - ] - } - ] - }, - "calls": { - "ty": 135 - }, - "event": null, - "constants": [ - { - "name": "EpochDuration", - "ty": 8, - "value": [ - 200, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of time, in slots, that each epoch should last.", - " NOTE: Currently it is not possible to change the epoch duration after", - " the chain has started. Attempting to do so will brick block production." - ] - }, - { - "name": "ExpectedBlockTime", - "ty": 8, - "value": [ - 184, - 11, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The expected average block time at which BABE should be creating", - " blocks. Since BABE is probabilistic it is not trivial to figure out", - " what the expected average block time should be based on the slot", - " duration and the security parameter `c` (where `1 - c` represents", - " the probability of a slot being empty)." - ] - }, - { - "name": "MaxAuthorities", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " Max number of authorities allowed" - ] - } - ], - "error": { - "ty": 351 - }, - "index": 2 - }, - { - "name": "Timestamp", - "storage": { - "prefix": "Timestamp", - "entries": [ - { - "name": "Now", - "modifier": "Default", - "ty": { - "Plain": 8 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Current time for the current block." - ] - }, - { - "name": "DidUpdate", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " Did the timestamp get updated in this block?" - ] - } - ] - }, - "calls": { - "ty": 145 - }, - "event": null, - "constants": [ - { - "name": "MinimumPeriod", - "ty": 8, - "value": [ - 220, - 5, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum period between blocks. Beware that this is different to the *expected*", - " period that the block production apparatus provides. Your chosen consensus system will", - " generally work with this to determine a sensible block time. e.g. For Aura, it will be", - " double this period on default settings." - ] - } - ], - "error": null, - "index": 3 - }, - { - "name": "Authorship", - "storage": { - "prefix": "Authorship", - "entries": [ - { - "name": "Uncles", - "modifier": "Default", - "ty": { - "Plain": 352 - }, - "default": [ - 0 - ], - "docs": [ - " Uncles" - ] - }, - { - "name": "Author", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " Author of current block." - ] - }, - { - "name": "DidSetUncles", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " Whether uncles were already set in this block." - ] - } - ] - }, - "calls": { - "ty": 147 - }, - "event": null, - "constants": [ - { - "name": "UncleGenerations", - "ty": 4, - "value": [ - 5, - 0, - 0, - 0 - ], - "docs": [ - " The number of blocks back we should accept uncles.", - " This means that we will deal with uncle-parents that are", - " `UncleGenerations + 1` before `now`." - ] - } - ], - "error": { - "ty": 354 - }, - "index": 4 - }, - { - "name": "Indices", - "storage": { - "prefix": "Indices", - "entries": [ - { - "name": "Accounts", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 355 - } - }, - "default": [ - 0 - ], - "docs": [ - " The lookup from index to account." - ] - } - ] - }, - "calls": { - "ty": 149 - }, - "event": { - "ty": 30 - }, - "constants": [ - { - "name": "Deposit", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The deposit needed for reserving an index." - ] - } - ], - "error": { - "ty": 356 - }, - "index": 5 - }, - { - "name": "Balances", - "storage": { - "prefix": "Balances", - "entries": [ - { - "name": "TotalIssuance", - "modifier": "Default", - "ty": { - "Plain": 6 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The total units issued in the system." - ] - }, - { - "name": "Account", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 5 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The Balances pallet example of storing the balance of an account.", - "", - " # Example", - "", - " ```nocompile", - " impl pallet_balances::Config for Runtime {", - " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>", - " }", - " ```", - "", - " You can also store the balance of an account in the `System` pallet.", - "", - " # Example", - "", - " ```nocompile", - " impl pallet_balances::Config for Runtime {", - " type AccountStore = System", - " }", - " ```", - "", - " But this comes with tradeoffs, storing account balances in the system pallet stores", - " `frame_system` data alongside the account data contrary to storing account balances in the", - " `Balances` pallet, which uses a `StorageMap` to store balances data only.", - " NOTE: This is only used in the case that this pallet is used to store balances." - ] - }, - { - "name": "Locks", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 357 - } - }, - "default": [ - 0 - ], - "docs": [ - " Any liquidity locks on some account balances.", - " NOTE: Should only be accessed when setting, changing and freeing a lock." - ] - }, - { - "name": "Reserves", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 361 - } - }, - "default": [ - 0 - ], - "docs": [ - " Named reserves on some account balances." - ] - }, - { - "name": "StorageVersion", - "modifier": "Default", - "ty": { - "Plain": 364 - }, - "default": [ - 0 - ], - "docs": [ - " Storage version of the pallet.", - "", - " This is set to v2.0.0 for new networks." - ] - } - ] - }, - "calls": { - "ty": 150 - }, - "event": { - "ty": 31 - }, - "constants": [ - { - "name": "ExistentialDeposit", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount required to keep an account open." - ] - }, - { - "name": "MaxLocks", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of locks that should exist on an account.", - " Not strictly enforced, but used for weight estimation." - ] - }, - { - "name": "MaxReserves", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of named reserves that can exist on an account." - ] - } - ], - "error": { - "ty": 365 - }, - "index": 6 - }, - { - "name": "TransactionPayment", - "storage": { - "prefix": "TransactionPayment", - "entries": [ - { - "name": "NextFeeMultiplier", - "modifier": "Default", - "ty": { - "Plain": 366 - }, - "default": [ - 0, - 0, - 100, - 167, - 179, - 182, - 224, - 13, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [] - }, - { - "name": "StorageVersion", - "modifier": "Default", - "ty": { - "Plain": 367 - }, - "default": [ - 0 - ], - "docs": [] - } - ] - }, - "calls": null, - "event": null, - "constants": [ - { - "name": "OperationalFeeMultiplier", - "ty": 2, - "value": [ - 5 - ], - "docs": [ - " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their", - " `priority`", - "", - " This value is multipled by the `final_fee` to obtain a \"virtual tip\" that is later", - " added to a tip component in regular `priority` calculations.", - " It means that a `Normal` transaction can front-run a similarly-sized `Operational`", - " extrinsic (with no tip), by including a tip value greater than the virtual tip.", - "", - " ```rust,ignore", - " // For `Normal`", - " let priority = priority_calc(tip);", - "", - " // For `Operational`", - " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;", - " let priority = priority_calc(tip + virtual_tip);", - " ```", - "", - " Note that since we use `final_fee` the multiplier applies also to the regular `tip`", - " sent with the transaction. So, not only does the transaction get a priority bump based", - " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`", - " transactions." - ] - }, - { - "name": "WeightToFee", - "ty": 368, - "value": [ - 4, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 - ], - "docs": [ - " The polynomial that is applied in order to derive fee from weight." - ] - }, - { - "name": "LengthToFee", - "ty": 368, - "value": [ - 4, - 0, - 228, - 11, - 84, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 - ], - "docs": [ - " The polynomial that is applied in order to derive fee from length." - ] - } - ], - "error": null, - "index": 7 - }, - { - "name": "AssetTxPayment", - "storage": null, - "calls": null, - "event": null, - "constants": [], - "error": null, - "index": 8 - }, - { - "name": "ElectionProviderMultiPhase", - "storage": { - "prefix": "ElectionProviderMultiPhase", - "entries": [ - { - "name": "Round", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 1, - 0, - 0, - 0 - ], - "docs": [ - " Internal counter for the number of rounds.", - "", - " This is useful for de-duplication of transactions submitted to the pool, and general", - " diagnostics of the pallet.", - "", - " This is merely incremented once per every time that an upstream `elect` is called." - ] - }, - { - "name": "CurrentPhase", - "modifier": "Default", - "ty": { - "Plain": 370 - }, - "default": [ - 0 - ], - "docs": [ - " Current phase." - ] - }, - { - "name": "QueuedSolution", - "modifier": "Optional", - "ty": { - "Plain": 372 - }, - "default": [ - 0 - ], - "docs": [ - " Current best solution, signed or unsigned, queued to be returned upon `elect`." - ] - }, - { - "name": "Snapshot", - "modifier": "Optional", - "ty": { - "Plain": 373 - }, - "default": [ - 0 - ], - "docs": [ - " Snapshot data of the round.", - "", - " This is created at the beginning of the signed phase and cleared upon calling `elect`." - ] - }, - { - "name": "DesiredTargets", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " Desired number of targets to elect for this round.", - "", - " Only exists when [`Snapshot`] is present." - ] - }, - { - "name": "SnapshotMetadata", - "modifier": "Optional", - "ty": { - "Plain": 207 - }, - "default": [ - 0 - ], - "docs": [ - " The metadata of the [`RoundSnapshot`]", - "", - " Only exists when [`Snapshot`] is present." - ] - }, - { - "name": "SignedSubmissionNextIndex", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The next index to be assigned to an incoming signed submission.", - "", - " Every accepted submission is assigned a unique index; that index is bound to that particular", - " submission for the duration of the election. On election finalization, the next index is", - " reset to 0.", - "", - " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its", - " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,", - " because iteration is slow. Instead, we store the value here." - ] - }, - { - "name": "SignedSubmissionIndices", - "modifier": "Default", - "ty": { - "Plain": 377 - }, - "default": [ - 0 - ], - "docs": [ - " A sorted, bounded set of `(score, index)`, where each `index` points to a value in", - " `SignedSubmissions`.", - "", - " We never need to process more than a single signed submission at a time. Signed submissions", - " can be quite large, so we're willing to pay the cost of multiple database accesses to access", - " them one at a time instead of reading and decoding all of them at once." - ] - }, - { - "name": "SignedSubmissionsMap", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 381 - } - }, - "default": [ - 0 - ], - "docs": [ - " Unchecked, signed solutions.", - "", - " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while", - " allowing us to keep only a single one in memory at a time.", - "", - " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or", - " affect; we shouldn't need a cryptographically secure hasher." - ] - }, - { - "name": "MinimumUntrustedScore", - "modifier": "Optional", - "ty": { - "Plain": 206 - }, - "default": [ - 0 - ], - "docs": [ - " The minimum score that each 'untrusted' solution must attain in order to be considered", - " feasible.", - "", - " Can be set via `set_minimum_untrusted_score`." - ] - } - ] - }, - "calls": { - "ty": 153 - }, - "event": { - "ty": 33 - }, - "constants": [ - { - "name": "UnsignedPhase", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " Duration of the unsigned phase." - ] - }, - { - "name": "SignedPhase", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " Duration of the signed phase." - ] - }, - { - "name": "SolutionImprovementThreshold", - "ty": 116, - "value": [ - 160, - 134, - 1, - 0 - ], - "docs": [ - " The minimum amount of improvement to the solution score that defines a solution as", - " \"better\" (in any phase)." - ] - }, - { - "name": "OffchainRepeat", - "ty": 4, - "value": [ - 5, - 0, - 0, - 0 - ], - "docs": [ - " The repeat threshold of the offchain worker.", - "", - " For example, if it is 5, that means that at least 5 blocks will elapse between attempts", - " to submit the worker's solution." - ] - }, - { - "name": "MinerTxPriority", - "ty": 8, - "value": [ - 254, - 255, - 255, - 255, - 255, - 255, - 255, - 127 - ], - "docs": [ - " The priority of the unsigned transaction submitted in the unsigned-phase" - ] - }, - { - "name": "MinerMaxWeight", - "ty": 8, - "value": [ - 192, - 124, - 144, - 124, - 45, - 1, - 0, - 0 - ], - "docs": [ - " Maximum weight that the miner should consume.", - "", - " The miner will ensure that the total weight of the unsigned solution will not exceed", - " this value, based on [`WeightInfo::submit_unsigned`]." - ] - }, - { - "name": "SignedMaxSubmissions", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " Maximum number of signed submissions that can be queued.", - "", - " It is best to avoid adjusting this during an election, as it impacts downstream data", - " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you", - " update this value during an election, you _must_ ensure that", - " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,", - " attempts to submit new solutions may cause a runtime panic." - ] - }, - { - "name": "SignedMaxWeight", - "ty": 8, - "value": [ - 192, - 124, - 144, - 124, - 45, - 1, - 0, - 0 - ], - "docs": [ - " Maximum weight of a signed solution.", - "", - " This should probably be similar to [`Config::MinerMaxWeight`]." - ] - }, - { - "name": "SignedRewardBase", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Base reward for a signed solution" - ] - }, - { - "name": "SignedDepositBase", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Base deposit for a signed solution." - ] - }, - { - "name": "SignedDepositByte", - "ty": 6, - "value": [ - 0, - 16, - 165, - 212, - 232, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Per-byte deposit for a signed solution." - ] - }, - { - "name": "SignedDepositWeight", - "ty": 6, - "value": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Per-weight deposit for a signed solution." - ] - }, - { - "name": "MaxElectingVoters", - "ty": 4, - "value": [ - 16, - 39, - 0, - 0 - ], - "docs": [ - " The maximum number of electing voters to put in the snapshot. At the moment, snapshots", - " are only over a single block, but once multi-block elections are introduced they will", - " take place over multiple blocks." - ] - }, - { - "name": "MaxElectableTargets", - "ty": 81, - "value": [ - 255, - 255 - ], - "docs": [ - " The maximum number of electable targets to put in the snapshot." - ] - }, - { - "name": "MinerMaxLength", - "ty": 4, - "value": [ - 0, - 0, - 54, - 0 - ], - "docs": [ - " Maximum length (bytes) that the mined solution should consume.", - "", - " The miner will ensure that the total length of the unsigned solution will not exceed", - " this value." - ] - } - ], - "error": { - "ty": 382 - }, - "index": 9 - }, - { - "name": "Staking", - "storage": { - "prefix": "Staking", - "entries": [ - { - "name": "HistoryDepth", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 84, - 0, - 0, - 0 - ], - "docs": [ - " Number of eras to keep in history.", - "", - " Information is kept for eras in `[current_era - history_depth; current_era]`.", - "", - " Must be more than the number of eras delayed by session otherwise. I.e. active era must", - " always be in history. I.e. `active_era > current_era - history_depth` must be", - " guaranteed." - ] - }, - { - "name": "ValidatorCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The ideal number of staking participants." - ] - }, - { - "name": "MinimumValidatorCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Minimum number of staking participants before emergency conditions are imposed." - ] - }, - { - "name": "Invulnerables", - "modifier": "Default", - "ty": { - "Plain": 40 - }, - "default": [ - 0 - ], - "docs": [ - " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're", - " easy to initialize and the performance hit is minimal (we expect no more than four", - " invulnerables) and restricted to testnets." - ] - }, - { - "name": "Bonded", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 0 - } - }, - "default": [ - 0 - ], - "docs": [ - " Map from all locked \"stash\" accounts to the controller account." - ] - }, - { - "name": "MinNominatorBond", - "modifier": "Default", - "ty": { - "Plain": 6 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum active bond to become and maintain the role of a nominator." - ] - }, - { - "name": "MinValidatorBond", - "modifier": "Default", - "ty": { - "Plain": 6 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum active bond to become and maintain the role of a validator." - ] - }, - { - "name": "MinCommission", - "modifier": "Default", - "ty": { - "Plain": 116 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount of commission that validators can set.", - "", - " If set to `0`, no limit exists." - ] - }, - { - "name": "Ledger", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 383 - } - }, - "default": [ - 0 - ], - "docs": [ - " Map from all (unlocked) \"controller\" accounts to the info regarding the staking." - ] - }, - { - "name": "Payee", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 213 - } - }, - "default": [ - 0 - ], - "docs": [ - " Where the reward payment should be made. Keyed by stash." - ] - }, - { - "name": "Validators", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 214 - } - }, - "default": [ - 0, - 0 - ], - "docs": [ - " The map from (wannabe) validator stash key to the preferences of that validator." - ] - }, - { - "name": "CounterForValidators", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - "Counter for the related counted storage map" - ] - }, - { - "name": "MaxValidatorsCount", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " The maximum validator count before we stop allowing new validators to join.", - "", - " When this value is not set, no limits are enforced." - ] - }, - { - "name": "Nominators", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 387 - } - }, - "default": [ - 0 - ], - "docs": [ - " The map from nominator stash key to their nomination preferences, namely the validators that", - " they wish to support.", - "", - " Note that the keys of this storage map might become non-decodable in case the", - " [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators", - " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`", - " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable", - " nominators will effectively not-exist, until they re-submit their preferences such that it", - " is within the bounds of the newly set `Config::MaxNominations`.", - "", - " This implies that `::iter_keys().count()` and `::iter().count()` might return different", - " values for this map. Moreover, the main `::count()` is aligned with the former, namely the", - " number of keys that exist.", - "", - " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via", - " [`Call::chill_other`] dispatchable by anyone." - ] - }, - { - "name": "CounterForNominators", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - "Counter for the related counted storage map" - ] - }, - { - "name": "MaxNominatorsCount", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " The maximum nominator count before we stop allowing new validators to join.", - "", - " When this value is not set, no limits are enforced." - ] - }, - { - "name": "CurrentEra", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " The current era index.", - "", - " This is the latest planned era, depending on how the Session pallet queues the validator", - " set, it might be active or not." - ] - }, - { - "name": "ActiveEra", - "modifier": "Optional", - "ty": { - "Plain": 388 - }, - "default": [ - 0 - ], - "docs": [ - " The active era information, it holds index and start.", - "", - " The active era is the era being currently rewarded. Validator set of this era must be", - " equal to [`SessionInterface::validators`]." - ] - }, - { - "name": "ErasStartSessionIndex", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 4 - } - }, - "default": [ - 0 - ], - "docs": [ - " The session index at which the era start for the last `HISTORY_DEPTH` eras.", - "", - " Note: This tracks the starting session (i.e. session index when era start being active)", - " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`." - ] - }, - { - "name": "ErasStakers", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 389, - "value": 64 - } - }, - "default": [ - 0, - 0, - 0 - ], - "docs": [ - " Exposure of validator at era.", - "", - " This is keyed first by the era index to allow bulk deletion and then the stash account.", - "", - " Is it removed after `HISTORY_DEPTH` eras.", - " If stakers hasn't been set or has been removed then empty exposure is returned." - ] - }, - { - "name": "ErasStakersClipped", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 389, - "value": 64 - } - }, - "default": [ - 0, - 0, - 0 - ], - "docs": [ - " Clipped Exposure of validator at era.", - "", - " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the", - " `T::MaxNominatorRewardedPerValidator` biggest stakers.", - " (Note: the field `total` and `own` of the exposure remains unchanged).", - " This is used to limit the i/o cost for the nominator payout.", - "", - " This is keyed fist by the era index to allow bulk deletion and then the stash account.", - "", - " Is it removed after `HISTORY_DEPTH` eras.", - " If stakers hasn't been set or has been removed then empty exposure is returned." - ] - }, - { - "name": "ErasValidatorPrefs", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 389, - "value": 214 - } - }, - "default": [ - 0, - 0 - ], - "docs": [ - " Similar to `ErasStakers`, this holds the preferences of validators.", - "", - " This is keyed first by the era index to allow bulk deletion and then the stash account.", - "", - " Is it removed after `HISTORY_DEPTH` eras." - ] - }, - { - "name": "ErasValidatorReward", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 6 - } - }, - "default": [ - 0 - ], - "docs": [ - " The total validator era payout for the last `HISTORY_DEPTH` eras.", - "", - " Eras that haven't finished yet or has been removed doesn't have reward." - ] - }, - { - "name": "ErasRewardPoints", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 390 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Rewards for the last `HISTORY_DEPTH` eras.", - " If reward hasn't been set or has been removed then 0 reward is returned." - ] - }, - { - "name": "ErasTotalStake", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 6 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The total amount staked for the last `HISTORY_DEPTH` eras.", - " If total hasn't been set or has been removed then 0 stake is returned." - ] - }, - { - "name": "ForceEra", - "modifier": "Default", - "ty": { - "Plain": 394 - }, - "default": [ - 0 - ], - "docs": [ - " Mode of era forcing." - ] - }, - { - "name": "SlashRewardFraction", - "modifier": "Default", - "ty": { - "Plain": 116 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The percentage of the slash that is distributed to reporters.", - "", - " The rest of the slashed value is handled by the `Slash`." - ] - }, - { - "name": "CanceledSlashPayout", - "modifier": "Default", - "ty": { - "Plain": 6 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of currency given to reporters of a slash event which was", - " canceled by extraordinary circumstances (e.g. governance)." - ] - }, - { - "name": "UnappliedSlashes", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 395 - } - }, - "default": [ - 0 - ], - "docs": [ - " All unapplied slashes that are queued for later." - ] - }, - { - "name": "BondedEras", - "modifier": "Default", - "ty": { - "Plain": 111 - }, - "default": [ - 0 - ], - "docs": [ - " A mapping from still-bonded eras to the first session index of that era.", - "", - " Must contains information for eras for the range:", - " `[active_era - bounding_duration; active_era]`" - ] - }, - { - "name": "ValidatorSlashInEra", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 389, - "value": 397 - } - }, - "default": [ - 0 - ], - "docs": [ - " All slashing events on validators, mapped by era to the highest slash proportion", - " and slash value of the era." - ] - }, - { - "name": "NominatorSlashInEra", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 389, - "value": 6 - } - }, - "default": [ - 0 - ], - "docs": [ - " All slashing events on nominators, mapped by era to the highest slash value of the era." - ] - }, - { - "name": "SlashingSpans", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 398 - } - }, - "default": [ - 0 - ], - "docs": [ - " Slashing spans for stash accounts." - ] - }, - { - "name": "SpanSlash", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 393, - "value": 399 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Records information about the maximum slash of a stash within a slashing span,", - " as well as how much reward has been paid out." - ] - }, - { - "name": "EarliestUnappliedSlash", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " The earliest era for which we have a pending, unapplied slash." - ] - }, - { - "name": "CurrentPlannedSession", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The last planned session scheduled by the session pallet.", - "", - " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]." - ] - }, - { - "name": "OffendingValidators", - "modifier": "Default", - "ty": { - "Plain": 400 - }, - "default": [ - 0 - ], - "docs": [ - " Indices of validators that have offended in the active era and whether they are currently", - " disabled.", - "", - " This value should be a superset of disabled validators since not all offences lead to the", - " validator being disabled (if there was no slash). This is needed to track the percentage of", - " validators that have offended in the current era, ensuring a new era is forced if", - " `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find", - " whether a given validator has previously offended using binary search. It gets cleared when", - " the era ends." - ] - }, - { - "name": "StorageVersion", - "modifier": "Default", - "ty": { - "Plain": 402 - }, - "default": [ - 7 - ], - "docs": [ - " True if network has been upgraded to this version.", - " Storage version of the pallet.", - "", - " This is set to v7.0.0 for new networks." - ] - }, - { - "name": "ChillThreshold", - "modifier": "Optional", - "ty": { - "Plain": 217 - }, - "default": [ - 0 - ], - "docs": [ - " The threshold for when users can start calling `chill_other` for other validators /", - " nominators. The threshold is compared to the actual number of validators / nominators", - " (`CountFor*`) in the system compared to the configured max (`Max*Count`)." - ] - } - ] - }, - "calls": { - "ty": 212 - }, - "event": { - "ty": 37 - }, - "constants": [ - { - "name": "MaxNominations", - "ty": 4, - "value": [ - 16, - 0, - 0, - 0 - ], - "docs": [ - " Maximum number of nominations per nominator." - ] - }, - { - "name": "SessionsPerEra", - "ty": 4, - "value": [ - 6, - 0, - 0, - 0 - ], - "docs": [ - " Number of sessions per era." - ] - }, - { - "name": "BondingDuration", - "ty": 4, - "value": [ - 160, - 2, - 0, - 0 - ], - "docs": [ - " Number of eras that staked funds must remain bonded for." - ] - }, - { - "name": "SlashDeferDuration", - "ty": 4, - "value": [ - 168, - 0, - 0, - 0 - ], - "docs": [ - " Number of eras that slashes are deferred by, after computation.", - "", - " This should be less than the bonding duration. Set to 0 if slashes", - " should be applied immediately, without opportunity for intervention." - ] - }, - { - "name": "MaxNominatorRewardedPerValidator", - "ty": 4, - "value": [ - 0, - 1, - 0, - 0 - ], - "docs": [ - " The maximum number of nominators rewarded for each validator.", - "", - " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can", - " claim their reward. This used to limit the i/o cost for the nominator payout." - ] - }, - { - "name": "MaxUnlockingChunks", - "ty": 4, - "value": [ - 32, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively", - " determines how many unique eras a staker may be unbonding in." - ] - } - ], - "error": { - "ty": 403 - }, - "index": 10 - }, - { - "name": "Session", - "storage": { - "prefix": "Session", - "entries": [ - { - "name": "Validators", - "modifier": "Default", - "ty": { - "Plain": 40 - }, - "default": [ - 0 - ], - "docs": [ - " The current set of validators." - ] - }, - { - "name": "CurrentIndex", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Current index of the session." - ] - }, - { - "name": "QueuedChanged", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " True if the underlying economic identities or weighting behind the validators", - " has changed in the queued validator set." - ] - }, - { - "name": "QueuedKeys", - "modifier": "Default", - "ty": { - "Plain": 404 - }, - "default": [ - 0 - ], - "docs": [ - " The queued keys for the next session. When the next session begins, these keys", - " will be used to determine the validator's session keys." - ] - }, - { - "name": "DisabledValidators", - "modifier": "Default", - "ty": { - "Plain": 92 - }, - "default": [ - 0 - ], - "docs": [ - " Indices of disabled validators.", - "", - " The vec is always kept sorted so that we can find whether a given validator is", - " disabled using binary search. It gets cleared when `on_session_ending` returns", - " a new set of identities." - ] - }, - { - "name": "NextKeys", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 223 - } - }, - "default": [ - 0 - ], - "docs": [ - " The next session keys for a validator." - ] - }, - { - "name": "KeyOwner", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 406, - "value": 0 - } - }, - "default": [ - 0 - ], - "docs": [ - " The owner of a key. The key is the `KeyTypeId` + the encoded key." - ] - } - ] - }, - "calls": { - "ty": 222 - }, - "event": { - "ty": 38 - }, - "constants": [], - "error": { - "ty": 408 - }, - "index": 11 - }, - { - "name": "Democracy", - "storage": { - "prefix": "Democracy", - "entries": [ - { - "name": "PublicPropCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The number of (public) proposals that have been made so far." - ] - }, - { - "name": "PublicProps", - "modifier": "Default", - "ty": { - "Plain": 409 - }, - "default": [ - 0 - ], - "docs": [ - " The public proposals. Unsorted. The second item is the proposal's hash." - ] - }, - { - "name": "DepositOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 411 - } - }, - "default": [ - 0 - ], - "docs": [ - " Those who have locked a deposit.", - "", - " TWOX-NOTE: Safe, as increasing integer keys are safe." - ] - }, - { - "name": "Preimages", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 412 - } - }, - "default": [ - 0 - ], - "docs": [ - " Map of hashes to the proposal preimage, along with who registered it and their deposit.", - " The block number is the block at which it was deposited." - ] - }, - { - "name": "ReferendumCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The next free referendum index, aka the number of referenda started so far." - ] - }, - { - "name": "LowestUnbaked", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The lowest referendum index representing an unbaked referendum. Equal to", - " `ReferendumCount` if there isn't a unbaked referendum." - ] - }, - { - "name": "ReferendumInfoOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 413 - } - }, - "default": [ - 0 - ], - "docs": [ - " Information concerning any given referendum.", - "", - " TWOX-NOTE: SAFE as indexes are not under an attacker’s control." - ] - }, - { - "name": "VotingOf", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 416 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " All votes for a particular voter. We store the balance for the number of votes that we", - " have recorded. The second item is the total amount of delegations, that will be added.", - "", - " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway." - ] - }, - { - "name": "LastTabledWasExternal", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " True if the last referendum tabled was submitted externally. False if it was a public", - " proposal." - ] - }, - { - "name": "NextExternal", - "modifier": "Optional", - "ty": { - "Plain": 421 - }, - "default": [ - 0 - ], - "docs": [ - " The referendum to be tabled whenever it would be valid to table an external proposal.", - " This happens when a referendum needs to be tabled and one of two conditions are met:", - " - `LastTabledWasExternal` is `false`; or", - " - `PublicProps` is empty." - ] - }, - { - "name": "Blacklist", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 422 - } - }, - "default": [ - 0 - ], - "docs": [ - " A record of who vetoed what. Maps proposal hash to a possible existent block number", - " (until when it may not be resubmitted) and who vetoed it." - ] - }, - { - "name": "Cancellations", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 35 - } - }, - "default": [ - 0 - ], - "docs": [ - " Record of all proposals that have been subject to emergency cancellation." - ] - }, - { - "name": "StorageVersion", - "modifier": "Optional", - "ty": { - "Plain": 423 - }, - "default": [ - 0 - ], - "docs": [ - " Storage version of the pallet.", - "", - " New networks start with last version." - ] - } - ] - }, - "calls": { - "ty": 225 - }, - "event": { - "ty": 39 - }, - "constants": [ - { - "name": "EnactmentPeriod", - "ty": 4, - "value": [ - 0, - 47, - 13, - 0 - ], - "docs": [ - " The period between a proposal being approved and enacted.", - "", - " It should generally be a little more than the unstake period to ensure that", - " voting stakers have an opportunity to remove themselves from the system in the case", - " where they are on the losing side of a vote." - ] - }, - { - "name": "LaunchPeriod", - "ty": 4, - "value": [ - 0, - 78, - 12, - 0 - ], - "docs": [ - " How often (in blocks) new public referenda are launched." - ] - }, - { - "name": "VotingPeriod", - "ty": 4, - "value": [ - 0, - 78, - 12, - 0 - ], - "docs": [ - " How often (in blocks) to check for new votes." - ] - }, - { - "name": "VoteLockingPeriod", - "ty": 4, - "value": [ - 0, - 47, - 13, - 0 - ], - "docs": [ - " The minimum period of vote locking.", - "", - " It should be no shorter than enactment period to ensure that in the case of an approval,", - " those successful voters are locked into the consequences that their votes entail." - ] - }, - { - "name": "MinimumDeposit", - "ty": 6, - "value": [ - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount to be used as a deposit for a public referendum proposal." - ] - }, - { - "name": "InstantAllowed", - "ty": 35, - "value": [ - 1 - ], - "docs": [ - " Indicator for whether an emergency origin is even allowed to happen. Some chains may", - " want to set this permanently to `false`, others may want to condition it on things such", - " as an upgrade having happened recently." - ] - }, - { - "name": "FastTrackVotingPeriod", - "ty": 4, - "value": [ - 128, - 81, - 1, - 0 - ], - "docs": [ - " Minimum voting period allowed for a fast-track referendum." - ] - }, - { - "name": "CooloffPeriod", - "ty": 4, - "value": [ - 0, - 78, - 12, - 0 - ], - "docs": [ - " Period in blocks where an external proposal may not be re-submitted after being vetoed." - ] - }, - { - "name": "PreimageByteDeposit", - "ty": 6, - "value": [ - 0, - 16, - 165, - 212, - 232, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of balance that must be deposited per byte of preimage stored." - ] - }, - { - "name": "MaxVotes", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of votes for an account.", - "", - " Also used to compute weight, an overly big value can", - " lead to extrinsic with very big weight: see `delegate` for instance." - ] - }, - { - "name": "MaxProposals", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of public proposals that can exist at any time." - ] - } - ], - "error": { - "ty": 424 - }, - "index": 12 - }, - { - "name": "Council", - "storage": { - "prefix": "Council", - "entries": [ - { - "name": "Proposals", - "modifier": "Default", - "ty": { - "Plain": 425 - }, - "default": [ - 0 - ], - "docs": [ - " The hashes of the active proposals." - ] - }, - { - "name": "ProposalOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 134 - } - }, - "default": [ - 0 - ], - "docs": [ - " Actual proposal for a given hash, if it's current." - ] - }, - { - "name": "Voting", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 426 - } - }, - "default": [ - 0 - ], - "docs": [ - " Votes on a given proposal, if it is ongoing." - ] - }, - { - "name": "ProposalCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Proposals so far." - ] - }, - { - "name": "Members", - "modifier": "Default", - "ty": { - "Plain": 40 - }, - "default": [ - 0 - ], - "docs": [ - " The current members of the collective. This is stored sorted (just by value)." - ] - }, - { - "name": "Prime", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The prime member that helps determine the default vote behavior in case of absentations." - ] - } - ] - }, - "calls": { - "ty": 227 - }, - "event": { - "ty": 44 - }, - "constants": [], - "error": { - "ty": 427 - }, - "index": 13 - }, - { - "name": "TechnicalCommittee", - "storage": { - "prefix": "TechnicalCommittee", - "entries": [ - { - "name": "Proposals", - "modifier": "Default", - "ty": { - "Plain": 428 - }, - "default": [ - 0 - ], - "docs": [ - " The hashes of the active proposals." - ] - }, - { - "name": "ProposalOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 134 - } - }, - "default": [ - 0 - ], - "docs": [ - " Actual proposal for a given hash, if it's current." - ] - }, - { - "name": "Voting", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 426 - } - }, - "default": [ - 0 - ], - "docs": [ - " Votes on a given proposal, if it is ongoing." - ] - }, - { - "name": "ProposalCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Proposals so far." - ] - }, - { - "name": "Members", - "modifier": "Default", - "ty": { - "Plain": 40 - }, - "default": [ - 0 - ], - "docs": [ - " The current members of the collective. This is stored sorted (just by value)." - ] - }, - { - "name": "Prime", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The prime member that helps determine the default vote behavior in case of absentations." - ] - } - ] - }, - "calls": { - "ty": 228 - }, - "event": { - "ty": 45 - }, - "constants": [], - "error": { - "ty": 429 - }, - "index": 14 - }, - { - "name": "Elections", - "storage": { - "prefix": "Elections", - "entries": [ - { - "name": "Members", - "modifier": "Default", - "ty": { - "Plain": 430 - }, - "default": [ - 0 - ], - "docs": [ - " The current elected members.", - "", - " Invariant: Always sorted based on account id." - ] - }, - { - "name": "RunnersUp", - "modifier": "Default", - "ty": { - "Plain": 430 - }, - "default": [ - 0 - ], - "docs": [ - " The current reserved runners-up.", - "", - " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the", - " last (i.e. _best_) runner-up will be replaced." - ] - }, - { - "name": "Candidates", - "modifier": "Default", - "ty": { - "Plain": 47 - }, - "default": [ - 0 - ], - "docs": [ - " The present candidate list. A current member or runner-up can never enter this vector", - " and is always implicitly assumed to be a candidate.", - "", - " Second element is the deposit.", - "", - " Invariant: Always sorted based on account id." - ] - }, - { - "name": "ElectionRounds", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The total number of vote rounds that have happened, excluding the upcoming one." - ] - }, - { - "name": "Voting", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 432 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Votes and locked stake of a particular voter.", - "", - " TWOX-NOTE: SAFE as `AccountId` is a crypto hash." - ] - } - ] - }, - "calls": { - "ty": 229 - }, - "event": { - "ty": 46 - }, - "constants": [ - { - "name": "PalletId", - "ty": 130, - "value": [ - 112, - 104, - 114, - 101, - 108, - 101, - 99, - 116 - ], - "docs": [ - " Identifier for the elections-phragmen pallet's lock" - ] - }, - { - "name": "CandidacyBond", - "ty": 6, - "value": [ - 0, - 128, - 198, - 164, - 126, - 141, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " How much should be locked up in order to submit one's candidacy." - ] - }, - { - "name": "VotingBondBase", - "ty": 6, - "value": [ - 0, - 240, - 67, - 109, - 227, - 106, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Base deposit associated with voting.", - "", - " This should be sensibly high to economically ensure the pallet cannot be attacked by", - " creating a gigantic number of votes." - ] - }, - { - "name": "VotingBondFactor", - "ty": 6, - "value": [ - 0, - 0, - 204, - 123, - 159, - 174, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of bond that need to be locked for each vote (32 bytes)." - ] - }, - { - "name": "DesiredMembers", - "ty": 4, - "value": [ - 13, - 0, - 0, - 0 - ], - "docs": [ - " Number of members to elect." - ] - }, - { - "name": "DesiredRunnersUp", - "ty": 4, - "value": [ - 7, - 0, - 0, - 0 - ], - "docs": [ - " Number of runners_up to keep." - ] - }, - { - "name": "TermDuration", - "ty": 4, - "value": [ - 128, - 19, - 3, - 0 - ], - "docs": [ - " How long each seat is kept. This defines the next block number at which an election", - " round will happen. If set to zero, no elections are ever triggered and the module will", - " be in passive mode." - ] - } - ], - "error": { - "ty": 433 - }, - "index": 15 - }, - { - "name": "TechnicalMembership", - "storage": { - "prefix": "TechnicalMembership", - "entries": [ - { - "name": "Members", - "modifier": "Default", - "ty": { - "Plain": 40 - }, - "default": [ - 0 - ], - "docs": [ - " The current membership, stored as an ordered Vec." - ] - }, - { - "name": "Prime", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The current prime member, if one exists." - ] - } - ] - }, - "calls": { - "ty": 231 - }, - "event": { - "ty": 49 - }, - "constants": [], - "error": { - "ty": 434 - }, - "index": 16 - }, - { - "name": "Grandpa", - "storage": { - "prefix": "Grandpa", - "entries": [ - { - "name": "State", - "modifier": "Default", - "ty": { - "Plain": 435 - }, - "default": [ - 0 - ], - "docs": [ - " State of the current authority set." - ] - }, - { - "name": "PendingChange", - "modifier": "Optional", - "ty": { - "Plain": 436 - }, - "default": [ - 0 - ], - "docs": [ - " Pending change: (signaled at, scheduled change)." - ] - }, - { - "name": "NextForced", - "modifier": "Optional", - "ty": { - "Plain": 4 - }, - "default": [ - 0 - ], - "docs": [ - " next block number where we can force a change." - ] - }, - { - "name": "Stalled", - "modifier": "Optional", - "ty": { - "Plain": 75 - }, - "default": [ - 0 - ], - "docs": [ - " `true` if we are currently stalled." - ] - }, - { - "name": "CurrentSetId", - "modifier": "Default", - "ty": { - "Plain": 8 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The number of changes (both in terms of keys and underlying economic responsibilities)", - " in the \"set\" of Grandpa validators from genesis." - ] - }, - { - "name": "SetIdSession", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 8, - "value": 4 - } - }, - "default": [ - 0 - ], - "docs": [ - " A mapping from grandpa set ID to the index of the *most recent* session for which its", - " members were responsible.", - "", - " TWOX-NOTE: `SetId` is not under user control." - ] - } - ] - }, - "calls": { - "ty": 232 - }, - "event": { - "ty": 50 - }, - "constants": [ - { - "name": "MaxAuthorities", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " Max Authorities in use" - ] - } - ], - "error": { - "ty": 438 - }, - "index": 17 - }, - { - "name": "Treasury", - "storage": { - "prefix": "Treasury", - "entries": [ - { - "name": "ProposalCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Number of proposals that have been made." - ] - }, - { - "name": "Proposals", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 439 - } - }, - "default": [ - 0 - ], - "docs": [ - " Proposals that have been made." - ] - }, - { - "name": "Approvals", - "modifier": "Default", - "ty": { - "Plain": 440 - }, - "default": [ - 0 - ], - "docs": [ - " Proposal indices that have been approved but not yet awarded." - ] - } - ] - }, - "calls": { - "ty": 244 - }, - "event": { - "ty": 55 - }, - "constants": [ - { - "name": "ProposalBond", - "ty": 441, - "value": [ - 80, - 195, - 0, - 0 - ], - "docs": [ - " Fraction of a proposal's value that should be bonded in order to place the proposal.", - " An accepted proposal gets these back. A rejected proposal does not." - ] - }, - { - "name": "ProposalBondMinimum", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Minimum amount of funds that should be placed in a deposit for making a proposal." - ] - }, - { - "name": "ProposalBondMaximum", - "ty": 442, - "value": [ - 0 - ], - "docs": [ - " Maximum amount of funds that should be placed in a deposit for making a proposal." - ] - }, - { - "name": "SpendPeriod", - "ty": 4, - "value": [ - 128, - 112, - 0, - 0 - ], - "docs": [ - " Period between successive spends." - ] - }, - { - "name": "Burn", - "ty": 441, - "value": [ - 32, - 161, - 7, - 0 - ], - "docs": [ - " Percentage of spare funds (if any) that are burnt per spend period." - ] - }, - { - "name": "PalletId", - "ty": 443, - "value": [ - 112, - 121, - 47, - 116, - 114, - 115, - 114, - 121 - ], - "docs": [ - " The treasury's pallet id, used for deriving its sovereign account ID." - ] - }, - { - "name": "MaxApprovals", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of approvals that can wait in the spending queue.", - "", - " NOTE: This parameter is also used within the Bounties Pallet extension if enabled." - ] - } - ], - "error": { - "ty": 444 - }, - "index": 18 - }, - { - "name": "Contracts", - "storage": { - "prefix": "Contracts", - "entries": [ - { - "name": "PristineCode", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 10 - } - }, - "default": [ - 0 - ], - "docs": [ - " A mapping from an original code hash to the original code, untouched by instrumentation." - ] - }, - { - "name": "CodeStorage", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 445 - } - }, - "default": [ - 0 - ], - "docs": [ - " A mapping between an original code hash and instrumented wasm code, ready for execution." - ] - }, - { - "name": "OwnerInfoOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 446 - } - }, - "default": [ - 0 - ], - "docs": [ - " A mapping between an original code hash and its owner information." - ] - }, - { - "name": "Nonce", - "modifier": "Default", - "ty": { - "Plain": 8 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " This is a **monotonic** counter incremented on contract instantiation.", - "", - " This is used in order to generate unique trie ids for contracts.", - " The trie id of a new contract is calculated from hash(account_id, nonce).", - " The nonce is required because otherwise the following sequence would lead to", - " a possible collision of storage:", - "", - " 1. Create a new contract.", - " 2. Terminate the contract.", - " 3. Immediately recreate the contract with the same account_id.", - "", - " This is bad because the contents of a trie are deleted lazily and there might be", - " storage of the old instantiation still in it when the new contract is created. Please", - " note that we can't replace the counter by the block number because the sequence above", - " can happen in the same block. We also can't keep the account counter in memory only", - " because storage is the only way to communicate across different extrinsics in the", - " same block.", - "", - " # Note", - "", - " Do not use it to determine the number of contracts. It won't be decremented if", - " a contract is destroyed." - ] - }, - { - "name": "ContractInfoOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 447 - } - }, - "default": [ - 0 - ], - "docs": [ - " The code associated with a given account.", - "", - " TWOX-NOTE: SAFE since `AccountId` is a secure hash." - ] - }, - { - "name": "DeletionQueue", - "modifier": "Default", - "ty": { - "Plain": 448 - }, - "default": [ - 0 - ], - "docs": [ - " Evicted contracts that await child trie deletion.", - "", - " Child trie deletion is a heavy operation depending on the amount of storage items", - " stored in said trie. Therefore this operation is performed lazily in `on_initialize`." - ] - } - ] - }, - "calls": { - "ty": 245 - }, - "event": { - "ty": 56 - }, - "constants": [ - { - "name": "Schedule", - "ty": 450, - "value": [ - 4, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 128, - 0, - 0, - 0, - 16, - 0, - 0, - 0, - 0, - 16, - 0, - 0, - 0, - 1, - 0, - 0, - 32, - 0, - 0, - 0, - 32, - 0, - 0, - 0, - 0, - 64, - 0, - 0, - 0, - 0, - 2, - 0, - 2, - 0, - 0, - 0, - 144, - 11, - 0, - 0, - 112, - 28, - 0, - 0, - 168, - 32, - 0, - 0, - 92, - 23, - 0, - 0, - 6, - 39, - 0, - 0, - 244, - 11, - 0, - 0, - 138, - 22, - 0, - 0, - 2, - 28, - 0, - 0, - 40, - 0, - 0, - 0, - 188, - 11, - 1, - 0, - 188, - 76, - 1, - 0, - 224, - 6, - 0, - 0, - 234, - 11, - 0, - 0, - 60, - 15, - 0, - 0, - 214, - 11, - 0, - 0, - 90, - 35, - 0, - 0, - 132, - 43, - 0, - 0, - 56, - 14, - 0, - 0, - 145, - 24, - 176, - 0, - 68, - 12, - 0, - 0, - 224, - 11, - 0, - 0, - 154, - 11, - 0, - 0, - 88, - 12, - 0, - 0, - 74, - 11, - 0, - 0, - 14, - 11, - 0, - 0, - 68, - 12, - 0, - 0, - 132, - 18, - 0, - 0, - 112, - 18, - 0, - 0, - 72, - 18, - 0, - 0, - 82, - 18, - 0, - 0, - 112, - 18, - 0, - 0, - 232, - 18, - 0, - 0, - 122, - 18, - 0, - 0, - 102, - 18, - 0, - 0, - 52, - 18, - 0, - 0, - 82, - 18, - 0, - 0, - 98, - 17, - 0, - 0, - 168, - 17, - 0, - 0, - 168, - 17, - 0, - 0, - 62, - 43, - 0, - 0, - 100, - 45, - 0, - 0, - 82, - 43, - 0, - 0, - 210, - 45, - 0, - 0, - 148, - 17, - 0, - 0, - 128, - 17, - 0, - 0, - 218, - 17, - 0, - 0, - 132, - 18, - 0, - 0, - 72, - 18, - 0, - 0, - 92, - 18, - 0, - 0, - 82, - 18, - 0, - 0, - 92, - 18, - 0, - 0, - 150, - 78, - 7, - 0, - 0, - 0, - 0, - 0, - 76, - 31, - 182, - 1, - 0, - 0, - 0, - 0, - 254, - 101, - 194, - 1, - 0, - 0, - 0, - 0, - 46, - 16, - 8, - 0, - 0, - 0, - 0, - 0, - 54, - 53, - 3, - 0, - 0, - 0, - 0, - 0, - 48, - 85, - 7, - 0, - 0, - 0, - 0, - 0, - 162, - 56, - 7, - 0, - 0, - 0, - 0, - 0, - 188, - 191, - 21, - 0, - 0, - 0, - 0, - 0, - 80, - 98, - 7, - 0, - 0, - 0, - 0, - 0, - 154, - 84, - 7, - 0, - 0, - 0, - 0, - 0, - 158, - 85, - 7, - 0, - 0, - 0, - 0, - 0, - 214, - 74, - 7, - 0, - 0, - 0, - 0, - 0, - 40, - 157, - 18, - 0, - 0, - 0, - 0, - 0, - 32, - 170, - 3, - 0, - 0, - 0, - 0, - 0, - 160, - 38, - 7, - 0, - 0, - 0, - 0, - 0, - 116, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 196, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 136, - 39, - 227, - 38, - 0, - 0, - 0, - 0, - 82, - 9, - 24, - 0, - 0, - 0, - 0, - 0, - 130, - 80, - 45, - 0, - 0, - 0, - 0, - 0, - 56, - 67, - 160, - 7, - 0, - 0, - 0, - 0, - 33, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 22, - 253, - 5, - 0, - 0, - 0, - 0, - 0, - 234, - 233, - 176, - 7, - 0, - 0, - 0, - 0, - 20, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 110, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 78, - 8, - 237, - 7, - 0, - 0, - 0, - 0, - 70, - 150, - 173, - 7, - 0, - 0, - 0, - 0, - 100, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 70, - 220, - 169, - 1, - 0, - 0, - 0, - 0, - 99, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 176, - 8, - 175, - 1, - 0, - 0, - 0, - 0, - 111, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 44, - 251, - 178, - 7, - 0, - 0, - 0, - 0, - 128, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 106, - 127, - 134, - 8, - 0, - 0, - 0, - 0, - 186, - 177, - 83, - 19, - 0, - 0, - 0, - 0, - 18, - 26, - 98, - 13, - 0, - 0, - 0, - 0, - 132, - 248, - 127, - 8, - 0, - 0, - 0, - 0, - 2, - 212, - 1, - 0, - 0, - 0, - 0, - 0, - 36, - 30, - 108, - 46, - 0, - 0, - 0, - 0, - 92, - 38, - 0, - 0, - 0, - 0, - 0, - 0, - 245, - 5, - 0, - 0, - 0, - 0, - 0, - 0, - 8, - 241, - 11, - 0, - 0, - 0, - 0, - 0, - 203, - 17, - 0, - 0, - 0, - 0, - 0, - 0, - 206, - 201, - 13, - 0, - 0, - 0, - 0, - 0, - 182, - 11, - 0, - 0, - 0, - 0, - 0, - 0, - 138, - 128, - 9, - 0, - 0, - 0, - 0, - 0, - 143, - 4, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 125, - 9, - 0, - 0, - 0, - 0, - 0, - 144, - 4, - 0, - 0, - 0, - 0, - 0, - 0, - 60, - 162, - 71, - 2, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Cost schedule and limits." - ] - }, - { - "name": "DeletionQueueDepth", - "ty": 4, - "value": [ - 12, - 87, - 0, - 0 - ], - "docs": [ - " The maximum number of contracts that can be pending for deletion.", - "", - " When a contract is deleted by calling `seal_terminate` it becomes inaccessible", - " immediately, but the deletion of the storage items it has accumulated is performed", - " later. The contract is put into the deletion queue. This defines how many", - " contracts can be queued up at the same time. If that limit is reached `seal_terminate`", - " will fail. The action must be retried in a later block in that case.", - "", - " The reasons for limiting the queue depth are:", - "", - " 1. The queue is in storage in order to be persistent between blocks. We want to limit", - " \tthe amount of storage that can be consumed.", - " 2. The queue is stored in a vector and needs to be decoded as a whole when reading", - "\t\tit at the end of each block. Longer queues take more weight to decode and hence", - "\t\tlimit the amount of items that can be deleted per block." - ] - }, - { - "name": "DeletionWeightLimit", - "ty": 8, - "value": [ - 0, - 208, - 237, - 144, - 46, - 0, - 0, - 0 - ], - "docs": [ - " The maximum amount of weight that can be consumed per block for lazy trie removal.", - "", - " The amount of weight that is dedicated per block to work on the deletion queue. Larger", - " values allow more trie keys to be deleted in each block but reduce the amount of", - " weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more", - " information about the deletion queue." - ] - }, - { - "name": "DepositPerByte", - "ty": 6, - "value": [ - 0, - 96, - 222, - 251, - 116, - 5, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of balance a caller has to pay for each byte of storage.", - "", - " # Note", - "", - " Changing this value for an existing chain might need a storage migration." - ] - }, - { - "name": "DepositPerItem", - "ty": 6, - "value": [ - 0, - 240, - 171, - 117, - 164, - 13, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of balance a caller has to pay for each storage item.", - "", - " # Note", - "", - " Changing this value for an existing chain might need a storage migration." - ] - } - ], - "error": { - "ty": 454 - }, - "index": 19 - }, - { - "name": "Sudo", - "storage": { - "prefix": "Sudo", - "entries": [ - { - "name": "Key", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The `AccountId` of the sudo key." - ] - } - ] - }, - "calls": { - "ty": 247 - }, - "event": { - "ty": 57 - }, - "constants": [], - "error": { - "ty": 455 - }, - "index": 20 - }, - { - "name": "ImOnline", - "storage": { - "prefix": "ImOnline", - "entries": [ - { - "name": "HeartbeatAfter", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The block number after which it's ok to send heartbeats in the current", - " session.", - "", - " At the beginning of each session we set this to a value that should fall", - " roughly in the middle of the session duration. The idea is to first wait for", - " the validators to produce a block in the current session, so that the", - " heartbeat later on will not be necessary.", - "", - " This value will only be used as a fallback if we fail to get a proper session", - " progress estimate from `NextSessionRotation`, as those estimates should be", - " more accurate then the value we calculate for `HeartbeatAfter`." - ] - }, - { - "name": "Keys", - "modifier": "Default", - "ty": { - "Plain": 456 - }, - "default": [ - 0 - ], - "docs": [ - " The current set of keys that may issue a heartbeat." - ] - }, - { - "name": "ReceivedHeartbeats", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 75, - "value": 458 - } - }, - "default": [ - 0 - ], - "docs": [ - " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to", - " `WrapperOpaque`." - ] - }, - { - "name": "AuthoredBlocks", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 389, - "value": 4 - } - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " For each session index, we keep a mapping of `ValidatorId` to the", - " number of blocks authored by the given authority." - ] - } - ] - }, - "calls": { - "ty": 248 - }, - "event": { - "ty": 59 - }, - "constants": [ - { - "name": "UnsignedPriority", - "ty": 8, - "value": [ - 255, - 255, - 255, - 255, - 255, - 255, - 255, - 255 - ], - "docs": [ - " A configuration for base priority of unsigned transactions.", - "", - " This is exposed so that it can be tuned for particular runtime, when", - " multiple pallets send unsigned transactions." - ] - } - ], - "error": { - "ty": 463 - }, - "index": 21 - }, - { - "name": "AuthorityDiscovery", - "storage": { - "prefix": "AuthorityDiscovery", - "entries": [ - { - "name": "Keys", - "modifier": "Default", - "ty": { - "Plain": 464 - }, - "default": [ - 0 - ], - "docs": [ - " Keys of the current authority set." - ] - }, - { - "name": "NextKeys", - "modifier": "Default", - "ty": { - "Plain": 464 - }, - "default": [ - 0 - ], - "docs": [ - " Keys of the next authority set." - ] - } - ] - }, - "calls": null, - "event": null, - "constants": [], - "error": null, - "index": 22 - }, - { - "name": "Offences", - "storage": { - "prefix": "Offences", - "entries": [ - { - "name": "Reports", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 9, - "value": 466 - } - }, - "default": [ - 0 - ], - "docs": [ - " The primary structure that holds all offence records keyed by report identifiers." - ] - }, - { - "name": "ConcurrentReportsIndex", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 467, - "value": 110 - } - }, - "default": [ - 0 - ], - "docs": [ - " A vector of reports of the same kind that happened at the same time slot." - ] - }, - { - "name": "ReportsByKindIndex", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 69, - "value": 10 - } - }, - "default": [ - 0 - ], - "docs": [ - " Enumerates all reports of a kind along with the time they happened.", - "", - " All reports are sorted by the time of offence.", - "", - " Note that the actual type of this mapping is `Vec`, this is because values of", - " different types are not supported at the moment so we are doing the manual serialization." - ] - } - ] - }, - "calls": null, - "event": { - "ty": 68 - }, - "constants": [], - "error": null, - "index": 23 - }, - { - "name": "Historical", - "storage": null, - "calls": null, - "event": null, - "constants": [], - "error": null, - "index": 24 - }, - { - "name": "RandomnessCollectiveFlip", - "storage": { - "prefix": "RandomnessCollectiveFlip", - "entries": [ - { - "name": "RandomMaterial", - "modifier": "Default", - "ty": { - "Plain": 468 - }, - "default": [ - 0 - ], - "docs": [ - " Series of block headers from the last 81 blocks that acts as random seed material. This", - " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of", - " the oldest hash." - ] - } - ] - }, - "calls": null, - "event": null, - "constants": [], - "error": null, - "index": 25 - }, - { - "name": "Identity", - "storage": { - "prefix": "Identity", - "entries": [ - { - "name": "IdentityOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 469 - } - }, - "default": [ - 0 - ], - "docs": [ - " Information that is pertinent to identify the entity behind an account.", - "", - " TWOX-NOTE: OK ― `AccountId` is a secure hash." - ] - }, - { - "name": "SuperOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 292 - } - }, - "default": [ - 0 - ], - "docs": [ - " The super-identity of an alternative \"sub\" identity together with its name, within that", - " context. If the account is not some other account's sub-identity, then just `None`." - ] - }, - { - "name": "SubsOf", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 473 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Alternative \"sub\" identities of this account.", - "", - " The first item is the deposit, the second is a vector of the accounts.", - "", - " TWOX-NOTE: OK ― `AccountId` is a secure hash." - ] - }, - { - "name": "Registrars", - "modifier": "Default", - "ty": { - "Plain": 475 - }, - "default": [ - 0 - ], - "docs": [ - " The set of registrars. Not expected to get very big as can only be added through a", - " special origin (likely a council motion).", - "", - " The index into this can be cast to `RegistrarIndex` to get a valid value." - ] - } - ] - }, - "calls": { - "ty": 256 - }, - "event": { - "ty": 70 - }, - "constants": [ - { - "name": "BasicDeposit", - "ty": 6, - "value": [ - 0, - 128, - 198, - 164, - 126, - 141, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit for a registered identity" - ] - }, - { - "name": "FieldDeposit", - "ty": 6, - "value": [ - 0, - 160, - 49, - 169, - 95, - 227, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit per additional field for a registered identity." - ] - }, - { - "name": "SubAccountDeposit", - "ty": 6, - "value": [ - 0, - 128, - 244, - 32, - 230, - 181, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit for a registered subaccount. This should account for the fact", - " that one storage item's value will increase by the size of an account ID, and there will", - " be another trie item whose value is the size of an account ID plus 32 bytes." - ] - }, - { - "name": "MaxSubAccounts", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of sub-accounts allowed per identified account." - ] - }, - { - "name": "MaxAdditionalFields", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O", - " required to access an identity, but can be pretty high." - ] - }, - { - "name": "MaxRegistrars", - "ty": 4, - "value": [ - 20, - 0, - 0, - 0 - ], - "docs": [ - " Maxmimum number of registrars allowed in the system. Needed to bound the complexity", - " of, e.g., updating judgements." - ] - } - ], - "error": { - "ty": 479 - }, - "index": 26 - }, - { - "name": "Society", - "storage": { - "prefix": "Society", - "entries": [ - { - "name": "Founder", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The first member." - ] - }, - { - "name": "Rules", - "modifier": "Optional", - "ty": { - "Plain": 9 - }, - "default": [ - 0 - ], - "docs": [ - " A hash of the rules of this society concerning membership. Can only be set once and", - " only by the founder." - ] - }, - { - "name": "Candidates", - "modifier": "Default", - "ty": { - "Plain": 480 - }, - "default": [ - 0 - ], - "docs": [ - " The current set of candidates; bidders that are attempting to become members." - ] - }, - { - "name": "SuspendedCandidates", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 483 - } - }, - "default": [ - 0 - ], - "docs": [ - " The set of suspended candidates." - ] - }, - { - "name": "Pot", - "modifier": "Default", - "ty": { - "Plain": 6 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Amount of our account balance that is specifically for the next round's bid(s)." - ] - }, - { - "name": "Head", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The most primary from the most recently approved members." - ] - }, - { - "name": "Members", - "modifier": "Default", - "ty": { - "Plain": 40 - }, - "default": [ - 0 - ], - "docs": [ - " The current set of members, ordered." - ] - }, - { - "name": "SuspendedMembers", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 35 - } - }, - "default": [ - 0 - ], - "docs": [ - " The set of suspended members." - ] - }, - { - "name": "Bids", - "modifier": "Default", - "ty": { - "Plain": 480 - }, - "default": [ - 0 - ], - "docs": [ - " The current bids, stored ordered by the value of the bid." - ] - }, - { - "name": "Vouching", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 484 - } - }, - "default": [ - 0 - ], - "docs": [ - " Members currently vouching or banned from vouching again" - ] - }, - { - "name": "Payouts", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 485 - } - }, - "default": [ - 0 - ], - "docs": [ - " Pending payouts; ordered by block number, with the amount that should be paid out." - ] - }, - { - "name": "Strikes", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 4 - } - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The ongoing number of losing votes cast by the member." - ] - }, - { - "name": "Votes", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 487, - "value": 488 - } - }, - "default": [ - 0 - ], - "docs": [ - " Double map from Candidate -> Voter -> (Maybe) Vote." - ] - }, - { - "name": "Defender", - "modifier": "Optional", - "ty": { - "Plain": 0 - }, - "default": [ - 0 - ], - "docs": [ - " The defending member currently being challenged." - ] - }, - { - "name": "DefenderVotes", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 488 - } - }, - "default": [ - 0 - ], - "docs": [ - " Votes for the defender." - ] - }, - { - "name": "MaxMembers", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The max number of members for the society at one time." - ] - } - ] - }, - "calls": { - "ty": 296 - }, - "event": { - "ty": 71 - }, - "constants": [ - { - "name": "PalletId", - "ty": 443, - "value": [ - 112, - 121, - 47, - 115, - 111, - 99, - 105, - 101 - ], - "docs": [ - " The societies's pallet id" - ] - }, - { - "name": "CandidateDeposit", - "ty": 6, - "value": [ - 0, - 128, - 198, - 164, - 126, - 141, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount of a deposit required for a bid to be made." - ] - }, - { - "name": "WrongSideDeduction", - "ty": 6, - "value": [ - 0, - 128, - 244, - 32, - 230, - 181, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of the unpaid reward that gets deducted in the case that either a skeptic", - " doesn't vote or someone votes in the wrong way." - ] - }, - { - "name": "MaxStrikes", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " The number of times a member may vote the wrong way (or not at all, when they are a", - " skeptic) before they become suspended." - ] - }, - { - "name": "PeriodSpend", - "ty": 6, - "value": [ - 0, - 0, - 197, - 46, - 188, - 162, - 177, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of incentive paid within each period. Doesn't include VoterTip." - ] - }, - { - "name": "RotationPeriod", - "ty": 4, - "value": [ - 0, - 119, - 1, - 0 - ], - "docs": [ - " The number of blocks between candidate/membership rotation periods." - ] - }, - { - "name": "MaxLockDuration", - "ty": 4, - "value": [ - 0, - 156, - 218, - 1 - ], - "docs": [ - " The maximum duration of the payout lock." - ] - }, - { - "name": "ChallengePeriod", - "ty": 4, - "value": [ - 128, - 19, - 3, - 0 - ], - "docs": [ - " The number of blocks between membership challenges." - ] - }, - { - "name": "MaxCandidateIntake", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of candidates that we accept per round." - ] - } - ], - "error": { - "ty": 489 - }, - "index": 27 - }, - { - "name": "Recovery", - "storage": { - "prefix": "Recovery", - "entries": [ - { - "name": "Recoverable", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 490 - } - }, - "default": [ - 0 - ], - "docs": [ - " The set of recoverable accounts and their recovery configuration." - ] - }, - { - "name": "ActiveRecoveries", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 487, - "value": 492 - } - }, - "default": [ - 0 - ], - "docs": [ - " Active recovery attempts.", - "", - " First account is the account to be recovered, and the second account", - " is the user trying to recover the account." - ] - }, - { - "name": "Proxy", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 0 - } - }, - "default": [ - 0 - ], - "docs": [ - " The list of allowed proxy accounts.", - "", - " Map from the user who can access it to the recovered account." - ] - } - ] - }, - "calls": { - "ty": 298 - }, - "event": { - "ty": 72 - }, - "constants": [ - { - "name": "ConfigDepositBase", - "ty": 6, - "value": [ - 0, - 64, - 99, - 82, - 191, - 198, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The base amount of currency needed to reserve for creating a recovery configuration.", - "", - " This is held for an additional storage item whose value size is", - " `2 + sizeof(BlockNumber, Balance)` bytes." - ] - }, - { - "name": "FriendDepositFactor", - "ty": 6, - "value": [ - 0, - 32, - 61, - 136, - 121, - 45, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of currency needed per additional user when creating a recovery", - " configuration.", - "", - " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage", - " value." - ] - }, - { - "name": "MaxFriends", - "ty": 4, - "value": [ - 9, - 0, - 0, - 0 - ], - "docs": [ - " The maximum amount of friends allowed in a recovery configuration.", - "", - " NOTE: The threshold programmed in this Pallet uses u16, so it does", - " not really make sense to have a limit here greater than u16::MAX.", - " But also, that is a lot more than you should probably set this value", - " to anyway..." - ] - }, - { - "name": "RecoveryDeposit", - "ty": 6, - "value": [ - 0, - 64, - 99, - 82, - 191, - 198, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The base amount of currency needed to reserve for starting a recovery.", - "", - " This is primarily held for deterring malicious recovery attempts, and should", - " have a value large enough that a bad actor would choose not to place this", - " deposit. It also acts to fund additional storage item whose value size is", - " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable", - " threshold." - ] - } - ], - "error": { - "ty": 493 - }, - "index": 28 - }, - { - "name": "Vesting", - "storage": { - "prefix": "Vesting", - "entries": [ - { - "name": "Vesting", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 494 - } - }, - "default": [ - 0 - ], - "docs": [ - " Information regarding the vesting of a given account." - ] - }, - { - "name": "StorageVersion", - "modifier": "Default", - "ty": { - "Plain": 496 - }, - "default": [ - 0 - ], - "docs": [ - " Storage version of the pallet.", - "", - " New networks start with latest version, as determined by the genesis build." - ] - } - ] - }, - "calls": { - "ty": 299 - }, - "event": { - "ty": 73 - }, - "constants": [ - { - "name": "MinVestedTransfer", - "ty": 6, - "value": [ - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount transferred to call `vested_transfer`." - ] - }, - { - "name": "MaxVestingSchedules", - "ty": 4, - "value": [ - 28, - 0, - 0, - 0 - ], - "docs": [] - } - ], - "error": { - "ty": 497 - }, - "index": 29 - }, - { - "name": "Scheduler", - "storage": { - "prefix": "Scheduler", - "entries": [ - { - "name": "Agenda", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 498 - } - }, - "default": [ - 0 - ], - "docs": [ - " Items to be executed, indexed by the block number that they should be executed on." - ] - }, - { - "name": "Lookup", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 10, - "value": 75 - } - }, - "default": [ - 0 - ], - "docs": [ - " Lookup from identity to the block number and index of the task." - ] - } - ] - }, - "calls": { - "ty": 301 - }, - "event": { - "ty": 74 - }, - "constants": [ - { - "name": "MaximumWeight", - "ty": 8, - "value": [ - 0, - 128, - 110, - 135, - 116, - 1, - 0, - 0 - ], - "docs": [ - " The maximum weight that may be scheduled per block for any dispatchables of less", - " priority than `schedule::HARD_DEADLINE`." - ] - }, - { - "name": "MaxScheduledPerBlock", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " The maximum number of scheduled calls in the queue for a single block.", - " Not strictly enforced, but used for weight estimation." - ] - } - ], - "error": { - "ty": 501 - }, - "index": 30 - }, - { - "name": "Preimage", - "storage": { - "prefix": "Preimage", - "entries": [ - { - "name": "StatusFor", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 502 - } - }, - "default": [ - 0 - ], - "docs": [ - " The request status of a given hash." - ] - }, - { - "name": "PreimageFor", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 504 - } - }, - "default": [ - 0 - ], - "docs": [ - " The preimages stored by this pallet." - ] - } - ] - }, - "calls": { - "ty": 304 - }, - "event": { - "ty": 78 - }, - "constants": [], - "error": { - "ty": 505 - }, - "index": 31 - }, - { - "name": "Proxy", - "storage": { - "prefix": "Proxy", - "entries": [ - { - "name": "Proxies", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 506 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The set of account proxies. Maps the account which has delegated to the accounts", - " which are being delegated to, together with the amount held on deposit." - ] - }, - { - "name": "Announcements", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 510 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The announcements made by the proxy (key)." - ] - } - ] - }, - "calls": { - "ty": 305 - }, - "event": { - "ty": 79 - }, - "constants": [ - { - "name": "ProxyDepositBase", - "ty": 6, - "value": [ - 0, - 240, - 158, - 84, - 76, - 57, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The base amount of currency needed to reserve for creating a proxy.", - "", - " This is held for an additional storage item whose value size is", - " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes." - ] - }, - { - "name": "ProxyDepositFactor", - "ty": 6, - "value": [ - 0, - 96, - 170, - 119, - 20, - 180, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of currency needed per proxy added.", - "", - " This is held for adding 32 bytes plus an instance of `ProxyType` more into a", - " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take", - " into account `32 + proxy_type.encode().len()` bytes of data." - ] - }, - { - "name": "MaxProxies", - "ty": 4, - "value": [ - 32, - 0, - 0, - 0 - ], - "docs": [ - " The maximum amount of proxies allowed for a single account." - ] - }, - { - "name": "MaxPending", - "ty": 4, - "value": [ - 32, - 0, - 0, - 0 - ], - "docs": [ - " The maximum amount of time-delayed announcements that are allowed to be pending." - ] - }, - { - "name": "AnnouncementDepositBase", - "ty": 6, - "value": [ - 0, - 240, - 158, - 84, - 76, - 57, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The base amount of currency needed to reserve for creating an announcement.", - "", - " This is held when a new storage item holding a `Balance` is created (typically 16", - " bytes)." - ] - }, - { - "name": "AnnouncementDepositFactor", - "ty": 6, - "value": [ - 0, - 192, - 84, - 239, - 40, - 104, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of currency needed per announcement made.", - "", - " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)", - " into a pre-existing storage value." - ] - } - ], - "error": { - "ty": 514 - }, - "index": 32 - }, - { - "name": "Multisig", - "storage": { - "prefix": "Multisig", - "entries": [ - { - "name": "Multisigs", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Blake2_128Concat" - ], - "key": 515, - "value": 516 - } - }, - "default": [ - 0 - ], - "docs": [ - " The set of open multisig operations." - ] - }, - { - "name": "Calls", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 1, - "value": 517 - } - }, - "default": [ - 0 - ], - "docs": [] - } - ] - }, - "calls": { - "ty": 307 - }, - "event": { - "ty": 82 - }, - "constants": [ - { - "name": "DepositBase", - "ty": 6, - "value": [ - 0, - 240, - 28, - 10, - 219, - 237, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The base amount of currency needed to reserve for creating a multisig execution or to", - " store a dispatch call for later.", - "", - " This is held for an additional storage item whose value size is", - " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is", - " `32 + sizeof(AccountId)` bytes." - ] - }, - { - "name": "DepositFactor", - "ty": 6, - "value": [ - 0, - 0, - 204, - 123, - 159, - 174, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of currency needed per unit threshold when creating a multisig execution.", - "", - " This is held for adding 32 bytes more into a pre-existing storage value." - ] - }, - { - "name": "MaxSignatories", - "ty": 81, - "value": [ - 100, - 0 - ], - "docs": [ - " The maximum amount of signatories allowed in the multisig." - ] - } - ], - "error": { - "ty": 518 - }, - "index": 33 - }, - { - "name": "Bounties", - "storage": { - "prefix": "Bounties", - "entries": [ - { - "name": "BountyCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Number of bounty proposals that have been made." - ] - }, - { - "name": "Bounties", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 519 - } - }, - "default": [ - 0 - ], - "docs": [ - " Bounties that have been made." - ] - }, - { - "name": "BountyDescriptions", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 521 - } - }, - "default": [ - 0 - ], - "docs": [ - " The description of each bounty." - ] - }, - { - "name": "BountyApprovals", - "modifier": "Default", - "ty": { - "Plain": 440 - }, - "default": [ - 0 - ], - "docs": [ - " Bounty indices that have been approved but not yet funded." - ] - } - ] - }, - "calls": { - "ty": 310 - }, - "event": { - "ty": 84 - }, - "constants": [ - { - "name": "BountyDepositBase", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit for placing a bounty proposal." - ] - }, - { - "name": "BountyDepositPayoutDelay", - "ty": 4, - "value": [ - 128, - 112, - 0, - 0 - ], - "docs": [ - " The delay period for which a bounty beneficiary need to wait before claim the payout." - ] - }, - { - "name": "BountyUpdatePeriod", - "ty": 4, - "value": [ - 0, - 39, - 6, - 0 - ], - "docs": [ - " Bounty duration in blocks." - ] - }, - { - "name": "CuratorDepositMultiplier", - "ty": 441, - "value": [ - 32, - 161, - 7, - 0 - ], - "docs": [ - " The curator deposit is calculated as a percentage of the curator fee.", - "", - " This deposit has optional upper and lower bounds with `CuratorDepositMax` and", - " `CuratorDepositMin`." - ] - }, - { - "name": "CuratorDepositMax", - "ty": 442, - "value": [ - 1, - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Maximum amount of funds that should be placed in a deposit for making a proposal." - ] - }, - { - "name": "CuratorDepositMin", - "ty": 442, - "value": [ - 1, - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Minimum amount of funds that should be placed in a deposit for making a proposal." - ] - }, - { - "name": "BountyValueMinimum", - "ty": 6, - "value": [ - 0, - 64, - 99, - 82, - 191, - 198, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Minimum value for a bounty." - ] - }, - { - "name": "DataDepositPerByte", - "ty": 6, - "value": [ - 0, - 16, - 165, - 212, - 232, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit per byte within the tip report reason or bounty description." - ] - }, - { - "name": "MaximumReasonLength", - "ty": 4, - "value": [ - 44, - 1, - 0, - 0 - ], - "docs": [ - " Maximum acceptable reason length.", - "", - " Benchmarks depend on this value, be sure to update weights file when changing this value" - ] - } - ], - "error": { - "ty": 522 - }, - "index": 34 - }, - { - "name": "Tips", - "storage": { - "prefix": "Tips", - "entries": [ - { - "name": "Tips", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 9, - "value": 523 - } - }, - "default": [ - 0 - ], - "docs": [ - " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.", - " This has the insecure enumerable hash function since the key itself is already", - " guaranteed to be a secure hash." - ] - }, - { - "name": "Reasons", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 9, - "value": 10 - } - }, - "default": [ - 0 - ], - "docs": [ - " Simple preimage lookup from the reason's hash to the original data. Again, has an", - " insecure enumerable hash since the key is guaranteed to be the result of a secure hash." - ] - } - ] - }, - "calls": { - "ty": 311 - }, - "event": { - "ty": 85 - }, - "constants": [ - { - "name": "MaximumReasonLength", - "ty": 4, - "value": [ - 44, - 1, - 0, - 0 - ], - "docs": [ - " Maximum acceptable reason length.", - "", - " Benchmarks depend on this value, be sure to update weights file when changing this value" - ] - }, - { - "name": "DataDepositPerByte", - "ty": 6, - "value": [ - 0, - 16, - 165, - 212, - 232, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit per byte within the tip report reason or bounty description." - ] - }, - { - "name": "TipCountdown", - "ty": 4, - "value": [ - 128, - 112, - 0, - 0 - ], - "docs": [ - " The period for which a tip remains open after is has achieved threshold tippers." - ] - }, - { - "name": "TipFindersFee", - "ty": 217, - "value": [ - 20 - ], - "docs": [ - " The percent of the final tip which goes to the original reporter of the tip." - ] - }, - { - "name": "TipReportDepositBase", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount held on deposit for placing a tip report." - ] - } - ], - "error": { - "ty": 524 - }, - "index": 35 - }, - { - "name": "Assets", - "storage": { - "prefix": "Assets", - "entries": [ - { - "name": "Asset", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 525 - } - }, - "default": [ - 0 - ], - "docs": [ - " Details of an asset." - ] - }, - { - "name": "Account", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 389, - "value": 526 - } - }, - "default": [ - 0 - ], - "docs": [ - " The holdings of a specific account for a specific asset." - ] - }, - { - "name": "Approvals", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 528, - "value": 529 - } - }, - "default": [ - 0 - ], - "docs": [ - " Approved balance transfers. First balance is the amount approved for transfer. Second", - " is the amount of `T::Currency` reserved for storing this.", - " First key is the asset ID, second key is the owner and third key is the delegate." - ] - }, - { - "name": "Metadata", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 530 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Metadata of an asset." - ] - } - ] - }, - "calls": { - "ty": 312 - }, - "event": { - "ty": 86 - }, - "constants": [ - { - "name": "AssetDeposit", - "ty": 6, - "value": [ - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The basic amount of funds that must be reserved for an asset." - ] - }, - { - "name": "AssetAccountDeposit", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of funds that must be reserved for a non-provider asset account to be", - " maintained." - ] - }, - { - "name": "MetadataDepositBase", - "ty": 6, - "value": [ - 0, - 128, - 198, - 164, - 126, - 141, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The basic amount of funds that must be reserved when adding metadata to your asset." - ] - }, - { - "name": "MetadataDepositPerByte", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The additional funds that must be reserved for the number of bytes you store in your", - " metadata." - ] - }, - { - "name": "ApprovalDeposit", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The amount of funds that must be reserved when creating a new approval." - ] - }, - { - "name": "StringLimit", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " The maximum length of a name or symbol stored on-chain." - ] - } - ], - "error": { - "ty": 531 - }, - "index": 36 - }, - { - "name": "Mmr", - "storage": { - "prefix": "Mmr", - "entries": [ - { - "name": "RootHash", - "modifier": "Default", - "ty": { - "Plain": 9 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Latest MMR Root hash." - ] - }, - { - "name": "NumberOfLeaves", - "modifier": "Default", - "ty": { - "Plain": 8 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Current size of the MMR (number of leaves)." - ] - }, - { - "name": "Nodes", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Identity" - ], - "key": 8, - "value": 9 - } - }, - "default": [ - 0 - ], - "docs": [ - " Hashes of the nodes in the MMR.", - "", - " Note this collection only contains MMR peaks, the inner nodes (and leaves)", - " are pruned and only stored in the Offchain DB." - ] - } - ] - }, - "calls": null, - "event": null, - "constants": [], - "error": null, - "index": 37 - }, - { - "name": "Lottery", - "storage": { - "prefix": "Lottery", - "entries": [ - { - "name": "LotteryIndex", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [] - }, - { - "name": "Lottery", - "modifier": "Optional", - "ty": { - "Plain": 532 - }, - "default": [ - 0 - ], - "docs": [ - " The configuration for the current lottery." - ] - }, - { - "name": "Participants", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 533 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)" - ] - }, - { - "name": "TicketsCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Total number of tickets sold." - ] - }, - { - "name": "Tickets", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 0 - } - }, - "default": [ - 0 - ], - "docs": [ - " Each ticket's owner.", - "", - " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones", - " are actually valid ticket mappings." - ] - }, - { - "name": "CallIndices", - "modifier": "Default", - "ty": { - "Plain": 534 - }, - "default": [ - 0 - ], - "docs": [ - " The calls stored in this pallet to be used in an active lottery if configured", - " by `Config::ValidateCall`." - ] - } - ] - }, - "calls": { - "ty": 314 - }, - "event": { - "ty": 87 - }, - "constants": [ - { - "name": "PalletId", - "ty": 443, - "value": [ - 112, - 121, - 47, - 108, - 111, - 116, - 116, - 111 - ], - "docs": [ - " The Lottery's pallet id" - ] - }, - { - "name": "MaxCalls", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " The max number of calls available in a single lottery." - ] - }, - { - "name": "MaxGenerateRandom", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " Number of time we should try to generate a random number that has no modulo bias.", - " The larger this number, the more potential computation is used for picking the winner,", - " but also the more likely that the chosen winner is done fairly." - ] - } - ], - "error": { - "ty": 536 - }, - "index": 38 - }, - { - "name": "Gilt", - "storage": { - "prefix": "Gilt", - "entries": [ - { - "name": "QueueTotals", - "modifier": "Default", - "ty": { - "Plain": 537 - }, - "default": [ - 0 - ], - "docs": [ - " The totals of items and balances within each queue. Saves a lot of storage reads in the", - " case of sparsely packed queues.", - "", - " The vector is indexed by duration in `Period`s, offset by one, so information on the queue", - " whose duration is one `Period` would be storage `0`." - ] - }, - { - "name": "Queues", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 538 - } - }, - "default": [ - 0 - ], - "docs": [ - " The queues of bids ready to become gilts. Indexed by duration (in `Period`s)." - ] - }, - { - "name": "ActiveTotal", - "modifier": "Default", - "ty": { - "Plain": 541 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Information relating to the gilts currently active." - ] - }, - { - "name": "Active", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 542 - } - }, - "default": [ - 0 - ], - "docs": [ - " The currently active gilts, indexed according to the order of creation." - ] - } - ] - }, - "calls": { - "ty": 315 - }, - "event": { - "ty": 89 - }, - "constants": [ - { - "name": "QueueCount", - "ty": 4, - "value": [ - 44, - 1, - 0, - 0 - ], - "docs": [ - " Number of duration queues in total. This sets the maximum duration supported, which is", - " this value multiplied by `Period`." - ] - }, - { - "name": "MaxQueueLen", - "ty": 4, - "value": [ - 232, - 3, - 0, - 0 - ], - "docs": [ - " Maximum number of items that may be in each duration queue." - ] - }, - { - "name": "FifoQueueLen", - "ty": 4, - "value": [ - 244, - 1, - 0, - 0 - ], - "docs": [ - " Portion of the queue which is free from ordering and just a FIFO.", - "", - " Must be no greater than `MaxQueueLen`." - ] - }, - { - "name": "Period", - "ty": 4, - "value": [ - 0, - 47, - 13, - 0 - ], - "docs": [ - " The base period for the duration queues. This is the common multiple across all", - " supported freezing durations that can be bid upon." - ] - }, - { - "name": "MinFreeze", - "ty": 6, - "value": [ - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount of funds that may be offered to freeze for a gilt. Note that this", - " does not actually limit the amount which may be frozen in a gilt since gilts may be", - " split up in order to satisfy the desired amount of funds under gilts.", - "", - " It should be at least big enough to ensure that there is no possible storage spam attack", - " or queue-filling attack." - ] - }, - { - "name": "IntakePeriod", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " The number of blocks between consecutive attempts to issue more gilts in an effort to", - " get to the target amount to be frozen.", - "", - " A larger value results in fewer storage hits each block, but a slower period to get to", - " the target." - ] - }, - { - "name": "MaxIntakeBids", - "ty": 4, - "value": [ - 10, - 0, - 0, - 0 - ], - "docs": [ - " The maximum amount of bids that can be turned into issued gilts each block. A larger", - " value here means less of the block available for transactions should there be a glut of", - " bids to make into gilts to reach the target." - ] - } - ], - "error": { - "ty": 543 - }, - "index": 39 - }, - { - "name": "Uniques", - "storage": { - "prefix": "Uniques", - "entries": [ - { - "name": "Class", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 544 - } - }, - "default": [ - 0 - ], - "docs": [ - " Details of an asset class." - ] - }, - { - "name": "OwnershipAcceptance", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 0, - "value": 4 - } - }, - "default": [ - 0 - ], - "docs": [ - " The class, if any, of which an account is willing to take ownership." - ] - }, - { - "name": "Account", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 545, - "value": 29 - } - }, - "default": [ - 0 - ], - "docs": [ - " The assets held by any given account; set out this way so that assets owned by a single", - " account can be enumerated." - ] - }, - { - "name": "ClassAccount", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 393, - "value": 29 - } - }, - "default": [ - 0 - ], - "docs": [ - " The classes owned by any given account; set out this way so that classes owned by a single", - " account can be enumerated." - ] - }, - { - "name": "Asset", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 75, - "value": 546 - } - }, - "default": [ - 0 - ], - "docs": [ - " The assets in existence and their ownership details." - ] - }, - { - "name": "ClassMetadataOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 547 - } - }, - "default": [ - 0 - ], - "docs": [ - " Metadata of an asset class." - ] - }, - { - "name": "InstanceMetadataOf", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 75, - "value": 548 - } - }, - "default": [ - 0 - ], - "docs": [ - " Metadata of an asset instance." - ] - }, - { - "name": "Attribute", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat", - "Blake2_128Concat", - "Blake2_128Concat" - ], - "key": 549, - "value": 550 - } - }, - "default": [ - 0 - ], - "docs": [ - " Metadata of an asset class." - ] - } - ] - }, - "calls": { - "ty": 318 - }, - "event": { - "ty": 90 - }, - "constants": [ - { - "name": "ClassDeposit", - "ty": 6, - "value": [ - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The basic amount of funds that must be reserved for an asset class." - ] - }, - { - "name": "InstanceDeposit", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The basic amount of funds that must be reserved for an asset instance." - ] - }, - { - "name": "MetadataDepositBase", - "ty": 6, - "value": [ - 0, - 128, - 198, - 164, - 126, - 141, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The basic amount of funds that must be reserved when adding metadata to your asset." - ] - }, - { - "name": "AttributeDepositBase", - "ty": 6, - "value": [ - 0, - 128, - 198, - 164, - 126, - 141, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The basic amount of funds that must be reserved when adding an attribute to an asset." - ] - }, - { - "name": "DepositPerByte", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The additional funds that must be reserved for the number of bytes store in metadata,", - " either \"normal\" metadata or attribute metadata." - ] - }, - { - "name": "StringLimit", - "ty": 4, - "value": [ - 50, - 0, - 0, - 0 - ], - "docs": [ - " The maximum length of data stored on-chain." - ] - }, - { - "name": "KeyLimit", - "ty": 4, - "value": [ - 32, - 0, - 0, - 0 - ], - "docs": [ - " The maximum length of an attribute key." - ] - }, - { - "name": "ValueLimit", - "ty": 4, - "value": [ - 0, - 1, - 0, - 0 - ], - "docs": [ - " The maximum length of an attribute value." - ] - } - ], - "error": { - "ty": 551 - }, - "index": 40 - }, - { - "name": "TransactionStorage", - "storage": { - "prefix": "TransactionStorage", - "entries": [ - { - "name": "Transactions", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 552 - } - }, - "default": [ - 0 - ], - "docs": [ - " Collection of transaction metadata by block number." - ] - }, - { - "name": "ChunkCount", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 4 - } - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Count indexed chunks for each block." - ] - }, - { - "name": "ByteFee", - "modifier": "Optional", - "ty": { - "Plain": 6 - }, - "default": [ - 0 - ], - "docs": [ - " Storage fee per byte." - ] - }, - { - "name": "EntryFee", - "modifier": "Optional", - "ty": { - "Plain": 6 - }, - "default": [ - 0 - ], - "docs": [ - " Storage fee per transaction." - ] - }, - { - "name": "MaxTransactionSize", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Maximum data set in a single transaction in bytes." - ] - }, - { - "name": "MaxBlockTransactions", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Maximum number of indexed transactions in the block." - ] - }, - { - "name": "StoragePeriod", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`", - " for block authoring." - ] - }, - { - "name": "BlockTransactions", - "modifier": "Default", - "ty": { - "Plain": 552 - }, - "default": [ - 0 - ], - "docs": [] - }, - { - "name": "ProofChecked", - "modifier": "Default", - "ty": { - "Plain": 35 - }, - "default": [ - 0 - ], - "docs": [ - " Was the proof checked in this block?" - ] - } - ] - }, - "calls": { - "ty": 321 - }, - "event": { - "ty": 96 - }, - "constants": [], - "error": { - "ty": 554 - }, - "index": 41 - }, - { - "name": "BagsList", - "storage": { - "prefix": "BagsList", - "entries": [ - { - "name": "ListNodes", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 555 - } - }, - "default": [ - 0 - ], - "docs": [ - " A single node, within some bag.", - "", - " Nodes store links forward and back within their respective bags." - ] - }, - { - "name": "CounterForListNodes", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - "Counter for the related counted storage map" - ] - }, - { - "name": "ListBags", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 8, - "value": 556 - } - }, - "default": [ - 0 - ], - "docs": [ - " A bag stored in storage.", - "", - " Stores a `Bag` struct, which stores head and tail pointers to itself." - ] - } - ] - }, - "calls": { - "ty": 323 - }, - "event": { - "ty": 97 - }, - "constants": [ - { - "name": "BagThresholds", - "ty": 557, - "value": [ - 33, - 3, - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 106, - 112, - 204, - 212, - 169, - 96, - 0, - 0, - 158, - 243, - 57, - 127, - 188, - 102, - 0, - 0, - 169, - 7, - 204, - 213, - 48, - 109, - 0, - 0, - 61, - 154, - 103, - 251, - 12, - 116, - 0, - 0, - 169, - 191, - 162, - 117, - 87, - 123, - 0, - 0, - 166, - 253, - 247, - 50, - 23, - 131, - 0, - 0, - 3, - 79, - 93, - 145, - 83, - 139, - 0, - 0, - 19, - 36, - 69, - 101, - 20, - 148, - 0, - 0, - 120, - 8, - 16, - 1, - 98, - 157, - 0, - 0, - 3, - 2, - 246, - 60, - 69, - 167, - 0, - 0, - 57, - 46, - 111, - 127, - 199, - 177, - 0, - 0, - 245, - 156, - 35, - 198, - 242, - 188, - 0, - 0, - 74, - 231, - 106, - 175, - 209, - 200, - 0, - 0, - 89, - 138, - 100, - 132, - 111, - 213, - 0, - 0, - 18, - 159, - 178, - 67, - 216, - 226, - 0, - 0, - 63, - 34, - 225, - 172, - 24, - 241, - 0, - 0, - 51, - 164, - 132, - 76, - 62, - 0, - 1, - 0, - 226, - 229, - 27, - 137, - 87, - 16, - 1, - 0, - 118, - 162, - 192, - 176, - 115, - 33, - 1, - 0, - 103, - 137, - 180, - 7, - 163, - 51, - 1, - 0, - 121, - 62, - 216, - 215, - 246, - 70, - 1, - 0, - 120, - 19, - 27, - 129, - 129, - 91, - 1, - 0, - 12, - 28, - 243, - 138, - 86, - 113, - 1, - 0, - 68, - 55, - 238, - 182, - 138, - 136, - 1, - 0, - 158, - 181, - 109, - 20, - 52, - 161, - 1, - 0, - 51, - 94, - 159, - 21, - 106, - 187, - 1, - 0, - 103, - 195, - 199, - 165, - 69, - 215, - 1, - 0, - 50, - 24, - 243, - 64, - 225, - 244, - 1, - 0, - 222, - 11, - 35, - 13, - 89, - 20, - 2, - 0, - 105, - 156, - 17, - 245, - 202, - 53, - 2, - 0, - 173, - 80, - 162, - 196, - 86, - 89, - 2, - 0, - 154, - 228, - 28, - 71, - 30, - 127, - 2, - 0, - 208, - 36, - 78, - 103, - 69, - 167, - 2, - 0, - 249, - 132, - 173, - 81, - 242, - 209, - 2, - 0, - 172, - 231, - 167, - 152, - 77, - 255, - 2, - 0, - 161, - 24, - 50, - 91, - 130, - 47, - 3, - 0, - 255, - 164, - 199, - 109, - 190, - 98, - 3, - 0, - 88, - 11, - 253, - 133, - 50, - 153, - 3, - 0, - 169, - 175, - 206, - 104, - 18, - 211, - 3, - 0, - 16, - 154, - 216, - 27, - 149, - 16, - 4, - 0, - 217, - 202, - 165, - 25, - 245, - 81, - 4, - 0, - 56, - 223, - 72, - 137, - 112, - 151, - 4, - 0, - 190, - 225, - 114, - 121, - 73, - 225, - 4, - 0, - 204, - 115, - 64, - 31, - 198, - 47, - 5, - 0, - 179, - 4, - 249, - 24, - 49, - 131, - 5, - 0, - 130, - 139, - 255, - 180, - 217, - 219, - 5, - 0, - 18, - 53, - 56, - 61, - 20, - 58, - 6, - 0, - 165, - 180, - 42, - 71, - 58, - 158, - 6, - 0, - 54, - 102, - 45, - 9, - 171, - 8, - 7, - 0, - 247, - 58, - 234, - 180, - 203, - 121, - 7, - 0, - 184, - 126, - 147, - 215, - 7, - 242, - 7, - 0, - 255, - 236, - 35, - 192, - 209, - 113, - 8, - 0, - 184, - 75, - 11, - 236, - 162, - 249, - 8, - 0, - 201, - 220, - 174, - 122, - 252, - 137, - 9, - 0, - 145, - 117, - 43, - 168, - 103, - 35, - 10, - 0, - 100, - 241, - 205, - 79, - 118, - 198, - 10, - 0, - 54, - 9, - 190, - 118, - 195, - 115, - 11, - 0, - 120, - 101, - 95, - 223, - 243, - 43, - 12, - 0, - 164, - 7, - 245, - 165, - 182, - 239, - 12, - 0, - 82, - 246, - 27, - 231, - 197, - 191, - 13, - 0, - 218, - 113, - 187, - 112, - 231, - 156, - 14, - 0, - 13, - 233, - 18, - 126, - 237, - 135, - 15, - 0, - 20, - 119, - 152, - 127, - 183, - 129, - 16, - 0, - 235, - 238, - 101, - 239, - 50, - 139, - 17, - 0, - 18, - 105, - 254, - 50, - 92, - 165, - 18, - 0, - 51, - 248, - 66, - 139, - 63, - 209, - 19, - 0, - 139, - 165, - 122, - 19, - 250, - 15, - 21, - 0, - 27, - 43, - 96, - 208, - 186, - 98, - 22, - 0, - 13, - 29, - 55, - 208, - 195, - 202, - 23, - 0, - 108, - 100, - 250, - 92, - 107, - 73, - 25, - 0, - 38, - 34, - 199, - 65, - 29, - 224, - 26, - 0, - 4, - 91, - 185, - 36, - 92, - 144, - 28, - 0, - 35, - 61, - 131, - 246, - 194, - 91, - 30, - 0, - 200, - 119, - 28, - 121, - 6, - 68, - 32, - 0, - 48, - 19, - 253, - 222, - 246, - 74, - 34, - 0, - 170, - 139, - 110, - 132, - 129, - 114, - 36, - 0, - 130, - 192, - 150, - 196, - 178, - 188, - 38, - 0, - 22, - 163, - 250, - 235, - 183, - 43, - 41, - 0, - 130, - 150, - 82, - 74, - 225, - 193, - 43, - 0, - 166, - 54, - 168, - 101, - 164, - 129, - 46, - 0, - 208, - 226, - 212, - 80, - 158, - 109, - 49, - 0, - 156, - 10, - 154, - 39, - 150, - 136, - 52, - 0, - 228, - 250, - 175, - 178, - 127, - 213, - 55, - 0, - 230, - 230, - 77, - 54, - 126, - 87, - 59, - 0, - 14, - 75, - 214, - 109, - 231, - 17, - 63, - 0, - 136, - 177, - 125, - 183, - 70, - 8, - 67, - 0, - 176, - 125, - 239, - 114, - 96, - 62, - 71, - 0, - 52, - 222, - 36, - 150, - 53, - 184, - 75, - 0, - 212, - 139, - 213, - 123, - 7, - 122, - 80, - 0, - 208, - 189, - 32, - 239, - 91, - 136, - 85, - 0, - 184, - 240, - 70, - 120, - 1, - 232, - 90, - 0, - 16, - 248, - 138, - 238, - 19, - 158, - 96, - 0, - 56, - 146, - 146, - 83, - 1, - 176, - 102, - 0, - 156, - 149, - 228, - 252, - 142, - 35, - 109, - 0, - 180, - 18, - 109, - 16, - 223, - 254, - 115, - 0, - 40, - 180, - 62, - 89, - 118, - 72, - 123, - 0, - 160, - 138, - 28, - 122, - 66, - 7, - 131, - 0, - 176, - 154, - 176, - 131, - 160, - 66, - 139, - 0, - 40, - 70, - 178, - 244, - 99, - 2, - 148, - 0, - 200, - 97, - 164, - 42, - 222, - 78, - 157, - 0, - 80, - 210, - 61, - 74, - 230, - 48, - 167, - 0, - 128, - 81, - 1, - 167, - 225, - 177, - 177, - 0, - 56, - 229, - 1, - 178, - 204, - 219, - 188, - 0, - 32, - 22, - 82, - 120, - 68, - 185, - 200, - 0, - 56, - 137, - 36, - 186, - 144, - 85, - 213, - 0, - 112, - 202, - 53, - 164, - 174, - 188, - 226, - 0, - 128, - 95, - 177, - 53, - 92, - 251, - 240, - 0, - 128, - 53, - 104, - 93, - 36, - 31, - 0, - 1, - 160, - 195, - 220, - 217, - 107, - 54, - 16, - 1, - 208, - 120, - 98, - 232, - 126, - 80, - 33, - 1, - 96, - 232, - 82, - 208, - 159, - 125, - 51, - 1, - 144, - 102, - 44, - 88, - 22, - 207, - 70, - 1, - 16, - 39, - 76, - 51, - 64, - 87, - 91, - 1, - 128, - 75, - 226, - 119, - 162, - 41, - 113, - 1, - 48, - 130, - 185, - 45, - 252, - 90, - 136, - 1, - 128, - 210, - 118, - 7, - 90, - 1, - 161, - 1, - 176, - 245, - 17, - 89, - 43, - 52, - 187, - 1, - 64, - 49, - 116, - 95, - 88, - 12, - 215, - 1, - 128, - 47, - 108, - 238, - 89, - 164, - 244, - 1, - 64, - 255, - 121, - 155, - 82, - 24, - 20, - 2, - 96, - 117, - 96, - 125, - 41, - 134, - 53, - 2, - 96, - 253, - 233, - 153, - 166, - 13, - 89, - 2, - 0, - 229, - 231, - 28, - 145, - 208, - 126, - 2, - 192, - 223, - 37, - 117, - 207, - 242, - 166, - 2, - 160, - 127, - 217, - 117, - 137, - 154, - 209, - 2, - 160, - 103, - 0, - 157, - 76, - 240, - 254, - 2, - 32, - 220, - 41, - 161, - 50, - 31, - 47, - 3, - 32, - 255, - 82, - 107, - 10, - 85, - 98, - 3, - 128, - 136, - 202, - 163, - 131, - 194, - 152, - 3, - 224, - 86, - 131, - 251, - 92, - 155, - 210, - 3, - 64, - 29, - 215, - 93, - 149, - 22, - 16, - 4, - 0, - 49, - 126, - 57, - 160, - 110, - 81, - 4, - 192, - 176, - 113, - 18, - 157, - 225, - 150, - 4, - 128, - 180, - 140, - 145, - 146, - 177, - 224, - 4, - 128, - 232, - 18, - 74, - 173, - 36, - 47, - 5, - 192, - 7, - 202, - 112, - 130, - 133, - 130, - 5, - 0, - 124, - 19, - 196, - 86, - 35, - 219, - 5, - 64, - 131, - 111, - 232, - 105, - 82, - 57, - 6, - 192, - 112, - 15, - 129, - 70, - 108, - 157, - 6, - 64, - 240, - 156, - 80, - 23, - 208, - 7, - 7, - 192, - 230, - 36, - 179, - 1, - 227, - 120, - 7, - 192, - 51, - 42, - 199, - 133, - 16, - 241, - 7, - 128, - 7, - 76, - 161, - 228, - 202, - 112, - 8, - 0, - 213, - 169, - 235, - 140, - 139, - 248, - 8, - 0, - 168, - 73, - 88, - 142, - 211, - 136, - 9, - 0, - 128, - 66, - 84, - 20, - 44, - 34, - 10, - 128, - 162, - 81, - 112, - 232, - 38, - 197, - 10, - 0, - 232, - 213, - 250, - 252, - 94, - 114, - 11, - 128, - 29, - 246, - 78, - 0, - 121, - 42, - 12, - 128, - 212, - 254, - 100, - 249, - 35, - 238, - 12, - 0, - 109, - 208, - 56, - 238, - 25, - 190, - 13, - 0, - 30, - 144, - 164, - 148, - 32, - 155, - 14, - 0, - 16, - 191, - 87, - 14, - 10, - 134, - 15, - 0, - 218, - 106, - 157, - 176, - 181, - 127, - 16, - 0, - 191, - 100, - 175, - 216, - 16, - 137, - 17, - 0, - 187, - 91, - 96, - 205, - 23, - 163, - 18, - 0, - 249, - 99, - 243, - 174, - 214, - 206, - 19, - 0, - 213, - 240, - 4, - 118, - 106, - 13, - 21, - 0, - 224, - 153, - 119, - 2, - 2, - 96, - 22, - 0, - 16, - 61, - 102, - 59, - 223, - 199, - 23, - 0, - 222, - 62, - 45, - 65, - 88, - 70, - 25, - 0, - 236, - 219, - 173, - 178, - 216, - 220, - 26, - 0, - 69, - 199, - 0, - 7, - 227, - 140, - 28, - 0, - 184, - 189, - 224, - 252, - 17, - 88, - 30, - 0, - 186, - 92, - 42, - 33, - 26, - 64, - 32, - 0, - 64, - 125, - 228, - 109, - 203, - 70, - 34, - 0, - 222, - 165, - 91, - 3, - 19, - 110, - 36, - 0, - 170, - 241, - 243, - 252, - 252, - 183, - 38, - 0, - 20, - 34, - 111, - 99, - 182, - 38, - 41, - 0, - 100, - 146, - 128, - 62, - 143, - 188, - 43, - 0, - 132, - 134, - 166, - 199, - 252, - 123, - 46, - 0, - 44, - 240, - 95, - 192, - 155, - 103, - 49, - 0, - 218, - 99, - 247, - 237, - 50, - 130, - 52, - 0, - 240, - 177, - 63, - 189, - 181, - 206, - 55, - 0, - 242, - 145, - 196, - 16, - 71, - 80, - 59, - 0, - 66, - 42, - 26, - 60, - 60, - 10, - 63, - 0, - 44, - 36, - 33, - 47, - 32, - 0, - 67, - 0, - 172, - 147, - 66, - 212, - 182, - 53, - 71, - 0, - 204, - 110, - 215, - 164, - 0, - 175, - 75, - 0, - 196, - 208, - 34, - 119, - 62, - 112, - 80, - 0, - 32, - 1, - 125, - 137, - 245, - 125, - 85, - 0, - 248, - 99, - 135, - 206, - 243, - 220, - 90, - 0, - 140, - 76, - 127, - 126, - 84, - 146, - 96, - 0, - 32, - 98, - 7, - 242, - 132, - 163, - 102, - 0, - 204, - 30, - 5, - 203, - 73, - 22, - 109, - 0, - 180, - 42, - 122, - 112, - 196, - 240, - 115, - 0, - 212, - 58, - 144, - 226, - 120, - 57, - 123, - 0, - 56, - 244, - 97, - 236, - 83, - 247, - 130, - 0, - 160, - 114, - 100, - 185, - 177, - 49, - 139, - 0, - 72, - 201, - 179, - 212, - 100, - 240, - 147, - 0, - 0, - 127, - 233, - 152, - 189, - 59, - 157, - 0, - 16, - 5, - 143, - 23, - 146, - 28, - 167, - 0, - 0, - 223, - 175, - 127, - 70, - 156, - 177, - 0, - 232, - 12, - 136, - 11, - 214, - 196, - 188, - 0, - 88, - 189, - 203, - 125, - 220, - 160, - 200, - 0, - 56, - 209, - 141, - 55, - 160, - 59, - 213, - 0, - 48, - 213, - 91, - 240, - 28, - 161, - 226, - 0, - 112, - 74, - 192, - 26, - 15, - 222, - 240, - 255, - 255, - 255, - 255, - 255, - 255, - 255, - 255 - ], - "docs": [ - " The list of thresholds separating the various bags.", - "", - " Ids are separated into unsorted bags according to their score. This specifies the", - " thresholds separating the bags. An id's bag is the largest bag for which the id's score", - " is less than or equal to its upper threshold.", - "", - " When ids are iterated, higher bags are iterated completely before lower bags. This means", - " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower", - " score, but peer ids within a particular bag are sorted in insertion order.", - "", - " # Expressing the constant", - "", - " This constant must be sorted in strictly increasing order. Duplicate items are not", - " permitted.", - "", - " There is an implied upper limit of `Score::MAX`; that value does not need to be", - " specified within the bag. For any two threshold lists, if one ends with", - " `Score::MAX`, the other one does not, and they are otherwise equal, the two", - " lists will behave identically.", - "", - " # Calculation", - "", - " It is recommended to generate the set of thresholds in a geometric series, such that", - " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *", - " constant_ratio).max(threshold[k] + 1)` for all `k`.", - "", - " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.", - "", - " # Examples", - "", - " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and", - " iteration is strictly in insertion order.", - " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to", - " the procedure given above, then the constant ratio is equal to 2.", - " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to", - " the procedure given above, then the constant ratio is approximately equal to 1.248.", - " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall", - " into bag 0, an id with score 2 will fall into bag 1, etc.", - "", - " # Migration", - "", - " In the event that this list ever changes, a copy of the old bags list must be retained.", - " With that `List::migrate` can be called, which will perform the appropriate migration." - ] - } - ], - "error": { - "ty": 558 - }, - "index": 42 - }, - { - "name": "StateTrieMigration", - "storage": { - "prefix": "StateTrieMigration", - "entries": [ - { - "name": "MigrationProcess", - "modifier": "Default", - "ty": { - "Plain": 327 - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Migration progress.", - "", - " This stores the snapshot of the last migrated keys. It can be set into motion and move", - " forward by any of the means provided by this pallet." - ] - }, - { - "name": "AutoLimits", - "modifier": "Default", - "ty": { - "Plain": 325 - }, - "default": [ - 0 - ], - "docs": [ - " The limits that are imposed on automatic migrations.", - "", - " If set to None, then no automatic migration happens." - ] - }, - { - "name": "SignedMigrationMaxLimits", - "modifier": "Optional", - "ty": { - "Plain": 326 - }, - "default": [ - 0 - ], - "docs": [ - " The maximum limits that the signed migration could use.", - "", - " If not set, no signed submission is allowed." - ] - } - ] - }, - "calls": { - "ty": 324 - }, - "event": { - "ty": 98 - }, - "constants": [], - "error": { - "ty": 559 - }, - "index": 43 - }, - { - "name": "ChildBounties", - "storage": { - "prefix": "ChildBounties", - "entries": [ - { - "name": "ChildBountyCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Number of total child bounties." - ] - }, - { - "name": "ParentChildBounties", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 4 - } - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " Number of child-bounties per parent bounty.", - " Map of parent bounty index to number of child bounties." - ] - }, - { - "name": "ChildBounties", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 75, - "value": 560 - } - }, - "default": [ - 0 - ], - "docs": [ - " Child-bounties that have been added." - ] - }, - { - "name": "ChildBountyDescriptions", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 521 - } - }, - "default": [ - 0 - ], - "docs": [ - " The description of each child-bounty." - ] - }, - { - "name": "ChildrenCuratorFees", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 4, - "value": 6 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The cumulative child-bounty curator fee for each parent bounty." - ] - } - ] - }, - "calls": { - "ty": 329 - }, - "event": { - "ty": 100 - }, - "constants": [ - { - "name": "MaxActiveChildBountyCount", - "ty": 4, - "value": [ - 5, - 0, - 0, - 0 - ], - "docs": [ - " Maximum number of child-bounties that can be added to a parent bounty." - ] - }, - { - "name": "ChildBountyValueMinimum", - "ty": 6, - "value": [ - 0, - 64, - 122, - 16, - 243, - 90, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " Minimum value for a child-bounty." - ] - } - ], - "error": { - "ty": 562 - }, - "index": 44 - }, - { - "name": "Referenda", - "storage": { - "prefix": "Referenda", - "entries": [ - { - "name": "ReferendumCount", - "modifier": "Default", - "ty": { - "Plain": 4 - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The next free referendum index, aka the number of referenda started so far." - ] - }, - { - "name": "ReferendumInfoFor", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Blake2_128Concat" - ], - "key": 4, - "value": 563 - } - }, - "default": [ - 0 - ], - "docs": [ - " Information concerning any given referendum." - ] - }, - { - "name": "TrackQueue", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 2, - "value": 571 - } - }, - "default": [ - 0 - ], - "docs": [ - " The sorted list of referenda ready to be decided but not yet being decided, ordered by", - " conviction-weighted approvals.", - "", - " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`." - ] - }, - { - "name": "DecidingCount", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 2, - "value": 4 - } - }, - "default": [ - 0, - 0, - 0, - 0 - ], - "docs": [ - " The number of referenda being decided currently." - ] - } - ] - }, - "calls": { - "ty": 330 - }, - "event": { - "ty": 101 - }, - "constants": [ - { - "name": "SubmissionDeposit", - "ty": 6, - "value": [ - 0, - 0, - 193, - 111, - 242, - 134, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " The minimum amount to be used as a deposit for a public referendum proposal." - ] - }, - { - "name": "MaxQueued", - "ty": 4, - "value": [ - 100, - 0, - 0, - 0 - ], - "docs": [ - " Maximum size of the referendum queue for a single track." - ] - }, - { - "name": "UndecidingTimeout", - "ty": 4, - "value": [ - 0, - 78, - 12, - 0 - ], - "docs": [ - " The number of blocks after submission that a referendum must begin being decided by.", - " Once this passes, then anyone may cancel the referendum." - ] - }, - { - "name": "AlarmInterval", - "ty": 4, - "value": [ - 1, - 0, - 0, - 0 - ], - "docs": [ - " Quantization level for the referendum wakeup scheduler. A higher number will result in", - " fewer storage reads/writes needed for smaller voters, but also result in delays to the", - " automatic referendum status changes. Explicit servicing instructions are unaffected." - ] - } - ], - "error": { - "ty": 572 - }, - "index": 45 - }, - { - "name": "ConvictionVoting", - "storage": { - "prefix": "ConvictionVoting", - "entries": [ - { - "name": "VotingFor", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat", - "Twox64Concat" - ], - "key": 573, - "value": 574 - } - }, - "default": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "docs": [ - " All voting for a particular voter in a particular voting class. We store the balance for the", - " number of votes that we have recorded." - ] - }, - { - "name": "ClassLocksFor", - "modifier": "Default", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 0, - "value": 582 - } - }, - "default": [ - 0 - ], - "docs": [ - " The voting classes which have a non-zero lock requirement and the lock amounts which they", - " require. The actual amount locked on behalf of this pallet should always be the maximum of", - " this list." - ] - } - ] - }, - "calls": { - "ty": 337 - }, - "event": { - "ty": 103 - }, - "constants": [ - { - "name": "MaxVotes", - "ty": 4, - "value": [ - 0, - 2, - 0, - 0 - ], - "docs": [ - " The maximum number of concurrent votes an account may have.", - "", - " Also used to compute weight, an overly large value can", - " lead to extrinsic with large weight estimation: see `delegate` for instance." - ] - }, - { - "name": "VoteLockingPeriod", - "ty": 4, - "value": [ - 0, - 47, - 13, - 0 - ], - "docs": [ - " The minimum period of vote locking.", - "", - " It should be no shorter than enactment period to ensure that in the case of an approval,", - " those successful voters are locked into the consequences that their votes entail." - ] - } - ], - "error": { - "ty": 584 - }, - "index": 46 - }, - { - "name": "Whitelist", - "storage": { - "prefix": "Whitelist", - "entries": [ - { - "name": "WhitelistedCall", - "modifier": "Optional", - "ty": { - "Map": { - "hashers": [ - "Twox64Concat" - ], - "key": 9, - "value": 29 - } - }, - "default": [ - 0 - ], - "docs": [] - } - ] - }, - "calls": { - "ty": 342 - }, - "event": { - "ty": 104 - }, - "constants": [], - "error": { - "ty": 585 - }, - "index": 47 - } - ], - "extrinsic": { - "ty": 586, - "version": 4, - "signed_extensions": [ - { - "identifier": "CheckNonZeroSender", - "ty": 591, - "additional_signed": 29 - }, - { - "identifier": "CheckSpecVersion", - "ty": 592, - "additional_signed": 4 - }, - { - "identifier": "CheckTxVersion", - "ty": 593, - "additional_signed": 4 - }, - { - "identifier": "CheckGenesis", - "ty": 594, - "additional_signed": 9 - }, - { - "identifier": "CheckMortality", - "ty": 595, - "additional_signed": 9 - }, - { - "identifier": "CheckNonce", - "ty": 597, - "additional_signed": 29 - }, - { - "identifier": "CheckWeight", - "ty": 598, - "additional_signed": 29 - }, - { - "identifier": "ChargeAssetTxPayment", - "ty": 599, - "additional_signed": 29 - } - ] - }, - "ty": 600 - } - } -] diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 4c995b13ae..9e540a9780 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -206,7 +206,29 @@ fn generate_storage_entry_fns( quote!( #field_name: & #field_ty ) }); + // If the item is a map, we want a way to access the root entry to do things like iterate over it, + // so expose a function to create this entry, too: + let root_entry_fn = if matches!(storage_entry.ty, StorageEntryType::Map { .. }) { + let fn_name_root = format_ident!("{}_root", fn_name); + quote! ( + #docs_token + pub fn #fn_name_root( + &self, + ) -> ::subxt::storage::StorageAddress::<'static, #return_ty> { + ::subxt::storage::StorageAddress::new_with_validation( + #pallet_name, + #storage_name, + ::subxt::storage::StorageEntryKey::Plain, + [#(#storage_hash,)*] + ) + } + ) + } else { + quote!() + }; + quote! { + // Access a specific value from a storage entry #docs_token pub fn #fn_name( &self, @@ -219,5 +241,7 @@ fn generate_storage_entry_fns( [#(#storage_hash,)*] ) } + + #root_entry_fn } } diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index a2df42bf38..fda64cfeac 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -12,11 +12,15 @@ use sp_keyring::AccountKeyring; use subxt::{ - ClientBuilder, - Config, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + OnlineClient, + config::{ + Config, + SubstrateConfig, + }, + extrinsic::{ + PairSigner, + SubstrateExtrinsicParams, + }, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -41,23 +45,28 @@ impl Config for MyConfig { type Header = ::Header; type Signature = ::Signature; type Extrinsic = ::Extrinsic; + // ExtrinsicParams makes use of the index type, so we need to adjust them + // too to align with our modified index type, above: + type ExtrinsicParams = SubstrateExtrinsicParams; } #[tokio::main] async fn main() -> Result<(), Box> { - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); - let signer = PairSigner::new(AccountKeyring::Alice.pair()); let dest = AccountKeyring::Bob.to_account_id().into(); + // Create a client to use: + let api = OnlineClient::::new().await?; + + // Create a transaction to submit: + let tx = polkadot::tx() + .balances() + .transfer(dest, 123_456_789_012_345); + + // submit the transaction with default params: let hash = api .tx() - .balances() - .transfer(dest, 10_000)? - .sign_and_submit_default(&signer) + .sign_and_submit_default(&tx, &signer) .await?; println!("Balance transfer extrinsic submitted: {}", hash); diff --git a/examples/examples/fetch_all_accounts.rs b/examples/examples/fetch_all_accounts.rs index 495c0617a0..fe9eab3235 100644 --- a/examples/examples/fetch_all_accounts.rs +++ b/examples/examples/fetch_all_accounts.rs @@ -11,9 +11,8 @@ //! ``` use subxt::{ - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -23,12 +22,11 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::new().await?; - let mut iter = api.storage().system().account_iter(None).await?; + let address = polkadot::storage().system().account_root(); + + let mut iter = api.storage().iter(address, 10, None).await?; while let Some((key, account)) = iter.next().await? { println!("{}: {}", hex::encode(key), account.data.free); From fff5b557e1f2f1ea1b839e9d41842990bde83505 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 15:27:41 +0100 Subject: [PATCH 25/75] get a bunch more of the examples compiling --- examples/examples/fetch_constants.rs | 29 +++------ examples/examples/fetch_staking_details.rs | 40 +++++++----- examples/examples/metadata_compatibility.rs | 24 +++----- examples/examples/rpc_call.rs | 15 +---- .../examples/rpc_call_subscribe_blocks.rs | 18 ++---- examples/examples/submit_and_watch.rs | 50 ++++++++------- examples/examples/subscribe_all_events.rs | 61 ++++++++----------- examples/examples/subscribe_one_event.rs | 58 ++++++++---------- .../examples/subscribe_runtime_updates.rs | 45 +++----------- examples/examples/subscribe_some_events.rs | 58 ++++++++---------- 10 files changed, 162 insertions(+), 236 deletions(-) diff --git a/examples/examples/fetch_constants.rs b/examples/examples/fetch_constants.rs index 88e4661120..4804f9f270 100644 --- a/examples/examples/fetch_constants.rs +++ b/examples/examples/fetch_constants.rs @@ -11,9 +11,8 @@ //! ``` use subxt::{ - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; // Generate the API from a static metadata path. @@ -24,22 +23,14 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - // Upon connecting to the target polkadot node, the node's metadata is downloaded (referred to - // as the runtime metadata). - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); - - // Constants are queried from the node's runtime metadata. - // Query the `ExistentialDeposit` constant from the `Balances` pallet. - let existential_deposit = api - // This is the constants query. - .constants() - // Constant from the `Balances` pallet. - .balances() - // Constant name. - .existential_deposit()?; + // Create a client to use: + let api = OnlineClient::::new().await?; + + // Build a constant address to query: + let address = polkadot::constants().balances().existential_deposit(); + + // Look it up: + let existential_deposit = api.constants().at(&address)?; println!("Existential Deposit: {}", existential_deposit); diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index 9c485cc71f..db25a61030 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -12,14 +12,17 @@ use sp_keyring::AccountKeyring; use subxt::{ - sp_core::{ - sr25519, - Pair, + ext::{ + sp_core::{ + sr25519, + Pair, + }, + sp_runtime::{ + AccountId32, + } }, - sp_runtime::AccountId32, - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -29,12 +32,13 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + // Create a client to use: + let api = OnlineClient::::new().await?; - let era = api.storage().staking().active_era(None).await?.unwrap(); + let active_era_addr = polkadot::storage() + .staking() + .active_era(); + let era = api.storage().fetch(&active_era_addr, None).await?.unwrap().unwrap(); println!( "Staking active era: index: {:?}, start: {:?}", era.index, era.start @@ -51,18 +55,22 @@ async fn main() -> Result<(), Box> { println!(" Alice//stash account id: {:?}", alice_stash_id); // Map from all locked "stash" accounts to the controller account. + let controller_acc_addr = polkadot::storage() + .staking() + .bonded(&alice_stash_id); let controller_acc = api .storage() - .staking() - .bonded(&alice_stash_id, None) + .fetch(&controller_acc_addr, None) .await? .unwrap(); println!(" account controlled by: {:?}", controller_acc); + let era_reward_addr = polkadot::storage() + .staking() + .eras_reward_points(&era.index); let era_result = api .storage() - .staking() - .eras_reward_points(&era.index, None) + .fetch(&era_reward_addr, None) .await?; println!("Era reward points: {:?}", era_result); diff --git a/examples/examples/metadata_compatibility.rs b/examples/examples/metadata_compatibility.rs index 3e6aa37764..de5113e73c 100644 --- a/examples/examples/metadata_compatibility.rs +++ b/examples/examples/metadata_compatibility.rs @@ -11,9 +11,8 @@ //! ``` use subxt::{ - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -23,18 +22,15 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::new().await?; - // Full metadata validation is not enabled by default; instead, the individual calls, - // storage requests and constant accesses are runtime type checked against the node - // metadata to ensure that they are compatible with the generated code. - // - // To make sure that all of our statically generated pallets are compatible with the - // runtime node, we can run this check: - api.validate_metadata()?; + // Each individual request will be validated against the static code that was + // used to construct it, if possible. We can also validate the entirety of the + // statically generated code against some client at a given point in time using + // this check. If it fails, then there is some breaking change between the metadata + // used to generate this static code, and the runtime metadata from a node that the + // client is using. + polkadot::validate_codegen(api)?; Ok(()) } diff --git a/examples/examples/rpc_call.rs b/examples/examples/rpc_call.rs index f19d6ec0a1..59cc4a9a16 100644 --- a/examples/examples/rpc_call.rs +++ b/examples/examples/rpc_call.rs @@ -11,28 +11,19 @@ //! ``` use subxt::{ - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; -#[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -pub mod polkadot {} - #[tokio::main] async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .set_url("wss://rpc.polkadot.io:443") - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::new().await?; let block_number = 1u32; let block_hash = api - .client .rpc() .block_hash(Some(block_number.into())) .await?; diff --git a/examples/examples/rpc_call_subscribe_blocks.rs b/examples/examples/rpc_call_subscribe_blocks.rs index 0246ec7796..8f78761776 100644 --- a/examples/examples/rpc_call_subscribe_blocks.rs +++ b/examples/examples/rpc_call_subscribe_blocks.rs @@ -12,31 +12,23 @@ use subxt::{ rpc::Subscription, - sp_runtime::{ + ext::sp_runtime::{ generic::Header, traits::BlakeTwo256, }, - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; -#[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -pub mod polkadot {} - #[tokio::main] async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .set_url("wss://rpc.polkadot.io:443") - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::from_url("wss://rpc.polkadot.io:443").await?; // For non-finalised blocks use `.subscribe_blocks()` let mut blocks: Subscription> = - api.client.rpc().subscribe_finalized_blocks().await?; + api.rpc().subscribe_finalized_blocks().await?; while let Some(Ok(block)) = blocks.next().await { println!( diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index b62c93b6f2..e699005c52 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -13,10 +13,11 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use subxt::{ - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, + extrinsic::{ + PairSigner, + } }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -40,16 +41,15 @@ async fn simple_transfer() -> Result<(), Box> { let signer = PairSigner::new(AccountKeyring::Alice.pair()); let dest = AccountKeyring::Bob.to_account_id().into(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::new().await?; + + let balance_transfer_tx = polkadot::tx() + .balances() + .transfer(dest, 10_000); let balance_transfer = api .tx() - .balances() - .transfer(dest, 10_000)? - .sign_and_submit_then_watch_default(&signer) + .sign_and_submit_then_watch_default(&balance_transfer_tx, &signer) .await? .wait_for_finalized_success() .await?; @@ -72,16 +72,15 @@ async fn simple_transfer_separate_events() -> Result<(), Box>>(); + let api = OnlineClient::::new().await?; + + let balance_transfer_tx = polkadot::tx() + .balances() + .transfer(dest, 10_000); let balance_transfer = api .tx() - .balances() - .transfer(dest, 10_000)? - .sign_and_submit_then_watch_default(&signer) + .sign_and_submit_then_watch_default(&balance_transfer_tx, &signer) .await? .wait_for_finalized() .await?; @@ -123,21 +122,20 @@ async fn handle_transfer_events() -> Result<(), Box> { let signer = PairSigner::new(AccountKeyring::Alice.pair()); let dest = AccountKeyring::Bob.to_account_id().into(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + let api = OnlineClient::::new().await?; + + let balance_transfer_tx = polkadot::tx() + .balances() + .transfer(dest, 10_000); let mut balance_transfer_progress = api .tx() - .balances() - .transfer(dest, 10_000)? - .sign_and_submit_then_watch_default(&signer) + .sign_and_submit_then_watch_default(&balance_transfer_tx, &signer) .await?; while let Some(ev) = balance_transfer_progress.next().await { let ev = ev?; - use subxt::TransactionStatus::*; + use subxt::extrinsic::TransactionStatus::*; // Made it into a block, but not finalized. if let InBlock(details) = ev { diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs index e4a8c14d36..8943d27268 100644 --- a/examples/examples/subscribe_all_events.rs +++ b/examples/examples/subscribe_all_events.rs @@ -14,10 +14,9 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + OnlineClient, + extrinsic::PairSigner, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -29,41 +28,33 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + // Create a client to use: + let api = OnlineClient::::new().await?; // Subscribe to any events that occur: - let mut event_sub = api.events().subscribe().await?; + let mut event_sub = api.events().subscribe::().await?; // While this subscription is active, balance transfers are made somewhere: - tokio::task::spawn(async { - let signer = PairSigner::new(AccountKeyring::Alice.pair()); - let api = - ClientBuilder::new() - .build() - .await - .unwrap() - .to_runtime_api::, - >>(); - - let mut transfer_amount = 1_000_000_000; - - // Make small balance transfers from Alice to Bob in a loop: - loop { - api.tx() - .balances() - .transfer(AccountKeyring::Bob.to_account_id().into(), transfer_amount) - .expect("compatible transfer call on runtime node") - .sign_and_submit_default(&signer) - .await - .unwrap(); - - tokio::time::sleep(Duration::from_secs(10)).await; - transfer_amount += 100_000_000; + tokio::task::spawn({ + let api = api.clone(); + async move { + let signer = PairSigner::new(AccountKeyring::Alice.pair()); + let mut transfer_amount = 1_000_000_000; + + // Make small balance transfers from Alice to Bob in a loop: + loop { + let transfer_tx = polkadot::tx().balances().transfer( + AccountKeyring::Bob.to_account_id().into(), + transfer_amount + ); + api.tx() + .sign_and_submit_default(&transfer_tx, &signer) + .await + .unwrap(); + + tokio::time::sleep(Duration::from_secs(10)).await; + transfer_amount += 100_000_000; + } } }); diff --git a/examples/examples/subscribe_one_event.rs b/examples/examples/subscribe_one_event.rs index 42828b3dae..d8ee407884 100644 --- a/examples/examples/subscribe_one_event.rs +++ b/examples/examples/subscribe_one_event.rs @@ -14,10 +14,9 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + OnlineClient, + extrinsic::PairSigner, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -29,43 +28,38 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - // Subscribe to any events that occur: - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + // Create a client to use: + let api = OnlineClient::::new().await?; // Subscribe to just balance transfer events, making use of `filter_events` // to select a single event type (note the 1-tuple) to filter out and return. let mut transfer_events = api .events() - .subscribe() + .subscribe::() .await? .filter_events::<(polkadot::balances::events::Transfer,)>(); - // While this subscription is active, we imagine some balance transfers are made somewhere else: - tokio::task::spawn(async { - let signer = PairSigner::new(AccountKeyring::Alice.pair()); - let api = - ClientBuilder::new() - .build() - .await - .unwrap() - .to_runtime_api::, - >>(); + // While this subscription is active, balance transfers are made somewhere: + tokio::task::spawn({ + let api = api.clone(); + async move { + let signer = PairSigner::new(AccountKeyring::Alice.pair()); + let mut transfer_amount = 1_000_000_000; + + // Make small balance transfers from Alice to Bob in a loop: + loop { + let transfer_tx = polkadot::tx().balances().transfer( + AccountKeyring::Bob.to_account_id().into(), + transfer_amount + ); + api.tx() + .sign_and_submit_default(&transfer_tx, &signer) + .await + .unwrap(); - // Make small balance transfers from Alice to Bob in a loop: - loop { - api.tx() - .balances() - .transfer(AccountKeyring::Bob.to_account_id().into(), 1_000_000_000) - .expect("compatible transfer call on runtime node") - .sign_and_submit_default(&signer) - .await - .unwrap(); - tokio::time::sleep(Duration::from_secs(10)).await; + tokio::time::sleep(Duration::from_secs(10)).await; + transfer_amount += 100_000_000; + } } }); diff --git a/examples/examples/subscribe_runtime_updates.rs b/examples/examples/subscribe_runtime_updates.rs index 9512b17328..d216d6ed83 100644 --- a/examples/examples/subscribe_runtime_updates.rs +++ b/examples/examples/subscribe_runtime_updates.rs @@ -10,59 +10,30 @@ //! polkadot --dev --tmp //! ``` -use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, }; -#[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -pub mod polkadot {} - #[tokio::main] async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + // Create a client to use: + let api = OnlineClient::::new().await?; // Start a new tokio task to perform the runtime updates while // utilizing the API for other use cases. - let update_client = api.client.updates(); + let update_client = api.subscribe_to_updates(); tokio::spawn(async move { let result = update_client.perform_runtime_updates().await; println!("Runtime update failed with result={:?}", result); }); - // Make multiple transfers to simulate a long running `subxt::Client` use-case. - // - // Meanwhile, the tokio task above will perform any necessary updates to keep in sync - // with the node we've connected to. Transactions submitted in the vicinity of a runtime - // update may still fail, however, owing to a race between the update happening and - // subxt synchronising its internal state with it. - let signer = PairSigner::new(AccountKeyring::Alice.pair()); - // Make small balance transfers from Alice to Bob: - for _ in 0..10 { - let hash = api - .tx() - .balances() - .transfer( - AccountKeyring::Bob.to_account_id().into(), - 123_456_789_012_345, - ) - .unwrap() - .sign_and_submit_default(&signer) - .await - .unwrap(); - - println!("Balance transfer extrinsic submitted: {}", hash); - tokio::time::sleep(Duration::from_secs(30)).await; - } + // If this client is kept in use a while, it'll update its metadata and such + // as needed when the node it's pointed at updates. + tokio::time::sleep(Duration::from_secs(10_000)).await; Ok(()) } diff --git a/examples/examples/subscribe_some_events.rs b/examples/examples/subscribe_some_events.rs index 2a138deb05..5014cbe7fa 100644 --- a/examples/examples/subscribe_some_events.rs +++ b/examples/examples/subscribe_some_events.rs @@ -14,10 +14,9 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - ClientBuilder, - SubstrateConfig, - PairSigner, - PolkadotExtrinsicParams, + OnlineClient, + PolkadotConfig, + extrinsic::PairSigner, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -29,44 +28,39 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - // Subscribe to any events that occur: - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); + // Create a client to use: + let api = OnlineClient::::new().await?; // Subscribe to several balance related events. If we ask for more than one event, // we'll be given a correpsonding tuple of `Option`'s, with exactly one // variant populated each time. - let mut balance_events = api.events().subscribe().await?.filter_events::<( + let mut balance_events = api.events().subscribe::().await?.filter_events::<( polkadot::balances::events::Withdraw, polkadot::balances::events::Transfer, polkadot::balances::events::Deposit, )>(); - // While this subscription is active, we imagine some balance transfers are made somewhere else: - tokio::task::spawn(async { - let signer = PairSigner::new(AccountKeyring::Alice.pair()); - let api = - ClientBuilder::new() - .build() - .await - .unwrap() - .to_runtime_api::, - >>(); + // While this subscription is active, balance transfers are made somewhere: + tokio::task::spawn({ + let api = api.clone(); + async move { + let signer = PairSigner::new(AccountKeyring::Alice.pair()); + let mut transfer_amount = 1_000_000_000; - // Make small balance transfers from Alice to Bob in a loop: - loop { - api.tx() - .balances() - .transfer(AccountKeyring::Bob.to_account_id().into(), 1_000_000_000) - .expect("compatible transfer call on runtime node") - .sign_and_submit_default(&signer) - .await - .unwrap(); - tokio::time::sleep(Duration::from_secs(10)).await; + // Make small balance transfers from Alice to Bob in a loop: + loop { + let transfer_tx = polkadot::tx().balances().transfer( + AccountKeyring::Bob.to_account_id().into(), + transfer_amount + ); + api.tx() + .sign_and_submit_default(&transfer_tx, &signer) + .await + .unwrap(); + + tokio::time::sleep(Duration::from_secs(10)).await; + transfer_amount += 100_000_000; + } } }); From e452c751f61f37e77304c8121cedd59fb8437188 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 16:56:01 +0100 Subject: [PATCH 26/75] almost get final example working; type mismatch to look into --- examples/examples/storage_query.rs | 68 +++++++++++------------------ subxt/src/storage/storage_client.rs | 27 ++++++------ 2 files changed, 40 insertions(+), 55 deletions(-) diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_query.rs index 5a16b67352..1db368166f 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_query.rs @@ -15,13 +15,11 @@ use subxt::{ rpc::Rpc, storage::{ StorageClient, - StorageKeyPrefix, + StorageEntryKey, + StorageMapKey, }, - ClientBuilder, - SubstrateConfig, - PolkadotExtrinsicParams, - StorageEntryKey, - StorageMapKey, + OnlineClient, + PolkadotConfig, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -31,13 +29,8 @@ pub mod polkadot {} async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); - - // Obtain the storage client wrapper from the API. - let storage: StorageClient<_> = api.client.storage(); + // Create a client to use: + let api = OnlineClient::::new().await?; // The VersionNotifiers type of the XcmPallet is defined as: // @@ -57,21 +50,24 @@ async fn main() -> Result<(), Box> { // Example 1. Iterate over fetched keys manually. { + let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); + // Fetch at most 10 keys from below the prefix XcmPallet' VersionNotifiers. - let keys = storage - .fetch_keys::(10, None, None) + let keys = api + .storage() + .fetch_keys(&key_addr, 10, None, None) .await?; println!("Example 1. Obtained keys:"); for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); - if let Some(storage_data) = storage.fetch_raw(key.clone(), None).await? { + if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn // - metadata in json format - let value = u64::decode(&mut &storage_data.0[..])?; + let value = u64::decode(&mut &*storage_data)?; println!(" Value: {}", value); } } @@ -79,26 +75,13 @@ async fn main() -> Result<(), Box> { // Example 2. Iterate over (keys, value) using the storage client. { - let mut iter = storage - .iter::(None) - .await?; + let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); - println!("\nExample 2. Obtained keys:"); - while let Some((key, value)) = iter.next().await? { - println!("Key: 0x{}", hex::encode(&key)); - println!(" Value: {}", value); - } - } - - // Example 3. Iterate over (keys, value) using the polkadot API. - { - let mut iter = api - .storage() - .xcm_pallet() - .version_notifiers_iter(None) + let mut iter = api.storage() + .iter(key_addr, 10, None) .await?; - println!("\nExample 3. Obtained keys:"); + println!("\nExample 2. Obtained keys:"); while let Some((key, value)) = iter.next().await? { println!("Key: 0x{}", hex::encode(&key)); println!(" Value: {}", value); @@ -108,11 +91,13 @@ async fn main() -> Result<(), Box> { // Example 4. Custom iteration over double maps. { // Obtain the inner RPC from the API. - let rpc: &Rpc<_> = api.client.rpc(); + let rpc = api.rpc(); + + let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); // Obtain the prefixed `twox_128("XcmPallet") ++ twox_128("VersionNotifiers")` - let prefix = - StorageKeyPrefix::new::(); + let mut query_key = key_addr.to_bytes(); + // From the VersionNotifiers definition above, the first key is represented by // ``` // Twox64Concat, @@ -120,14 +105,13 @@ async fn main() -> Result<(), Box> { // ``` // while `XcmVersion` is `u32`. // Pass `2` as `XcmVersion` and concatenate the key to the prefix. - let entry_key = StorageEntryKey::Map(vec![StorageMapKey::new( + StorageEntryKey::Map(vec![StorageMapKey::new( &2u32, - ::subxt::StorageHasher::Twox64Concat, - )]); + ::subxt::storage::StorageHasher::Twox64Concat, + )]).to_bytes(&mut query_key); // The final query key is: // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(2u32) ++ 2u32` - let query_key = entry_key.final_key(prefix); println!("\nExample 4\nQuery key: 0x{}", hex::encode(&query_key)); let keys = rpc @@ -138,7 +122,7 @@ async fn main() -> Result<(), Box> { for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); - if let Some(storage_data) = storage.fetch_raw(key.clone(), None).await? { + if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 0662b3038c..18712497ee 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -269,11 +269,6 @@ where } } - - - - - /// This is returned from storage accesses in the statically generated /// code, and contains the information needed to find, validate and decode /// the storage entry. @@ -323,13 +318,8 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { let mut bytes = sp_core::twox_128(self.pallet_name.as_bytes()).to_vec(); bytes.extend(&sp_core::twox_128(self.storage_name.as_bytes())[..]); - // Then, if we need to further dig into this entry, we do so, - // hashing additional fields as specified: - if let StorageEntryKey::Map(map) = &*self.storage_entry_key { - for entry in map { - entry.to_bytes(&mut bytes); - } - } + // Then encode any additional params to dig further into the entry: + self.storage_entry_key.to_bytes(&mut bytes); bytes } @@ -361,6 +351,17 @@ pub enum StorageEntryKey { Map(Vec), } +impl StorageEntryKey { + /// Convert this [`StorageEntryKey`] into bytes and append them to some existing bytes. + pub fn to_bytes(&self, bytes: &mut Vec) { + if let StorageEntryKey::Map(map) = self { + for entry in map { + entry.to_bytes(bytes); + } + } + } +} + impl <'a> From for Cow<'a, StorageEntryKey> { fn from(k: StorageEntryKey) -> Self { Cow::Owned(k) @@ -383,7 +384,7 @@ impl StorageMapKey { } } - /// Convert this [`StorageMapKey`] into bytes and append it to some existing bytes. + /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. pub fn to_bytes(&self, bytes: &mut Vec) { match &self.hasher { StorageHasher::Identity => bytes.extend(&self.value), From 00d51d1596cc899cfc2f5b80a111d2dcdf04ba0f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 8 Jul 2022 17:00:10 +0100 Subject: [PATCH 27/75] wee tweaks --- examples/examples/storage_query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_query.rs index 1db368166f..d6521366e5 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_query.rs @@ -115,7 +115,7 @@ async fn main() -> Result<(), Box> { println!("\nExample 4\nQuery key: 0x{}", hex::encode(&query_key)); let keys = rpc - .storage_keys_paged(Some(query_key), 10, None, None) + .storage_keys_paged(query_key, 10, None, None) .await?; println!("Obtained keys:"); @@ -127,7 +127,7 @@ async fn main() -> Result<(), Box> { // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn // - metadata in json format - let value = u64::decode(&mut &storage_data.0[..])?; + let value = u64::decode(&mut &storage_data[..])?; println!(" Value: {}", value); } } From 2fed937b4458c2ebba6e987f74a54691ef48ffa0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 11 Jul 2022 14:39:31 +0100 Subject: [PATCH 28/75] move StorageAddress to separate file --- subxt/src/extrinsic/tx_client.rs | 4 +- subxt/src/storage/mod.rs | 20 ++- subxt/src/storage/storage_address.rs | 189 +++++++++++++++++++++++++++ subxt/src/storage/storage_client.rs | 177 +++---------------------- 4 files changed, 226 insertions(+), 164 deletions(-) create mode 100644 subxt/src/storage/storage_address.rs diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index b301191f1b..27edc3967d 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -106,7 +106,7 @@ impl > TxClient { }; tracing::debug!( - "additional_and_extra_params: {:?}", + "tx additional_and_extra_params: {:?}", additional_and_extra_params ); @@ -126,7 +126,7 @@ impl > TxClient { } }; - tracing::info!("xt signature: {}", hex::encode(signature.encode())); + tracing::debug!("tx signature: {}", hex::encode(signature.encode())); // 5. Encode extrinsic, now that we have the parts we need. This is compatible // with the Encode impl for UncheckedExtrinsic (protocol version 4). diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index 8879876607..ac5d99bde0 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -5,13 +5,21 @@ //! Types associated with accessing and working with storage items. mod storage_client; +mod storage_address; pub use storage_client::{ + StorageClient, KeyIter, SignedExtension, - StorageAddress, - StorageClient, - StorageEntryKey, - StorageMapKey, - StorageHasher, -}; \ No newline at end of file +}; + +/// Types representing an address which describes where a storage +/// entry lives and how to properly decode it. +pub mod address { + pub use super::storage_address::{ + StorageAddress, + StorageEntryKey, + StorageMapKey, + StorageHasher, + }; +} diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs new file mode 100644 index 0000000000..d2e4d49bae --- /dev/null +++ b/subxt/src/storage/storage_address.rs @@ -0,0 +1,189 @@ +// 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. + +use codec::{ + Encode, +}; +use sp_core::storage::{ + StorageKey, +}; +pub use sp_runtime::traits::SignedExtension; +use std::{ + borrow::Cow, +}; + + +// We use this type a bunch, so export it from here. +pub use frame_metadata::StorageHasher; + +/// This is returned from storage accesses in the statically generated +/// code, and contains the information needed to find, validate and decode +/// the storage entry. +pub struct StorageAddress <'a, ReturnTy> { + pallet_name: Cow<'a, str>, + entry_name: Cow<'a, str>, + // How to access the specific value at that storage address. + storage_entry_key: StorageEntryKey, + // Hash provided from static code for validation. + validation_hash: Option<[u8; 32]>, + _marker: std::marker::PhantomData +} + +impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { + /// Create a new [`StorageAddress`] that will be validated + /// against node metadata using the hash given. + pub fn new_with_validation( + pallet_name: impl Into>, + storage_name: impl Into>, + storage_entry_key: StorageEntryKey, + hash: [u8; 32] + ) -> Self { + Self { + pallet_name: pallet_name.into(), + entry_name: storage_name.into(), + storage_entry_key: storage_entry_key.into(), + validation_hash: Some(hash), + _marker: std::marker::PhantomData + } + } + + /// Do not validate this storage prior to accessing it. + pub fn unvalidated(self) -> Self { + Self { + pallet_name: self.pallet_name, + entry_name: self.entry_name, + storage_entry_key: self.storage_entry_key, + validation_hash: None, + _marker: self._marker + } + } + + /// Strip any map keys from a storage entry. If the storage entry is pointing at + /// a plain, non-map storage value, then this will have no effect. + pub fn root(&mut self) { + self.storage_entry_key = StorageEntryKey::Plain.into(); + } + + /// Append a map key to the existing storage address. + pub fn append_map_key(&mut self, key: StorageMapKey) { + match &mut self.storage_entry_key { + StorageEntryKey::Plain => { + self.storage_entry_key = StorageEntryKey::Map(vec![key]); + }, + StorageEntryKey::Map(keys) => { + keys.push(key); + } + } + } + + /// Convert this address into bytes that we can pass to a node to look up + /// the associated value at this address. + pub fn to_bytes(&self) -> Vec { + // First encode the pallet/name part: + let mut bytes = sp_core::twox_128(self.pallet_name.as_bytes()).to_vec(); + bytes.extend(&sp_core::twox_128(self.entry_name.as_bytes())[..]); + + // Then encode any additional params to dig further into the entry: + self.storage_entry_key.to_bytes(&mut bytes); + + bytes + } + + /// Take a storage address and return an owned storage address. + pub fn to_owned(self) -> StorageAddress<'static, ReturnTy> { + StorageAddress { + pallet_name: Cow::Owned(self.pallet_name.into_owned()), + entry_name: Cow::Owned(self.entry_name.into_owned()), + storage_entry_key: self.storage_entry_key, + validation_hash: self.validation_hash, + _marker: self._marker + } + } + + /// Pallet name the entry lives at. + pub fn pallet_name(&self) -> &str { + &*self.pallet_name + } + + /// The name of the storage entry in the pallet. + pub fn entry_name(&self) -> &str { + &*self.entry_name + } + + /// A hash which validates that the address is valid. + pub fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash + } +} + +impl <'a, R> From<&StorageAddress<'a, R>> for StorageKey { + fn from(address: &StorageAddress<'a, R>) -> Self { + StorageKey(address.to_bytes()) + } +} + +/// Storage key. +#[derive(Clone)] +pub enum StorageEntryKey { + /// Plain key. + Plain, + /// Map key(s). + Map(Vec), +} + +impl StorageEntryKey { + /// Convert this [`StorageEntryKey`] into bytes and append them to some existing bytes. + pub fn to_bytes(&self, bytes: &mut Vec) { + if let StorageEntryKey::Map(map) = self { + for entry in map { + entry.to_bytes(bytes); + } + } + } +} + +impl <'a> From for Cow<'a, StorageEntryKey> { + fn from(k: StorageEntryKey) -> Self { + Cow::Owned(k) + } +} + +/// Storage key for a Map. +#[derive(Clone)] +pub struct StorageMapKey { + value: Vec, + hasher: StorageHasher, +} + +impl StorageMapKey { + /// Create a new [`StorageMapKey`] with the encoded data and the hasher. + pub fn new(value: &T, hasher: StorageHasher) -> Self { + Self { + value: value.encode(), + hasher, + } + } + + /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. + pub fn to_bytes(&self, bytes: &mut Vec) { + match &self.hasher { + StorageHasher::Identity => bytes.extend(&self.value), + StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(bytes)), + StorageHasher::Blake2_128Concat => { + // adapted from substrate Blake2_128Concat::hash since StorageHasher is not public + let v = sp_core::blake2_128(&self.value); + let v = v.iter().chain(&self.value).cloned(); + bytes.extend(v); + } + StorageHasher::Blake2_256 => bytes.extend(sp_core::blake2_256(&self.value)), + StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(&self.value)), + StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(&self.value)), + StorageHasher::Twox64Concat => { + let v = sp_core::twox_64(&self.value); + let v = v.iter().chain(&self.value).cloned(); + bytes.extend(v); + } + } + } +} \ No newline at end of file diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 18712497ee..3168fd736c 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -4,7 +4,6 @@ use codec::{ Decode, - Encode, }; use sp_core::storage::{ StorageData, @@ -13,7 +12,6 @@ use sp_core::storage::{ pub use sp_runtime::traits::SignedExtension; use std::{ marker::PhantomData, - borrow::Cow, future::Future, }; use crate::{ @@ -28,9 +26,7 @@ use crate::{ Config, }; use derivative::Derivative; - -// We use this type a bunch, so export it from here. -pub use frame_metadata::StorageHasher; +use super::storage_address::StorageAddress; /// Query the runtime storage using [StorageClient]. /// @@ -159,10 +155,10 @@ where // is likely to actually correspond to a real storage entry or not. // if not, it means static codegen doesn't line up with runtime // metadata. - if let Some(validation_hash) = address.storage_hash { + if let Some(validation_hash) = address.validation_hash() { validate_storage( - &*address.pallet_name, - &*address.storage_name, + address.pallet_name(), + address.entry_name(), validation_hash, &client.metadata() )?; @@ -184,8 +180,8 @@ where ) -> impl Future> + 'a { let client = self.client.clone(); async move { - let pallet_name = &*address.pallet_name; - let storage_name = &*address.storage_name; + let pallet_name = address.pallet_name(); + let storage_name = address.entry_name(); // Metadata validation happens via .fetch(): if let Some(data) = client.storage().fetch(address, hash).await? { Ok(data) @@ -235,10 +231,10 @@ where // is likely to actually correspond to a real storage entry or not. // if not, it means static codegen doesn't line up with runtime // metadata. - if let Some(validation_hash) = address.storage_hash { + if let Some(validation_hash) = address.validation_hash() { validate_storage( - &*address.pallet_name, - &*address.storage_name, + address.pallet_name(), + address.entry_name(), validation_hash, &client.metadata() )?; @@ -257,10 +253,17 @@ where .expect("didn't pass a block number; qed") }; + // Strip any keys off; we want the top level entry only. + let root_addr = { + let mut a = address.to_owned(); + a.root(); + a + }; + Ok(KeyIter { client: client.storage(), - address: address.to_owned(), - hash, + address: root_addr, + block_hash: hash, count: page_size, start_key: None, buffer: Default::default(), @@ -269,150 +272,12 @@ where } } -/// This is returned from storage accesses in the statically generated -/// code, and contains the information needed to find, validate and decode -/// the storage entry. -pub struct StorageAddress <'a, ReturnTy> { - pallet_name: Cow<'a, str>, - storage_name: Cow<'a, str>, - // How to access the specific value at that storage address. - storage_entry_key: Cow<'a, StorageEntryKey>, - // Hash provided from static code for validation. - storage_hash: Option<[u8; 32]>, - _marker: std::marker::PhantomData -} - -impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { - /// Create a new [`StorageAddress`] that will be validated - /// against node metadata using the hash given. - pub fn new_with_validation( - pallet_name: impl Into>, - storage_name: impl Into>, - storage_entry_key: impl Into>, - hash: [u8; 32] - ) -> Self { - Self { - pallet_name: pallet_name.into(), - storage_name: storage_name.into(), - storage_entry_key: storage_entry_key.into(), - storage_hash: Some(hash), - _marker: std::marker::PhantomData - } - } - - /// Do not validate this storage prior to accessing it. - pub fn unvalidated(self) -> Self { - Self { - pallet_name: self.pallet_name, - storage_name: self.storage_name, - storage_entry_key: self.storage_entry_key, - storage_hash: None, - _marker: self._marker - } - } - - /// Convert this address into bytes that we can pass to a node to look up - /// the associated value at this address. - pub fn to_bytes(&self) -> Vec { - // First encode the pallet/name part: - let mut bytes = sp_core::twox_128(self.pallet_name.as_bytes()).to_vec(); - bytes.extend(&sp_core::twox_128(self.storage_name.as_bytes())[..]); - - // Then encode any additional params to dig further into the entry: - self.storage_entry_key.to_bytes(&mut bytes); - - bytes - } - - /// Take a storage address and return an owned storage address. - pub fn to_owned(self) -> StorageAddress<'static, ReturnTy> { - StorageAddress { - pallet_name: Cow::Owned(self.pallet_name.into_owned()), - storage_name: Cow::Owned(self.storage_name.into_owned()), - storage_entry_key: Cow::Owned(self.storage_entry_key.into_owned()), - storage_hash: self.storage_hash, - _marker: self._marker - } - } -} - -impl <'a, R> From<&StorageAddress<'a, R>> for StorageKey { - fn from(address: &StorageAddress<'a, R>) -> Self { - StorageKey(address.to_bytes()) - } -} - -/// Storage key. -#[derive(Clone)] -pub enum StorageEntryKey { - /// Plain key. - Plain, - /// Map key(s). - Map(Vec), -} - -impl StorageEntryKey { - /// Convert this [`StorageEntryKey`] into bytes and append them to some existing bytes. - pub fn to_bytes(&self, bytes: &mut Vec) { - if let StorageEntryKey::Map(map) = self { - for entry in map { - entry.to_bytes(bytes); - } - } - } -} - -impl <'a> From for Cow<'a, StorageEntryKey> { - fn from(k: StorageEntryKey) -> Self { - Cow::Owned(k) - } -} - -/// Storage key for a Map. -#[derive(Clone)] -pub struct StorageMapKey { - value: Vec, - hasher: StorageHasher, -} - -impl StorageMapKey { - /// Create a new [`StorageMapKey`] with the encoded data and the hasher. - pub fn new(value: &T, hasher: StorageHasher) -> Self { - Self { - value: value.encode(), - hasher, - } - } - - /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. - pub fn to_bytes(&self, bytes: &mut Vec) { - match &self.hasher { - StorageHasher::Identity => bytes.extend(&self.value), - StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(bytes)), - StorageHasher::Blake2_128Concat => { - // adapted from substrate Blake2_128Concat::hash since StorageHasher is not public - let v = sp_core::blake2_128(&self.value); - let v = v.iter().chain(&self.value).cloned(); - bytes.extend(v); - } - StorageHasher::Blake2_256 => bytes.extend(sp_core::blake2_256(&self.value)), - StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(&self.value)), - StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(&self.value)), - StorageHasher::Twox64Concat => { - let v = sp_core::twox_64(&self.value); - let v = v.iter().chain(&self.value).cloned(); - bytes.extend(v); - } - } - } -} - /// Iterates over key value pairs in a map. pub struct KeyIter { client: StorageClient, address: StorageAddress<'static, ReturnTy>, count: u32, - hash: T::Hash, + block_hash: T::Hash, start_key: Option, buffer: Vec<(StorageKey, StorageData)>, } @@ -426,7 +291,7 @@ impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode> KeyIter, ReturnTy: Decode> KeyIter Date: Mon, 11 Jul 2022 18:35:06 +0100 Subject: [PATCH 29/75] pass Defaultable/Iterable info to StorageAddress in codegen --- codegen/src/api/storage.rs | 57 +++++++++++++++++----------- subxt/src/storage/mod.rs | 2 + subxt/src/storage/storage_address.rs | 23 +++++++---- subxt/src/storage/storage_client.rs | 34 +++++++++++------ 4 files changed, 75 insertions(+), 41 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 9e540a9780..b96f247ab0 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -71,7 +71,7 @@ fn generate_storage_entry_fns( ) -> TokenStream2 { let (fields, key_impl) = match storage_entry.ty { StorageEntryType::Plain(_) => { - (vec![], quote!(::subxt::storage::StorageEntryKey::Plain)) + (vec![], quote!(::subxt::storage::address::StorageEntryKey::Plain)) } StorageEntryType::Map { ref key, @@ -92,7 +92,7 @@ fn generate_storage_entry_fns( StorageHasher::Identity => "Identity", }; let hasher = format_ident!("{}", hasher); - quote!( ::subxt::storage::StorageHasher::#hasher ) + quote!( ::subxt::storage::address::StorageHasher::#hasher ) }) .collect::>(); match key_ty.type_def() { @@ -116,10 +116,10 @@ fn generate_storage_entry_fns( .into_iter() .zip(&fields) .map(|(hasher, (field_name, _))| { - quote!( ::subxt::storage::StorageMapKey::new(#field_name, #hasher) ) + quote!( ::subxt::storage::address::StorageMapKey::new(#field_name, #hasher) ) }); quote! { - ::subxt::storage::StorageEntryKey::Map( + ::subxt::storage::address::StorageEntryKey::Map( vec![ #( #keys ),* ] ) } @@ -132,8 +132,8 @@ fn generate_storage_entry_fns( quote!( #field_name ) }); quote! { - ::subxt::storage::StorageEntryKey::Map( - vec![ ::subxt::storage::StorageMapKey::new(&(#( #items ),*), #hasher) ] + ::subxt::storage::address::StorageEntryKey::Map( + vec![ ::subxt::storage::address::StorageMapKey::new(&(#( #items ),*), #hasher) ] ) } } else { @@ -155,8 +155,8 @@ fn generate_storage_entry_fns( abort_call_site!("No hasher found for single key") }); let key_impl = quote! { - ::subxt::storage::StorageEntryKey::Map( - vec![ ::subxt::storage::StorageMapKey::new(_0, #hasher) ] + ::subxt::storage::address::StorageEntryKey::Map( + vec![ ::subxt::storage::address::StorageMapKey::new(_0, #hasher) ] ) }; (fields, key_impl) @@ -183,14 +183,6 @@ fn generate_storage_entry_fns( StorageEntryType::Map { ref value, .. } => value, }; let storage_entry_value_ty = type_gen.resolve_type_path(storage_entry_ty.id(), &[]); - let return_ty = match storage_entry.modifier { - StorageEntryModifier::Default => { - quote!( #storage_entry_value_ty ) - } - StorageEntryModifier::Optional => { - quote!( ::core::option::Option<#storage_entry_value_ty> ) - } - }; let docs = &storage_entry.docs; let docs_token = quote! { #( #[doc = #docs ] )* }; @@ -206,19 +198,40 @@ fn generate_storage_entry_fns( quote!( #field_name: & #field_ty ) }); + let is_map_type = matches!(storage_entry.ty, StorageEntryType::Map { .. }); + + // Is the entry iterable? + let iterable_type = if is_map_type { + quote!(::subxt::storage::address::AddressIsIterable) + } else { + quote!(()) + }; + + let has_default_value = match storage_entry.modifier { + StorageEntryModifier::Default => true, + StorageEntryModifier::Optional => false, + }; + + // Does the entry have a default value? + let defaultable_type = if has_default_value { + quote!(::subxt::storage::address::AddressHasDefaultValue) + } else { + quote!(()) + }; + // If the item is a map, we want a way to access the root entry to do things like iterate over it, // so expose a function to create this entry, too: - let root_entry_fn = if matches!(storage_entry.ty, StorageEntryType::Map { .. }) { + let root_entry_fn = if is_map_type { let fn_name_root = format_ident!("{}_root", fn_name); quote! ( #docs_token pub fn #fn_name_root( &self, - ) -> ::subxt::storage::StorageAddress::<'static, #return_ty> { - ::subxt::storage::StorageAddress::new_with_validation( + ) -> ::subxt::storage::address::StorageAddress::<'static, #storage_entry_value_ty, #iterable_type, #defaultable_type> { + ::subxt::storage::address::StorageAddress::new_with_validation( #pallet_name, #storage_name, - ::subxt::storage::StorageEntryKey::Plain, + ::subxt::storage::address::StorageEntryKey::Plain, [#(#storage_hash,)*] ) } @@ -233,8 +246,8 @@ fn generate_storage_entry_fns( pub fn #fn_name( &self, #( #key_args, )* - ) -> ::subxt::storage::StorageAddress::<'static, #return_ty> { - ::subxt::storage::StorageAddress::new_with_validation( + ) -> ::subxt::storage::address::StorageAddress::<'static, #storage_entry_value_ty, #iterable_type, #defaultable_type> { + ::subxt::storage::address::StorageAddress::new_with_validation( #pallet_name, #storage_name, #key_impl, diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index ac5d99bde0..2bfc29c29c 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -21,5 +21,7 @@ pub mod address { StorageEntryKey, StorageMapKey, StorageHasher, + AddressHasDefaultValue, + AddressIsIterable, }; } diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index d2e4d49bae..71ea4e30eb 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -13,24 +13,23 @@ use std::{ borrow::Cow, }; - // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; /// This is returned from storage accesses in the statically generated /// code, and contains the information needed to find, validate and decode /// the storage entry. -pub struct StorageAddress <'a, ReturnTy> { +pub struct StorageAddress <'a, ReturnTy, Iterable, Defaultable> { pallet_name: Cow<'a, str>, entry_name: Cow<'a, str>, // How to access the specific value at that storage address. storage_entry_key: StorageEntryKey, // Hash provided from static code for validation. validation_hash: Option<[u8; 32]>, - _marker: std::marker::PhantomData + _marker: std::marker::PhantomData<(ReturnTy, Iterable, Defaultable)> } -impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { +impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable, Defaultable> { /// Create a new [`StorageAddress`] that will be validated /// against node metadata using the hash given. pub fn new_with_validation( @@ -91,7 +90,7 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { } /// Take a storage address and return an owned storage address. - pub fn to_owned(self) -> StorageAddress<'static, ReturnTy> { + pub fn to_owned(self) -> StorageAddress<'static, ReturnTy, Iterable, Defaultable> { StorageAddress { pallet_name: Cow::Owned(self.pallet_name.into_owned()), entry_name: Cow::Owned(self.entry_name.into_owned()), @@ -117,8 +116,8 @@ impl <'a, ReturnTy> StorageAddress<'a, ReturnTy> { } } -impl <'a, R> From<&StorageAddress<'a, R>> for StorageKey { - fn from(address: &StorageAddress<'a, R>) -> Self { +impl <'a, ReturnTy, Iterable, Defaultable> From<&StorageAddress<'a, ReturnTy, Iterable, Defaultable>> for StorageKey { + fn from(address: &StorageAddress<'a, ReturnTy, Iterable, Defaultable>) -> Self { StorageKey(address.to_bytes()) } } @@ -186,4 +185,12 @@ impl StorageMapKey { } } } -} \ No newline at end of file +} + +/// If a [`StorageAddress`] is annotated with this, we can iterate over it. +pub struct AddressIsIterable; + + +/// If a [`StorageAddress`] is annotated with this, it has a default value +/// that we can use if it's not been set. +pub struct AddressHasDefaultValue; \ No newline at end of file diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 3168fd736c..0759d72ece 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -26,7 +26,11 @@ use crate::{ Config, }; use derivative::Derivative; -use super::storage_address::StorageAddress; +use super::storage_address::{ + StorageAddress, + AddressHasDefaultValue, + AddressIsIterable, +}; /// Query the runtime storage using [StorageClient]. /// @@ -144,9 +148,9 @@ where } /// Fetch a decoded value from storage at a given address and optional block hash. - pub fn fetch<'a, ReturnTy: Decode>( + pub fn fetch<'a, ReturnTy: Decode, Iterable, Defaultable>( &self, - address: &'a StorageAddress<'_, ReturnTy>, + address: &'a StorageAddress<'_, ReturnTy, Iterable, Defaultable>, hash: Option, ) -> impl Future, BasicError>> + 'a { let client = self.client.clone(); @@ -173,9 +177,13 @@ where } /// Fetch a StorageKey that has a default value with an optional block hash. - pub fn fetch_or_default<'a, ReturnTy: Decode>( + /// + /// Note: The [`StorageAddress`] provided must be tagged with [`AddressHasDefaultValue`] + /// in order to use this function. Statically generated storage addresses will be + /// tagged appropriately. + pub fn fetch_or_default<'a, ReturnTy: Decode, Iterable>( &self, - address: &'a StorageAddress<'_, ReturnTy>, + address: &'a StorageAddress<'_, ReturnTy, Iterable, AddressHasDefaultValue>, hash: Option, ) -> impl Future> + 'a { let client = self.client.clone(); @@ -219,12 +227,16 @@ where } /// Returns an iterator of key value pairs. - pub fn iter<'a, ReturnTy: Decode + 'static>( + /// + /// Note: The [`StorageAddress`] provided must be tagged with [`AddressIsIterable`] + /// in order to use this function. Statically generated storage addresses will be + /// tagged appropriately. + pub fn iter<'a, ReturnTy: Decode + 'static, Defaultable: 'static>( &self, - address: StorageAddress<'a, ReturnTy>, + address: StorageAddress<'a, ReturnTy, AddressIsIterable, Defaultable>, page_size: u32, hash: Option, - ) -> impl Future, BasicError>> + 'a { + ) -> impl Future, BasicError>> + 'a { let client = self.client.clone(); async move { // Metadata validation checks whether the static address given @@ -273,16 +285,16 @@ where } /// Iterates over key value pairs in a map. -pub struct KeyIter { +pub struct KeyIter { client: StorageClient, - address: StorageAddress<'static, ReturnTy>, + address: StorageAddress<'static, ReturnTy, AddressIsIterable, Defaultable>, count: u32, block_hash: T::Hash, start_key: Option, buffer: Vec<(StorageKey, StorageData)>, } -impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode> KeyIter { +impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> KeyIter { /// Returns the next key value pair from a map. pub async fn next(&mut self) -> Result, BasicError> { loop { From 6621dcfc6aede3131055a595f00552e6d50a4249 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 12 Jul 2022 15:29:40 +0100 Subject: [PATCH 30/75] fix storage validation ne, and partial run through example code --- artifacts/polkadot_metadata.scale | Bin 332025 -> 332773 bytes codegen/src/api/constants.rs | 2 +- codegen/src/api/storage.rs | 16 ++----- examples/examples/balance_transfer.rs | 4 +- .../examples/balance_transfer_with_params.rs | 4 +- .../examples/concurrent_storage_requests.rs | 8 ++++ examples/examples/custom_config.rs | 11 ++--- examples/examples/custom_type_derives.rs | 3 +- examples/examples/fetch_all_accounts.rs | 4 +- examples/examples/fetch_constants.rs | 4 +- examples/examples/fetch_staking_details.rs | 6 +-- examples/examples/metadata_compatibility.rs | 4 +- examples/examples/rpc_call.rs | 4 +- .../examples/rpc_call_subscribe_blocks.rs | 4 +- examples/examples/storage_query.rs | 21 ++++---- subxt/src/constants/constants_client.rs | 21 +++----- subxt/src/metadata/decode_with_metadata.rs | 13 +++++ subxt/src/metadata/mod.rs | 5 ++ subxt/src/storage/mod.rs | 4 +- subxt/src/storage/storage_address.rs | 45 +++--------------- subxt/src/storage/storage_client.rs | 2 +- 21 files changed, 81 insertions(+), 104 deletions(-) diff --git a/artifacts/polkadot_metadata.scale b/artifacts/polkadot_metadata.scale index f0676eace69d113cf5000ecf25ba91db748d7013..50ff19cea9cab181efd8ddb7335052f517d29c16 100644 GIT binary patch delta 8096 zcmb6;3s_ZEx@+yV4riY&=uv?HMK=iwiUgS^BqkavDgufRG=dFhA2@nA2hKyoRCLrC zEiq|_E7M9Et!s_1YtGKPJ}8;S6w4Z&s2C&j-kgzXXyQ)Z>2d$HHyTYk^Ue3|Z|}9% z|F3`j>wmAcuQ!EXc`-bsN)0G|yAFl)wS~mb_Xbqo;b_};aX9~Q)To`}lu7wMZ?)I2 zxTh$da@DOmC{C<~p%RzJp+0QK@f@DR+h`yy&5}8cqstZEfLw0O(Z0xYACA2zbs&}x z&z|;@5PHwtYSrV&ss`L;+T)`lw5=I-Ym`#u4SE7vLC!$-$y+!~D=xA3wbGqgvPWGm z`}qv5BYBY4mA6DwW=zzYmqhlTqy{QgpBk(xQ5+7R>i4sz4{^kp9#T;_b+Y2-EaW*S z6i!5lR?hWSsa}sNm%9~LmFkfF(3c;`EA(@+hgZ)WKNO3azNAV@om=kpsq?BGik3eo zCN~~!qUU_ zOJ9y+`6o$)IJipjC>5$t%U&-VBYluONA;_|WvW9o2H53VAzXWU{eiwX)vYRiwWM10 zxx5ao>9Gi{WJ8LH)X^bCvHqV5Qzqf@>cat_QUVe&sQjZKaB9FCP~0V^#D4+})xO^F zj`n4qOI!boX`}HyO0YcO@_KG)JT=Sgn@ax)N8y8U6zIz3sj%bmAgal3Z~4;M!KyOV zhmfd+Y}}D{PY;DDZm*vk)W2APzN&R@yesd9OhR!~nakk-ayS*}XPI)&aiD*1+uEW{ zPMohbZwe1joaebAD)9z!EiEQSyX%3zTJoc1H|2YmKt=8Nqd$*Np6qhK!fG|>KK#a% zf8dAZog|UNZexo$(dqK}10{a9Hvno3?}OvrO0T|Pq1xHU#*DpZfy?6oS>`#Nel;Ne zD^aDEacQ%OCxmDrgldk>#fBbd)MxQMgcC$JYfsk?lai-+JprGqEEv#^FNsb|bOt>R zQ@=GBN98L%h0F7Hywhq;+7c@+a0M#C>y~RLm)!Ahk`U-lZS|HBTJx5H24mVMTk`NL zTI%DY!;-Vy?l~%F2u#D|ngaI5$4B&uf57GUd)?p{CSbUQPM->hvdb?!Zh%rIOjkS( zw+b2piwU{|rVnW+^P;t+tJ3l5f7fPmQM(d zpNK>r)%ciPsrcnG6}&iTI(^E7EHFbyp?9{re2(Jst0q^6a~dAa?rVn9SuTHoqJ0*v z;q8YkW^kSS`^H)!HIudF<7uI?AN&x4Y6?;?8&!ZOvHdYPjMWz4J_3wvD8M7dQitkR zYD;DI>jFGn$ib|=0LNmPeN%vk)u|~JDRNqBYN~8#-k(y83n3I49UhAvrmxCAh*EOm z@=8~ErCg=d!aig$z2y+O9Ny&~=$0!%zbZrUa=JW<+ZCvl-AY9TSYDFsuk;4pjsgsG z0?Ja@zsmzb&4_PQk#CDf z;!0OVrRooGD!l84%|q|z{8OfQ01CpFm%(-+haHNoe^sRI7@E{J?^|x>= z?H6w39|#U+$YiZ=;pt& z4Htk<@%Wvp&j(U>`n**J?Z6FA04I*iq_j-+s7_b8OYzl~rhE<*dkrwxMLejE%bla% zAee%(@$9_9>c(76tfCYeTHYMDo?d0b81b{1-nyk zCdSlW%ce~5fuAi?OAJx6jx%@|rn==U?vpn#(O+HSgM12UdvF;fR&YFazKRUevjz#y z8hnub$7W%0SVl&!%cJ@rx;b4H`l-!=X6XTi{|Gd3;zUH^cd{=w3o&}*6GFO(6WKdY z3*S}d;04?!758$b*5Bjl#+LkGA+U{`Nxl>!4g_1C{Y!5od5{Q*C14^Y-?aQmrAEB~ z#d8;%9{Vs=H+abh8g1B4(5M?0f^Z3DvWKf&erQw02J|;u*r(x0aRp1^=x%6 znQLp{ z(&O?;n-w2ne_ueVhaWY-ze+^MIDWGg!NZqKC#c0}owg>T)2v}38HHQ*V+%<+#^+hw zB3SJLdvy_U;5HV!n2d{TyYZ*~R`|Lhi@i?7mV`5ZQJ6B^VgufXMFKBMj;4 zQTg>=OkC$obXn22RyIx{|1%hi(6@*P9z;X!@d(*?OZ-a|3S;SIe-DS{aWt?!&<+Q2je7XK9*Ya;yxrL%<< zWH`<=kn|^@9TJ%(-p(UZaP~G2*^hJd10Hf-h|Ik`roP`pekX9j6^W>b4GxmQ?0A3_ zgZDxE5u%8pY)FvA=&uAx5sg%DP04T^7wfx%B;imteg&C0Yuq-H!zN z0E|G1;Hl+B4*2!`b;KNr1h-l8mienB(yWojeyoTF6&@RZz;oc>@tK8}saD z({1N&ngY`sy` z-kBM#-?fGe5QOa_+y6&=2V3+r@;rWqeZQVWv50kGr%kMM9a$gQbo+&-?h#F=-rH-f zJ*M?NL(yKoDs=Z5BTeZlj_O7ux{QDJw#Cyx-M#eD2mblP){DG!nY#xK0)?j%wje0C9F@=$PgT9 zvE9zq2N|If+w@;ON$w|5;a_9q0K~POPmvV%CkDao@>8T8N9fJl$ySV`*_<8Zst{{q zyWr%{Hhn<)=nw8B7D0%!XZ?#a<+X?) zlwjkbYquRGnRCc<#3_t6+YQf=!8ncWe~#Rplm>XhSQ~-|HjCsMD@wohMnZRyyQgK^ z@c7AvK2^awt zQL#;Xe90j8-5wGSwaCC1$jht)+U&g-$ZV|YaW9hjAp>0;x5|d#;Za?+p&C|tkPKn> zzexJBU+*Jl`v*Bnn+4VKZzh4d0;UdOs}B;1y}q9mu_yKex0wgXotTG)gG9ICO)TyN zs4(p{G9TBojjxfwh_X5jAr;G8Oh!_NwT4`>Hh{WklajkC~rP%Ch@j5KCj(| z+Bs;at%G+rV049dhqI60Alv&~g)u7DfDv_?^LM{VMnGk9_DwS0*2O1u+fcU&N;^d+ z+OG34nDwp6Zo?@uLckJB)8SI=y;I~)!6LD>Z$h$1{Gpis0zc5{j0z!Run!y0=MDXe^9zP7_g_#FT?1 zmTf;R^wI5SNF){#dgy+CMzF9MXUT3UiIdoi(dgcgm{zh5-0|5~$O38XYAZ>Q#&W!L z38kA$-F=QM9+=6;vLpl#ENKTdWb3=m5v$dfV?YQTFb`gUDksSPdVxG>ZX_O@DtM8k z;2gI5BFM0boxMnoh8OS|*#ylqX&u6-s7G3deoyua#pYhL>UB2lQk_kI>;qCE5Jd{r zy4EGK*pHwTQd!q0P#}kWMC^LgN90Rlb8(vOAyCD0h$e67$6%g~ox4QZX4Du9AuyXD zv1e;_#3;3%~AMW8MS8zgPb%xD&RnS25c*m)VMiLOt< z$bbGBSqxstInclPj0~{i2G;Ky@!&?b`Wo2?8Q0oLM%~@`qlLHsbm8sh!u&%;Q3PLg zbP~tNCZlhkC!jqBOR{W7d!^gP{So^lGh-i;ey9%i88qezc610@0(6hCd;d)K3r8jG zQbUCP&7a9pijT2h|CKm~HA@gj6G2+gKs3HZIxV$I=cNl$yVN0Fk*-Rph1t775evQ| zsra6CS_21uAq&w~OJQnVZXXyjz z0UV}Z9Y9?%aB!bHnjRqR!!$Y!7wF%m(L@Y~#t~!aOB5Hs_};x#z*YMD>2!q!2ld(a z(~B6_>Iqr&4*t!YOvefE4Lm>_F-DT@)Q@q4eq=heV^V9~&VHLi>#eoc zD2k}UT61VL3(lZ(LCvRU&~cVc)+Xy3)?}r!9zT;p#@?g9H;XP1@IHNH9u2WTNJ}dO z29L0Lg*1SV>Teg)lL9`bKem9L!?=YlDx&$gmAza<2SaT8Z4ph!7j$6}%@lCEKIuWa zOaNi&579aJDw9g+HsHCbgf7Ga9B=+!%9&>k3N6Mq_Ju;LKsv=`AS6irVGg>1#EKtq z=Emt~9CQ`NX?l*6S}`807gSIi#_4Rr8k(T5sibuwICGnq$~cR~dFg5lj_;*OnB<84 zw6*UHWS6RG9L~J~TT=rt@cWm1G!@TdANlA*c%Gi&rx5}!*7JjOKY=9q{lg$*Rb=C8 zVdpOPaxHa=RU*i7rJT?DRnn*dRf1>SmF|v-H#Ygma*U`lk#Gbs7#)2`=*ho*|Hoe~_dX<8Juh-KA(kXVaxGi)n?$#G< zp>6?RXQ#H(CA=t0ZJ-(0!j?ABd&6q@POiz5`A?WyRdo)xO zl`1>$g$iqoMqh;8e5BD8puqW0(%)dvSnM|14Yk@pMyFwmzL){uF%h=m_Ci;+9~*Dc zc*Bn%OMJ9`?kUteF4{cC-zYf#1k0-6OyqY}c=)ZA*B#`QyI)T91_OS$g@WtJObiDim|xAW zpaV(9&7B7p>UD*dk>S6$XKKlE6>e1n=8|w%Y~1LTd#kDy_$j7TC@zmbkZKY%t}pc+ zFVhc&kvP{D|HEB4{-GHf&o9SkdmXBu%MTT>g$L+Ku-52pJSIk_auE6!!=R-8`J~lr@cWR1N9AklYR!LO?ryf!VS>sQ=rog`tTOI z2!j!>{SA2GGwjlD=-s$UAMh64&4YpdTS_pv{p+WJE^g6xpP`opd|Kal4tyADmyUPn ze}aQQ`7UU$g>}CRv##h*pXZaVvS;4|hC5lw`?M2Z*K>bIn~CtPO}BqQa|JjQJoF*8 zbL;eeOrL;{&<+u$g`IDwPOzr&f1sfP)FIiQ(4hi^1@%)}hv5KlJebYq1|){9?K?n1M`{sQ=sW%f z?g$Hi?lZx2n|D*FD z_&oK0bQFQ>ic{Z0SJ7j>qsanR8>d-fvFnIx=^&5{rcujlT&qHe#S1aU7h;JPK#`k8 zOFRUVL!xCQ?CN9DGM{IJF_Hx|RL?f|v6MkV_@a;H42I(7^)MK2V&Q!)Wu!^k!)p6l zc0t`7)6eo11o?h;%RO~RrSfAEjh{ZHQiVU0Ue6-c=ba0`ELC5Nv~rR$3K#U{^Wp9T zT;{Z7A8(8mKHM|XD%n$wk!f&+?sxgmOYtT~uGa^@bKt+m1t~u92K92aU0RuJ^cEN% n6x$)KES*xRz)7u;U)3wd-_?AjmMh^3yJWXSSguMdJEi{zh|Naf delta 8082 zcmbtZ3tUxIx?kU3>u}E5q8=2IqafP^#Y6^89W@`}BPB%v#TOzRI2+h@9&jEiC80O9 z%xs{OuCcPDpw?g?pE3|)8g|Y-AO+}LEih&N^Z|rG%91HlQVR>+ewQ!JP6+Qf2a%B^ z8d7H395z>>x~ORClIeu7_Q2`+gNG^kIqOQ?Ns8(#Q9Y{PnP;=xJ*wB6q}ZH-MQ$K- z?V5(n1(V`{1)hGy8I*k1aWL9U$^fD>Y#v+SvJx3MxWzK;W(&#%qGYLF)w5Q$n{KuT zDcRQ7fdm@2&bpmLuq_JPqXPY7hDl%v{OZXwi_;)Krxaxrme@2`o@P%{9I6f3CMl(= zM|0cr3e;lFb+Zz^l5Han#-=P zCqk>JNDE9t3(j=73m;kNcNVA~Lc#-8+g@DoQhtstM4qP!`Yv7aLYkmdmtAue=jM;^ zVmiy=_NsPvhZtZ0fmKicXvh!v<>ucsS$N>9n0o_pF%f~kKD`va4y1069EYAN(Cl_G z_g?3hpP20mO+E0Q5*0WTX9-kqFSy;<&&5VaEIcsznXU6S-p#;W=E_f+so61})KZ^n zkGwO!ZbrdaCGw^ZBPD|=kh$aj$~U{hOZYJ8z7W?WrAYI5eR*Do+lOYfb-kkPmT4{* zT5(ZPkyrJZ?ywy;{LnjLCMPT@QI&O}k%~JwR9R>9DusbBcg%|0@B=$1DFwp0d9I*$ zg8?3R;n~!{2cCX#f~R&!_x?B;ja}q-*+Y)b%}<);cKJM7fgf!U-n$JbuuB2$C$TfS zW`2v!&6LVlmTA5cOtW?Wgcp-oUkH5glaVRiY5Ko$n~h26(`*h$d6p{rMa%`PRV$%A z;Hw&Q$5c`sj$3ry-ouP#>^yb_Mpq4~^mOt0;n?`un%C=gU{14}IgKL?Z1Y1XSJAwR zy_?{NL#NKOx$F)VV+mow??Bh~5KY#@BxGG`^A(n0cOa*Ffu(1^QDn?p)nhAv=$3TV z>CP^-+j@74fWbtFS*jLJ^-r2kOzcFe;>3|k3C2i)s=5?^h=))*h=x7QEGTpHr>0`+ z^|dc?FI3lM*)*@pNW&w~?VQs;2-6ERuaA*K1~?o@J++Djk-O~t&T=Wn%1v1?w@(6i z5rQ15Jz3#7S@7WCSa269h`EXjlUea1;vx(Qq*D0dEV$2TR~@$U2;iS)!3a=z|HTk1 zB>*3@7=~9Ss>#L4%Gi{Ylu#slME}Wf_s;qVURF5|S)@crhf^t2+E=lVY zo8MRB_GrFx6zNm^UQD%MU$M3p%}}JdY!2;F)gI!j2=gG?CNE#)a+E8DI00LML)C9A zfoMNi^m~2}v5f!Y45R?nQ{ICjB)a~)bczte$)s6M~PrPy4G>hZWe4=5U6 zw^xc?s<=Ih-K~0EBYjAT3fqvhz*dYFEKyyTG@l4Yo8of2OL4GWDN^kQ$5;CXgBKyRK(XG?b@+w>5P=d)+fQFkK<8so(o z^laGOD3HY`ck2s|4$P$|X`tiSpvvXTRIRwgx5WLBs?Kt&MMYYnrn-DArfao_XoSr1 zg`x++%%>Kso@nUqB#;>DL9Z3=g_sQ0Q-J0nfHp0*`7kE-fu+Fh#+GQiTI^9(6PWyy z2w7nyM9MXiT)uifeHLu`)%o-b0F_@zr)xpunG31Ssu?Z4ghQ0m$QI)^gp?T}TBN4f zlsNhIg>;d*Ot5zviJxaIqDfHBD;Ck!*7Dx?je!atmqF9zO*odBEQD;~YcpsTY~#%t zGy#jRGU%W|JFu6CKdIVC@Ig{yAv<|&CS7daE!y`O$sS&wNq-~P1iSY}lUn{j7TpDP zq8QA-$f7d`91^7UMuLx!wvQa<4=$#a@P>YLF>N)%5&l9BEgjJq?EYCIX%h6!MuLwJ zIhm4E!M7G;B5C0%tLSLyoH6iGyp@0dD{9s&SJ4LnTKUmjlzWjcTTSh7nZLQ3PPAUW zs}+KQmy|~bz!iN)9!;axwq9w6oD4bOY7Ylo6?&c|9sFVeO&)N~NKE7+pvkTofi1y; z#}=Z4JNfg4bOzkue=MY#*3Mp~1T)5ZqgR@ton5g2rdzQ9CRC- ziQq$6xFw#D2=QiWk0w$4q)I;lE3Yr2OCXkq6;l-ptXcV%V#=e2nQ+^H@KrvwD=jeA zhVii_v=9;m*+BkpC3Gf?;-8n$X)u$kbjsIvpEyvWvB8E4ur+HK}h4ZoN>EJ-c472`l zIn7{_6Sr$~V)(ZeG#pIa^f;Z)XR6c%WxVxqy3Ojpt4sk$JWxpoO64Y=GaH8T=|HqyF#7KF|=HpfD@FSWGPK*}9EiBMVF}qi6ruV^aee-6T zB*7kDzm@)0sxk4D;nE$~`Xwq!EQ< zzBYDEu3{V2r$q*hcf4Q z&JJ2Vx>c}0hd2@Bbs2eG?w!|_E?#XtcwOPMpQVq>ZGzVo6S->Q8{?&@kg8uiOMQ~u z5oC|+#WlXBnjY%gDeB?%j6{7>bKf)CD*DCI^n?XHR!;fSbIGfbMf1Q+LYTj|vKNy<_Lw^V*; zAB`S72bmD@C#9JQKB&P?gN3Ax|#DT@x!6oizG2k1d8f&{Y<(lpR^HPE5@&koW_VFR6lxD3yoL9rIi zjLUh|+jJ<$?tXmuFX_qt<$|QuKq^Ezjq;5R^gf>0Kv%#PWR$2MXrT83F5SUldmE@6 z_|9S0afRG!mUfr}aqejT@>_H%RP$?ZQQydF!DgqK;DZy@V7HmzgG;)Z;Db%A216LB z(UILj$y_VCP=h)Y6~~`_mzufb9fbWu{F!&?{pLfWyWULdZ*{l7gIHH`47Il&!?zvB z(1I(D(f;rT*N)M6ES^0^=ZrfdMmCyBqq%3YHkt28)+QvxWNiw~B=%hz3y1jw@6zEB z&4NW4kW->;F_V^VCDPy=KmRTr1LwM1Wd5TjItN;@K9p~4reS<{6V-9kka?WOn=c9m zm(Aqzt?pNk)Ai;nqJ0aHwp;CUe@9>Ja~0c}sSGTn<5o|^2|5z4@yRFXB=a>fu+vOB zZ*{+Xf=-ujh;|$ea?mZ`;}FRZdY{ou@0H9lhXxueG;~OPWnTSus1l|}{GLWIIYP$q zQ8J0@qDwnX$KopT*lEm+3jWj6bi8a8B(XAym3iq~(qP_xnyv^RhK)kuM3N9<8o02w zuU>hEMuIdd#4DgYZs7WRbe}v%aHs<^wnxX4E%XVId+*~iFo7?9pC-tY1=%#2OzRT# z%KJ1YGF3FrkqJI1(1IRH>k_Cu-cO%=mVOu}rwf`?N-{$epLl_e!p&>`1-c67aO47p zNH+iYLU2is_z-Pc%O`(G--yf(vZiE3h;==X+z^AIf1-7gt;<-J3zCJK7SM2Ax=3>+ z%)9)L=o6AAizPC!Xp2=Jbcwc6*(tbP3?pTtBax5$gnm5VALNWjYEq7G6!%V~LdK_O zfNqlS2+&PPi~%YNgrYJ$OKb^B7*m%i!y}I@z@BtsH3QQ3vT;^ zou_1$1XuVsGMgf`$=o_0S!eZOV_E&gqA2t{|^rL-PxS1{Ae)J*zy-3yqQu}cJ z+CA)b2-g=6V%lIVkBnun)5@eC2ggj~Duxre?f2O0--i*v`={X5LaEzP?s7ZvmI)8o zw$SOiwA7*D30iaEVH~d|#oYxKcxV)-?a;w`UGQ+4oU}l775hqphg2c!!I}M+-zF?r z`Tq)Y1cmTNCa`!|p;t{{iGU~5Hzu+J4AlMh2XJrT*VSq4Q3F)ymu9jL05<9RY&J-g zXXdbp5|&}}*iL{g`b%kSBEU}l?8D3pxObepfLVZUGS={w>1>B_lQEhRX5)G3%*u@m z*<#G)oP}(nq1sqy+{huEDf+J$vO@rebbAI{Cc$C-%`6sXz(wNNGBzB;>eFS+2aWow zXAjnV4Wic2SD|6XoxTrs$%ceH11B+d>me z=Y^^h_1qFx0WewrP-8}bY5HH*Ff%|ZKl21j&<8kJW!SxQO#NbJ;TM5I%>msn(ed4T zcQ24M-r!-6L%KfB%SHiY@>M=GVRm=x0KaHm!KbceDUi#ZYuReZ)laTvQ4&>6n}r_3 zbVE7YPVxSrdIJt^=gk|?L{2`vf)$y{Ola^8N(QfaghlhJ3KqtHU%~o-pMOxnmO;6m z{5ZQG5N8W2*=vZpVH?>}^k?oyW)S`?+{C^UTZ#N9*f4~te|dr}Krq7j{Ws#!@y%=n zo(q&MYy{NkbGNXC0QG#=R(28(^o38d90tw&?d>cU{c~|UdlxNBj3!BzfDHA|o! zrfd9H)ocQE>VK_f4hc`j%bsUz#9s8+^K1$h-#^cOjL|o7CvyQRSG$XyKvi9wJ&Li| z#@TUzzWf)v*){akzrMicf?5Ca1ypLV)jYzoL@V_|@ZS{t$FwxW$LhA1SS!Wd<^y|$ zz6t#48kPWK_%CW$K8)2PUS&Hex^jOls|NJS_Yg!`((d3(BS>Oxb<`U@ask)-sqi226%_J*5>f5 zcw>*(kah*Ba`HnOr@4yUQ>J+R1y0SE*UcpZ~2R~;we*ZH%@-8e(LA!LJy;b;7p|5L}K~wrolo0 zq$C!U`&93!TLuue=`qp&s|E4;T%ag^;6T>uKeu2?4+|zkraAuRRW;mv3y&99*9+Zt z)hnWkWb>AKb`;a}xnHskn4kR{nAQ($yu6V;1e$)d5i<^)`pI|Ldw{98=Ut5Favt8q zwu@a_6Z-^@{1wMpIc(v7KhE~UHvN^~v6X-s_st1}p&GutnT-ppHRG|($s?NBK>f95 z_6$Isp7IAq0gmY7PqNPdn)TSz>@O0W(xHVd7gu2`-)FzX1+ec~jP7RcI?MJ!n?CT5 zV$fAS=o~8D!Ox##SK)?!`~%iVC6M)P7g)L!W{??)*Z7VLY@FWjB5MUq&(HqMp2Om? zj}Ua5`NNl35oTQdB^EA0U;V9*S)2qB`ky~xm57!4>i=Xu1FCfPbFpR&(+^x_CXsLr zU*eiPieLJYeH=Chg%AgCY-dCCzkJ2sq?n0&|Hl4+M?A;Z>`fd!>Kb!NDD0l-gBxLWwb@{m(4Fi17~&B>_w+H` zhm$$c$FNi^n{j;&=$&f5zMr80SIZCk8U6sc6z;cRbM3AOLjkRo>$ndrpoIQKaK{2mFZPD{qzK6T7(=s+Z*rNx@nOJ}{DAA7~gd cq)py1FTOV diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index 16d696c238..cda9312e84 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -63,7 +63,7 @@ pub fn generate_constants( quote! { #( #[doc = #docs ] )* - pub fn #fn_name(&self) -> ::subxt::constants::ConstantAddress<'static, #return_ty> { + pub fn #fn_name(&self) -> ::subxt::constants::ConstantAddress<'static, ::subxt::metadata::DecodeStaticType<#return_ty>> { ::subxt::constants::ConstantAddress::new_with_validation( #pallet_name, #constant_name, diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index b96f247ab0..a243b1c914 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -71,7 +71,7 @@ fn generate_storage_entry_fns( ) -> TokenStream2 { let (fields, key_impl) = match storage_entry.ty { StorageEntryType::Plain(_) => { - (vec![], quote!(::subxt::storage::address::StorageEntryKey::Plain)) + (vec![], quote!(vec![])) } StorageEntryType::Map { ref key, @@ -119,9 +119,7 @@ fn generate_storage_entry_fns( quote!( ::subxt::storage::address::StorageMapKey::new(#field_name, #hasher) ) }); quote! { - ::subxt::storage::address::StorageEntryKey::Map( - vec![ #( #keys ),* ] - ) + vec![ #( #keys ),* ] } } else if hashers.len() == 1 { // If there is one hasher, then however many fields we have, we want to hash a @@ -132,9 +130,7 @@ fn generate_storage_entry_fns( quote!( #field_name ) }); quote! { - ::subxt::storage::address::StorageEntryKey::Map( - vec![ ::subxt::storage::address::StorageMapKey::new(&(#( #items ),*), #hasher) ] - ) + vec![ ::subxt::storage::address::StorageMapKey::new(&(#( #items ),*), #hasher) ] } } else { // If we hit this condition, we don't know how to handle the number of hashes vs fields @@ -155,9 +151,7 @@ fn generate_storage_entry_fns( abort_call_site!("No hasher found for single key") }); let key_impl = quote! { - ::subxt::storage::address::StorageEntryKey::Map( - vec![ ::subxt::storage::address::StorageMapKey::new(_0, #hasher) ] - ) + vec![ ::subxt::storage::address::StorageMapKey::new(_0, #hasher) ] }; (fields, key_impl) } @@ -231,7 +225,7 @@ fn generate_storage_entry_fns( ::subxt::storage::address::StorageAddress::new_with_validation( #pallet_name, #storage_name, - ::subxt::storage::address::StorageEntryKey::Plain, + Vec::new(), [#(#storage_hash,)*] ) } diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index 112557ea79..2bcf765a46 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index 83287fd468..9dc8eb64ab 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/concurrent_storage_requests.rs b/examples/examples/concurrent_storage_requests.rs index 5bf5a7fe5b..01dba1e36f 100644 --- a/examples/examples/concurrent_storage_requests.rs +++ b/examples/examples/concurrent_storage_requests.rs @@ -2,6 +2,14 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + use futures::join; use sp_keyring::AccountKeyring; use subxt::{ diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index fda64cfeac..64f590ee96 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -2,13 +2,8 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. -//! -//! E.g. -//! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location -//! polkadot --dev --tmp -//! ``` +//! This example should compile but should aos fail to work, since we've modified the +//! config to not align with a Polkadot node. use sp_keyring::AccountKeyring; use subxt::{ @@ -45,7 +40,7 @@ impl Config for MyConfig { type Header = ::Header; type Signature = ::Signature; type Extrinsic = ::Extrinsic; - // ExtrinsicParams makes use of the index type, so we need to adjust them + // ExtrinsicParams makes use of the index type, so we need to adjust it // too to align with our modified index type, above: type ExtrinsicParams = SubstrateExtrinsicParams; } diff --git a/examples/examples/custom_type_derives.rs b/examples/examples/custom_type_derives.rs index e972ad7a88..ac73aed6c7 100644 --- a/examples/examples/custom_type_derives.rs +++ b/examples/examples/custom_type_derives.rs @@ -2,8 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. - +//! Example verified against polkadot polkadot 0.9.25-5174e9ae75b. #![allow(clippy::redundant_clone)] #[subxt::subxt( diff --git a/examples/examples/fetch_all_accounts.rs b/examples/examples/fetch_all_accounts.rs index fe9eab3235..a34af6d63d 100644 --- a/examples/examples/fetch_all_accounts.rs +++ b/examples/examples/fetch_all_accounts.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/fetch_constants.rs b/examples/examples/fetch_constants.rs index 4804f9f270..6868ed2d5a 100644 --- a/examples/examples/fetch_constants.rs +++ b/examples/examples/fetch_constants.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index db25a61030..a3aa1ffa22 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` @@ -38,7 +38,7 @@ async fn main() -> Result<(), Box> { let active_era_addr = polkadot::storage() .staking() .active_era(); - let era = api.storage().fetch(&active_era_addr, None).await?.unwrap().unwrap(); + let era = api.storage().fetch(&active_era_addr, None).await?.unwrap(); println!( "Staking active era: index: {:?}, start: {:?}", era.index, era.start diff --git a/examples/examples/metadata_compatibility.rs b/examples/examples/metadata_compatibility.rs index de5113e73c..7463d6a3b8 100644 --- a/examples/examples/metadata_compatibility.rs +++ b/examples/examples/metadata_compatibility.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/rpc_call.rs b/examples/examples/rpc_call.rs index 59cc4a9a16..e0590c91f1 100644 --- a/examples/examples/rpc_call.rs +++ b/examples/examples/rpc_call.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/rpc_call_subscribe_blocks.rs b/examples/examples/rpc_call_subscribe_blocks.rs index 8f78761776..7baf533b2a 100644 --- a/examples/examples/rpc_call_subscribe_blocks.rs +++ b/examples/examples/rpc_call_subscribe_blocks.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-f6d6ab005d-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_query.rs index d6521366e5..ea5f306147 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_query.rs @@ -2,21 +2,22 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` use codec::Decode; use subxt::{ - rpc::Rpc, storage::{ - StorageClient, - StorageEntryKey, - StorageMapKey, + StorageKey, + address::{ + StorageMapKey, + StorageHasher, + } }, OnlineClient, PolkadotConfig, @@ -105,17 +106,17 @@ async fn main() -> Result<(), Box> { // ``` // while `XcmVersion` is `u32`. // Pass `2` as `XcmVersion` and concatenate the key to the prefix. - StorageEntryKey::Map(vec![StorageMapKey::new( + StorageMapKey::new( &2u32, - ::subxt::storage::StorageHasher::Twox64Concat, - )]).to_bytes(&mut query_key); + StorageHasher::Twox64Concat, + ).to_bytes(&mut query_key); // The final query key is: // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(2u32) ++ 2u32` println!("\nExample 4\nQuery key: 0x{}", hex::encode(&query_key)); let keys = rpc - .storage_keys_paged(query_key, 10, None, None) + .storage_keys_paged(StorageKey(query_key), 10, None, None) .await?; println!("Obtained keys:"); diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index c18b37dfa7..bbe326cbbd 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -2,15 +2,16 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use codec::Decode; use super::ConstantAddress; use crate::{ Config, client::OfflineClientT, error::BasicError, - metadata::MetadataError, + metadata::{ + MetadataError, + DecodeWithMetadata, + }, }; -use scale_value::{ Value, scale::TypeId }; use derivative::Derivative; /// A client for accessing constants. @@ -29,19 +30,10 @@ impl ConstantsClient { } impl > ConstantsClient { - /// Access a constant, returning a [`Value`] type representing it. - pub fn value_at(&self, pallet_name: &str, constant_name: &str) -> Result, BasicError> { - let metadata = self.client.metadata(); - let pallet = metadata.pallet(&pallet_name)?; - let constant = pallet.constant(&constant_name)?; - let val = scale_value::scale::decode_as_type(&mut &*constant.value, constant.ty.id(), metadata.types())?; - Ok(val) - } - /// Access the constant at the address given, returning the type defined by this address. /// This is probably used with addresses given from static codegen, although you can manually /// construct your own, too. - pub fn at(&self, address: &ConstantAddress<'_, ReturnTy>) -> Result { + pub fn at(&self, address: &ConstantAddress<'_, ReturnTy>) -> Result { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: @@ -55,8 +47,7 @@ impl > ConstantsClient { // 2. Attempt to decode the constant into the type given: let pallet = metadata.pallet(address.pallet_name())?; let constant = pallet.constant(address.constant_name())?; - let value = codec::Decode::decode(&mut &constant.value[..])?; + let value = ReturnTy::decode_with_metadata(&mut &*constant.value, constant.ty.id(), &metadata)?; Ok(value) } - } diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs index 4c9862e611..749c9a645a 100644 --- a/subxt/src/metadata/decode_with_metadata.rs +++ b/subxt/src/metadata/decode_with_metadata.rs @@ -8,8 +8,11 @@ use super::{ use crate::{ error::BasicError, }; +use codec::Decode; +/// This trait is implemented for types which can be decoded with the help of metadata. pub trait DecodeWithMetadata: Sized { + /// The type that we'll get back from decoding. type Target; /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. fn decode_with_metadata(bytes: &mut &[u8], type_id: u32, metadata: &Metadata) -> Result; @@ -24,3 +27,13 @@ impl DecodeWithMetadata for scale_value::Value { } } +/// Any type implementing [`Decode`] can also be decoded with the help of metadata. +pub struct DecodeStaticType(std::marker::PhantomData); + +impl DecodeWithMetadata for DecodeStaticType { + type Target = T; + + fn decode_with_metadata(bytes: &mut &[u8], _type_id: u32, _metadata: &Metadata) -> Result { + T::decode(bytes).map_err(|e| e.into()) + } +} diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index bdfd7c79e8..f7b3701a5c 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -28,3 +28,8 @@ pub use encode_with_metadata::{ EncodeDynamicCall, EncodeWithMetadata, }; + +pub use decode_with_metadata::{ + DecodeWithMetadata, + DecodeStaticType, +}; \ No newline at end of file diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index 2bfc29c29c..ebea660baf 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -13,12 +13,14 @@ pub use storage_client::{ SignedExtension, }; +// Re-export as this is used in the public API: +pub use sp_core::storage::StorageKey; + /// Types representing an address which describes where a storage /// entry lives and how to properly decode it. pub mod address { pub use super::storage_address::{ StorageAddress, - StorageEntryKey, StorageMapKey, StorageHasher, AddressHasDefaultValue, diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 71ea4e30eb..16c0e877e3 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -23,7 +23,7 @@ pub struct StorageAddress <'a, ReturnTy, Iterable, Defaultable> { pallet_name: Cow<'a, str>, entry_name: Cow<'a, str>, // How to access the specific value at that storage address. - storage_entry_key: StorageEntryKey, + storage_entry_key: Vec, // Hash provided from static code for validation. validation_hash: Option<[u8; 32]>, _marker: std::marker::PhantomData<(ReturnTy, Iterable, Defaultable)> @@ -35,7 +35,7 @@ impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable pub fn new_with_validation( pallet_name: impl Into>, storage_name: impl Into>, - storage_entry_key: StorageEntryKey, + storage_entry_key: Vec, hash: [u8; 32] ) -> Self { Self { @@ -61,19 +61,12 @@ impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable /// Strip any map keys from a storage entry. If the storage entry is pointing at /// a plain, non-map storage value, then this will have no effect. pub fn root(&mut self) { - self.storage_entry_key = StorageEntryKey::Plain.into(); + self.storage_entry_key.clear(); } /// Append a map key to the existing storage address. pub fn append_map_key(&mut self, key: StorageMapKey) { - match &mut self.storage_entry_key { - StorageEntryKey::Plain => { - self.storage_entry_key = StorageEntryKey::Map(vec![key]); - }, - StorageEntryKey::Map(keys) => { - keys.push(key); - } - } + self.storage_entry_key.push(key); } /// Convert this address into bytes that we can pass to a node to look up @@ -84,7 +77,9 @@ impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable bytes.extend(&sp_core::twox_128(self.entry_name.as_bytes())[..]); // Then encode any additional params to dig further into the entry: - self.storage_entry_key.to_bytes(&mut bytes); + for entry in &self.storage_entry_key { + entry.to_bytes(&mut bytes); + } bytes } @@ -122,32 +117,6 @@ impl <'a, ReturnTy, Iterable, Defaultable> From<&StorageAddress<'a, ReturnTy, It } } -/// Storage key. -#[derive(Clone)] -pub enum StorageEntryKey { - /// Plain key. - Plain, - /// Map key(s). - Map(Vec), -} - -impl StorageEntryKey { - /// Convert this [`StorageEntryKey`] into bytes and append them to some existing bytes. - pub fn to_bytes(&self, bytes: &mut Vec) { - if let StorageEntryKey::Map(map) = self { - for entry in map { - entry.to_bytes(bytes); - } - } - } -} - -impl <'a> From for Cow<'a, StorageEntryKey> { - fn from(k: StorageEntryKey) -> Self { - Cow::Owned(k) - } -} - /// Storage key for a Map. #[derive(Clone)] pub struct StorageMapKey { diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 0759d72ece..92d4ee3389 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -337,7 +337,7 @@ fn validate_storage(pallet_name: &str, storage_name: &str, hash: [u8; 32], metad Ok(hash) => hash, Err(e) => return Err(e.into()) }; - match expected_hash != hash { + match expected_hash == hash { true => Ok(()), false => Err(crate::error::MetadataError::IncompatibleMetadata.into()) } From e1af0f795339b5082c27d12f1a8c9703ff796bf8 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 12 Jul 2022 21:34:21 +0100 Subject: [PATCH 31/75] Remove static iteration and strip a generic param from everything --- codegen/src/api/calls.rs | 2 +- examples/examples/submit_and_watch.rs | 4 +- examples/examples/subscribe_all_events.rs | 20 +- examples/examples/subscribe_one_event.rs | 6 +- .../examples/subscribe_runtime_updates.rs | 4 +- examples/examples/subscribe_some_events.rs | 6 +- subxt/src/events/event_subscription.rs | 25 +- subxt/src/events/events_client.rs | 39 +-- subxt/src/events/events_type.rs | 285 ++---------------- subxt/src/events/filter_events.rs | 30 +- subxt/src/events/mod.rs | 3 +- subxt/src/extrinsic/transaction.rs | 81 ++--- subxt/src/extrinsic/tx_client.rs | 54 ++-- 13 files changed, 135 insertions(+), 424 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 8c54ac502f..122fd3b118 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -96,7 +96,7 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> ::subxt::extrinsic::SubmittableExtrinsic<::subxt::metadata::EncodeStaticCall<#struct_name>, DispatchError, root_mod::Event> { + ) -> ::subxt::extrinsic::SubmittableExtrinsic<::subxt::metadata::EncodeStaticCall<#struct_name>, DispatchError> { ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( ::subxt::metadata::EncodeStaticCall { pallet: #pallet_name, diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index e699005c52..eb8c810902 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs index 8943d27268..ef926ad3bd 100644 --- a/examples/examples/subscribe_all_events.rs +++ b/examples/examples/subscribe_all_events.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` @@ -32,7 +32,7 @@ async fn main() -> Result<(), Box> { let api = OnlineClient::::new().await?; // Subscribe to any events that occur: - let mut event_sub = api.events().subscribe::().await?; + let mut event_sub = api.events().subscribe().await?; // While this subscription is active, balance transfers are made somewhere: tokio::task::spawn({ @@ -63,17 +63,9 @@ async fn main() -> Result<(), Box> { let events = events?; let block_hash = events.block_hash(); - // We can iterate, statically decoding all events if we want: - println!("All events in block {block_hash:?}:"); - println!(" Static event details:"); - for event in events.iter() { - let event = event?; - println!(" {event:?}"); - } - - // Or we can dynamically decode events: + // We can dynamically decode events: println!(" Dynamic event details: {block_hash:?}:"); - for event in events.iter_raw() { + for event in events.iter() { let event = event?; let is_balance_transfer = event .as_event::()? @@ -85,7 +77,7 @@ async fn main() -> Result<(), Box> { ); } - // Or we can dynamically find the first transfer event, ignoring any others: + // Or we can find the first transfer event, ignoring any others: let transfer_event = events.find_first::()?; diff --git a/examples/examples/subscribe_one_event.rs b/examples/examples/subscribe_one_event.rs index d8ee407884..8bdc625a98 100644 --- a/examples/examples/subscribe_one_event.rs +++ b/examples/examples/subscribe_one_event.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` @@ -35,7 +35,7 @@ async fn main() -> Result<(), Box> { // to select a single event type (note the 1-tuple) to filter out and return. let mut transfer_events = api .events() - .subscribe::() + .subscribe() .await? .filter_events::<(polkadot::balances::events::Transfer,)>(); diff --git a/examples/examples/subscribe_runtime_updates.rs b/examples/examples/subscribe_runtime_updates.rs index d216d6ed83..af77ce9bee 100644 --- a/examples/examples/subscribe_runtime_updates.rs +++ b/examples/examples/subscribe_runtime_updates.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-f6d6ab005d-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/subscribe_some_events.rs b/examples/examples/subscribe_some_events.rs index 5014cbe7fa..529a304efd 100644 --- a/examples/examples/subscribe_some_events.rs +++ b/examples/examples/subscribe_some_events.rs @@ -2,11 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.18-4542a603cc-aarch64-macos. +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` @@ -34,7 +34,7 @@ async fn main() -> Result<(), Box> { // Subscribe to several balance related events. If we ask for more than one event, // we'll be given a correpsonding tuple of `Option`'s, with exactly one // variant populated each time. - let mut balance_events = api.events().subscribe::().await?.filter_events::<( + let mut balance_events = api.events().subscribe().await?.filter_events::<( polkadot::balances::events::Withdraw, polkadot::balances::events::Transfer, polkadot::balances::events::Deposit, diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index f3335286bd..86c2258641 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -12,7 +12,6 @@ use crate::{ }, events::EventsClient, }; -use codec::Decode; use derivative::Derivative; use futures::{ stream::BoxStream, @@ -29,11 +28,10 @@ use std::{ }; pub use super::{ - EventDetails, EventFilter, Events, FilterEvents, - RawEventDetails, + EventDetails, }; /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back @@ -49,21 +47,20 @@ pub type EventSub = Subscription; /// A subscription to events that implements [`Stream`], and returns [`Events`] objects for each block. #[derive(Derivative)] #[derivative(Debug(bound = "Sub: std::fmt::Debug, Client: std::fmt::Debug"))] -pub struct EventSubscription { +pub struct EventSubscription { finished: bool, client: Client, block_header_subscription: Sub, #[derivative(Debug = "ignore")] at: Option< std::pin::Pin< - Box, BasicError>> + Send>, + Box, BasicError>> + Send>, >, >, - _event_type: std::marker::PhantomData, } -impl> - EventSubscription +impl> + EventSubscription where Sub: Stream> + Unpin, { @@ -75,7 +72,6 @@ where client: client, block_header_subscription, at: None, - _event_type: std::marker::PhantomData, } } @@ -86,8 +82,8 @@ where } } -impl<'a, T: Config, Client, Sub: Unpin, Evs: Decode> Unpin - for EventSubscription +impl<'a, T: Config, Client, Sub: Unpin> Unpin + for EventSubscription { } @@ -108,15 +104,14 @@ impl<'a, T: Config, Client, Sub: Unpin, Evs: Decode> Unpin // // The advantage of this manual implementation is that we have a named type that we (and others) // can derive things on, store away, alias etc. -impl Stream for EventSubscription +impl Stream for EventSubscription where T: Config, Client: OnlineClientT, Sub: Stream> + Unpin, - Evs: Decode, E: Into, { - type Item = Result, BasicError>; + type Item = Result, BasicError>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -174,7 +169,6 @@ mod test { crate::SubstrateConfig, (), EventSub<::Header>, - (), >, >(); assert_send::< @@ -182,7 +176,6 @@ mod test { crate::SubstrateConfig, (), FinalizedEventSub<::Header>, - (), >, >(); } diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index d86d5949e4..61fa8a5511 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -2,7 +2,6 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use codec::Decode; use futures::{ future::Either, stream, @@ -55,17 +54,11 @@ where T: Config, Client: OnlineClientT { - /// Obtain events at some block hash. The generic parameter is what we - /// will attempt to decode each event into if using [`crate::events::Events::iter()`], - /// and is expected to be the outermost event enum that contains all of - /// the possible events across all pallets. - pub fn at( + /// Obtain events at some block hash. + pub fn at( &self, block_hash: T::Hash, - ) -> impl Future, BasicError>> + Send + 'static - where - Evs: Decode, - { + ) -> impl Future, BasicError>> + Send + 'static { // Clone and pass the client in like this so that we can explicitly // return a Future that's Send + 'static, rather than tied to &self. let client = self.client.clone(); @@ -78,11 +71,9 @@ where /// /// **Note:** these blocks haven't necessarily been finalised yet; prefer /// [`Events::subscribe_finalized()`] if that is important. - pub fn subscribe( + pub fn subscribe( &self - ) -> impl Future, Evs>, BasicError>> + Send + 'static - where - Evs: Decode + 'static + ) -> impl Future>, BasicError>> + Send + 'static { let client = self.client.clone(); async move { @@ -91,12 +82,11 @@ where } /// Subscribe to events from finalized blocks. - pub async fn subscribe_finalized( + pub async fn subscribe_finalized( &self, - ) -> impl Future, Evs>, BasicError>> + Send + 'static + ) -> impl Future>, BasicError>> + Send + 'static where Client: Send + Sync + 'static, - Evs: Decode + 'static { let client = self.client.clone(); async move { @@ -123,14 +113,13 @@ where } } -async fn at( +async fn at( client: Client, block_hash: T::Hash, -) -> Result, BasicError> +) -> Result, BasicError> where T: Config, Client: OnlineClientT, - Evs: Decode, { let event_bytes = client .rpc() @@ -146,26 +135,24 @@ where )) } -async fn subscribe( +async fn subscribe( client: Client -) -> Result, Evs>, BasicError> +) -> Result>, BasicError> where T: Config, Client: OnlineClientT, - Evs: Decode + 'static { let block_subscription = client.rpc().subscribe_blocks().await?; Ok(EventSubscription::new(client, block_subscription)) } /// Subscribe to events from finalized blocks. -async fn subscribe_finalized( +async fn subscribe_finalized( client: Client, -) -> Result, Evs>, BasicError> +) -> Result>, BasicError> where T: Config, Client: OnlineClientT, - Evs: Decode + 'static { // fetch the last finalised block details immediately, so that we'll get // events for each block after this one. diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 8002f593dc..a983926c53 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -25,7 +25,7 @@ use super::{ /// information needed to decode and iterate over them. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct Events { +pub struct Events { metadata: Metadata, block_hash: T::Hash, // Note; raw event bytes are prefixed with a Compact containing @@ -33,10 +33,9 @@ pub struct Events { // before storing the bytes here. event_bytes: Vec, num_events: u32, - _event_type: std::marker::PhantomData, } -impl<'a, T: Config, Evs: Decode> Events { +impl<'a, T: Config> Events { pub (crate) fn new( metadata: Metadata, block_hash: T::Hash, @@ -59,7 +58,6 @@ impl<'a, T: Config, Evs: Decode> Events { block_hash, event_bytes, num_events, - _event_type: std::marker::PhantomData } } @@ -79,69 +77,12 @@ impl<'a, T: Config, Evs: Decode> Events { self.block_hash } - /// Iterate over the events, statically decoding them as we go. - /// If an event is encountered that cannot be statically decoded, - /// a [`codec::Error`] will be returned. - /// - /// If the generated code does not know about all of the pallets that exist - /// in the runtime being targeted, it may not know about all of the - /// events either, and so this method should be avoided in favout of [`Events::iter_raw()`], - /// which uses runtime metadata to skip over unknown events. - pub fn iter( - &self, - ) -> impl Iterator, BasicError>> + '_ { - let event_bytes = &self.event_bytes; - - let mut pos = 0; - let mut index = 0; - std::iter::from_fn(move || { - let cursor = &mut &event_bytes[pos..]; - let start_len = cursor.len(); - - if start_len == 0 || self.num_events == index { - None - } else { - let mut decode_one_event = || -> Result<_, BasicError> { - let phase = Phase::decode(cursor)?; - let ev = Evs::decode(cursor)?; - let _topics = Vec::::decode(cursor)?; - Ok((phase, ev)) - }; - match decode_one_event() { - Ok((phase, event)) => { - // Skip over decoded bytes in next iteration: - pos += start_len - cursor.len(); - // Gather the event details before incrementing the index for the next iter. - let res = Some(Ok(EventDetails { - phase, - index, - event, - })); - index += 1; - res - } - Err(e) => { - // By setting the position to the "end" of the event bytes, - // the cursor len will become 0 and the iterator will return `None` - // from now on: - pos = event_bytes.len(); - Some(Err(e)) - } - } - } - }) - } - /// Iterate over all of the events, using metadata to dynamically /// decode them as we go, and returning the raw bytes and other associated /// details. If an error occurs, all subsequent iterations return `None`. - /// - /// This method is safe to use even if you do not statically know about - /// all of the possible events; it splits events up using the metadata - /// obtained at runtime, which does. - pub fn iter_raw( + pub fn iter( &self, - ) -> impl Iterator> + '_ { + ) -> impl Iterator> + '_ { let event_bytes = &self.event_bytes; let metadata = self.metadata.clone(); @@ -179,15 +120,11 @@ impl<'a, T: Config, Evs: Decode> Events { /// decode them as we go, and returning the raw bytes and other associated /// details. If an error occurs, all subsequent iterations return `None`. /// - /// This method is safe to use even if you do not statically know about - /// all of the possible events; it splits events up using the metadata - /// obtained at runtime, which does. - /// - /// Unlike [`Events::iter_raw()`] this consumes `self`, which can be useful + /// Unlike [`Events::iter()`] this consumes `self`, which can be useful /// if you need to store the iterator somewhere and avoid lifetime issues. - pub fn into_iter_raw( + pub fn into_iter( self, - ) -> impl Iterator> + 'a { + ) -> impl Iterator> + 'a { let mut pos = 0; let mut index = 0; let metadata = self.metadata.clone(); @@ -226,7 +163,7 @@ impl<'a, T: Config, Evs: Decode> Events { /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to /// use even if you do not statically know about all of the possible events. pub fn find(&self) -> impl Iterator> + '_ { - self.iter_raw().filter_map(|ev| { + self.iter().filter_map(|ev| { ev.and_then(|ev| ev.as_event::().map_err(Into::into)) .transpose() }) @@ -250,24 +187,13 @@ impl<'a, T: Config, Evs: Decode> Events { } } -/// A decoded event and associated details. -#[derive(Debug, Clone, PartialEq)] -pub struct EventDetails { - /// During which [`Phase`] was the event produced? - pub phase: Phase, - /// What index is this event in the stored events for this block. - pub index: u32, - /// The event itself. - pub event: Evs, -} - /// A Value which has been decoded from some raw bytes. pub type DecodedValue = scale_value::Value; /// The raw bytes for an event with associated details about /// where and when it was emitted. #[derive(Debug, Clone, PartialEq)] -pub struct RawEventDetails { +pub struct EventDetails { /// When was the event produced? pub phase: Phase, /// What index is this event in the stored events for this block. @@ -286,7 +212,7 @@ pub struct RawEventDetails { pub fields: Vec, } -impl RawEventDetails { +impl EventDetails { /// Attempt to decode this [`RawEventDetails`] into a specific event. pub fn as_event(&self) -> Result, CodecError> { if self.pallet == E::PALLET && self.variant == E::EVENT { @@ -302,7 +228,7 @@ fn decode_raw_event_details( metadata: &Metadata, index: u32, input: &mut &[u8], -) -> Result { +) -> Result { // Decode basic event details: let phase = Phase::decode(input)?; let pallet_index = input.read_byte()?; @@ -347,7 +273,7 @@ fn decode_raw_event_details( let topics = Vec::::decode(input)?; tracing::debug!("topics: {:?}", topics); - Ok(RawEventDetails { + Ok(EventDetails { phase, index, pallet_index, @@ -440,7 +366,7 @@ pub(crate) mod test_utils { pub fn events( metadata: Metadata, event_records: Vec>, - ) -> Events> { + ) -> Events { let num_events = event_records.len() as u32; let mut event_bytes = Vec::new(); for ev in event_records { @@ -451,17 +377,16 @@ pub(crate) mod test_utils { /// Much like [`events`], but takes pre-encoded events and event count, so that we can /// mess with the bytes in tests if we need to. - pub fn events_raw( + pub fn events_raw( metadata: Metadata, event_bytes: Vec, num_events: u32, - ) -> Events> { + ) -> Events { Events { block_hash: ::Hash::default(), event_bytes, metadata, num_events, - _event_type: std::marker::PhantomData, } } } @@ -473,7 +398,6 @@ mod tests { event_record, events, events_raw, - AllEvents, }, *, }; @@ -506,7 +430,7 @@ mod tests { // Just for convenience, pass in the metadata type constructed // by the `metadata` function above to simplify caller code. metadata: &Metadata, - actual: RawEventDetails, + actual: EventDetails, expected: TestRawEventDetails, ) { let types = &metadata.runtime_metadata().types; @@ -541,133 +465,6 @@ mod tests { assert_eq!(actual_fields_no_context, expected.fields); } - #[test] - fn statically_decode_single_event() { - #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] - enum Event { - A(u8), - } - - // Create fake metadata that knows about our single event, above: - let metadata = metadata::(); - // Encode our events in the format we expect back from a node, and - // construct an Events object to iterate them: - let events = events::( - metadata, - vec![event_record(Phase::Finalization, Event::A(1))], - ); - - let event_details: Vec>> = - events.iter().collect::>().unwrap(); - assert_eq!( - event_details, - vec![EventDetails { - index: 0, - phase: Phase::Finalization, - event: AllEvents::Test(Event::A(1)) - }] - ); - } - - #[test] - fn statically_decode_multiple_events() { - #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] - enum Event { - A(u8), - B(bool), - } - - // Create fake metadata that knows about our single event, above: - let metadata = metadata::(); - - // Encode our events in the format we expect back from a node, and - // construst an Events object to iterate them: - let events = events::( - metadata, - vec![ - event_record(Phase::Initialization, Event::A(1)), - event_record(Phase::ApplyExtrinsic(123), Event::B(true)), - event_record(Phase::Finalization, Event::A(234)), - ], - ); - - let event_details: Vec>> = - events.iter().collect::>().unwrap(); - assert_eq!( - event_details, - vec![ - EventDetails { - index: 0, - phase: Phase::Initialization, - event: AllEvents::Test(Event::A(1)) - }, - EventDetails { - index: 1, - phase: Phase::ApplyExtrinsic(123), - event: AllEvents::Test(Event::B(true)) - }, - EventDetails { - index: 2, - phase: Phase::Finalization, - event: AllEvents::Test(Event::A(234)) - }, - ] - ); - } - - #[test] - fn statically_decode_multiple_events_until_error() { - #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] - enum Event { - A(u8), - B(bool), - } - - // Create fake metadata that knows about our single event, above: - let metadata = metadata::(); - - // Encode 2 events: - let mut event_bytes = vec![]; - event_record(Phase::Initialization, Event::A(1)).encode_to(&mut event_bytes); - event_record(Phase::ApplyExtrinsic(123), Event::B(true)) - .encode_to(&mut event_bytes); - - // Push a few naff bytes to the end (a broken third event): - event_bytes.extend_from_slice(&[3, 127, 45, 0, 2]); - - // Encode our events in the format we expect back from a node, and - // construst an Events object to iterate them: - let events = events_raw::( - metadata, - event_bytes, - 3, // 2 "good" events, and then it'll hit the naff bytes. - ); - - let mut events_iter = events.iter(); - assert_eq!( - events_iter.next().unwrap().unwrap(), - EventDetails { - index: 0, - phase: Phase::Initialization, - event: AllEvents::Test(Event::A(1)) - } - ); - assert_eq!( - events_iter.next().unwrap().unwrap(), - EventDetails { - index: 1, - phase: Phase::ApplyExtrinsic(123), - event: AllEvents::Test(Event::B(true)) - } - ); - - // We'll hit an error trying to decode the third event: - assert!(events_iter.next().unwrap().is_err()); - // ... and then "None" from then on. - assert!(events_iter.next().is_none()); - assert!(events_iter.next().is_none()); - } - #[test] fn dynamically_decode_single_event() { #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] @@ -686,7 +483,7 @@ mod tests { vec![event_record(Phase::ApplyExtrinsic(123), event)], ); - let mut event_details = events.iter_raw(); + let mut event_details = events.iter(); assert_raw_events_match( &metadata, event_details.next().unwrap().unwrap(), @@ -733,7 +530,7 @@ mod tests { ], ); - let mut event_details = events.iter_raw(); + let mut event_details = events.iter(); assert_raw_events_match( &metadata, @@ -799,13 +596,13 @@ mod tests { // Encode our events in the format we expect back from a node, and // construst an Events object to iterate them: - let events = events_raw::( + let events = events_raw( metadata.clone(), event_bytes, 3, // 2 "good" events, and then it'll hit the naff bytes. ); - let mut events_iter = events.iter_raw(); + let mut events_iter = events.iter(); assert_raw_events_match( &metadata, events_iter.next().unwrap().unwrap(), @@ -857,20 +654,8 @@ mod tests { vec![event_record(Phase::Finalization, Event::A(1))], ); - // Statically decode: - let event_details: Vec>> = - events.iter().collect::>().unwrap(); - assert_eq!( - event_details, - vec![EventDetails { - index: 0, - phase: Phase::Finalization, - event: AllEvents::Test(Event::A(1)) - }] - ); - // Dynamically decode: - let mut event_details = events.iter_raw(); + let mut event_details = events.iter(); assert_raw_events_match( &metadata, event_details.next().unwrap().unwrap(), @@ -910,20 +695,8 @@ mod tests { )], ); - // Statically decode: - let event_details: Vec>> = - events.iter().collect::>().unwrap(); - assert_eq!( - event_details, - vec![EventDetails { - index: 0, - phase: Phase::Finalization, - event: AllEvents::Test(Event::A(CompactWrapper(1))) - }] - ); - // Dynamically decode: - let mut event_details = events.iter_raw(); + let mut event_details = events.iter(); assert_raw_events_match( &metadata, event_details.next().unwrap().unwrap(), @@ -964,20 +737,8 @@ mod tests { vec![event_record(Phase::Finalization, Event::A(MyType::B))], ); - // Statically decode: - let event_details: Vec>> = - events.iter().collect::>().unwrap(); - assert_eq!( - event_details, - vec![EventDetails { - index: 0, - phase: Phase::Finalization, - event: AllEvents::Test(Event::A(MyType::B)) - }] - ); - // Dynamically decode: - let mut event_details = events.iter_raw(); + let mut event_details = events.iter(); assert_raw_events_match( &metadata, event_details.next().unwrap().unwrap(), diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index 6d52666a74..35e61a2efd 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -13,7 +13,6 @@ use super::{ StaticEvent, Phase }; -use codec::Decode; use futures::{ Stream, StreamExt, @@ -58,11 +57,10 @@ impl<'a, Sub: 'a, T: Config, Filter: EventFilter> FilterEvents<'a, Sub, T, Filte } } -impl<'a, Sub, T, Evs, Filter> Stream for FilterEvents<'a, Sub, T, Filter> +impl<'a, Sub, T, Filter> Stream for FilterEvents<'a, Sub, T, Filter> where - Sub: Stream, BasicError>> + Unpin + 'a, + Sub: Stream, BasicError>> + Unpin + 'a, T: Config, - Evs: Decode + 'static, Filter: EventFilter, { type Item = Result, BasicError>; @@ -114,8 +112,8 @@ pub trait EventFilter: private::Sealed { /// The type we'll be handed back from filtering. type ReturnType; /// Filter the events based on the type implementing this trait. - fn filter<'a, T: Config, Evs: Decode + 'static>( - events: Events, + fn filter<'a, T: Config>( + events: Events, ) -> Box< dyn Iterator< Item = Result< @@ -139,15 +137,15 @@ pub(crate) mod private { impl private::Sealed for (Ev,) {} impl EventFilter for (Ev,) { type ReturnType = Ev; - fn filter<'a, T: Config, Evs: Decode + 'static>( - events: Events, + fn filter<'a, T: Config>( + events: Events, ) -> Box< dyn Iterator, BasicError>> + Send + 'a, > { let block_hash = events.block_hash(); - let mut iter = events.into_iter_raw(); + let mut iter = events.into_iter(); Box::new(std::iter::from_fn(move || { for ev in iter.by_ref() { // Forward any error immediately: @@ -181,11 +179,11 @@ macro_rules! impl_event_filter { impl <$($ty: StaticEvent),+> private::Sealed for ( $($ty,)+ ) {} impl <$($ty: StaticEvent),+> EventFilter for ( $($ty,)+ ) { type ReturnType = ( $(Option<$ty>,)+ ); - fn filter<'a, T: Config, Evs: Decode + 'static>( - events: Events + fn filter<'a, T: Config>( + events: Events ) -> Box, BasicError>> + Send + 'a> { let block_hash = events.block_hash(); - let mut iter = events.into_iter_raw(); + let mut iter = events.into_iter(); Box::new(std::iter::from_fn(move || { let mut out: ( $(Option<$ty>,)+ ) = Default::default(); for ev in iter.by_ref() { @@ -234,7 +232,6 @@ mod test { event_record, events, metadata, - AllEvents, }, *, }; @@ -243,7 +240,10 @@ mod test { SubstrateConfig, Metadata, }; - use codec::Encode; + use codec::{ + Decode, + Encode, + }; use futures::{ stream, Stream, @@ -286,7 +286,7 @@ mod test { // A stream of fake events for us to try filtering on. fn events_stream( metadata: Metadata, - ) -> impl Stream>, BasicError>> + ) -> impl Stream, BasicError>> { stream::iter(vec![ events::( diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index c3ffe02db2..9a349a7e30 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -95,9 +95,8 @@ pub use event_subscription::{ }; pub use events_type::{ DecodedValue, - EventDetails, Events, - RawEventDetails, + EventDetails, }; pub use filter_events::{ EventFilter, diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index aa6c87298c..e5c4f85084 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -22,9 +22,8 @@ use crate::{ }, events::{ self, - EventDetails, Events, - RawEventDetails, + EventDetails, EventsClient, Phase, StaticEvent, @@ -49,20 +48,20 @@ pub use sp_runtime::traits::SignedExtension; /// returned from [`crate::SubmittableExtrinsic::sign_and_submit_then_watch()`]. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] -pub struct TransactionProgress { +pub struct TransactionProgress { sub: Option>>, ext_hash: T::Hash, client: C, - _error: PhantomDataSendSync<(Err, Evs)>, + _error: PhantomDataSendSync, } // The above type is not `Unpin` by default unless the generic param `T` is, // so we manually make it clear that Unpin is actually fine regardless of `T` // (we don't care if this moves around in memory while it's "pinned"). -impl Unpin for TransactionProgress {} +impl Unpin for TransactionProgress {} -impl, Err: Decode + HasModuleError, Evs: Decode> - TransactionProgress +impl, Err: Decode + HasModuleError> + TransactionProgress { /// Instantiate a new [`TransactionProgress`] from a custom subscription. pub fn new( @@ -83,7 +82,7 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// avoid importing that trait if you don't otherwise need it. pub async fn next_item( &mut self, - ) -> Option, BasicError>> { + ) -> Option, BasicError>> { self.next().await } @@ -100,7 +99,7 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_in_block( mut self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. @@ -130,7 +129,7 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized( mut self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. @@ -159,16 +158,16 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized_success( self, - ) -> Result, Error> { + ) -> Result, Error> { let evs = self.wait_for_finalized().await?.wait_for_success().await?; Ok(evs) } } -impl, Err: Decode + HasModuleError, Evs: Decode> Stream - for TransactionProgress +impl, Err: Decode + HasModuleError> Stream + for TransactionProgress { - type Item = Result, BasicError>; + type Item = Result, BasicError>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -277,7 +276,7 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// or that finality gadget is lagging behind. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] -pub enum TransactionStatus { +pub enum TransactionStatus { /// The transaction is part of the "future" queue. Future, /// The transaction is part of the "ready" queue. @@ -285,7 +284,7 @@ pub enum TransactionStatus { /// The transaction has been broadcast to the given peers. Broadcast(Vec), /// The transaction has been included in a block with given hash. - InBlock(TransactionInBlock), + InBlock(TransactionInBlock), /// The block this transaction was included in has been retracted, /// probably because it did not make it onto the blocks which were /// finalized. @@ -294,7 +293,7 @@ pub enum TransactionStatus { /// blocks, and so the subscription has ended. FinalityTimeout(T::Hash), /// The transaction has been finalized by a finality-gadget, e.g GRANDPA. - Finalized(TransactionInBlock), + Finalized(TransactionInBlock), /// The transaction has been replaced in the pool by another transaction /// that provides the same tags. (e.g. same (sender, nonce)). Usurped(T::Hash), @@ -304,10 +303,10 @@ pub enum TransactionStatus { Invalid, } -impl TransactionStatus { +impl TransactionStatus { /// A convenience method to return the `Finalized` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::Finalized`]. - pub fn as_finalized(&self) -> Option<&TransactionInBlock> { + pub fn as_finalized(&self) -> Option<&TransactionInBlock> { match self { Self::Finalized(val) => Some(val), _ => None, @@ -316,7 +315,7 @@ impl TransactionStatus { /// A convenience method to return the `InBlock` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::InBlock`]. - pub fn as_in_block(&self) -> Option<&TransactionInBlock> { + pub fn as_in_block(&self) -> Option<&TransactionInBlock> { match self { Self::InBlock(val) => Some(val), _ => None, @@ -327,15 +326,15 @@ impl TransactionStatus { /// This struct represents a transaction that has made it into a block. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] -pub struct TransactionInBlock { +pub struct TransactionInBlock { block_hash: T::Hash, ext_hash: T::Hash, client: C, - _error: PhantomDataSendSync<(Err, Evs)>, + _error: PhantomDataSendSync, } -impl, Err: Decode + HasModuleError, Evs: Decode> - TransactionInBlock +impl, Err: Decode + HasModuleError> + TransactionInBlock { pub(crate) fn new( block_hash: T::Hash, @@ -373,11 +372,11 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn wait_for_success(&self) -> Result, Error> { + pub async fn wait_for_success(&self) -> Result, Error> { let events = self.fetch_events().await?; // Try to find any errors; return the first one we encounter. - for ev in events.iter_raw() { + for ev in events.iter() { let ev = ev?; if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { let dispatch_error = Err::decode(&mut &*ev.bytes)?; @@ -407,7 +406,7 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn fetch_events(&self) -> Result, BasicError> { + pub async fn fetch_events(&self) -> Result, BasicError> { let block = self .client .rpc() @@ -441,13 +440,13 @@ impl, Err: Decode + HasModuleError, Evs: Decode> /// We can iterate over the events, or look for a specific one. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionEvents { +pub struct TransactionEvents { ext_hash: T::Hash, ext_idx: u32, - events: Events, + events: Events, } -impl TransactionEvents { +impl TransactionEvents { /// Return the hash of the block that the transaction has made it into. pub fn block_hash(&self) -> T::Hash { self.events.block_hash() @@ -459,32 +458,18 @@ impl TransactionEvents { } /// Return all of the events in the block that the transaction made it into. - pub fn all_events_in_block(&self) -> &events::Events { + pub fn all_events_in_block(&self) -> &events::Events { &self.events } - /// Iterate over the statically decoded events associated with this transaction. + /// Iterate over all of the raw events associated with this transaction. /// /// This works in the same way that [`events::Events::iter()`] does, with the /// exception that it filters out events not related to the submitted extrinsic. pub fn iter( &self, - ) -> impl Iterator, BasicError>> + '_ { + ) -> impl Iterator> + '_ { self.events.iter().filter(|ev| { - ev.as_ref() - .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) - .unwrap_or(true) // Keep any errors - }) - } - - /// Iterate over all of the raw events associated with this transaction. - /// - /// This works in the same way that [`events::Events::iter_raw()`] does, with the - /// exception that it filters out events not related to the submitted extrinsic. - pub fn iter_raw( - &self, - ) -> impl Iterator> + '_ { - self.events.iter_raw().filter(|ev| { ev.as_ref() .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) .unwrap_or(true) // Keep any errors. @@ -498,7 +483,7 @@ impl TransactionEvents { pub fn find( &self, ) -> impl Iterator> + '_ { - self.iter_raw().filter_map(|ev| { + self.iter().filter_map(|ev| { ev.and_then(|ev| ev.as_event::().map_err(Into::into)) .transpose() }) diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index 27edc3967d..b968869424 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -69,13 +69,13 @@ impl > TxClient { } /// Creates a returns a raw signed extrinsic, without submitting it. - pub async fn create_signed_with_nonce( + pub async fn create_signed_with_nonce( &self, - call: &SubmittableExtrinsic, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), account_nonce: T::Index, other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, BasicError> where Call: EncodeWithMetadata + MetadataLocation, { @@ -166,16 +166,15 @@ impl > TxClient { impl > TxClient { /// Creates a returns a raw signed extrinsic, without submitting it. - pub async fn create_signed( + pub async fn create_signed( &self, - call: &SubmittableExtrinsic, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, BasicError> where Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, - Evs: Decode, { // Get nonce from the node. let account_nonce = if let Some(nonce) = signer.nonce() { @@ -195,15 +194,14 @@ impl > TxClient { /// /// Returns a [`TransactionProgress`], 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: &SubmittableExtrinsic, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), - ) -> Result, BasicError> + ) -> Result, BasicError> where Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, - Evs: Decode, >::OtherParams: Default, { self.sign_and_submit_then_watch(call, signer, Default::default()) @@ -214,16 +212,15 @@ impl > TxClient { /// /// Returns a [`TransactionProgress`], 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: &SubmittableExtrinsic, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, BasicError> where Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, - Evs: Decode, { self.create_signed(call, signer, other_params) .await? @@ -241,15 +238,14 @@ impl > TxClient { /// /// 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: &SubmittableExtrinsic, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), ) -> Result where Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, - Evs: Decode, >::OtherParams: Default, { self.sign_and_submit(call, signer, Default::default()).await @@ -263,16 +259,15 @@ impl > TxClient { /// /// 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: &SubmittableExtrinsic, + call: &SubmittableExtrinsic, signer: &(dyn Signer + Send + Sync), other_params: >::OtherParams, ) -> Result where Call: EncodeWithMetadata + MetadataLocation, Err: Decode + HasModuleError, - Evs: Decode, { self.create_signed(call, signer, other_params) .await? @@ -285,16 +280,16 @@ impl > TxClient { /// data (which ultimately is anything that can be SCALE encoded with the help of /// [`crate::Metadata`]), this contains type information which can help us decode the /// resulting events or error. -pub struct SubmittableExtrinsic { +pub struct SubmittableExtrinsic { call_data: Call, // static calls come with a hash that allows us to validate them // against metadata. Dynamic calls have no such info, but instead can be // validated more comprehensively at runtime when we attempt to encode them. call_hash: Option<[u8; 32]>, - marker: std::marker::PhantomData<(Err, Evs)>, + marker: std::marker::PhantomData, } -impl SubmittableExtrinsic { +impl SubmittableExtrinsic { /// Create a new [`SubmittableExtrinsic`] that will not be validated /// against node metadata. pub fn new_unvalidated( @@ -328,25 +323,24 @@ impl SubmittableExtrinsic { } } -impl EncodeWithMetadata for SubmittableExtrinsic { +impl EncodeWithMetadata for SubmittableExtrinsic { fn encode_to_with_metadata(&self, metadata: &crate::Metadata, out: &mut Vec) -> Result<(), BasicError> { self.call_data.encode_to_with_metadata(metadata, out) } } /// This represents an extrinsic that has been signed and is ready to submit. -pub struct SignedSubmittableExtrinsic { +pub struct SignedSubmittableExtrinsic { client: C, encoded: Encoded, - marker: std::marker::PhantomData<(Err, Evs, T)>, + marker: std::marker::PhantomData<(Err, T)>, } -impl SignedSubmittableExtrinsic +impl SignedSubmittableExtrinsic where T: Config, C: OnlineClientT, Err: Decode + HasModuleError, - Evs: Decode, { /// Submits the extrinsic to the chain. /// @@ -354,7 +348,7 @@ where /// and obtain details about it, once it has made it into a block. pub async fn submit_and_watch( &self, - ) -> Result, BasicError> { + ) -> Result, BasicError> { // Get a hash of the extrinsic (we'll need this later). let ext_hash = T::Hashing::hash_of(&self.encoded); From 778fb154e64f0ebe9799ce1bff2bbc0077ebbf99 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 13 Jul 2022 13:41:44 +0100 Subject: [PATCH 32/75] fix doc tests in subxt crate --- codegen/src/api/mod.rs | 2 +- subxt/Cargo.toml | 2 +- subxt/src/client/online_client.rs | 10 +- subxt/src/events/event_subscription.rs | 34 + subxt/src/events/events_client.rs | 28 +- subxt/src/events/mod.rs | 83 +- subxt/src/lib.rs | 176 +- subxt/src/rpc.rs | 60 +- subxt/src/storage/mod.rs | 1 - subxt/src/storage/storage_client.rs | 130 +- .../integration-tests/src/codegen/polkadot.rs | 51959 ++++++---------- 11 files changed, 20181 insertions(+), 32304 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index ae22944669..fa60bfd8e9 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -316,7 +316,7 @@ impl RuntimeGenerator { } /// check whether the Client you are using is aligned with the statically generated codegen. - pub fn validate_codegen>(client: C) -> Result<(), ::subxt::error::MetadataError> { + pub fn validate_codegen>(client: &C) -> Result<(), ::subxt::error::MetadataError> { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ #(#metadata_hash,)* ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 132cb44f66..7264d691bf 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -42,4 +42,4 @@ frame-metadata = "15.0.0" derivative = "2.2.0" [dev-dependencies] -tokio = { version = "1.8", features = ["macros", "time"] } +tokio = { version = "1.8", features = ["macros", "time", "rt-multi-thread"] } diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 9f5d8d148f..a288173330 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -101,15 +101,15 @@ impl OnlineClient { /// /// ```no_run /// # #[tokio::main] - /// # fn main() { - /// use subxt::client::OnlineClient; + /// # async fn main() { + /// use subxt::{ OnlineClient, PolkadotConfig }; /// - /// let client = OnlineClient::new().await.unwrap(); + /// let client = OnlineClient::::new().await.unwrap(); /// /// let update_task = client.subscribe_to_updates(); /// tokio::spawn(async move { - /// update_task.await; - /// }) + /// update_task.perform_runtime_updates().await; + /// }); /// # } /// ``` pub fn subscribe_to_updates(&self) -> ClientRuntimeUpdater { diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 86c2258641..974b53a9ba 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -77,6 +77,40 @@ where /// Return only specific events matching the tuple of 1 or more event /// types that has been provided as the `Filter` type parameter. + /// + /// # Example + /// + /// ```no_run + /// use futures::StreamExt; + /// use subxt::{ OnlineClient, PolkadotConfig }; + /// + /// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] + /// pub mod polkadot {} + /// + /// # #[tokio::main] + /// # async fn main() { + /// let api = OnlineClient::::new().await.unwrap(); + /// + /// let mut events = api + /// .events() + /// .subscribe() + /// .await + /// .unwrap() + /// .filter_events::<( + /// polkadot::balances::events::Transfer, + /// polkadot::balances::events::Deposit + /// )>(); + /// + /// while let Some(ev) = events.next().await { + /// let event_details = ev.unwrap(); + /// match event_details.event { + /// (Some(transfer), None) => println!("Balance transfer event: {transfer:?}"), + /// (None, Some(deposit)) => println!("Balance deposit event: {deposit:?}"), + /// _ => unreachable!() + /// } + /// } + /// # } + /// ``` pub fn filter_events(self) -> FilterEvents<'static, Self, T, Filter> { FilterEvents::new(self) } diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index 61fa8a5511..b731d2de16 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -67,10 +67,36 @@ where } } - /// Subscribe to events from blocks. + /// Subscribe to all events from blocks. /// /// **Note:** these blocks haven't necessarily been finalised yet; prefer /// [`Events::subscribe_finalized()`] if that is important. + /// + /// # Example + /// + /// ```no_run + /// # #[tokio::main] + /// # async fn main() { + /// use futures::StreamExt; + /// use subxt::{ OnlineClient, PolkadotConfig }; + /// + /// let api = OnlineClient::::new().await.unwrap(); + /// + /// let mut events = api.events().subscribe().await.unwrap(); + /// + /// while let Some(ev) = events.next().await { + /// // Obtain all events from this block. + /// let ev = ev.unwrap(); + /// // Print block hash. + /// println!("Event at block hash {:?}", ev.block_hash()); + /// // Iterate over all events. + /// let mut iter = ev.iter(); + /// while let Some(event_details) = iter.next() { + /// println!("Event details {:?}", event_details); + /// } + /// } + /// # } + /// ``` pub fn subscribe( &self ) -> impl Future>, BasicError>> + Send + 'static diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 9a349a7e30..074cb7c19c 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -2,86 +2,9 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -//! This module exposes the ability to work with events generated by a given block. -//! Subxt can either attempt to statically decode events into known types, or it -//! can hand back details of the raw event without knowing what shape its contents -//! are (this may be useful if we don't know what exactly we're looking for). -//! -//! This module is wrapped by the generated API in `RuntimeAPI::EventsApi`. -//! -//! # Examples -//! -//! ## Subscribe to all events -//! -//! Users can subscribe to all emitted events from blocks using `subscribe()`. -//! -//! To subscribe to all events from just the finalized blocks use `subscribe_finalized()`. -//! -//! To obtain the events from a given block use `at()`. -//! -//! ```no_run -//! # use futures::StreamExt; -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! # pub mod polkadot {} -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! let mut events = api.events().subscribe().await.unwrap(); -//! -//! while let Some(ev) = events.next().await { -//! // Obtain all events from this block. -//! let ev: subxt::Events<_, _> = ev.unwrap(); -//! // Print block hash. -//! println!("Event at block hash {:?}", ev.block_hash()); -//! // Iterate over all events. -//! let mut iter = ev.iter(); -//! while let Some(event_details) = iter.next() { -//! println!("Event details {:?}", event_details); -//! } -//! } -//! # } -//! ``` -//! -//! ## Filter events -//! -//! The subxt exposes the ability to filter events via the `filter_events()` function. -//! -//! The function filters events from the provided tuple. If 1-tuple is provided, the events are -//! returned directly. Otherwise, we'll be given a corresponding tuple of `Option`'s, with exactly -//! one variant populated each time. -//! -//! ```no_run -//! # use futures::StreamExt; -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} -//! -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! -//! let mut transfer_events = api -//! .events() -//! .subscribe() -//! .await -//! .unwrap() -//! .filter_events::<(polkadot::balances::events::Transfer,)>(); -//! -//! while let Some(transfer_event) = transfer_events.next().await { -//! println!("Balance transfer event: {transfer_event:?}"); -//! } -//! # } -//! ``` +//! This module exposes the types and such necessary for working with events. +//! The two main entry points into events are [`crate::OnlineClient::events()`] +//! and calls like [crate::extrinsic::TransactionProgress::wait_for_finalized_success()]. mod event_subscription; mod events_type; diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index b714942bd8..051516d3c8 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -10,164 +10,80 @@ //! - [Query constants](https://docs.substrate.io/how-to-guides/v3/basics/configurable-constants/) (Constants) //! - [Subscribe to events](https://docs.substrate.io/v3/runtime/events-and-errors/) (Events) //! -//! -//! # Generate the runtime API -//! -//! Subxt generates a runtime API from downloaded static metadata. The metadata can be downloaded using the -//! [subxt-cli](https://crates.io/crates/subxt-cli) tool. -//! -//! To generate the runtime API, use the `subxt` attribute which points at downloaded static metadata. -//! -//! ```ignore -//! #[subxt::subxt(runtime_metadata_path = "metadata.scale")] -//! pub mod node_runtime { } -//! ``` -//! -//! The `node_runtime` has the following hierarchy: -//! -//! ```rust -//! pub mod node_runtime { -//! pub mod PalletName { -//! pub mod calls { } -//! pub mod storage { } -//! pub mod constants { } -//! pub mod events { } -//! } -//! } -//! ``` -//! -//! For more information regarding the `node_runtime` hierarchy, please visit the -//! [subxt-codegen](https://docs.rs/subxt-codegen/latest/subxt_codegen/) documentation. -//! -//! //! # Initializing the API client //! -//! ```no_run -//! use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; +//! To interact with a node, you'll need to construct a client. //! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} +//! ```no_run +//! use subxt::{ OnlineClient, PolkadotConfig }; //! //! # #[tokio::main] //! # async fn main() { -//! let api = ClientBuilder::new() -//! .set_url("wss://rpc.polkadot.io:443") -//! .build() -//! .await -//! .unwrap() -//! .to_runtime_api::>>(); +//! let api = OnlineClient::::new().await.unwrap(); //! # } //! ``` //! -//! The `RuntimeApi` type is generated by the `subxt` macro from the supplied metadata. This can be parameterized with user -//! supplied implementations for the `Config` and `Extra` types, if the default implementation differs from the target -//! chain. -//! -//! To ensure that extrinsics are properly submitted, during the build phase of the Client the -//! runtime metadata of the node is downloaded. If the URL is not specified (`set_url`), the local host is used instead. -//! -//! -//! # Submit Extrinsics -//! -//! Extrinsics are obtained using the API's `RuntimeApi::tx()` method, followed by `pallet_name()` and then the -//! `call_item_name()`. +//! This default client connects to a locally running node, but can be configured to point anywhere. +//! additionally, an [`crate::OfflineClient`] is available to perform operations that don't require a +//! network connection to a node. //! -//! Submit an extrinsic, returning success once the transaction is validated and accepted into the pool: +//! The client takes a type parameter, here [`crate::PolkadotConfig`], which bakes in assumptions about +//! the structure of extrinsics and the underlying types used by the node for things like block numbers. +//! If the node you'd lik to interact with deviates from Polkadot or the default Substrate node in these +//! areas, you'll need to configur thie by implementing the [`crate::config::Config`] type yourself. //! -//! Please visit the [balance_transfer](../examples/examples/balance_transfer.rs) example for more details. +//! # Generating runtime types //! +//! Subxt can generate types at compile time to help you interact with a node. The metadata can be downloaded using the +//! [subxt-cli](https://crates.io/crates/subxt-cli) tool. //! -//! # Querying Storage -//! -//! The runtime storage is queried via the generated `RuntimeApi::storage()` method, followed by the `pallet_name()` and -//! then the `storage_item_name()`. -//! -//! Please visit the [fetch_staking_details](../examples/examples/fetch_staking_details.rs) example for more details. -//! -//! # Query Constants -//! -//! Constants are embedded into the node's metadata. -//! -//! The subxt offers the ability to query constants from the runtime metadata (metadata downloaded when constructing -//! the client, *not* the one provided for API generation). -//! -//! To query constants use the generated `RuntimeApi::constants()` method, followed by the `pallet_name()` and then the -//! `constant_item_name()`. -//! -//! Please visit the [fetch_constants](../examples/examples/fetch_constants.rs) example for more details. +//! To generate the types, use the `subxt` attribute which points at downloaded static metadata. //! -//! # Subscribe to Events +//! ```ignore +//! #[subxt::subxt(runtime_metadata_path = "metadata.scale")] +//! pub mod node_runtime { } +//! ``` //! -//! To subscribe to events, use the generated `RuntimeApi::events()` method which exposes: -//! - `subscribe()` - Subscribe to events emitted from blocks. These blocks haven't necessarily been finalised. -//! - `subscribe_finalized()` - Subscribe to events from finalized blocks. -//! - `at()` - Obtain events at a given block hash. +//! For more information, please visit the [subxt-codegen](https://docs.rs/subxt-codegen/latest/subxt_codegen/) +//! documentation. //! +//! # Interacting with the API //! -//! *Examples* -//! - [subscribe_all_events](../examples/examples/subscribe_all_events.rs): Subscribe to events emitted from blocks. -//! - [subscribe_one_event](../examples/examples/subscribe_one_event.rs): Subscribe and filter by one event. -//! - [subscribe_some_events](../examples/examples/subscribe_some_events.rs): Subscribe and filter event. +//! Once instantiated, a client, exposes four functions: +//! - `.tx()` for submitting extrinsics/transactions. See [`crate::extrinsic::TxClient`] for more details, or see +//! the [balance_transfer](../examples/examples/balance_transfer.rs) example. +//! - `.storage()` for fetching and iterating over storage entries. See [`crate::storage::StorageClient`] for more details, or see +//! the [fetch_staking_details](../examples/examples/fetch_staking_details.rs) example. +//! - `.constants()` for getting hold of constants. See [`crate::constants::ConstantsClient`] for more details, or see +//! the [fetch_constants](../examples/examples/fetch_constants.rs) example. +//! - `.events()` for subscribing/obtaining events. See [`crate::events::EventsClient`] for more details, or see: +//! - [subscribe_all_events](../examples/examples/subscribe_all_events.rs): Subscribe to events emitted from blocks. +//! - [subscribe_one_event](../examples/examples/subscribe_one_event.rs): Subscribe and filter by one event. +//! - [subscribe_some_events](../examples/examples/subscribe_some_events.rs): Subscribe and filter event. //! //! # Static Metadata Validation //! -//! There are two types of metadata that the subxt is aware of: -//! - static metadata: Metadata used for generating the API. -//! - runtime metadata: Metadata downloaded from the target node when a subxt client is created. +//! If you use types generated by the [`crate::subxt`] macro, there is a chance that they will fall out of sync +//! with the actual state of the node you're trying to interact with. //! -//! There are cases when the static metadata is different from the runtime metadata of a node. -//! Such is the case when the node performs a runtime update. +//! When you attempt to use any ofthese static types to interact with a node, Subxt will validate that they are +//! still compatible and issue an error if they have deviated. //! -//! To ensure that subxt can properly communicate with the target node the static metadata is validated -//! against the runtime metadata of the node. -//! -//! This validation is performed at the Call, Constant, and Storage levels, as well for the entire metadata. -//! The level of granularity ensures that the users can still submit a given call, even if another -//! call suffered changes. -//! -//! Full metadata validation: +//! Accitionally, you can validate that the entirety of the statically generated code aligns with a node like so: //! //! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! # pub mod polkadot {} -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! // To make sure that all of our statically generated pallets are compatible with the -//! // runtime node, we can run this check: -//! api.validate_metadata().unwrap(); -//! # } -//! ``` +//! use subxt::{ OnlineClient, PolkadotConfig }; //! -//! Call level validation: +//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] +//! pub mod polkadot {} //! -//! ```ignore -//! # use sp_keyring::AccountKeyring; -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! # pub mod polkadot {} //! # #[tokio::main] //! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! // Submit the `transfer` extrinsic from Alice's account to Bob's. -//! let dest = AccountKeyring::Bob.to_account_id().into(); -//! -//! let extrinsic = api -//! .tx() -//! .balances() -//! // Constructing an extrinsic will fail if the metadata -//! // is not in sync with the generated API. -//! .transfer(dest, 123_456_789_012_345) -//! .unwrap(); +//! let api = OnlineClient::::new().await.unwrap(); +//! +//! if let Err(_e) = polkadot::validate_codegen(&api) { +//! println!("Generated code is not up to date with node we're connected to"); +//! } //! # } //! ``` //! diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index 93e6965c41..4618569c3a 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -7,67 +7,29 @@ //! This is used behind the scenes by various `subxt` APIs, but can //! also be used directly. //! -//! # Examples +//! # Example //! -//! ## Fetch Storage +//! Fetching storage keys //! //! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # use subxt::storage::StorageKeyPrefix; -//! # use subxt::rpc::Rpc; +//! use subxt::{ PolkadotConfig, OnlineClient, storage::StorageKey }; //! //! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] //! pub mod polkadot {} //! //! # #[tokio::main] //! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! // Storage prefix is `twox_128("System") ++ twox_128("ExtrinsicCount")`. -//! let key = StorageKeyPrefix::new::() -//! .to_storage_key(); +//! let api = OnlineClient::::new().await.unwrap(); //! -//! // Obtain the RPC from a generated API -//! let rpc: &Rpc<_> = api -//! .client -//! .rpc(); -//! -//! let result = rpc.storage(&key, None).await.unwrap(); -//! println!("Storage result: {:?}", result); -//! # } -//! ``` -//! -//! ## Fetch Keys -//! -//! ```no_run -//! # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -//! # use subxt::storage::StorageKeyPrefix; -//! # use subxt::rpc::Rpc; -//! -//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -//! pub mod polkadot {} -//! -//! # #[tokio::main] -//! # async fn main() { -//! # let api = ClientBuilder::new() -//! # .build() -//! # .await -//! # .unwrap() -//! # .to_runtime_api::>>(); -//! let key = StorageKeyPrefix::new::() -//! .to_storage_key(); -//! -//! // Obtain the RPC from a generated API -//! let rpc: &Rpc<_> = api -//! .client -//! .rpc(); +//! let key = polkadot::storage() +//! .xcm_pallet() +//! .version_notifiers_root() +//! .to_bytes(); //! //! // Fetch up to 10 keys. -//! let keys = rpc -//! .storage_keys_paged(Some(key), 10, None, None) +//! let keys = api +//! .rpc() +//! .storage_keys_paged(StorageKey(key), 10, None, None) //! .await //! .unwrap(); //! diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index ebea660baf..ad3f4f817b 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -10,7 +10,6 @@ mod storage_address; pub use storage_client::{ StorageClient, KeyIter, - SignedExtension, }; // Re-export as this is used in the public API: diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 92d4ee3389..2c580cafbf 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -9,7 +9,6 @@ use sp_core::storage::{ StorageData, StorageKey, }; -pub use sp_runtime::traits::SignedExtension; use std::{ marker::PhantomData, future::Future, @@ -32,81 +31,7 @@ use super::storage_address::{ AddressIsIterable, }; -/// Query the runtime storage using [StorageClient]. -/// -/// This module is the core of performing runtime storage queries. While you can -/// work with it directly, it's prefer to use the generated `storage()` interface where -/// possible. -/// -/// The exposed API is performing RPC calls to `state_getStorage` and `state_getKeysPaged`. -/// -/// A runtime storage entry can be of type: -/// - [StorageEntryKey::Plain] for keys constructed just from the prefix -/// `twox_128(pallet) ++ twox_128(storage_item)` -/// - [StorageEntryKey::Map] for mapped keys constructed from the prefix, -/// plus other arguments `twox_128(pallet) ++ twox_128(storage_item) ++ hash(arg1) ++ arg1` -/// -/// # Examples -/// -/// ## Fetch Storage Keys -/// -/// ```no_run -/// # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -/// # use subxt::storage::StorageClient; -/// -/// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -/// pub mod polkadot {} -/// -/// # #[tokio::main] -/// # async fn main() { -/// # let api = ClientBuilder::new() -/// # .build() -/// # .await -/// # .unwrap() -/// # .to_runtime_api::>>(); -/// # // Obtain the storage client wrapper from the API. -/// # let storage: StorageClient<_> = api.client.storage(); -/// // Fetch just the keys, returning up to 10 keys. -/// let keys = storage -/// .fetch_keys::(10, None, None) -/// .await -/// .unwrap(); -/// // Iterate over each key -/// for key in keys.iter() { -/// println!("Key: 0x{}", hex::encode(&key)); -/// } -/// # } -/// ``` -/// -/// ## Iterate over Storage -/// -/// ```no_run -/// # use subxt::{ClientBuilder, DefaultConfig, PolkadotExtrinsicParams}; -/// # use subxt::storage::StorageClient; -/// -/// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] -/// pub mod polkadot {} -/// -/// # #[tokio::main] -/// # async fn main() { -/// # let api = ClientBuilder::new() -/// # .build() -/// # .await -/// # .unwrap() -/// # .to_runtime_api::>>(); -/// # // Obtain the storage client wrapper from the API. -/// # let storage: StorageClient<_> = api.client.storage(); -/// // Iterate over keys and values. -/// let mut iter = storage -/// .iter::(None) -/// .await -/// .unwrap(); -/// while let Some((key, value)) = iter.next().await.unwrap() { -/// println!("Key: 0x{}", hex::encode(&key)); -/// println!("Value: {}", value); -/// } -/// # } -/// ``` +/// Query the runtime storage. #[derive(Derivative)] #[derivative(Clone(bound = "Client: Clone"))] pub struct StorageClient { @@ -148,6 +73,32 @@ where } /// Fetch a decoded value from storage at a given address and optional block hash. + /// + /// # Example + /// + /// ```no_run + /// use subxt::{ PolkadotConfig, OnlineClient }; + /// + /// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] + /// pub mod polkadot {} + /// + /// # #[tokio::main] + /// # async fn main() { + /// let api = OnlineClient::::new().await.unwrap(); + /// + /// // Address to a storage entry we'd like to access. + /// let address = polkadot::storage().xcm_pallet().queries(&12345); + /// + /// // Fetch just the keys, returning up to 10 keys. + /// let value = api + /// .storage() + /// .fetch(&address, None) + /// .await + /// .unwrap(); + /// + /// println!("Value: {:?}", value); + /// # } + /// ``` pub fn fetch<'a, ReturnTy: Decode, Iterable, Defaultable>( &self, address: &'a StorageAddress<'_, ReturnTy, Iterable, Defaultable>, @@ -231,6 +182,33 @@ where /// Note: The [`StorageAddress`] provided must be tagged with [`AddressIsIterable`] /// in order to use this function. Statically generated storage addresses will be /// tagged appropriately. + /// + /// ```no_run + /// use subxt::{ PolkadotConfig, OnlineClient }; + /// + /// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] + /// pub mod polkadot {} + /// + /// # #[tokio::main] + /// # async fn main() { + /// let api = OnlineClient::::new().await.unwrap(); + /// + /// // Address to the root of a storage entry that we'd like to iterate over. + /// let address = polkadot::storage().xcm_pallet().version_notifiers_root(); + /// + /// // Iterate over keys and values at that address. + /// let mut iter = api + /// .storage() + /// .iter(address, 10, None) + /// .await + /// .unwrap(); + /// + /// while let Some((key, value)) = iter.next().await.unwrap() { + /// println!("Key: 0x{}", hex::encode(&key)); + /// println!("Value: {}", value); + /// } + /// # } + /// ``` pub fn iter<'a, ReturnTy: Decode + 'static, Defaultable: 'static>( &self, address: StorageAddress<'a, ReturnTy, AddressIsIterable, Defaultable>, diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 00214e9661..43a7878c27 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -54,7 +54,9 @@ pub mod api { "Crowdloan", "XcmPallet", ]; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Debug, + )] pub enum Event { #[codec(index = 0)] System(system::Event), @@ -66,8 +68,6 @@ pub mod api { Indices(indices::Event), #[codec(index = 5)] Balances(balances::Event), - #[codec(index = 32)] - TransactionPayment(transaction_payment::Event), #[codec(index = 7)] Staking(staking::Event), #[codec(index = 8)] @@ -134,146 +134,113 @@ pub mod api { XcmPallet(xcm_pallet::Event), } pub mod system { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct FillBlock { pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, } - impl ::subxt::Call for FillBlock { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "fill_block"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Remark { pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for Remark { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "remark"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHeapPages { pub pages: ::core::primitive::u64, } - impl ::subxt::Call for SetHeapPages { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "set_heap_pages"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetCode { pub code: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetCode { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "set_code"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetCodeWithoutChecks { pub code: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetCodeWithoutChecks { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "set_code_without_checks"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetStorage { pub items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, } - impl ::subxt::Call for SetStorage { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "set_storage"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct KillStorage { pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, } - impl ::subxt::Call for KillStorage { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "kill_storage"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct KillPrefix { pub prefix: ::std::vec::Vec<::core::primitive::u8>, pub subkeys: ::core::primitive::u32, } - impl ::subxt::Call for KillPrefix { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "kill_prefix"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemarkWithEvent { pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for RemarkWithEvent { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "remark_with_event"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "A dispatch that will fill the block weight up to the given ratio."] pub fn fill_block( &self, ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - FillBlock, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 228u8, 117u8, 251u8, 95u8, 47u8, 56u8, 32u8, 177u8, 191u8, - 72u8, 75u8, 23u8, 193u8, 175u8, 227u8, 218u8, 127u8, 94u8, - 114u8, 110u8, 215u8, 61u8, 162u8, 102u8, 73u8, 89u8, 218u8, - 148u8, 59u8, 73u8, 59u8, 149u8, - ] - { - let call = FillBlock { ratio }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "fill_block", + data: FillBlock { ratio }, + }, + [ + 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, + 76u8, 167u8, 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, + 191u8, 145u8, 130u8, 245u8, 177u8, 201u8, 169u8, 129u8, + 173u8, 105u8, 88u8, 45u8, 136u8, 191u8, + ], + ) } #[doc = "Make some on-chain remark."] #[doc = ""] @@ -283,69 +250,45 @@ pub mod api { pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Remark, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 186u8, 79u8, 33u8, 199u8, 216u8, 115u8, 19u8, 146u8, 220u8, - 174u8, 98u8, 61u8, 179u8, 230u8, 40u8, 70u8, 22u8, 251u8, - 77u8, 62u8, 133u8, 80u8, 186u8, 70u8, 135u8, 172u8, 178u8, - 241u8, 69u8, 106u8, 235u8, 140u8, - ] - { - let call = Remark { remark }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "remark", + data: Remark { remark }, + }, + [ + 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, + 101u8, 51u8, 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, + 191u8, 73u8, 160u8, 146u8, 87u8, 147u8, 243u8, 28u8, 228u8, + 116u8, 224u8, 181u8, 129u8, 160u8, + ], + ) } #[doc = "Set the number of pages in the WebAssembly environment's heap."] pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHeapPages, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 77u8, 138u8, 122u8, 55u8, 179u8, 101u8, 60u8, 137u8, 173u8, - 39u8, 28u8, 36u8, 237u8, 243u8, 232u8, 162u8, 76u8, 176u8, - 135u8, 58u8, 60u8, 177u8, 105u8, 136u8, 94u8, 53u8, 26u8, - 31u8, 41u8, 156u8, 228u8, 241u8, - ] - { - let call = SetHeapPages { pages }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "set_heap_pages", + data: SetHeapPages { pages }, + }, + [ + 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, + 6u8, 244u8, 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, + 43u8, 87u8, 26u8, 45u8, 125u8, 222u8, 165u8, 254u8, 172u8, + 158u8, 39u8, 178u8, 86u8, 87u8, + ], + ) } #[doc = "Set the new runtime code."] #[doc = ""] @@ -362,35 +305,23 @@ pub mod api { pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetCode, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 35u8, 75u8, 103u8, 203u8, 91u8, 141u8, 77u8, 95u8, 37u8, - 157u8, 107u8, 240u8, 54u8, 242u8, 245u8, 205u8, 104u8, 165u8, - 177u8, 37u8, 86u8, 197u8, 28u8, 202u8, 121u8, 159u8, 18u8, - 204u8, 237u8, 117u8, 141u8, 131u8, - ] - { - let call = SetCode { code }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "set_code", + data: SetCode { code }, + }, + [ + 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, + 120u8, 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, + 93u8, 128u8, 107u8, 4u8, 3u8, 142u8, 13u8, 134u8, 196u8, + 62u8, 113u8, 181u8, 14u8, 40u8, + ], + ) } #[doc = "Set the new runtime code without doing any checks of the given `code`."] #[doc = ""] @@ -404,35 +335,23 @@ pub mod api { pub fn set_code_without_checks( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetCodeWithoutChecks, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 150u8, 148u8, 119u8, 129u8, 77u8, 216u8, 135u8, 187u8, 127u8, - 24u8, 238u8, 15u8, 227u8, 229u8, 191u8, 217u8, 106u8, 129u8, - 149u8, 79u8, 154u8, 78u8, 53u8, 159u8, 89u8, 69u8, 103u8, - 197u8, 93u8, 161u8, 134u8, 17u8, - ] - { - let call = SetCodeWithoutChecks { code }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "set_code_without_checks", + data: SetCodeWithoutChecks { code }, + }, + [ + 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, + 148u8, 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, + 66u8, 195u8, 60u8, 40u8, 142u8, 169u8, 183u8, 80u8, 80u8, + 96u8, 3u8, 231u8, 99u8, 216u8, + ], + ) } #[doc = "Set some items of storage."] pub fn set_storage( @@ -441,69 +360,45 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetStorage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 197u8, 12u8, 119u8, 205u8, 152u8, 103u8, 211u8, 170u8, 146u8, - 253u8, 25u8, 56u8, 180u8, 146u8, 74u8, 75u8, 38u8, 108u8, - 212u8, 154u8, 23u8, 22u8, 148u8, 175u8, 107u8, 186u8, 222u8, - 13u8, 149u8, 132u8, 204u8, 217u8, - ] - { - let call = SetStorage { items }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "set_storage", + data: SetStorage { items }, + }, + [ + 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, + 90u8, 19u8, 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, + 33u8, 172u8, 119u8, 78u8, 140u8, 10u8, 107u8, 202u8, 122u8, + 235u8, 181u8, 191u8, 22u8, 116u8, + ], + ) } #[doc = "Kill some items from storage."] pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - KillStorage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 154u8, 115u8, 185u8, 20u8, 126u8, 90u8, 222u8, 131u8, 199u8, - 57u8, 184u8, 226u8, 43u8, 245u8, 161u8, 176u8, 194u8, 123u8, - 139u8, 97u8, 97u8, 94u8, 47u8, 64u8, 204u8, 96u8, 190u8, - 94u8, 216u8, 237u8, 69u8, 51u8, - ] - { - let call = KillStorage { keys }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "kill_storage", + data: KillStorage { keys }, + }, + [ + 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, + 216u8, 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, + 209u8, 41u8, 228u8, 67u8, 130u8, 230u8, 160u8, 207u8, 11u8, + 180u8, 139u8, 242u8, 41u8, 15u8, + ], + ) } #[doc = "Kill all storage items with a key that starts with the given prefix."] #[doc = ""] @@ -513,69 +408,45 @@ pub mod api { &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - KillPrefix, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 214u8, 101u8, 191u8, 241u8, 1u8, 241u8, 144u8, 116u8, 246u8, - 199u8, 159u8, 249u8, 155u8, 164u8, 220u8, 221u8, 75u8, 33u8, - 204u8, 3u8, 255u8, 201u8, 187u8, 238u8, 181u8, 213u8, 41u8, - 105u8, 234u8, 120u8, 202u8, 115u8, - ] - { - let call = KillPrefix { prefix, subkeys }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "kill_prefix", + data: KillPrefix { prefix, subkeys }, + }, + [ + 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, + 22u8, 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, + 129u8, 34u8, 80u8, 4u8, 173u8, 120u8, 92u8, 35u8, 237u8, + 112u8, 201u8, 207u8, 200u8, 48u8, + ], + ) } #[doc = "Make some on-chain remark and emit event."] pub fn remark_with_event( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemarkWithEvent, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 171u8, 82u8, 75u8, 237u8, 69u8, 197u8, 223u8, 125u8, 123u8, - 51u8, 241u8, 35u8, 202u8, 210u8, 227u8, 109u8, 1u8, 241u8, - 255u8, 63u8, 33u8, 115u8, 156u8, 239u8, 97u8, 76u8, 193u8, - 35u8, 74u8, 199u8, 43u8, 255u8, - ] - { - let call = RemarkWithEvent { remark }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "System", + call: "remark_with_event", + data: RemarkWithEvent { remark }, + }, + [ + 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, + 75u8, 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, + 56u8, 225u8, 136u8, 88u8, 26u8, 114u8, 178u8, 43u8, 176u8, + 43u8, 240u8, 84u8, 116u8, 46u8, + ], + ) } } } @@ -583,663 +454,364 @@ pub mod api { pub type Event = runtime_types::frame_system::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An extrinsic completed successfully."] pub struct ExtrinsicSuccess { pub dispatch_info: runtime_types::frame_support::weights::DispatchInfo, } - impl ::subxt::Event for ExtrinsicSuccess { + impl ::subxt::events::StaticEvent for ExtrinsicSuccess { const PALLET: &'static str = "System"; const EVENT: &'static str = "ExtrinsicSuccess"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An extrinsic failed."] pub struct ExtrinsicFailed { pub dispatch_error: runtime_types::sp_runtime::DispatchError, pub dispatch_info: runtime_types::frame_support::weights::DispatchInfo, } - impl ::subxt::Event for ExtrinsicFailed { + impl ::subxt::events::StaticEvent for ExtrinsicFailed { const PALLET: &'static str = "System"; const EVENT: &'static str = "ExtrinsicFailed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "`:code` was updated."] pub struct CodeUpdated; - impl ::subxt::Event for CodeUpdated { + impl ::subxt::events::StaticEvent for CodeUpdated { const PALLET: &'static str = "System"; const EVENT: &'static str = "CodeUpdated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new account was created."] pub struct NewAccount { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for NewAccount { + impl ::subxt::events::StaticEvent for NewAccount { const PALLET: &'static str = "System"; const EVENT: &'static str = "NewAccount"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account was reaped."] pub struct KilledAccount { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for KilledAccount { + impl ::subxt::events::StaticEvent for KilledAccount { const PALLET: &'static str = "System"; const EVENT: &'static str = "KilledAccount"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "On on-chain remark happened."] pub struct Remarked { - pub sender: ::subxt::sp_core::crypto::AccountId32, - pub hash: ::subxt::sp_core::H256, + pub sender: ::subxt::ext::sp_core::crypto::AccountId32, + pub hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Remarked { + impl ::subxt::events::StaticEvent for Remarked { const PALLET: &'static str = "System"; const EVENT: &'static str = "Remarked"; } } pub mod storage { use super::runtime_types; - pub struct Account<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Account<'_> { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "Account"; - type Value = runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct ExtrinsicCount; - impl ::subxt::StorageEntry for ExtrinsicCount { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "ExtrinsicCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct BlockWeight; - impl ::subxt::StorageEntry for BlockWeight { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "BlockWeight"; - type Value = runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u64, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct AllExtrinsicsLen; - impl ::subxt::StorageEntry for AllExtrinsicsLen { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "AllExtrinsicsLen"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct BlockHash<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for BlockHash<'_> { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "BlockHash"; - type Value = ::subxt::sp_core::H256; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ExtrinsicData<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ExtrinsicData<'_> { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "ExtrinsicData"; - type Value = ::std::vec::Vec<::core::primitive::u8>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Number; - impl ::subxt::StorageEntry for Number { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "Number"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ParentHash; - impl ::subxt::StorageEntry for ParentHash { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "ParentHash"; - type Value = ::subxt::sp_core::H256; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Digest; - impl ::subxt::StorageEntry for Digest { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "Digest"; - type Value = runtime_types::sp_runtime::generic::digest::Digest; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Events; - impl ::subxt::StorageEntry for Events { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "Events"; - type Value = ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::polkadot_runtime::Event, - ::subxt::sp_core::H256, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct EventCount; - impl ::subxt::StorageEntry for EventCount { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "EventCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct EventTopics<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for EventTopics<'_> { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "EventTopics"; - type Value = - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct LastRuntimeUpgrade; - impl ::subxt::StorageEntry for LastRuntimeUpgrade { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "LastRuntimeUpgrade"; - type Value = runtime_types::frame_system::LastRuntimeUpgradeInfo; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct UpgradedToU32RefCount; - impl ::subxt::StorageEntry for UpgradedToU32RefCount { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "UpgradedToU32RefCount"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct UpgradedToTripleRefCount; - impl ::subxt::StorageEntry for UpgradedToTripleRefCount { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "UpgradedToTripleRefCount"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ExecutionPhase; - impl ::subxt::StorageEntry for ExecutionPhase { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "ExecutionPhase"; - type Value = runtime_types::frame_system::Phase; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The full account information for a particular account ID."] pub fn account( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::AccountData< - ::core::primitive::u128, - >, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 224u8, 184u8, 2u8, 14u8, 38u8, 177u8, 223u8, 98u8, 223u8, - 15u8, 130u8, 23u8, 212u8, 69u8, 61u8, 165u8, 171u8, 61u8, - 171u8, 57u8, 88u8, 71u8, 168u8, 172u8, 54u8, 91u8, 109u8, - 231u8, 169u8, 167u8, 195u8, 46u8, - ] - { - let entry = Account(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "Account", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, + 69u8, 77u8, 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8, + 174u8, 243u8, 252u8, 42u8, 65u8, 120u8, 229u8, 38u8, 210u8, + 255u8, 22u8, 40u8, 109u8, 223u8, + ], + ) } #[doc = " The full account information for a particular account ID."] - pub fn account_iter( + pub fn account_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Account<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 224u8, 184u8, 2u8, 14u8, 38u8, 177u8, 223u8, 98u8, 223u8, - 15u8, 130u8, 23u8, 212u8, 69u8, 61u8, 165u8, 171u8, 61u8, - 171u8, 57u8, 88u8, 71u8, 168u8, 172u8, 54u8, 91u8, 109u8, - 231u8, 169u8, 167u8, 195u8, 46u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "Account", + Vec::new(), + [ + 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, + 69u8, 77u8, 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8, + 174u8, 243u8, 252u8, 42u8, 65u8, 120u8, 229u8, 38u8, 210u8, + 255u8, 22u8, 40u8, 109u8, 223u8, + ], + ) } #[doc = " Total extrinsics count for the current block."] pub fn extrinsic_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, - 242u8, 53u8, 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, - 225u8, 28u8, 232u8, 4u8, 136u8, 41u8, 151u8, 82u8, 189u8, - 149u8, 49u8, 166u8, 139u8, 9u8, 163u8, 231u8, - ] - { - let entry = ExtrinsicCount; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "ExtrinsicCount", + vec![], + [ + 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, 242u8, + 53u8, 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, 225u8, 28u8, + 232u8, 4u8, 136u8, 41u8, 151u8, 82u8, 189u8, 149u8, 49u8, + 166u8, 139u8, 9u8, 163u8, 231u8, + ], + ) } #[doc = " The current weight for the block."] pub fn block_weight( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u64, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_support::weights::PerDispatchClass< + ::core::primitive::u64, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 2u8, 236u8, 190u8, 174u8, 244u8, 98u8, 194u8, 168u8, - 89u8, 208u8, 7u8, 45u8, 175u8, 171u8, 177u8, 121u8, - 215u8, 190u8, 184u8, 195u8, 49u8, 133u8, 44u8, 1u8, - 181u8, 215u8, 89u8, 84u8, 255u8, 16u8, 57u8, 152u8, - ] - { - let entry = BlockWeight; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "BlockWeight", + vec![], + [ + 91u8, 211u8, 177u8, 36u8, 147u8, 249u8, 55u8, 164u8, 48u8, + 49u8, 55u8, 11u8, 121u8, 193u8, 103u8, 69u8, 38u8, 142u8, + 148u8, 36u8, 137u8, 41u8, 115u8, 195u8, 31u8, 174u8, 163u8, + 125u8, 69u8, 5u8, 94u8, 79u8, + ], + ) } #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] pub fn all_extrinsics_len( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 202u8, 145u8, 209u8, 225u8, 40u8, 220u8, 174u8, 74u8, - 93u8, 164u8, 254u8, 248u8, 254u8, 192u8, 32u8, 117u8, - 96u8, 149u8, 53u8, 145u8, 219u8, 64u8, 234u8, 18u8, - 217u8, 200u8, 203u8, 141u8, 145u8, 28u8, 134u8, 60u8, - ] - { - let entry = AllExtrinsicsLen; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "AllExtrinsicsLen", + vec![], + [ + 202u8, 145u8, 209u8, 225u8, 40u8, 220u8, 174u8, 74u8, 93u8, + 164u8, 254u8, 248u8, 254u8, 192u8, 32u8, 117u8, 96u8, 149u8, + 53u8, 145u8, 219u8, 64u8, 234u8, 18u8, 217u8, 200u8, 203u8, + 141u8, 145u8, 28u8, 134u8, 60u8, + ], + ) } #[doc = " Map of block numbers to block hashes."] pub fn block_hash( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::sp_core::H256, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 24u8, 99u8, 146u8, 142u8, 205u8, 166u8, 4u8, 32u8, 218u8, - 213u8, 24u8, 236u8, 45u8, 116u8, 145u8, 204u8, 27u8, - 141u8, 169u8, 249u8, 111u8, 141u8, 37u8, 136u8, 45u8, - 73u8, 167u8, 217u8, 118u8, 206u8, 246u8, 120u8, - ] - { - let entry = BlockHash(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::H256, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "BlockHash", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, + 195u8, 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, + 106u8, 20u8, 168u8, 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, + 149u8, 200u8, 4u8, 220u8, 237u8, + ], + ) } #[doc = " Map of block numbers to block hashes."] - pub fn block_hash_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, BlockHash<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 24u8, 99u8, 146u8, 142u8, 205u8, 166u8, 4u8, 32u8, 218u8, - 213u8, 24u8, 236u8, 45u8, 116u8, 145u8, 204u8, 27u8, - 141u8, 169u8, 249u8, 111u8, 141u8, 37u8, 136u8, 45u8, - 73u8, 167u8, 217u8, 118u8, 206u8, 246u8, 120u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn block_hash_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::H256, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "BlockHash", + Vec::new(), + [ + 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, + 195u8, 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8, + 106u8, 20u8, 168u8, 80u8, 76u8, 235u8, 12u8, 51u8, 137u8, + 149u8, 200u8, 4u8, 220u8, 237u8, + ], + ) } #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] pub fn extrinsic_data( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, - 238u8, 211u8, 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, - 168u8, 125u8, 98u8, 23u8, 241u8, 59u8, 49u8, 86u8, 126u8, - 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ] - { - let entry = ExtrinsicData(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "ExtrinsicData", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, + 238u8, 211u8, 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, + 125u8, 98u8, 23u8, 241u8, 59u8, 49u8, 86u8, 126u8, 9u8, + 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, + ], + ) } #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] - pub fn extrinsic_data_iter( + pub fn extrinsic_data_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ExtrinsicData<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, - 238u8, 211u8, 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, - 168u8, 125u8, 98u8, 23u8, 241u8, 59u8, 49u8, 86u8, 126u8, - 9u8, 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "ExtrinsicData", + Vec::new(), + [ + 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, + 238u8, 211u8, 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8, + 125u8, 98u8, 23u8, 241u8, 59u8, 49u8, 86u8, 126u8, 9u8, + 114u8, 163u8, 160u8, 62u8, 50u8, 67u8, + ], + ) } #[doc = " The current block number being processed. Set by `execute_block`."] pub fn number( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, - 126u8, 235u8, 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, - 141u8, 232u8, 43u8, 204u8, 36u8, 87u8, 211u8, 141u8, - 187u8, 68u8, 236u8, 70u8, 193u8, 235u8, 164u8, 191u8, - ] - { - let entry = Number; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "Number", + vec![], + [ + 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, 126u8, + 235u8, 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, 141u8, 232u8, + 43u8, 204u8, 36u8, 87u8, 211u8, 141u8, 187u8, 68u8, 236u8, + 70u8, 193u8, 235u8, 164u8, 191u8, + ], + ) } #[doc = " Hash of the previous block."] pub fn parent_hash( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::sp_core::H256, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 194u8, 221u8, 147u8, 22u8, 68u8, 141u8, 32u8, 6u8, 202u8, - 39u8, 164u8, 184u8, 69u8, 126u8, 190u8, 101u8, 215u8, - 27u8, 127u8, 157u8, 200u8, 69u8, 170u8, 139u8, 232u8, - 27u8, 254u8, 181u8, 183u8, 105u8, 111u8, 177u8, - ] - { - let entry = ParentHash; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::H256, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "ParentHash", + vec![], + [ + 232u8, 206u8, 177u8, 119u8, 38u8, 57u8, 233u8, 50u8, 225u8, + 49u8, 169u8, 176u8, 210u8, 51u8, 231u8, 176u8, 234u8, 186u8, + 188u8, 112u8, 15u8, 152u8, 195u8, 232u8, 201u8, 97u8, 208u8, + 249u8, 9u8, 163u8, 69u8, 36u8, + ], + ) } #[doc = " Digest of the current block, also part of the block header."] pub fn digest( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::generic::digest::Digest, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 10u8, 176u8, 13u8, 228u8, 226u8, 42u8, 210u8, 151u8, - 107u8, 212u8, 136u8, 15u8, 38u8, 182u8, 225u8, 12u8, - 250u8, 56u8, 193u8, 243u8, 219u8, 113u8, 95u8, 233u8, - 21u8, 229u8, 125u8, 146u8, 92u8, 250u8, 32u8, 168u8, - ] - { - let entry = Digest; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::generic::digest::Digest, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "Digest", + vec![], + [ + 83u8, 141u8, 200u8, 132u8, 182u8, 55u8, 197u8, 122u8, 13u8, + 159u8, 31u8, 42u8, 60u8, 191u8, 89u8, 221u8, 242u8, 47u8, + 199u8, 213u8, 48u8, 216u8, 131u8, 168u8, 245u8, 82u8, 56u8, + 190u8, 62u8, 69u8, 96u8, 37u8, + ], + ) } #[doc = " Events deposited for the current block."] #[doc = ""] @@ -1250,77 +822,49 @@ pub mod api { #[doc = " just in case someone still reads them from within the runtime."] pub fn events( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::polkadot_runtime::Event, - ::subxt::sp_core::H256, - >, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::polkadot_runtime::Event, + ::subxt::ext::sp_core::H256, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 70u8, 6u8, 210u8, 172u8, 48u8, 188u8, 175u8, 84u8, 44u8, - 231u8, 130u8, 201u8, 97u8, 122u8, 141u8, 35u8, 115u8, - 91u8, 218u8, 225u8, 220u8, 39u8, 221u8, 100u8, 65u8, - 38u8, 52u8, 119u8, 209u8, 44u8, 39u8, 175u8, - ] - { - let entry = Events; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "Events", + vec![], + [ + 203u8, 182u8, 158u8, 92u8, 173u8, 25u8, 74u8, 25u8, 74u8, + 105u8, 133u8, 201u8, 185u8, 240u8, 214u8, 144u8, 238u8, + 248u8, 15u8, 16u8, 192u8, 84u8, 233u8, 41u8, 169u8, 244u8, + 64u8, 237u8, 36u8, 72u8, 145u8, 95u8, + ], + ) } #[doc = " The number of events in the `Events` list."] pub fn event_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, - 26u8, 208u8, 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, - 249u8, 25u8, 202u8, 185u8, 161u8, 144u8, 167u8, 104u8, - 127u8, 187u8, 38u8, 18u8, 52u8, 61u8, 66u8, 112u8, - ] - { - let entry = EventCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "EventCount", + vec![], + [ + 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, 26u8, + 208u8, 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, 249u8, 25u8, + 202u8, 185u8, 161u8, 144u8, 167u8, 104u8, 127u8, 187u8, 38u8, + 18u8, 52u8, 61u8, 66u8, 112u8, + ], + ) } #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] #[doc = " of events in the `>` list."] @@ -1334,38 +878,27 @@ pub mod api { #[doc = " no notification will be triggered thus the event might be lost."] pub fn event_topics( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 231u8, 73u8, 172u8, 223u8, 210u8, 145u8, 151u8, 102u8, - 73u8, 23u8, 140u8, 55u8, 97u8, 40u8, 219u8, 239u8, 229u8, - 177u8, 72u8, 41u8, 93u8, 178u8, 7u8, 209u8, 57u8, 86u8, - 153u8, 252u8, 86u8, 152u8, 245u8, 179u8, - ] - { - let entry = EventTopics(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "EventTopics", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, + 1u8, 129u8, 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, + 139u8, 196u8, 154u8, 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, + 176u8, 232u8, 82u8, 223u8, 38u8, + ], + ) } #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] #[doc = " of events in the `>` list."] @@ -1377,320 +910,214 @@ pub mod api { #[doc = " The value has the type `(T::BlockNumber, EventIndex)` because if we used only just"] #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] #[doc = " no notification will be triggered thus the event might be lost."] - pub fn event_topics_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, EventTopics<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 231u8, 73u8, 172u8, 223u8, 210u8, 145u8, 151u8, 102u8, - 73u8, 23u8, 140u8, 55u8, 97u8, 40u8, 219u8, 239u8, 229u8, - 177u8, 72u8, 41u8, 93u8, 178u8, 7u8, 209u8, 57u8, 86u8, - 153u8, 252u8, 86u8, 152u8, 245u8, 179u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn event_topics_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "EventTopics", + Vec::new(), + [ + 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, + 1u8, 129u8, 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8, + 139u8, 196u8, 154u8, 111u8, 110u8, 178u8, 24u8, 44u8, 183u8, + 176u8, 232u8, 82u8, 223u8, 38u8, + ], + ) } #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] pub fn last_runtime_upgrade( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::frame_system::LastRuntimeUpgradeInfo, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 219u8, 153u8, 158u8, 38u8, 45u8, 65u8, 151u8, 137u8, - 53u8, 76u8, 11u8, 181u8, 218u8, 248u8, 125u8, 190u8, - 100u8, 240u8, 173u8, 75u8, 179u8, 137u8, 198u8, 197u8, - 248u8, 185u8, 118u8, 58u8, 42u8, 165u8, 125u8, 119u8, - ] - { - let entry = LastRuntimeUpgrade; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_system::LastRuntimeUpgradeInfo, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "LastRuntimeUpgrade", + vec![], + [ + 52u8, 37u8, 117u8, 111u8, 57u8, 130u8, 196u8, 14u8, 99u8, + 77u8, 91u8, 126u8, 178u8, 249u8, 78u8, 34u8, 9u8, 194u8, + 92u8, 105u8, 113u8, 81u8, 185u8, 127u8, 245u8, 184u8, 60u8, + 29u8, 234u8, 182u8, 96u8, 196u8, + ], + ) } #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] pub fn upgraded_to_u32_ref_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8, - 175u8, 175u8, 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, - 141u8, 32u8, 107u8, 3u8, 114u8, 83u8, 250u8, 180u8, - 233u8, 152u8, 54u8, 187u8, 99u8, 131u8, 204u8, - ] - { - let entry = UpgradedToU32RefCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "UpgradedToU32RefCount", + vec![], + [ + 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8, + 175u8, 175u8, 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, 141u8, + 32u8, 107u8, 3u8, 114u8, 83u8, 250u8, 180u8, 233u8, 152u8, + 54u8, 187u8, 99u8, 131u8, 204u8, + ], + ) } #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] #[doc = " (default) if not."] pub fn upgraded_to_triple_ref_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8, - 56u8, 201u8, 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, - 105u8, 14u8, 230u8, 103u8, 155u8, 246u8, 99u8, 53u8, - 207u8, 225u8, 128u8, 186u8, 76u8, 40u8, 185u8, - ] - { - let entry = UpgradedToTripleRefCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "UpgradedToTripleRefCount", + vec![], + [ + 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8, + 56u8, 201u8, 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, 105u8, + 14u8, 230u8, 103u8, 155u8, 246u8, 99u8, 53u8, 207u8, 225u8, + 128u8, 186u8, 76u8, 40u8, 185u8, + ], + ) } #[doc = " The execution phase of the block."] pub fn execution_phase( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 13u8, 230u8, 220u8, 239u8, 161u8, 172u8, 122u8, - 188u8, 95u8, 141u8, 118u8, 91u8, 158u8, 111u8, 145u8, - 243u8, 173u8, 226u8, 212u8, 187u8, 118u8, 94u8, 132u8, - 221u8, 244u8, 61u8, 148u8, 217u8, 30u8, 238u8, 225u8, - ] - { - let entry = ExecutionPhase; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_system::Phase, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "System", + "ExecutionPhase", + vec![], + [ + 230u8, 183u8, 221u8, 135u8, 226u8, 223u8, 55u8, 104u8, 138u8, + 224u8, 103u8, 156u8, 222u8, 99u8, 203u8, 199u8, 164u8, 168u8, + 193u8, 133u8, 201u8, 155u8, 63u8, 95u8, 17u8, 206u8, 165u8, + 123u8, 161u8, 33u8, 172u8, 93u8, + ], + ) + } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Block & extrinsics weights: base values and limits."] pub fn block_weights( &self, - ) -> ::core::result::Result< - runtime_types::frame_system::limits::BlockWeights, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("System", "BlockWeights")? - == [ - 42u8, 201u8, 244u8, 211u8, 62u8, 161u8, 172u8, 171u8, 167u8, - 103u8, 140u8, 240u8, 106u8, 225u8, 55u8, 34u8, 162u8, 11u8, - 59u8, 8u8, 251u8, 103u8, 50u8, 183u8, 213u8, 64u8, 0u8, 59u8, - 189u8, 112u8, 175u8, 120u8, - ] - { - let pallet = metadata.pallet("System")?; - let constant = pallet.constant("BlockWeights")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_system::limits::BlockWeights, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "System", + "BlockWeights", + [ + 153u8, 164u8, 86u8, 79u8, 97u8, 114u8, 248u8, 181u8, 179u8, + 186u8, 214u8, 124u8, 215u8, 96u8, 116u8, 109u8, 215u8, 182u8, + 61u8, 10u8, 77u8, 74u8, 29u8, 125u8, 131u8, 111u8, 249u8, + 208u8, 233u8, 170u8, 11u8, 14u8, + ], + ) } #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::core::result::Result< - runtime_types::frame_system::limits::BlockLength, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("System", "BlockLength")? - == [ - 120u8, 249u8, 182u8, 103u8, 246u8, 214u8, 149u8, 44u8, 42u8, - 64u8, 2u8, 56u8, 157u8, 184u8, 43u8, 195u8, 214u8, 251u8, - 207u8, 207u8, 249u8, 105u8, 203u8, 108u8, 179u8, 93u8, 93u8, - 246u8, 40u8, 175u8, 160u8, 114u8, - ] - { - let pallet = metadata.pallet("System")?; - let constant = pallet.constant("BlockLength")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_system::limits::BlockLength, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "System", + "BlockLength", + [ + 116u8, 184u8, 225u8, 228u8, 207u8, 203u8, 4u8, 220u8, 234u8, + 198u8, 150u8, 108u8, 205u8, 87u8, 194u8, 131u8, 229u8, 51u8, + 140u8, 4u8, 47u8, 12u8, 200u8, 144u8, 153u8, 62u8, 51u8, + 39u8, 138u8, 205u8, 203u8, 236u8, + ], + ) } #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] pub fn block_hash_count( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("System", "BlockHashCount")? - == [ - 123u8, 126u8, 182u8, 103u8, 71u8, 187u8, 233u8, 8u8, 47u8, - 226u8, 159u8, 139u8, 0u8, 59u8, 190u8, 135u8, 189u8, 77u8, - 190u8, 81u8, 39u8, 198u8, 224u8, 219u8, 70u8, 143u8, 6u8, - 132u8, 196u8, 61u8, 117u8, 194u8, - ] - { - let pallet = metadata.pallet("System")?; - let constant = pallet.constant("BlockHashCount")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "System", + "BlockHashCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The weight of runtime database operations the runtime can invoke."] pub fn db_weight( &self, - ) -> ::core::result::Result< - runtime_types::frame_support::weights::RuntimeDbWeight, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("System", "DbWeight")? - == [ - 159u8, 93u8, 33u8, 204u8, 10u8, 85u8, 53u8, 104u8, 180u8, - 190u8, 30u8, 135u8, 158u8, 108u8, 240u8, 172u8, 234u8, 169u8, - 6u8, 147u8, 95u8, 39u8, 231u8, 137u8, 204u8, 38u8, 100u8, - 46u8, 252u8, 94u8, 119u8, 213u8, - ] - { - let pallet = metadata.pallet("System")?; - let constant = pallet.constant("DbWeight")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_support::weights::RuntimeDbWeight, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "System", + "DbWeight", + [ + 124u8, 162u8, 190u8, 149u8, 49u8, 177u8, 162u8, 231u8, 62u8, + 167u8, 199u8, 181u8, 43u8, 232u8, 185u8, 116u8, 195u8, 51u8, + 233u8, 223u8, 20u8, 129u8, 246u8, 13u8, 65u8, 180u8, 64u8, + 9u8, 157u8, 59u8, 245u8, 118u8, + ], + ) } #[doc = " Get the chain's current version."] pub fn version( &self, - ) -> ::core::result::Result< - runtime_types::sp_version::RuntimeVersion, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("System", "Version")? - == [ - 149u8, 89u8, 207u8, 225u8, 53u8, 68u8, 197u8, 29u8, 227u8, - 30u8, 125u8, 163u8, 182u8, 142u8, 100u8, 218u8, 185u8, 91u8, - 29u8, 108u8, 235u8, 180u8, 21u8, 89u8, 134u8, 222u8, 107u8, - 134u8, 139u8, 79u8, 252u8, 181u8, - ] - { - let pallet = metadata.pallet("System")?; - let constant = pallet.constant("Version")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_version::RuntimeVersion, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "System", + "Version", + [ + 93u8, 98u8, 57u8, 243u8, 229u8, 8u8, 234u8, 231u8, 72u8, + 230u8, 139u8, 47u8, 63u8, 181u8, 17u8, 2u8, 220u8, 231u8, + 104u8, 237u8, 185u8, 143u8, 165u8, 253u8, 188u8, 76u8, 147u8, + 12u8, 170u8, 26u8, 74u8, 200u8, + ], + ) } #[doc = " The designated SS85 prefix of this chain."] #[doc = ""] @@ -1699,43 +1126,37 @@ pub mod api { #[doc = " an identifier of the chain."] pub fn ss58_prefix( &self, - ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("System", "SS58Prefix")? - == [ - 80u8, 239u8, 133u8, 243u8, 151u8, 113u8, 37u8, 41u8, 100u8, - 145u8, 201u8, 253u8, 29u8, 81u8, 203u8, 97u8, 202u8, 212u8, - 105u8, 25u8, 177u8, 227u8, 114u8, 66u8, 40u8, 194u8, 250u8, - 96u8, 166u8, 87u8, 32u8, 185u8, - ] - { - let pallet = metadata.pallet("System")?; - let constant = pallet.constant("SS58Prefix")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "System", + "SS58Prefix", + [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, + 227u8, 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, + 184u8, 72u8, 169u8, 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, + 123u8, 128u8, 193u8, 29u8, 70u8, + ], + ) } } } } pub mod scheduler { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Schedule { pub when: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( @@ -1746,24 +1167,24 @@ pub mod api { pub call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, } - impl ::subxt::Call for Schedule { - const PALLET: &'static str = "Scheduler"; - const FUNCTION: &'static str = "schedule"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Cancel { pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for Cancel { - const PALLET: &'static str = "Scheduler"; - const FUNCTION: &'static str = "cancel"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ScheduleNamed { pub id: ::std::vec::Vec<::core::primitive::u8>, pub when: ::core::primitive::u32, @@ -1775,23 +1196,23 @@ pub mod api { pub call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, } - impl ::subxt::Call for ScheduleNamed { - const PALLET: &'static str = "Scheduler"; - const FUNCTION: &'static str = "schedule_named"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CancelNamed { pub id: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for CancelNamed { - const PALLET: &'static str = "Scheduler"; - const FUNCTION: &'static str = "cancel_named"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ScheduleAfter { pub after: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( @@ -1802,15 +1223,15 @@ pub mod api { pub call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, } - impl ::subxt::Call for ScheduleAfter { - const PALLET: &'static str = "Scheduler"; - const FUNCTION: &'static str = "schedule_after"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ScheduleNamedAfter { pub id: ::std::vec::Vec<::core::primitive::u8>, pub after: ::core::primitive::u32, @@ -1822,29 +1243,12 @@ pub mod api { pub call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, } - impl ::subxt::Call for ScheduleNamedAfter { - const PALLET: &'static str = "Scheduler"; - const FUNCTION: &'static str = "schedule_named_after"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Anonymously schedule a task."] pub fn schedule( &self, @@ -1856,77 +1260,53 @@ pub mod api { priority: ::core::primitive::u8, call: runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Schedule, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 65u8, 105u8, 62u8, 249u8, 104u8, 239u8, 42u8, 123u8, 8u8, - 42u8, 72u8, 186u8, 237u8, 57u8, 116u8, 132u8, 131u8, 41u8, - 47u8, 128u8, 153u8, 21u8, 69u8, 45u8, 250u8, 130u8, 154u8, - 237u8, 172u8, 227u8, 203u8, 95u8, - ] - { - let call = Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ::subxt::ext::sp_core::H256, + >, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Scheduler", + call: "schedule", + data: Schedule { + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 137u8, 178u8, 250u8, 136u8, 93u8, 23u8, 136u8, 247u8, 212u8, + 74u8, 92u8, 177u8, 23u8, 35u8, 116u8, 23u8, 205u8, 118u8, + 171u8, 162u8, 117u8, 107u8, 138u8, 142u8, 129u8, 52u8, 137u8, + 66u8, 69u8, 161u8, 243u8, 112u8, + ], + ) } #[doc = "Cancel an anonymously scheduled task."] pub fn cancel( &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Cancel, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 118u8, 0u8, 188u8, 218u8, 148u8, 86u8, 139u8, 15u8, 3u8, - 161u8, 6u8, 150u8, 46u8, 32u8, 85u8, 179u8, 106u8, 113u8, - 240u8, 115u8, 167u8, 114u8, 243u8, 69u8, 103u8, 60u8, 99u8, - 135u8, 21u8, 8u8, 19u8, 225u8, - ] - { - let call = Cancel { when, index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Scheduler", + call: "cancel", + data: Cancel { when, index }, + }, + [ + 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8, + 30u8, 89u8, 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8, + 253u8, 161u8, 103u8, 178u8, 227u8, 152u8, 180u8, 80u8, 156u8, + 82u8, 126u8, 132u8, 120u8, + ], + ) } #[doc = "Schedule a named task."] pub fn schedule_named( @@ -1940,77 +1320,53 @@ pub mod api { priority: ::core::primitive::u8, call: runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ScheduleNamed, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 39u8, 220u8, 199u8, 201u8, 59u8, 156u8, 51u8, 244u8, 243u8, - 29u8, 6u8, 18u8, 158u8, 9u8, 251u8, 26u8, 207u8, 180u8, - 158u8, 198u8, 116u8, 0u8, 18u8, 186u8, 220u8, 253u8, 45u8, - 158u8, 247u8, 206u8, 234u8, 86u8, - ] - { - let call = ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ::subxt::ext::sp_core::H256, + >, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Scheduler", + call: "schedule_named", + data: ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 1u8, 236u8, 205u8, 140u8, 220u8, 43u8, 237u8, 225u8, 189u8, + 7u8, 92u8, 146u8, 170u8, 169u8, 139u8, 201u8, 130u8, 96u8, + 93u8, 5u8, 5u8, 127u8, 23u8, 18u8, 214u8, 2u8, 29u8, 91u8, + 45u8, 122u8, 81u8, 105u8, + ], + ) } #[doc = "Cancel a named scheduled task."] pub fn cancel_named( &self, id: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelNamed, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 118u8, 221u8, 232u8, 126u8, 67u8, 134u8, 33u8, 7u8, 224u8, - 110u8, 181u8, 18u8, 57u8, 39u8, 15u8, 64u8, 90u8, 132u8, 2u8, - 238u8, 19u8, 241u8, 194u8, 120u8, 5u8, 109u8, 74u8, 205u8, - 42u8, 244u8, 99u8, 54u8, - ] - { - let call = CancelNamed { id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Scheduler", + call: "cancel_named", + data: CancelNamed { id }, + }, + [ + 42u8, 232u8, 92u8, 167u8, 113u8, 136u8, 7u8, 215u8, 88u8, + 117u8, 74u8, 26u8, 225u8, 230u8, 244u8, 106u8, 150u8, 112u8, + 46u8, 228u8, 96u8, 252u8, 78u8, 126u8, 39u8, 207u8, 36u8, + 110u8, 83u8, 62u8, 84u8, 241u8, + ], + ) } #[doc = "Anonymously schedule a task after a delay."] #[doc = ""] @@ -2027,42 +1383,30 @@ pub mod api { priority: ::core::primitive::u8, call: runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ScheduleAfter, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 115u8, 139u8, 93u8, 218u8, 175u8, 210u8, 114u8, 59u8, 180u8, - 36u8, 5u8, 193u8, 86u8, 250u8, 222u8, 35u8, 35u8, 94u8, 25u8, - 130u8, 192u8, 166u8, 0u8, 31u8, 127u8, 114u8, 95u8, 24u8, - 64u8, 91u8, 135u8, 114u8, - ] - { - let call = ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ::subxt::ext::sp_core::H256, + >, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Scheduler", + call: "schedule_after", + data: ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 128u8, 226u8, 249u8, 226u8, 27u8, 178u8, 222u8, 22u8, 126u8, + 156u8, 70u8, 146u8, 195u8, 112u8, 15u8, 110u8, 222u8, 2u8, + 89u8, 85u8, 144u8, 133u8, 163u8, 177u8, 62u8, 73u8, 55u8, + 47u8, 172u8, 52u8, 116u8, 5u8, + ], + ) } #[doc = "Schedule a named task after a delay."] #[doc = ""] @@ -2080,43 +1424,31 @@ pub mod api { priority: ::core::primitive::u8, call: runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ScheduleNamedAfter, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 245u8, 76u8, 86u8, 31u8, 17u8, 228u8, 176u8, 203u8, 22u8, - 130u8, 202u8, 237u8, 206u8, 248u8, 58u8, 252u8, 164u8, 72u8, - 116u8, 93u8, 183u8, 28u8, 244u8, 16u8, 32u8, 131u8, 58u8, - 95u8, 195u8, 88u8, 243u8, 183u8, - ] - { - let call = ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ::subxt::ext::sp_core::H256, + >, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Scheduler", + call: "schedule_named_after", + data: ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 13u8, 12u8, 26u8, 103u8, 66u8, 180u8, 139u8, 149u8, 147u8, + 0u8, 51u8, 26u8, 195u8, 42u8, 139u8, 29u8, 29u8, 188u8, + 218u8, 188u8, 114u8, 253u8, 33u8, 47u8, 90u8, 241u8, 128u8, + 12u8, 242u8, 169u8, 82u8, 235u8, + ], + ) } } } @@ -2124,27 +1456,39 @@ pub mod api { pub type Event = runtime_types::pallet_scheduler::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Scheduled some task."] pub struct Scheduled { pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, } - impl ::subxt::Event for Scheduled { + impl ::subxt::events::StaticEvent for Scheduled { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Scheduled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Canceled some task."] pub struct Canceled { pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, } - impl ::subxt::Event for Canceled { + impl ::subxt::events::StaticEvent for Canceled { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Canceled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Dispatched some task."] pub struct Dispatched { pub task: (::core::primitive::u32, ::core::primitive::u32), @@ -2152,323 +1496,194 @@ pub mod api { pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for Dispatched { + impl ::subxt::events::StaticEvent for Dispatched { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Dispatched"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The call for the provided hash was not found so the task has been aborted."] pub struct CallLookupFailed { pub task: (::core::primitive::u32, ::core::primitive::u32), pub id: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, pub error: runtime_types::frame_support::traits::schedule::LookupError, } - impl ::subxt::Event for CallLookupFailed { + impl ::subxt::events::StaticEvent for CallLookupFailed { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "CallLookupFailed"; } } pub mod storage { use super::runtime_types; - pub struct Agenda<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Agenda<'_> { - const PALLET: &'static str = "Scheduler"; - const STORAGE: &'static str = "Agenda"; - type Value = ::std::vec::Vec< - ::core::option::Option< - runtime_types::pallet_scheduler::ScheduledV3< - runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - ::core::primitive::u32, - runtime_types::polkadot_runtime::OriginCaller, - ::subxt::sp_core::crypto::AccountId32, - >, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Lookup<'a>(pub &'a [::core::primitive::u8]); - impl ::subxt::StorageEntry for Lookup<'_> { - const PALLET: &'static str = "Scheduler"; - const STORAGE: &'static str = "Lookup"; - type Value = (::core::primitive::u32, ::core::primitive::u32); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : & 'a :: core :: primitive :: u32 , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 75u8, 4u8, 32u8, 14u8, 49u8, 69u8, 183u8, 81u8, 195u8, - 51u8, 83u8, 183u8, 41u8, 69u8, 255u8, 112u8, 131u8, - 132u8, 72u8, 115u8, 249u8, 142u8, 23u8, 219u8, 172u8, - 84u8, 11u8, 245u8, 139u8, 70u8, 181u8, 86u8, - ] - { - let entry = Agenda(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Agenda<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 75u8, 4u8, 32u8, 14u8, 49u8, 69u8, 183u8, 81u8, 195u8, - 51u8, 83u8, 183u8, 41u8, 69u8, 255u8, 112u8, 131u8, - 132u8, 72u8, 115u8, 249u8, 142u8, 23u8, 219u8, 172u8, - 84u8, 11u8, 245u8, 139u8, 70u8, 181u8, 86u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub struct StorageApi; + impl StorageApi { + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : & :: core :: primitive :: u32 ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: storage :: address :: AddressIsIterable , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Scheduler", + "Agenda", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 126u8, 252u8, 83u8, 155u8, 229u8, 159u8, 72u8, 83u8, 118u8, + 67u8, 86u8, 164u8, 64u8, 243u8, 165u8, 120u8, 161u8, 78u8, + 165u8, 42u8, 87u8, 247u8, 87u8, 55u8, 107u8, 164u8, 109u8, + 97u8, 57u8, 92u8, 57u8, 10u8, + ], + ) + } + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: storage :: address :: AddressIsIterable , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Scheduler", + "Agenda", + Vec::new(), + [ + 126u8, 252u8, 83u8, 155u8, 229u8, 159u8, 72u8, 83u8, 118u8, + 67u8, 86u8, 164u8, 64u8, 243u8, 165u8, 120u8, 161u8, 78u8, + 165u8, 42u8, 87u8, 247u8, 87u8, 55u8, 107u8, 164u8, 109u8, + 97u8, 57u8, 92u8, 57u8, 10u8, + ], + ) } #[doc = " Lookup from identity to the block number and index of the task."] pub fn lookup( &self, - _0: &'a [::core::primitive::u8], - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 56u8, 105u8, 156u8, 110u8, 251u8, 141u8, 219u8, 56u8, - 131u8, 57u8, 180u8, 33u8, 48u8, 30u8, 193u8, 194u8, - 169u8, 182u8, 168u8, 43u8, 36u8, 202u8, 222u8, 182u8, - 41u8, 216u8, 222u8, 1u8, 72u8, 165u8, 62u8, 166u8, - ] - { - let entry = Lookup(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &&[::core::primitive::u8], + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Scheduler", + "Lookup", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 56u8, 105u8, 156u8, 110u8, 251u8, 141u8, 219u8, 56u8, 131u8, + 57u8, 180u8, 33u8, 48u8, 30u8, 193u8, 194u8, 169u8, 182u8, + 168u8, 43u8, 36u8, 202u8, 222u8, 182u8, 41u8, 216u8, 222u8, + 1u8, 72u8, 165u8, 62u8, 166u8, + ], + ) } #[doc = " Lookup from identity to the block number and index of the task."] - pub fn lookup_iter( + pub fn lookup_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Lookup<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 56u8, 105u8, 156u8, 110u8, 251u8, 141u8, 219u8, 56u8, - 131u8, 57u8, 180u8, 33u8, 48u8, 30u8, 193u8, 194u8, - 169u8, 182u8, 168u8, 43u8, 36u8, 202u8, 222u8, 182u8, - 41u8, 216u8, 222u8, 1u8, 72u8, 165u8, 62u8, 166u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Scheduler", + "Lookup", + Vec::new(), + [ + 56u8, 105u8, 156u8, 110u8, 251u8, 141u8, 219u8, 56u8, 131u8, + 57u8, 180u8, 33u8, 48u8, 30u8, 193u8, 194u8, 169u8, 182u8, + 168u8, 43u8, 36u8, 202u8, 222u8, 182u8, 41u8, 216u8, 222u8, + 1u8, 72u8, 165u8, 62u8, 166u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The maximum weight that may be scheduled per block for any dispatchables of less"] #[doc = " priority than `schedule::HARD_DEADLINE`."] pub fn maximum_weight( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Scheduler", "MaximumWeight")? - == [ - 235u8, 167u8, 74u8, 91u8, 5u8, 188u8, 76u8, 138u8, 208u8, - 10u8, 100u8, 241u8, 65u8, 185u8, 195u8, 212u8, 38u8, 161u8, - 27u8, 113u8, 220u8, 214u8, 28u8, 214u8, 67u8, 169u8, 21u8, - 10u8, 230u8, 130u8, 251u8, 175u8, - ] - { - let pallet = metadata.pallet("Scheduler")?; - let constant = pallet.constant("MaximumWeight")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Scheduler", + "MaximumWeight", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } #[doc = " The maximum number of scheduled calls in the queue for a single block."] #[doc = " Not strictly enforced, but used for weight estimation."] pub fn max_scheduled_per_block( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Scheduler", "MaxScheduledPerBlock")? - == [ - 64u8, 25u8, 128u8, 202u8, 165u8, 97u8, 30u8, 196u8, 174u8, - 132u8, 139u8, 223u8, 88u8, 20u8, 228u8, 203u8, 253u8, 201u8, - 83u8, 157u8, 161u8, 120u8, 187u8, 165u8, 4u8, 64u8, 184u8, - 34u8, 28u8, 129u8, 136u8, 13u8, - ] - { - let pallet = metadata.pallet("Scheduler")?; - let constant = pallet.constant("MaxScheduledPerBlock")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Scheduler", + "MaxScheduledPerBlock", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod preimage { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NotePreimage { pub bytes: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "note_preimage"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct UnnotePreimage { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for UnnotePreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "unnote_preimage"; + pub hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RequestPreimage { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for RequestPreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "request_preimage"; + pub hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct UnrequestPreimage { - pub hash: ::subxt::sp_core::H256, + pub hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Call for UnrequestPreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "unrequest_preimage"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Register a preimage on-chain."] #[doc = ""] #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] @@ -2476,69 +1691,45 @@ pub mod api { pub fn note_preimage( &self, bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NotePreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 116u8, 66u8, 88u8, 251u8, 187u8, 86u8, 82u8, 136u8, 215u8, - 82u8, 240u8, 255u8, 70u8, 190u8, 116u8, 187u8, 232u8, 168u8, - 125u8, 234u8, 8u8, 21u8, 247u8, 195u8, 167u8, 237u8, 27u8, - 202u8, 123u8, 25u8, 225u8, 131u8, - ] - { - let call = NotePreimage { bytes }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Preimage", + call: "note_preimage", + data: NotePreimage { bytes }, + }, + [ + 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, + 89u8, 149u8, 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, + 35u8, 17u8, 125u8, 130u8, 31u8, 206u8, 106u8, 83u8, 163u8, + 192u8, 81u8, 23u8, 232u8, 230u8, + ], + ) } #[doc = "Clear an unrequested preimage from the runtime storage."] pub fn unnote_preimage( &self, - hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - UnnotePreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 162u8, 195u8, 220u8, 134u8, 147u8, 150u8, 145u8, 130u8, - 231u8, 104u8, 83u8, 70u8, 42u8, 90u8, 248u8, 61u8, 223u8, - 63u8, 162u8, 219u8, 92u8, 248u8, 179u8, 99u8, 158u8, 252u8, - 89u8, 59u8, 115u8, 130u8, 73u8, 21u8, - ] - { - let call = UnnotePreimage { hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Preimage", + call: "unnote_preimage", + data: UnnotePreimage { hash }, + }, + [ + 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, + 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, + 147u8, 116u8, 27u8, 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, + 8u8, 19u8, 242u8, 207u8, 17u8, + ], + ) } #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] #[doc = ""] @@ -2546,72 +1737,48 @@ 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::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RequestPreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 186u8, 108u8, 235u8, 145u8, 104u8, 29u8, 22u8, 33u8, 21u8, - 121u8, 32u8, 75u8, 141u8, 125u8, 205u8, 186u8, 210u8, 184u8, - 134u8, 248u8, 74u8, 175u8, 104u8, 91u8, 247u8, 151u8, 70u8, - 192u8, 183u8, 163u8, 245u8, 180u8, - ] - { - let call = RequestPreimage { hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Preimage", + call: "request_preimage", + data: RequestPreimage { hash }, + }, + [ + 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, + 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, + 170u8, 169u8, 127u8, 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, + 228u8, 141u8, 83u8, 162u8, 233u8, + ], + ) } #[doc = "Clear a previously made request for a preimage."] #[doc = ""] #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] pub fn unrequest_preimage( &self, - hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - UnrequestPreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 160u8, 6u8, 6u8, 198u8, 77u8, 37u8, 28u8, 86u8, 240u8, 160u8, - 128u8, 123u8, 144u8, 150u8, 150u8, 60u8, 107u8, 148u8, 189u8, - 192u8, 125u8, 25u8, 55u8, 212u8, 193u8, 212u8, 198u8, 131u8, - 113u8, 37u8, 213u8, 152u8, - ] - { - let call = UnrequestPreimage { hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Preimage", + call: "unrequest_preimage", + data: UnrequestPreimage { hash }, + }, + [ + 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, + 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, + 105u8, 152u8, 69u8, 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, + 130u8, 11u8, 113u8, 187u8, 108u8, + ], + ) } } } @@ -2619,237 +1786,168 @@ pub mod api { pub type Event = runtime_types::pallet_preimage::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A preimage has been noted."] pub struct Noted { - pub hash: ::subxt::sp_core::H256, + pub hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Noted { + impl ::subxt::events::StaticEvent for Noted { const PALLET: &'static str = "Preimage"; const EVENT: &'static str = "Noted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A preimage has been requested."] pub struct Requested { - pub hash: ::subxt::sp_core::H256, + pub hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Requested { + impl ::subxt::events::StaticEvent for Requested { const PALLET: &'static str = "Preimage"; const EVENT: &'static str = "Requested"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A preimage has ben cleared."] pub struct Cleared { - pub hash: ::subxt::sp_core::H256, + pub hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Cleared { + impl ::subxt::events::StaticEvent for Cleared { const PALLET: &'static str = "Preimage"; const EVENT: &'static str = "Cleared"; } } pub mod storage { use super::runtime_types; - pub struct StatusFor<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for StatusFor<'_> { - const PALLET: &'static str = "Preimage"; - const STORAGE: &'static str = "StatusFor"; - type Value = runtime_types::pallet_preimage::RequestStatus< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct PreimageFor<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for PreimageFor<'_> { - const PALLET: &'static str = "Preimage"; - const STORAGE: &'static str = "PreimageFor"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The request status of a given hash."] pub fn status_for( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_preimage::RequestStatus< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 239u8, 53u8, 52u8, 248u8, 196u8, 74u8, 99u8, 113u8, - 135u8, 186u8, 100u8, 46u8, 246u8, 245u8, 160u8, 102u8, - 81u8, 96u8, 85u8, 11u8, 27u8, 53u8, 139u8, 8u8, 18u8, - 208u8, 241u8, 139u8, 162u8, 239u8, 113u8, 28u8, - ] - { - let entry = StatusFor(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Preimage", + "StatusFor", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 244u8, 6u8, 120u8, 75u8, 164u8, 32u8, 39u8, 15u8, 107u8, + 127u8, 19u8, 242u8, 80u8, 121u8, 18u8, 219u8, 253u8, 174u8, + 138u8, 9u8, 76u8, 219u8, 156u8, 229u8, 78u8, 155u8, 233u8, + 162u8, 215u8, 237u8, 23u8, 123u8, + ], + ) } #[doc = " The request status of a given hash."] - pub fn status_for_iter( + pub fn status_for_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, StatusFor<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 239u8, 53u8, 52u8, 248u8, 196u8, 74u8, 99u8, 113u8, - 135u8, 186u8, 100u8, 46u8, 246u8, 245u8, 160u8, 102u8, - 81u8, 96u8, 85u8, 11u8, 27u8, 53u8, 139u8, 8u8, 18u8, - 208u8, 241u8, 139u8, 162u8, 239u8, 113u8, 28u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Preimage", + "StatusFor", + Vec::new(), + [ + 244u8, 6u8, 120u8, 75u8, 164u8, 32u8, 39u8, 15u8, 107u8, + 127u8, 19u8, 242u8, 80u8, 121u8, 18u8, 219u8, 253u8, 174u8, + 138u8, 9u8, 76u8, 219u8, 156u8, 229u8, 78u8, 155u8, 233u8, + 162u8, 215u8, 237u8, 23u8, 123u8, + ], + ) } #[doc = " The preimages stored by this pallet."] pub fn preimage_for( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 153u8, 48u8, 185u8, 144u8, 57u8, 68u8, 133u8, 92u8, - 225u8, 172u8, 36u8, 62u8, 152u8, 162u8, 15u8, 139u8, - 140u8, 82u8, 118u8, 63u8, 31u8, 158u8, 197u8, 26u8, - 141u8, 210u8, 150u8, 82u8, 109u8, 100u8, 144u8, 56u8, - ] - { - let entry = PreimageFor(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Preimage", + "PreimageFor", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 82u8, 216u8, 233u8, 5u8, 102u8, 206u8, 96u8, 64u8, 133u8, + 179u8, 63u8, 45u8, 53u8, 42u8, 190u8, 95u8, 77u8, 197u8, + 60u8, 11u8, 59u8, 231u8, 190u8, 219u8, 87u8, 149u8, 112u8, + 196u8, 33u8, 238u8, 247u8, 117u8, + ], + ) } #[doc = " The preimages stored by this pallet."] - pub fn preimage_for_iter( + pub fn preimage_for_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PreimageFor<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 153u8, 48u8, 185u8, 144u8, 57u8, 68u8, 133u8, 92u8, - 225u8, 172u8, 36u8, 62u8, 152u8, 162u8, 15u8, 139u8, - 140u8, 82u8, 118u8, 63u8, 31u8, 158u8, 197u8, 26u8, - 141u8, 210u8, 150u8, 82u8, 109u8, 100u8, 144u8, 56u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Preimage", + "PreimageFor", + Vec::new(), + [ + 82u8, 216u8, 233u8, 5u8, 102u8, 206u8, 96u8, 64u8, 133u8, + 179u8, 63u8, 45u8, 53u8, 42u8, 190u8, 95u8, 77u8, 197u8, + 60u8, 11u8, 59u8, 231u8, 190u8, 219u8, 87u8, 149u8, 112u8, + 196u8, 33u8, 238u8, 247u8, 117u8, + ], + ) } } } } pub mod babe { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReportEquivocation { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_consensus_slots::EquivocationProof< @@ -2862,11 +1960,11 @@ pub mod api { >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocation { - const PALLET: &'static str = "Babe"; - const FUNCTION: &'static str = "report_equivocation"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReportEquivocationUnsigned { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_consensus_slots::EquivocationProof< @@ -2879,34 +1977,17 @@ pub mod api { >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocationUnsigned { - const PALLET: &'static str = "Babe"; - const FUNCTION: &'static str = "report_equivocation_unsigned"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct PlanConfigChange { pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, } - impl ::subxt::Call for PlanConfigChange { - const PALLET: &'static str = "Babe"; - const FUNCTION: &'static str = "plan_config_change"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Report authority equivocation/misbehavior. This method will verify"] #[doc = "the equivocation proof and validate the given key ownership proof"] #[doc = "against the extracted offender. If both are valid, the offence will"] @@ -2915,40 +1996,28 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReportEquivocation, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 123u8, 212u8, 216u8, 77u8, 79u8, 132u8, 201u8, 155u8, 166u8, - 230u8, 50u8, 89u8, 98u8, 68u8, 56u8, 213u8, 206u8, 245u8, - 91u8, 104u8, 89u8, 189u8, 57u8, 38u8, 127u8, 22u8, 47u8, - 206u8, 142u8, 202u8, 106u8, 154u8, - ] - { - let call = ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Babe", + call: "report_equivocation", + data: ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + }, + [ + 177u8, 237u8, 107u8, 138u8, 237u8, 233u8, 30u8, 195u8, 112u8, + 176u8, 185u8, 113u8, 157u8, 221u8, 134u8, 151u8, 62u8, 151u8, + 64u8, 164u8, 254u8, 112u8, 2u8, 94u8, 175u8, 79u8, 160u8, + 3u8, 72u8, 145u8, 244u8, 137u8, + ], + ) } #[doc = "Report authority equivocation/misbehavior. This method will verify"] #[doc = "the equivocation proof and validate the given key ownership proof"] @@ -2962,40 +2031,28 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReportEquivocationUnsigned, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 32u8, 163u8, 168u8, 251u8, 251u8, 9u8, 1u8, 195u8, 173u8, - 32u8, 235u8, 125u8, 141u8, 201u8, 130u8, 207u8, 239u8, 76u8, - 150u8, 99u8, 74u8, 193u8, 60u8, 165u8, 93u8, 49u8, 95u8, - 224u8, 217u8, 243u8, 117u8, 173u8, - ] - { - let call = ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Babe", + call: "report_equivocation_unsigned", + data: ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + }, + [ + 56u8, 103u8, 238u8, 118u8, 61u8, 192u8, 222u8, 87u8, 254u8, + 24u8, 138u8, 219u8, 210u8, 85u8, 201u8, 147u8, 128u8, 49u8, + 199u8, 144u8, 46u8, 158u8, 163u8, 31u8, 101u8, 224u8, 72u8, + 98u8, 68u8, 120u8, 215u8, 19u8, + ], + ) } #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] @@ -3004,342 +2061,119 @@ pub mod api { pub fn plan_config_change( &self, config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - PlanConfigChange, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 215u8, 121u8, 90u8, 87u8, 178u8, 247u8, 114u8, 53u8, 174u8, - 28u8, 20u8, 33u8, 139u8, 216u8, 13u8, 187u8, 74u8, 198u8, - 38u8, 28u8, 175u8, 13u8, 73u8, 132u8, 103u8, 78u8, 217u8, - 207u8, 113u8, 169u8, 42u8, 103u8, - ] - { - let call = PlanConfigChange { config }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Babe", + call: "plan_config_change", + data: PlanConfigChange { config }, + }, + [ + 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8, + 20u8, 42u8, 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8, + 46u8, 40u8, 137u8, 209u8, 37u8, 24u8, 108u8, 251u8, 189u8, + 77u8, 208u8, 74u8, 32u8, + ], + ) } } } pub mod storage { use super::runtime_types; - pub struct EpochIndex; - impl ::subxt::StorageEntry for EpochIndex { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "EpochIndex"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Authorities; - impl ::subxt::StorageEntry for Authorities { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "Authorities"; - type Value = + pub struct StorageApi; + impl StorageApi { + #[doc = " Current epoch index."] + pub fn epoch_index( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "EpochIndex", + vec![], + [ + 51u8, 27u8, 91u8, 156u8, 118u8, 99u8, 46u8, 219u8, 190u8, + 147u8, 205u8, 23u8, 106u8, 169u8, 121u8, 218u8, 208u8, 235u8, + 135u8, 127u8, 243u8, 41u8, 55u8, 243u8, 235u8, 122u8, 57u8, + 86u8, 37u8, 90u8, 208u8, 71u8, + ], + ) + } + #[doc = " Current epoch authorities."] + pub fn authorities( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< ( runtime_types::sp_consensus_babe::app::Public, ::core::primitive::u64, ), - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct GenesisSlot; - impl ::subxt::StorageEntry for GenesisSlot { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "GenesisSlot"; - type Value = runtime_types::sp_consensus_slots::Slot; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentSlot; - impl ::subxt::StorageEntry for CurrentSlot { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "CurrentSlot"; - type Value = runtime_types::sp_consensus_slots::Slot; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Randomness; - impl ::subxt::StorageEntry for Randomness { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "Randomness"; - type Value = [::core::primitive::u8; 32usize]; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct PendingEpochConfigChange; - impl ::subxt::StorageEntry for PendingEpochConfigChange { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "PendingEpochConfigChange"; - type Value = - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextRandomness; - impl ::subxt::StorageEntry for NextRandomness { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "NextRandomness"; - type Value = [::core::primitive::u8; 32usize]; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextAuthorities; - impl ::subxt::StorageEntry for NextAuthorities { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "NextAuthorities"; - type Value = - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - ( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - ), - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SegmentIndex; - impl ::subxt::StorageEntry for SegmentIndex { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "SegmentIndex"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct UnderConstruction<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for UnderConstruction<'_> { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "UnderConstruction"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Initialized; - impl ::subxt::StorageEntry for Initialized { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "Initialized"; - type Value = ::core::option::Option< - runtime_types::sp_consensus_babe::digests::PreDigest, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct AuthorVrfRandomness; - impl ::subxt::StorageEntry for AuthorVrfRandomness { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "AuthorVrfRandomness"; - type Value = ::core::option::Option<[::core::primitive::u8; 32usize]>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct EpochStart; - impl ::subxt::StorageEntry for EpochStart { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "EpochStart"; - type Value = (::core::primitive::u32, ::core::primitive::u32); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Lateness; - impl ::subxt::StorageEntry for Lateness { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "Lateness"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct EpochConfig; - impl ::subxt::StorageEntry for EpochConfig { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "EpochConfig"; - type Value = runtime_types::sp_consensus_babe::BabeEpochConfiguration; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextEpochConfig; - impl ::subxt::StorageEntry for NextEpochConfig { - const PALLET: &'static str = "Babe"; - const STORAGE: &'static str = "NextEpochConfig"; - type Value = runtime_types::sp_consensus_babe::BabeEpochConfiguration; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - #[doc = " Current epoch index."] - pub fn epoch_index( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u64, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 51u8, 27u8, 91u8, 156u8, 118u8, 99u8, 46u8, 219u8, 190u8, - 147u8, 205u8, 23u8, 106u8, 169u8, 121u8, 218u8, 208u8, - 235u8, 135u8, 127u8, 243u8, 41u8, 55u8, 243u8, 235u8, - 122u8, 57u8, 86u8, 37u8, 90u8, 208u8, 71u8, - ] - { - let entry = EpochIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Current epoch authorities."] pub fn authorities (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 39u8, 102u8, 251u8, 125u8, 230u8, 247u8, 174u8, 255u8, - 2u8, 81u8, 86u8, 69u8, 182u8, 92u8, 191u8, 163u8, 66u8, - 181u8, 247u8, 9u8, 57u8, 154u8, 239u8, 34u8, 25u8, 139u8, - 119u8, 4u8, 131u8, 124u8, 135u8, 240u8, - ] - { - let entry = Authorities; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "Authorities", + vec![], + [ + 61u8, 8u8, 133u8, 111u8, 169u8, 120u8, 0u8, 213u8, 31u8, + 159u8, 204u8, 212u8, 18u8, 205u8, 93u8, 84u8, 140u8, 108u8, + 136u8, 209u8, 234u8, 107u8, 145u8, 9u8, 204u8, 224u8, 105u8, + 9u8, 238u8, 241u8, 65u8, 30u8, + ], + ) } #[doc = " The slot at which the first epoch actually started. This is 0"] #[doc = " until the first block of the chain."] pub fn genesis_slot( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_consensus_slots::Slot, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 136u8, 244u8, 7u8, 142u8, 224u8, 33u8, 144u8, 186u8, - 155u8, 144u8, 68u8, 81u8, 241u8, 57u8, 40u8, 207u8, 35u8, - 39u8, 28u8, 41u8, 210u8, 213u8, 53u8, 195u8, 175u8, - 119u8, 6u8, 175u8, 100u8, 192u8, 180u8, 73u8, - ] - { - let entry = GenesisSlot; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_consensus_slots::Slot, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "GenesisSlot", + vec![], + [ + 234u8, 127u8, 243u8, 100u8, 124u8, 160u8, 66u8, 248u8, 48u8, + 218u8, 61u8, 52u8, 54u8, 142u8, 158u8, 77u8, 32u8, 63u8, + 156u8, 39u8, 94u8, 255u8, 192u8, 238u8, 170u8, 118u8, 58u8, + 42u8, 199u8, 61u8, 199u8, 77u8, + ], + ) } #[doc = " Current slot number."] pub fn current_slot( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_consensus_slots::Slot, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 233u8, 102u8, 77u8, 99u8, 103u8, 50u8, 151u8, 229u8, - 46u8, 226u8, 181u8, 37u8, 117u8, 204u8, 234u8, 120u8, - 116u8, 166u8, 80u8, 188u8, 92u8, 154u8, 137u8, 150u8, - 79u8, 164u8, 29u8, 203u8, 2u8, 51u8, 123u8, 104u8, - ] - { - let entry = CurrentSlot; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_consensus_slots::Slot, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "CurrentSlot", + vec![], + [ + 139u8, 237u8, 185u8, 137u8, 251u8, 179u8, 69u8, 167u8, 133u8, + 168u8, 204u8, 64u8, 178u8, 123u8, 92u8, 250u8, 119u8, 190u8, + 208u8, 178u8, 208u8, 176u8, 124u8, 187u8, 74u8, 165u8, 33u8, + 78u8, 161u8, 206u8, 8u8, 108u8, + ], + ) } #[doc = " The epoch randomness for the *current* epoch."] #[doc = ""] @@ -3353,124 +2187,91 @@ pub mod api { #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] pub fn randomness( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - [::core::primitive::u8; 32usize], - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 191u8, 197u8, 25u8, 164u8, 104u8, 248u8, 247u8, 193u8, - 244u8, 60u8, 181u8, 195u8, 248u8, 90u8, 41u8, 199u8, - 82u8, 123u8, 72u8, 126u8, 18u8, 17u8, 128u8, 215u8, 34u8, - 251u8, 227u8, 70u8, 166u8, 10u8, 104u8, 140u8, - ] - { - let entry = Randomness; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] pub fn pending_epoch_config_change (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 98u8, 52u8, 22u8, 32u8, 76u8, 196u8, 89u8, 78u8, 119u8, - 181u8, 17u8, 49u8, 220u8, 159u8, 195u8, 74u8, 33u8, 59u8, - 15u8, 104u8, 26u8, 111u8, 165u8, 68u8, 147u8, 14u8, 86u8, - 94u8, 250u8, 167u8, 146u8, 82u8, - ] - { - let entry = PendingEpochConfigChange; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + [::core::primitive::u8; 32usize], + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "Randomness", + vec![], + [ + 191u8, 197u8, 25u8, 164u8, 104u8, 248u8, 247u8, 193u8, 244u8, + 60u8, 181u8, 195u8, 248u8, 90u8, 41u8, 199u8, 82u8, 123u8, + 72u8, 126u8, 18u8, 17u8, 128u8, 215u8, 34u8, 251u8, 227u8, + 70u8, 166u8, 10u8, 104u8, 140u8, + ], + ) + } + #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] + pub fn pending_epoch_config_change( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "PendingEpochConfigChange", + vec![], + [ + 4u8, 201u8, 0u8, 204u8, 47u8, 246u8, 4u8, 185u8, 163u8, + 242u8, 242u8, 152u8, 29u8, 222u8, 71u8, 127u8, 49u8, 203u8, + 206u8, 180u8, 244u8, 50u8, 80u8, 49u8, 199u8, 97u8, 3u8, + 170u8, 156u8, 139u8, 106u8, 113u8, + ], + ) } #[doc = " Next epoch randomness."] pub fn next_randomness( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - [::core::primitive::u8; 32usize], - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + [::core::primitive::u8; 32usize], + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "NextRandomness", + vec![], + [ + 185u8, 98u8, 45u8, 109u8, 253u8, 38u8, 238u8, 221u8, 240u8, + 29u8, 38u8, 107u8, 118u8, 117u8, 131u8, 115u8, 21u8, 255u8, + 203u8, 81u8, 243u8, 251u8, 91u8, 60u8, 163u8, 202u8, 125u8, + 193u8, 173u8, 234u8, 166u8, 92u8, + ], + ) + } + #[doc = " Next epoch authorities."] + pub fn next_authorities( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< + ( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + ), >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 185u8, 98u8, 45u8, 109u8, 253u8, 38u8, 238u8, 221u8, - 240u8, 29u8, 38u8, 107u8, 118u8, 117u8, 131u8, 115u8, - 21u8, 255u8, 203u8, 81u8, 243u8, 251u8, 91u8, 60u8, - 163u8, 202u8, 125u8, 193u8, 173u8, 234u8, 166u8, 92u8, - ] - { - let entry = NextRandomness; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Next epoch authorities."] pub fn next_authorities (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 211u8, 175u8, 218u8, 0u8, 212u8, 114u8, 210u8, 137u8, - 146u8, 135u8, 78u8, 133u8, 85u8, 253u8, 140u8, 242u8, - 101u8, 155u8, 159u8, 8u8, 217u8, 176u8, 234u8, 143u8, - 212u8, 103u8, 198u8, 94u8, 121u8, 111u8, 56u8, 89u8, - ] - { - let entry = NextAuthorities; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "NextAuthorities", + vec![], + [ + 201u8, 193u8, 164u8, 18u8, 155u8, 253u8, 124u8, 163u8, 143u8, + 73u8, 212u8, 20u8, 241u8, 108u8, 110u8, 5u8, 171u8, 66u8, + 224u8, 208u8, 10u8, 65u8, 148u8, 164u8, 1u8, 12u8, 216u8, + 83u8, 20u8, 226u8, 254u8, 183u8, + ], + ) } #[doc = " Randomness under construction."] #[doc = ""] @@ -3483,149 +2284,97 @@ pub mod api { #[doc = " epoch."] pub fn segment_index( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 128u8, 45u8, 87u8, 58u8, 174u8, 152u8, 241u8, 156u8, - 56u8, 192u8, 19u8, 45u8, 75u8, 160u8, 35u8, 253u8, 145u8, - 11u8, 178u8, 81u8, 114u8, 117u8, 112u8, 107u8, 163u8, - 208u8, 240u8, 151u8, 102u8, 176u8, 246u8, 5u8, - ] - { - let entry = SegmentIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "SegmentIndex", + vec![], + [ + 128u8, 45u8, 87u8, 58u8, 174u8, 152u8, 241u8, 156u8, 56u8, + 192u8, 19u8, 45u8, 75u8, 160u8, 35u8, 253u8, 145u8, 11u8, + 178u8, 81u8, 114u8, 117u8, 112u8, 107u8, 163u8, 208u8, 240u8, + 151u8, 102u8, 176u8, 246u8, 5u8, + ], + ) } #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] pub fn under_construction( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 12u8, 167u8, 30u8, 96u8, 161u8, 63u8, 210u8, 63u8, 91u8, - 199u8, 188u8, 78u8, 254u8, 255u8, 253u8, 202u8, 203u8, - 26u8, 4u8, 105u8, 76u8, 125u8, 191u8, 245u8, 32u8, 97u8, - 127u8, 129u8, 167u8, 80u8, 210u8, 123u8, - ] - { - let entry = UnderConstruction(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "UnderConstruction", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, + 172u8, 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, + 7u8, 84u8, 220u8, 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, + 144u8, 73u8, 238u8, 59u8, 164u8, + ], + ) } #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] - pub fn under_construction_iter( + pub fn under_construction_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, UnderConstruction<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 12u8, 167u8, 30u8, 96u8, 161u8, 63u8, 210u8, 63u8, 91u8, - 199u8, 188u8, 78u8, 254u8, 255u8, 253u8, 202u8, 203u8, - 26u8, 4u8, 105u8, 76u8, 125u8, 191u8, 245u8, 32u8, 97u8, - 127u8, 129u8, 167u8, 80u8, 210u8, 123u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "UnderConstruction", + Vec::new(), + [ + 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, + 172u8, 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8, + 7u8, 84u8, 220u8, 89u8, 195u8, 177u8, 235u8, 51u8, 98u8, + 144u8, 73u8, 238u8, 59u8, 164u8, + ], + ) } #[doc = " Temporary value (cleared at block finalization) which is `Some`"] #[doc = " if per-block initialization has already been called for current block."] pub fn initialized( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - ::core::option::Option< - runtime_types::sp_consensus_babe::digests::PreDigest, - >, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::option::Option< + runtime_types::sp_consensus_babe::digests::PreDigest, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 23u8, 254u8, 52u8, 114u8, 235u8, 65u8, 46u8, 39u8, - 97u8, 238u8, 243u8, 237u8, 138u8, 142u8, 85u8, 114u8, - 69u8, 58u8, 172u8, 7u8, 238u8, 110u8, 153u8, 22u8, 122u8, - 117u8, 149u8, 113u8, 221u8, 127u8, 225u8, - ] - { - let entry = Initialized; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "Initialized", + vec![], + [ + 142u8, 101u8, 250u8, 113u8, 93u8, 201u8, 157u8, 18u8, 166u8, + 153u8, 59u8, 197u8, 107u8, 247u8, 124u8, 110u8, 202u8, 67u8, + 62u8, 57u8, 186u8, 134u8, 49u8, 182u8, 149u8, 44u8, 255u8, + 85u8, 87u8, 177u8, 149u8, 121u8, + ], + ) } #[doc = " This field should always be populated during block processing unless"] #[doc = " secondary plain slots are enabled (which don't contain a VRF output)."] @@ -3633,37 +2382,23 @@ pub mod api { #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] pub fn author_vrf_randomness( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<[::core::primitive::u8; 32usize]>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 66u8, 235u8, 74u8, 252u8, 222u8, 135u8, 19u8, 28u8, 74u8, - 191u8, 170u8, 197u8, 207u8, 127u8, 77u8, 121u8, 138u8, - 138u8, 110u8, 187u8, 34u8, 14u8, 230u8, 43u8, 241u8, - 241u8, 63u8, 163u8, 53u8, 179u8, 250u8, 247u8, - ] - { - let entry = AuthorVrfRandomness; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::option::Option<[::core::primitive::u8; 32usize]>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "AuthorVrfRandomness", + vec![], + [ + 66u8, 235u8, 74u8, 252u8, 222u8, 135u8, 19u8, 28u8, 74u8, + 191u8, 170u8, 197u8, 207u8, 127u8, 77u8, 121u8, 138u8, 138u8, + 110u8, 187u8, 34u8, 14u8, 230u8, 43u8, 241u8, 241u8, 63u8, + 163u8, 53u8, 179u8, 250u8, 247u8, + ], + ) } #[doc = " The block numbers when the last and current epoch have started, respectively `N-1` and"] #[doc = " `N`."] @@ -3672,37 +2407,23 @@ pub mod api { #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] pub fn epoch_start( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 196u8, 39u8, 241u8, 20u8, 150u8, 180u8, 136u8, 4u8, - 195u8, 205u8, 218u8, 10u8, 130u8, 131u8, 168u8, 243u8, - 207u8, 249u8, 58u8, 195u8, 177u8, 119u8, 110u8, 243u8, - 241u8, 3u8, 245u8, 56u8, 157u8, 5u8, 68u8, 60u8, - ] - { - let entry = EpochStart; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "EpochStart", + vec![], + [ + 196u8, 39u8, 241u8, 20u8, 150u8, 180u8, 136u8, 4u8, 195u8, + 205u8, 218u8, 10u8, 130u8, 131u8, 168u8, 243u8, 207u8, 249u8, + 58u8, 195u8, 177u8, 119u8, 110u8, 243u8, 241u8, 3u8, 245u8, + 56u8, 157u8, 5u8, 68u8, 60u8, + ], + ) } #[doc = " How late the current block is compared to its parent."] #[doc = ""] @@ -3711,150 +2432,93 @@ pub mod api { #[doc = " execution context should always yield zero."] pub fn lateness( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 229u8, 230u8, 224u8, 89u8, 49u8, 213u8, 198u8, 236u8, - 144u8, 56u8, 193u8, 234u8, 62u8, 242u8, 191u8, 199u8, - 105u8, 131u8, 74u8, 63u8, 75u8, 1u8, 210u8, 49u8, 3u8, - 128u8, 18u8, 77u8, 219u8, 146u8, 60u8, 88u8, - ] - { - let entry = Lateness; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "Lateness", + vec![], + [ + 229u8, 230u8, 224u8, 89u8, 49u8, 213u8, 198u8, 236u8, 144u8, + 56u8, 193u8, 234u8, 62u8, 242u8, 191u8, 199u8, 105u8, 131u8, + 74u8, 63u8, 75u8, 1u8, 210u8, 49u8, 3u8, 128u8, 18u8, 77u8, + 219u8, 146u8, 60u8, 88u8, + ], + ) } #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"] #[doc = " genesis."] pub fn epoch_config( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 169u8, 189u8, 214u8, 159u8, 181u8, 232u8, 243u8, 4u8, - 113u8, 24u8, 221u8, 229u8, 27u8, 35u8, 3u8, 121u8, 136u8, - 88u8, 187u8, 193u8, 207u8, 153u8, 223u8, 225u8, 166u8, - 183u8, 53u8, 3u8, 162u8, 207u8, 88u8, 133u8, - ] - { - let entry = EpochConfig; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "EpochConfig", + vec![], + [ + 41u8, 118u8, 141u8, 244u8, 72u8, 17u8, 125u8, 203u8, 43u8, + 153u8, 203u8, 119u8, 117u8, 223u8, 123u8, 133u8, 73u8, 235u8, + 130u8, 21u8, 160u8, 167u8, 16u8, 173u8, 177u8, 35u8, 117u8, + 97u8, 149u8, 49u8, 220u8, 24u8, + ], + ) } #[doc = " The configuration for the next epoch, `None` if the config will not change"] #[doc = " (you can fallback to `EpochConfig` instead in that case)."] pub fn next_epoch_config( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 239u8, 125u8, 203u8, 223u8, 161u8, 107u8, 232u8, 54u8, - 158u8, 100u8, 244u8, 140u8, 119u8, 58u8, 253u8, 245u8, - 73u8, 236u8, 50u8, 67u8, 228u8, 162u8, 166u8, 168u8, - 162u8, 152u8, 239u8, 246u8, 153u8, 223u8, 109u8, 121u8, - ] - { - let entry = NextEpochConfig; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Babe", + "NextEpochConfig", + vec![], + [ + 111u8, 182u8, 144u8, 180u8, 92u8, 146u8, 102u8, 249u8, 196u8, + 229u8, 226u8, 30u8, 25u8, 198u8, 133u8, 9u8, 136u8, 95u8, + 11u8, 151u8, 139u8, 156u8, 105u8, 228u8, 181u8, 12u8, 175u8, + 148u8, 174u8, 33u8, 233u8, 228u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The amount of time, in slots, that each epoch should last."] #[doc = " NOTE: Currently it is not possible to change the epoch duration after"] #[doc = " the chain has started. Attempting to do so will brick block production."] pub fn epoch_duration( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Babe", "EpochDuration")? - == [ - 40u8, 54u8, 255u8, 20u8, 89u8, 2u8, 38u8, 235u8, 70u8, 145u8, - 128u8, 227u8, 177u8, 3u8, 153u8, 91u8, 102u8, 159u8, 160u8, - 139u8, 88u8, 111u8, 116u8, 90u8, 139u8, 12u8, 31u8, 236u8, - 11u8, 113u8, 213u8, 254u8, - ] - { - let pallet = metadata.pallet("Babe")?; - let constant = pallet.constant("EpochDuration")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Babe", + "EpochDuration", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } #[doc = " The expected average block time at which BABE should be creating"] #[doc = " blocks. Since BABE is probabilistic it is not trivial to figure out"] @@ -3863,90 +2527,61 @@ pub mod api { #[doc = " the probability of a slot being empty)."] pub fn expected_block_time( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Babe", "ExpectedBlockTime")? - == [ - 249u8, 170u8, 37u8, 7u8, 132u8, 115u8, 106u8, 71u8, 116u8, - 166u8, 78u8, 251u8, 242u8, 146u8, 99u8, 207u8, 204u8, 225u8, - 157u8, 57u8, 19u8, 17u8, 202u8, 231u8, 50u8, 67u8, 17u8, - 205u8, 238u8, 80u8, 154u8, 125u8, - ] - { - let pallet = metadata.pallet("Babe")?; - let constant = pallet.constant("ExpectedBlockTime")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Babe", + "ExpectedBlockTime", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } #[doc = " Max number of authorities allowed"] pub fn max_authorities( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Babe", "MaxAuthorities")? - == [ - 248u8, 195u8, 131u8, 166u8, 10u8, 50u8, 71u8, 223u8, 41u8, - 49u8, 43u8, 99u8, 251u8, 113u8, 75u8, 193u8, 159u8, 15u8, - 77u8, 217u8, 147u8, 205u8, 165u8, 50u8, 6u8, 166u8, 77u8, - 189u8, 102u8, 22u8, 201u8, 19u8, - ] - { - let pallet = metadata.pallet("Babe")?; - let constant = pallet.constant("MaxAuthorities")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Babe", + "MaxAuthorities", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod timestamp { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Set { #[codec(compact)] pub now: ::core::primitive::u64, } - impl ::subxt::Call for Set { - const PALLET: &'static str = "Timestamp"; - const FUNCTION: &'static str = "set"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Set the current time."] #[doc = ""] #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] @@ -3966,261 +2601,158 @@ pub mod api { pub fn set( &self, now: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Set, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 191u8, 73u8, 102u8, 150u8, 65u8, 157u8, 172u8, 194u8, 7u8, - 72u8, 1u8, 35u8, 54u8, 99u8, 245u8, 139u8, 40u8, 136u8, - 245u8, 53u8, 167u8, 100u8, 143u8, 244u8, 160u8, 5u8, 18u8, - 130u8, 77u8, 160u8, 227u8, 51u8, - ] - { - let call = Set { now }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Timestamp", + call: "set", + data: Set { now }, + }, + [ + 6u8, 97u8, 172u8, 236u8, 118u8, 238u8, 228u8, 114u8, 15u8, + 115u8, 102u8, 85u8, 66u8, 151u8, 16u8, 33u8, 187u8, 17u8, + 166u8, 88u8, 127u8, 214u8, 182u8, 51u8, 168u8, 88u8, 43u8, + 101u8, 185u8, 8u8, 1u8, 28u8, + ], + ) } } } pub mod storage { use super::runtime_types; - pub struct Now; - impl ::subxt::StorageEntry for Now { - const PALLET: &'static str = "Timestamp"; - const STORAGE: &'static str = "Now"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct DidUpdate; - impl ::subxt::StorageEntry for DidUpdate { - const PALLET: &'static str = "Timestamp"; - const STORAGE: &'static str = "DidUpdate"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Current time for the current block."] pub fn now( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u64, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 148u8, 53u8, 50u8, 54u8, 13u8, 161u8, 57u8, 150u8, 16u8, - 83u8, 144u8, 221u8, 59u8, 75u8, 158u8, 130u8, 39u8, - 123u8, 106u8, 134u8, 202u8, 185u8, 83u8, 85u8, 60u8, - 41u8, 120u8, 96u8, 210u8, 34u8, 2u8, 250u8, - ] - { - let entry = Now; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Timestamp", + "Now", + vec![], + [ + 148u8, 53u8, 50u8, 54u8, 13u8, 161u8, 57u8, 150u8, 16u8, + 83u8, 144u8, 221u8, 59u8, 75u8, 158u8, 130u8, 39u8, 123u8, + 106u8, 134u8, 202u8, 185u8, 83u8, 85u8, 60u8, 41u8, 120u8, + 96u8, 210u8, 34u8, 2u8, 250u8, + ], + ) } #[doc = " Did the timestamp get updated in this block?"] pub fn did_update( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 70u8, 13u8, 92u8, 186u8, 80u8, 151u8, 167u8, 90u8, 158u8, - 232u8, 175u8, 13u8, 103u8, 135u8, 2u8, 78u8, 16u8, 6u8, - 39u8, 158u8, 167u8, 85u8, 27u8, 47u8, 122u8, 73u8, 127u8, - 26u8, 35u8, 168u8, 72u8, 204u8, - ] - { - let entry = DidUpdate; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Timestamp", + "DidUpdate", + vec![], + [ + 70u8, 13u8, 92u8, 186u8, 80u8, 151u8, 167u8, 90u8, 158u8, + 232u8, 175u8, 13u8, 103u8, 135u8, 2u8, 78u8, 16u8, 6u8, 39u8, + 158u8, 167u8, 85u8, 27u8, 47u8, 122u8, 73u8, 127u8, 26u8, + 35u8, 168u8, 72u8, 204u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The minimum period between blocks. Beware that this is different to the *expected*"] #[doc = " period that the block production apparatus provides. Your chosen consensus system will"] #[doc = " generally work with this to determine a sensible block time. e.g. For Aura, it will be"] #[doc = " double this period on default settings."] pub fn minimum_period( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Timestamp", "MinimumPeriod")? - == [ - 141u8, 242u8, 40u8, 24u8, 83u8, 43u8, 33u8, 194u8, 156u8, - 149u8, 219u8, 61u8, 10u8, 123u8, 120u8, 247u8, 228u8, 22u8, - 25u8, 24u8, 214u8, 188u8, 54u8, 135u8, 240u8, 162u8, 41u8, - 216u8, 3u8, 58u8, 238u8, 39u8, - ] - { - let pallet = metadata.pallet("Timestamp")?; - let constant = pallet.constant("MinimumPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Timestamp", + "MinimumPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } } } } pub mod indices { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Claim { pub index: ::core::primitive::u32, } - impl ::subxt::Call for Claim { - const PALLET: &'static str = "Indices"; - const FUNCTION: &'static str = "claim"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Transfer { - pub new: ::subxt::sp_core::crypto::AccountId32, + pub new: ::subxt::ext::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for Transfer { - const PALLET: &'static str = "Indices"; - const FUNCTION: &'static str = "transfer"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Free { pub index: ::core::primitive::u32, } - impl ::subxt::Call for Free { - const PALLET: &'static str = "Indices"; - const FUNCTION: &'static str = "free"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceTransfer { - pub new: ::subxt::sp_core::crypto::AccountId32, + pub new: ::subxt::ext::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, pub freeze: ::core::primitive::bool, } - impl ::subxt::Call for ForceTransfer { - const PALLET: &'static str = "Indices"; - const FUNCTION: &'static str = "force_transfer"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Freeze { pub index: ::core::primitive::u32, } - impl ::subxt::Call for Freeze { - const PALLET: &'static str = "Indices"; - const FUNCTION: &'static str = "freeze"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Assign an previously unassigned index."] #[doc = ""] #[doc = "Payment: `Deposit` is reserved from the sender account."] @@ -4242,35 +2774,23 @@ pub mod api { pub fn claim( &self, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Claim, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 27u8, 4u8, 108u8, 55u8, 23u8, 109u8, 175u8, 25u8, 201u8, - 230u8, 228u8, 51u8, 164u8, 15u8, 79u8, 10u8, 219u8, 182u8, - 242u8, 102u8, 164u8, 148u8, 39u8, 91u8, 106u8, 197u8, 29u8, - 190u8, 178u8, 221u8, 16u8, 87u8, - ] - { - let call = Claim { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Indices", + call: "claim", + data: Claim { index }, + }, + [ + 5u8, 24u8, 11u8, 173u8, 226u8, 170u8, 0u8, 30u8, 193u8, + 102u8, 214u8, 59u8, 252u8, 32u8, 221u8, 88u8, 196u8, 189u8, + 244u8, 18u8, 233u8, 37u8, 228u8, 248u8, 76u8, 175u8, 212u8, + 233u8, 238u8, 203u8, 162u8, 68u8, + ], + ) } #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] #[doc = "is effectively transferred to the new account."] @@ -4294,37 +2814,25 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - new: ::subxt::sp_core::crypto::AccountId32, + new: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Transfer, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 124u8, 83u8, 33u8, 230u8, 23u8, 70u8, 83u8, 59u8, 76u8, - 100u8, 219u8, 100u8, 165u8, 163u8, 102u8, 193u8, 11u8, 22u8, - 30u8, 125u8, 114u8, 28u8, 61u8, 156u8, 38u8, 170u8, 129u8, - 74u8, 187u8, 28u8, 33u8, 65u8, - ] - { - let call = Transfer { new, index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Indices", + call: "transfer", + data: Transfer { new, index }, + }, + [ + 229u8, 48u8, 45u8, 2u8, 206u8, 24u8, 60u8, 43u8, 202u8, 99u8, + 80u8, 172u8, 62u8, 134u8, 224u8, 128u8, 107u8, 219u8, 57u8, + 87u8, 144u8, 220u8, 207u8, 79u8, 7u8, 89u8, 208u8, 75u8, + 158u8, 75u8, 10u8, 113u8, + ], + ) } #[doc = "Free up an index owned by the sender."] #[doc = ""] @@ -4347,35 +2855,23 @@ pub mod api { pub fn free( &self, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Free, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 153u8, 143u8, 162u8, 33u8, 229u8, 3u8, 159u8, 153u8, 111u8, - 100u8, 160u8, 250u8, 227u8, 24u8, 157u8, 226u8, 173u8, 39u8, - 25u8, 200u8, 137u8, 147u8, 232u8, 213u8, 182u8, 49u8, 142u8, - 250u8, 139u8, 155u8, 84u8, 214u8, - ] - { - let call = Free { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Indices", + call: "free", + data: Free { index }, + }, + [ + 133u8, 202u8, 225u8, 127u8, 69u8, 145u8, 43u8, 13u8, 160u8, + 248u8, 215u8, 243u8, 232u8, 166u8, 74u8, 203u8, 235u8, 138u8, + 255u8, 27u8, 163u8, 71u8, 254u8, 217u8, 6u8, 208u8, 202u8, + 204u8, 238u8, 70u8, 126u8, 252u8, + ], + ) } #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] #[doc = "held, then any deposit is reimbursed to its current owner."] @@ -4400,38 +2896,26 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - new: ::subxt::sp_core::crypto::AccountId32, + new: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, freeze: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceTransfer, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 181u8, 143u8, 90u8, 135u8, 132u8, 11u8, 145u8, 85u8, 4u8, - 211u8, 56u8, 110u8, 213u8, 153u8, 224u8, 106u8, 198u8, 250u8, - 130u8, 253u8, 72u8, 58u8, 133u8, 150u8, 102u8, 119u8, 177u8, - 175u8, 77u8, 106u8, 253u8, 99u8, - ] - { - let call = ForceTransfer { new, index, freeze }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Indices", + call: "force_transfer", + data: ForceTransfer { new, index, freeze }, + }, + [ + 2u8, 134u8, 200u8, 233u8, 224u8, 80u8, 237u8, 130u8, 28u8, + 159u8, 130u8, 223u8, 124u8, 205u8, 248u8, 70u8, 246u8, 77u8, + 73u8, 193u8, 78u8, 85u8, 58u8, 29u8, 191u8, 217u8, 252u8, + 178u8, 113u8, 255u8, 151u8, 49u8, + ], + ) } #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] #[doc = "deposit."] @@ -4454,35 +2938,23 @@ pub mod api { pub fn freeze( &self, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Freeze, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 204u8, 127u8, 214u8, 137u8, 138u8, 28u8, 171u8, 169u8, 184u8, - 164u8, 235u8, 114u8, 132u8, 176u8, 14u8, 207u8, 72u8, 39u8, - 179u8, 231u8, 137u8, 243u8, 242u8, 57u8, 89u8, 57u8, 213u8, - 210u8, 87u8, 12u8, 253u8, 159u8, - ] - { - let call = Freeze { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Indices", + call: "freeze", + data: Freeze { index }, + }, + [ + 121u8, 45u8, 118u8, 2u8, 72u8, 48u8, 38u8, 7u8, 234u8, 204u8, + 68u8, 20u8, 76u8, 251u8, 205u8, 246u8, 149u8, 31u8, 168u8, + 186u8, 208u8, 90u8, 40u8, 47u8, 100u8, 228u8, 188u8, 33u8, + 79u8, 220u8, 105u8, 209u8, + ], + ) } } } @@ -4490,207 +2962,163 @@ pub mod api { pub type Event = runtime_types::pallet_indices::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A account index was assigned."] pub struct IndexAssigned { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, } - impl ::subxt::Event for IndexAssigned { + impl ::subxt::events::StaticEvent for IndexAssigned { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexAssigned"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A account index has been freed up (unassigned)."] pub struct IndexFreed { pub index: ::core::primitive::u32, } - impl ::subxt::Event for IndexFreed { + impl ::subxt::events::StaticEvent for IndexFreed { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexFreed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A account index has been frozen to its current account ID."] pub struct IndexFrozen { pub index: ::core::primitive::u32, - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for IndexFrozen { + impl ::subxt::events::StaticEvent for IndexFrozen { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexFrozen"; } } pub mod storage { use super::runtime_types; - pub struct Accounts<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Accounts<'_> { - const PALLET: &'static str = "Indices"; - const STORAGE: &'static str = "Accounts"; - type Value = ( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::bool, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The lookup from index to account."] pub fn accounts( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::bool, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 105u8, 208u8, 81u8, 30u8, 157u8, 108u8, 22u8, 122u8, - 152u8, 220u8, 40u8, 97u8, 255u8, 166u8, 222u8, 11u8, - 81u8, 245u8, 143u8, 79u8, 57u8, 19u8, 174u8, 164u8, - 220u8, 59u8, 77u8, 117u8, 39u8, 72u8, 251u8, 234u8, - ] - { - let entry = Accounts(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::bool, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Indices", + "Accounts", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8, + 27u8, 38u8, 9u8, 202u8, 209u8, 111u8, 209u8, 144u8, 13u8, + 211u8, 114u8, 239u8, 127u8, 75u8, 166u8, 234u8, 222u8, 225u8, + 35u8, 160u8, 163u8, 112u8, 242u8, + ], + ) } #[doc = " The lookup from index to account."] - pub fn accounts_iter( + pub fn accounts_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Accounts<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 105u8, 208u8, 81u8, 30u8, 157u8, 108u8, 22u8, 122u8, - 152u8, 220u8, 40u8, 97u8, 255u8, 166u8, 222u8, 11u8, - 81u8, 245u8, 143u8, 79u8, 57u8, 19u8, 174u8, 164u8, - 220u8, 59u8, 77u8, 117u8, 39u8, 72u8, 251u8, 234u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::bool, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Indices", + "Accounts", + Vec::new(), + [ + 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8, + 27u8, 38u8, 9u8, 202u8, 209u8, 111u8, 209u8, 144u8, 13u8, + 211u8, 114u8, 239u8, 127u8, 75u8, 166u8, 234u8, 222u8, 225u8, + 35u8, 160u8, 163u8, 112u8, 242u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The deposit needed for reserving an index."] pub fn deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Indices", "Deposit")? - == [ - 249u8, 18u8, 129u8, 140u8, 50u8, 11u8, 128u8, 63u8, 198u8, - 178u8, 202u8, 62u8, 51u8, 99u8, 138u8, 112u8, 96u8, 138u8, - 30u8, 159u8, 53u8, 65u8, 250u8, 156u8, 199u8, 99u8, 129u8, - 80u8, 116u8, 156u8, 82u8, 42u8, - ] - { - let pallet = metadata.pallet("Indices")?; - let constant = pallet.constant("Deposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Indices", + "Deposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } } } } pub mod balances { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Transfer { - pub dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Transfer { - const PALLET: &'static str = "Balances"; - const FUNCTION: &'static str = "transfer"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetBalance { - pub who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -4698,79 +3126,62 @@ pub mod api { #[codec(compact)] pub new_reserved: ::core::primitive::u128, } - impl ::subxt::Call for SetBalance { - const PALLET: &'static str = "Balances"; - const FUNCTION: &'static str = "set_balance"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceTransfer { - pub source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub source: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - pub dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for ForceTransfer { - const PALLET: &'static str = "Balances"; - const FUNCTION: &'static str = "force_transfer"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct TransferKeepAlive { - pub dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for TransferKeepAlive { - const PALLET: &'static str = "Balances"; - const FUNCTION: &'static str = "transfer_keep_alive"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct TransferAll { - pub dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub keep_alive: ::core::primitive::bool, } - impl ::subxt::Call for TransferAll { - const PALLET: &'static str = "Balances"; - const FUNCTION: &'static str = "transfer_all"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] - pub struct ForceUnreserve { - pub who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] + pub struct ForceUnreserve { + pub who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub amount: ::core::primitive::u128, } - impl ::subxt::Call for ForceUnreserve { - const PALLET: &'static str = "Balances"; - const FUNCTION: &'static str = "force_unreserve"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Transfer some liquid free balance to another account."] #[doc = ""] #[doc = "`transfer` will set the `FreeBalance` of the sender and receiver."] @@ -4798,40 +3209,28 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Transfer, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 250u8, 8u8, 164u8, 186u8, 80u8, 220u8, 134u8, 247u8, 142u8, - 121u8, 34u8, 22u8, 169u8, 39u8, 6u8, 93u8, 72u8, 47u8, 44u8, - 107u8, 9u8, 98u8, 203u8, 190u8, 136u8, 55u8, 251u8, 78u8, - 216u8, 150u8, 98u8, 118u8, - ] - { - let call = Transfer { dest, value }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Balances", + call: "transfer", + data: Transfer { dest, value }, + }, + [ + 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, + 155u8, 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, + 218u8, 114u8, 107u8, 141u8, 138u8, 100u8, 237u8, 21u8, 58u8, + 172u8, 3u8, 20u8, 216u8, 38u8, + ], + ) } #[doc = "Set the balances of a given account."] #[doc = ""] @@ -4843,45 +3242,33 @@ pub mod api { #[doc = "The dispatch origin for this call is `root`."] pub fn set_balance( &self, - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetBalance, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 232u8, 6u8, 27u8, 131u8, 163u8, 72u8, 148u8, 197u8, 14u8, - 239u8, 94u8, 1u8, 32u8, 94u8, 17u8, 14u8, 123u8, 82u8, 39u8, - 233u8, 77u8, 20u8, 40u8, 139u8, 222u8, 137u8, 103u8, 18u8, - 126u8, 63u8, 200u8, 149u8, - ] - { - let call = SetBalance { - who, - new_free, - new_reserved, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Balances", + call: "set_balance", + data: SetBalance { + who, + new_free, + new_reserved, + }, + }, + [ + 234u8, 215u8, 97u8, 98u8, 243u8, 199u8, 57u8, 76u8, 59u8, + 161u8, 118u8, 207u8, 34u8, 197u8, 198u8, 61u8, 231u8, 210u8, + 169u8, 235u8, 150u8, 137u8, 173u8, 49u8, 28u8, 77u8, 84u8, + 149u8, 143u8, 210u8, 139u8, 193u8, + ], + ) } #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"] #[doc = "specified."] @@ -4891,48 +3278,36 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + source: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceTransfer, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 120u8, 66u8, 111u8, 84u8, 176u8, 241u8, 214u8, 118u8, 219u8, - 75u8, 127u8, 222u8, 45u8, 33u8, 204u8, 147u8, 126u8, 214u8, - 101u8, 190u8, 37u8, 37u8, 159u8, 166u8, 61u8, 143u8, 22u8, - 32u8, 15u8, 83u8, 221u8, 230u8, - ] - { - let call = ForceTransfer { - source, - dest, - value, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Balances", + call: "force_transfer", + data: ForceTransfer { + source, + dest, + value, + }, + }, + [ + 79u8, 174u8, 212u8, 108u8, 184u8, 33u8, 170u8, 29u8, 232u8, + 254u8, 195u8, 218u8, 221u8, 134u8, 57u8, 99u8, 6u8, 70u8, + 181u8, 227u8, 56u8, 239u8, 243u8, 158u8, 157u8, 245u8, 36u8, + 162u8, 11u8, 237u8, 147u8, 15u8, + ], + ) } #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"] #[doc = "origin account."] @@ -4942,40 +3317,28 @@ pub mod api { #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] pub fn transfer_keep_alive( &self, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - TransferKeepAlive, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 111u8, 233u8, 125u8, 71u8, 223u8, 141u8, 112u8, 94u8, 157u8, - 11u8, 88u8, 7u8, 239u8, 145u8, 247u8, 183u8, 245u8, 87u8, - 157u8, 35u8, 49u8, 91u8, 54u8, 103u8, 101u8, 76u8, 110u8, - 94u8, 81u8, 170u8, 153u8, 209u8, - ] - { - let call = TransferKeepAlive { dest, value }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Balances", + call: "transfer_keep_alive", + data: TransferKeepAlive { dest, value }, + }, + [ + 112u8, 179u8, 75u8, 168u8, 193u8, 221u8, 9u8, 82u8, 190u8, + 113u8, 253u8, 13u8, 130u8, 134u8, 170u8, 216u8, 136u8, 111u8, + 242u8, 220u8, 202u8, 112u8, 47u8, 79u8, 73u8, 244u8, 226u8, + 59u8, 240u8, 188u8, 210u8, 208u8, + ], + ) } #[doc = "Transfer the entire transferable balance from the caller account."] #[doc = ""] @@ -4996,80 +3359,56 @@ pub mod api { #[doc = " #"] pub fn transfer_all( &self, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, keep_alive: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - TransferAll, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 240u8, 165u8, 185u8, 144u8, 24u8, 149u8, 15u8, 46u8, 60u8, - 147u8, 19u8, 187u8, 96u8, 24u8, 150u8, 53u8, 151u8, 232u8, - 200u8, 164u8, 176u8, 167u8, 8u8, 23u8, 63u8, 135u8, 68u8, - 110u8, 5u8, 21u8, 35u8, 78u8, - ] - { - let call = TransferAll { dest, keep_alive }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Balances", + call: "transfer_all", + data: TransferAll { dest, keep_alive }, + }, + [ + 46u8, 129u8, 29u8, 177u8, 221u8, 107u8, 245u8, 69u8, 238u8, + 126u8, 145u8, 26u8, 219u8, 208u8, 14u8, 80u8, 149u8, 1u8, + 214u8, 63u8, 67u8, 201u8, 144u8, 45u8, 129u8, 145u8, 174u8, + 71u8, 238u8, 113u8, 208u8, 34u8, + ], + ) } #[doc = "Unreserve some balance from a user by force."] #[doc = ""] #[doc = "Can only be called by ROOT."] pub fn force_unreserve( &self, - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, amount: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceUnreserve, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 106u8, 42u8, 48u8, 136u8, 41u8, 155u8, 214u8, 112u8, 99u8, - 122u8, 202u8, 250u8, 95u8, 60u8, 182u8, 13u8, 25u8, 149u8, - 212u8, 212u8, 247u8, 191u8, 130u8, 95u8, 84u8, 252u8, 252u8, - 197u8, 244u8, 149u8, 103u8, 67u8, - ] - { - let call = ForceUnreserve { who, amount }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Balances", + call: "force_unreserve", + data: ForceUnreserve { who, amount }, + }, + [ + 160u8, 146u8, 137u8, 76u8, 157u8, 187u8, 66u8, 148u8, 207u8, + 76u8, 32u8, 254u8, 82u8, 215u8, 35u8, 161u8, 213u8, 52u8, + 32u8, 98u8, 102u8, 106u8, 234u8, 123u8, 6u8, 175u8, 184u8, + 188u8, 174u8, 106u8, 176u8, 78u8, + ], + ) } } } @@ -5077,222 +3416,178 @@ pub mod api { pub type Event = runtime_types::pallet_balances::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account was created with some free balance."] pub struct Endowed { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub free_balance: ::core::primitive::u128, } - impl ::subxt::Event for Endowed { + impl ::subxt::events::StaticEvent for Endowed { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Endowed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for DustLost { + impl ::subxt::events::StaticEvent for DustLost { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "DustLost"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Transfer succeeded."] pub struct Transfer { - pub from: ::subxt::sp_core::crypto::AccountId32, - pub to: ::subxt::sp_core::crypto::AccountId32, + pub from: ::subxt::ext::sp_core::crypto::AccountId32, + pub to: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Transfer { + impl ::subxt::events::StaticEvent for Transfer { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Transfer"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A balance was set by root."] pub struct BalanceSet { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub free: ::core::primitive::u128, pub reserved: ::core::primitive::u128, } - impl ::subxt::Event for BalanceSet { + impl ::subxt::events::StaticEvent for BalanceSet { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "BalanceSet"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some balance was reserved (moved from free to reserved)."] pub struct Reserved { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Reserved { + impl ::subxt::events::StaticEvent for Reserved { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Reserved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some balance was unreserved (moved from reserved to free)."] pub struct Unreserved { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Unreserved { + impl ::subxt::events::StaticEvent for Unreserved { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Unreserved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, - pub to: ::subxt::sp_core::crypto::AccountId32, + pub from: ::subxt::ext::sp_core::crypto::AccountId32, + pub to: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, pub destination_status: runtime_types::frame_support::traits::tokens::misc::BalanceStatus, } - impl ::subxt::Event for ReserveRepatriated { + impl ::subxt::events::StaticEvent for ReserveRepatriated { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "ReserveRepatriated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some amount was deposited (e.g. for transaction fees)."] pub struct Deposit { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Deposit { + impl ::subxt::events::StaticEvent for Deposit { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Deposit"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] pub struct Withdraw { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Withdraw { + impl ::subxt::events::StaticEvent for Withdraw { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Withdraw"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] pub struct Slashed { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Slashed { + impl ::subxt::events::StaticEvent for Slashed { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Slashed"; } } pub mod storage { use super::runtime_types; - pub struct TotalIssuance; - impl ::subxt::StorageEntry for TotalIssuance { - const PALLET: &'static str = "Balances"; - const STORAGE: &'static str = "TotalIssuance"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Account<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Account<'_> { - const PALLET: &'static str = "Balances"; - const STORAGE: &'static str = "Account"; - type Value = - runtime_types::pallet_balances::AccountData<::core::primitive::u128>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct Locks<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Locks<'_> { - const PALLET: &'static str = "Balances"; - const STORAGE: &'static str = "Locks"; - type Value = - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock< - ::core::primitive::u128, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct Reserves<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Reserves<'_> { - const PALLET: &'static str = "Balances"; - const STORAGE: &'static str = "Reserves"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct StorageVersion; - impl ::subxt::StorageEntry for StorageVersion { - const PALLET: &'static str = "Balances"; - const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::pallet_balances::Releases; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The total units issued in the system."] pub fn total_issuance( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 1u8, 206u8, 252u8, 237u8, 6u8, 30u8, 20u8, 232u8, 164u8, - 115u8, 51u8, 156u8, 156u8, 206u8, 241u8, 187u8, 44u8, - 84u8, 25u8, 164u8, 235u8, 20u8, 86u8, 242u8, 124u8, 23u8, - 28u8, 140u8, 26u8, 73u8, 231u8, 51u8, - ] - { - let entry = TotalIssuance; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "TotalIssuance", + vec![], + [ + 1u8, 206u8, 252u8, 237u8, 6u8, 30u8, 20u8, 232u8, 164u8, + 115u8, 51u8, 156u8, 156u8, 206u8, 241u8, 187u8, 44u8, 84u8, + 25u8, 164u8, 235u8, 20u8, 86u8, 242u8, 124u8, 23u8, 28u8, + 140u8, 26u8, 73u8, 231u8, 51u8, + ], + ) } #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] @@ -5320,40 +3615,27 @@ 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: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_balances::AccountData< - ::core::primitive::u128, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 129u8, 169u8, 171u8, 206u8, 229u8, 178u8, 69u8, 118u8, - 199u8, 64u8, 254u8, 67u8, 16u8, 154u8, 160u8, 197u8, - 177u8, 161u8, 148u8, 199u8, 78u8, 219u8, 187u8, 83u8, - 99u8, 110u8, 207u8, 252u8, 243u8, 39u8, 46u8, 106u8, - ] - { - let entry = Account(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "Account", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, + 80u8, 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8, + 141u8, 240u8, 172u8, 217u8, 215u8, 109u8, 87u8, 135u8, 248u8, + 57u8, 98u8, 185u8, 22u8, 4u8, + ], + ) } #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] @@ -5379,428 +3661,278 @@ pub mod api { #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] - pub fn account_iter( + pub fn account_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Account<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 129u8, 169u8, 171u8, 206u8, 229u8, 178u8, 69u8, 118u8, - 199u8, 64u8, 254u8, 67u8, 16u8, 154u8, 160u8, 197u8, - 177u8, 161u8, 148u8, 199u8, 78u8, 219u8, 187u8, 83u8, - 99u8, 110u8, 207u8, 252u8, 243u8, 39u8, 46u8, 106u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "Account", + Vec::new(), + [ + 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, + 80u8, 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8, + 141u8, 240u8, 172u8, 217u8, 215u8, 109u8, 87u8, 135u8, 248u8, + 57u8, 98u8, 185u8, 22u8, 4u8, + ], + ) } #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] pub fn locks (& self , _0 : & 'a :: subxt :: sp_core :: crypto :: AccountId32 , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 31u8, 76u8, 213u8, 60u8, 86u8, 11u8, 155u8, 151u8, 33u8, - 212u8, 74u8, 89u8, 174u8, 74u8, 195u8, 107u8, 29u8, - 163u8, 178u8, 34u8, 209u8, 8u8, 201u8, 237u8, 77u8, 99u8, - 205u8, 212u8, 236u8, 132u8, 2u8, 252u8, - ] - { - let entry = Locks(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + pub fn locks( + &self, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::BalanceLock< + ::core::primitive::u128, + >, + >, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "Locks", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, + 134u8, 195u8, 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8, + 4u8, 122u8, 90u8, 212u8, 136u8, 14u8, 127u8, 232u8, 8u8, + 192u8, 40u8, 233u8, 18u8, 250u8, + ], + ) } #[doc = " Any liquidity locks on some account balances."] #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - pub fn locks_iter( + pub fn locks_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Locks<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::BalanceLock< + ::core::primitive::u128, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 31u8, 76u8, 213u8, 60u8, 86u8, 11u8, 155u8, 151u8, 33u8, - 212u8, 74u8, 89u8, 174u8, 74u8, 195u8, 107u8, 29u8, - 163u8, 178u8, 34u8, 209u8, 8u8, 201u8, 237u8, 77u8, 99u8, - 205u8, 212u8, 236u8, 132u8, 2u8, 252u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "Locks", + Vec::new(), + [ + 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, + 134u8, 195u8, 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8, + 4u8, 122u8, 90u8, 212u8, 136u8, 14u8, 127u8, 232u8, 8u8, + 192u8, 40u8, 233u8, 18u8, 250u8, + ], + ) } #[doc = " Named reserves on some account balances."] pub fn reserves( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, - >, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 6u8, 69u8, 151u8, 81u8, 40u8, 146u8, 113u8, 56u8, - 239u8, 104u8, 31u8, 168u8, 242u8, 141u8, 121u8, 213u8, - 213u8, 114u8, 63u8, 62u8, 47u8, 91u8, 119u8, 57u8, 91u8, - 95u8, 81u8, 19u8, 208u8, 59u8, 146u8, - ] - { - let entry = Reserves(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "Reserves", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, + 250u8, 128u8, 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8, + 16u8, 147u8, 74u8, 55u8, 183u8, 94u8, 160u8, 177u8, 26u8, + 187u8, 71u8, 197u8, 187u8, 163u8, + ], + ) } #[doc = " Named reserves on some account balances."] - pub fn reserves_iter( + pub fn reserves_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Reserves<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 6u8, 69u8, 151u8, 81u8, 40u8, 146u8, 113u8, 56u8, - 239u8, 104u8, 31u8, 168u8, 242u8, 141u8, 121u8, 213u8, - 213u8, 114u8, 63u8, 62u8, 47u8, 91u8, 119u8, 57u8, 91u8, - 95u8, 81u8, 19u8, 208u8, 59u8, 146u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "Reserves", + Vec::new(), + [ + 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, + 250u8, 128u8, 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8, + 16u8, 147u8, 74u8, 55u8, 183u8, 94u8, 160u8, 177u8, 26u8, + 187u8, 71u8, 197u8, 187u8, 163u8, + ], + ) } #[doc = " Storage version of the pallet."] #[doc = ""] #[doc = " This is set to v2.0.0 for new networks."] pub fn storage_version( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_balances::Releases, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 135u8, 96u8, 28u8, 234u8, 124u8, 212u8, 56u8, 140u8, - 40u8, 101u8, 235u8, 128u8, 136u8, 221u8, 182u8, 81u8, - 17u8, 9u8, 184u8, 228u8, 174u8, 165u8, 200u8, 162u8, - 214u8, 178u8, 227u8, 72u8, 34u8, 5u8, 173u8, 96u8, - ] - { - let entry = StorageVersion; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_balances::Releases, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Balances", + "StorageVersion", + vec![], + [ + 135u8, 96u8, 28u8, 234u8, 124u8, 212u8, 56u8, 140u8, 40u8, + 101u8, 235u8, 128u8, 136u8, 221u8, 182u8, 81u8, 17u8, 9u8, + 184u8, 228u8, 174u8, 165u8, 200u8, 162u8, 214u8, 178u8, + 227u8, 72u8, 34u8, 5u8, 173u8, 96u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The minimum amount required to keep an account open."] pub fn existential_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Balances", "ExistentialDeposit")? - == [ - 100u8, 197u8, 144u8, 241u8, 166u8, 142u8, 204u8, 246u8, - 114u8, 229u8, 145u8, 5u8, 133u8, 180u8, 23u8, 117u8, 117u8, - 204u8, 228u8, 32u8, 70u8, 243u8, 110u8, 36u8, 218u8, 106u8, - 47u8, 136u8, 193u8, 46u8, 121u8, 242u8, - ] - { - let pallet = metadata.pallet("Balances")?; - let constant = pallet.constant("ExistentialDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Balances", + "ExistentialDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The maximum number of locks that should exist on an account."] #[doc = " Not strictly enforced, but used for weight estimation."] pub fn max_locks( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Balances", "MaxLocks")? - == [ - 250u8, 58u8, 19u8, 15u8, 35u8, 113u8, 227u8, 89u8, 39u8, - 75u8, 21u8, 108u8, 202u8, 32u8, 163u8, 167u8, 207u8, 233u8, - 69u8, 151u8, 53u8, 164u8, 230u8, 16u8, 14u8, 22u8, 172u8, - 46u8, 36u8, 216u8, 29u8, 1u8, - ] - { - let pallet = metadata.pallet("Balances")?; - let constant = pallet.constant("MaxLocks")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Balances", + "MaxLocks", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The maximum number of named reserves that can exist on an account."] pub fn max_reserves( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Balances", "MaxReserves")? - == [ - 24u8, 30u8, 77u8, 89u8, 216u8, 114u8, 140u8, 11u8, 127u8, - 252u8, 130u8, 203u8, 4u8, 55u8, 62u8, 240u8, 65u8, 182u8, - 187u8, 189u8, 140u8, 6u8, 177u8, 216u8, 159u8, 108u8, 18u8, - 73u8, 95u8, 67u8, 62u8, 50u8, - ] - { - let pallet = metadata.pallet("Balances")?; - let constant = pallet.constant("MaxReserves")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Balances", + "MaxReserves", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod transaction_payment { - use super::{ - root_mod, - runtime_types, - }; - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] - #[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::sp_core::crypto::AccountId32, - pub actual_fee: ::core::primitive::u128, - pub tip: ::core::primitive::u128, - } - impl ::subxt::Event for TransactionFeePaid { - const PALLET: &'static str = "TransactionPayment"; - const EVENT: &'static str = "TransactionFeePaid"; - } - } + use super::root_mod; + use super::runtime_types; pub mod storage { use super::runtime_types; - pub struct NextFeeMultiplier; - impl ::subxt::StorageEntry for NextFeeMultiplier { - const PALLET: &'static str = "TransactionPayment"; - const STORAGE: &'static str = "NextFeeMultiplier"; - type Value = runtime_types::sp_arithmetic::fixed_point::FixedU128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageVersion; - impl ::subxt::StorageEntry for StorageVersion { - const PALLET: &'static str = "TransactionPayment"; - const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::pallet_transaction_payment::Releases; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { pub fn next_fee_multiplier( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_arithmetic::fixed_point::FixedU128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 232u8, 48u8, 68u8, 202u8, 209u8, 29u8, 249u8, 71u8, 0u8, - 84u8, 229u8, 250u8, 176u8, 203u8, 27u8, 26u8, 34u8, 55u8, - 83u8, 183u8, 224u8, 40u8, 62u8, 127u8, 131u8, 88u8, - 128u8, 9u8, 56u8, 178u8, 31u8, 183u8, - ] - { - let entry = NextFeeMultiplier; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_arithmetic::fixed_point::FixedU128, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TransactionPayment", + "NextFeeMultiplier", + vec![], + [ + 210u8, 0u8, 206u8, 165u8, 183u8, 10u8, 206u8, 52u8, 14u8, + 90u8, 218u8, 197u8, 189u8, 125u8, 113u8, 216u8, 52u8, 161u8, + 45u8, 24u8, 245u8, 237u8, 121u8, 41u8, 106u8, 29u8, 45u8, + 129u8, 250u8, 203u8, 206u8, 180u8, + ], + ) } pub fn storage_version( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_transaction_payment::Releases, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8, - 82u8, 176u8, 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, - 11u8, 34u8, 12u8, 12u8, 198u8, 58u8, 191u8, 186u8, 221u8, - 221u8, 119u8, 181u8, 253u8, 154u8, 228u8, - ] - { - let entry = StorageVersion; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_transaction_payment::Releases, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TransactionPayment", + "StorageVersion", + vec![], + [ + 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8, + 82u8, 176u8, 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, 11u8, + 34u8, 12u8, 12u8, 198u8, 58u8, 191u8, 186u8, 221u8, 221u8, + 119u8, 181u8, 253u8, 154u8, 228u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] #[doc = " `priority`"] #[doc = ""] @@ -5824,44 +3956,37 @@ pub mod api { #[doc = " transactions."] pub fn operational_fee_multiplier( &self, - ) -> ::core::result::Result<::core::primitive::u8, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("TransactionPayment", "OperationalFeeMultiplier")? - == [ - 161u8, 232u8, 150u8, 43u8, 106u8, 83u8, 56u8, 248u8, 54u8, - 123u8, 244u8, 73u8, 5u8, 49u8, 245u8, 150u8, 70u8, 92u8, - 158u8, 207u8, 127u8, 115u8, 211u8, 21u8, 24u8, 136u8, 89u8, - 44u8, 151u8, 211u8, 235u8, 196u8, - ] - { - let pallet = metadata.pallet("TransactionPayment")?; - let constant = pallet.constant("OperationalFeeMultiplier")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "TransactionPayment", + "OperationalFeeMultiplier", + [ + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, + 110u8, 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, + 185u8, 66u8, 226u8, 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, + 114u8, 237u8, 228u8, 183u8, 165u8, + ], + ) } } } } pub mod authorship { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetUncles { pub new_uncles: ::std::vec::Vec< runtime_types::sp_runtime::generic::header::Header< @@ -5870,25 +3995,8 @@ pub mod api { >, >, } - impl ::subxt::Call for SetUncles { - const PALLET: &'static str = "Authorship"; - const FUNCTION: &'static str = "set_uncles"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Provide a set of uncles."] pub fn set_uncles( &self, @@ -5898,460 +4006,354 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetUncles, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 5u8, 56u8, 71u8, 152u8, 103u8, 232u8, 101u8, 171u8, 200u8, - 2u8, 177u8, 102u8, 0u8, 93u8, 210u8, 90u8, 56u8, 151u8, 5u8, - 235u8, 227u8, 197u8, 189u8, 248u8, 2u8, 71u8, 49u8, 220u8, - 212u8, 253u8, 235u8, 67u8, - ] - { - let call = SetUncles { new_uncles }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Authorship", + call: "set_uncles", + data: SetUncles { new_uncles }, + }, + [ + 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, + 228u8, 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, + 90u8, 60u8, 223u8, 19u8, 111u8, 172u8, 5u8, 223u8, 132u8, + 37u8, 235u8, 119u8, 42u8, 64u8, + ], + ) } } } pub mod storage { use super::runtime_types; - pub struct Uncles; - impl ::subxt::StorageEntry for Uncles { - const PALLET: &'static str = "Authorship"; - const STORAGE: &'static str = "Uncles"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_authorship::UncleEntryItem< - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Author; - impl ::subxt::StorageEntry for Author { - const PALLET: &'static str = "Authorship"; - const STORAGE: &'static str = "Author"; - type Value = ::subxt::sp_core::crypto::AccountId32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct DidSetUncles; - impl ::subxt::StorageEntry for DidSetUncles { - const PALLET: &'static str = "Authorship"; - const STORAGE: &'static str = "DidSetUncles"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Uncles"] pub fn uncles( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_authorship::UncleEntryItem< - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - >, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::pallet_authorship::UncleEntryItem< + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::subxt::ext::sp_core::crypto::AccountId32, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 104u8, 166u8, 142u8, 139u8, 46u8, 63u8, 163u8, 183u8, - 45u8, 77u8, 156u8, 44u8, 228u8, 57u8, 253u8, 230u8, - 103u8, 119u8, 145u8, 135u8, 251u8, 182u8, 144u8, 165u8, - 127u8, 150u8, 127u8, 185u8, 146u8, 228u8, 91u8, 163u8, - ] - { - let entry = Uncles; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Authorship", + "Uncles", + vec![], + [ + 43u8, 181u8, 75u8, 158u8, 153u8, 32u8, 210u8, 36u8, 194u8, + 34u8, 146u8, 179u8, 154u8, 141u8, 75u8, 29u8, 51u8, 116u8, + 94u8, 82u8, 90u8, 74u8, 103u8, 216u8, 86u8, 27u8, 30u8, + 213u8, 174u8, 80u8, 193u8, 51u8, + ], + ) } #[doc = " Author of current block."] pub fn author( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 191u8, 57u8, 3u8, 242u8, 220u8, 123u8, 103u8, 215u8, - 149u8, 120u8, 20u8, 139u8, 146u8, 234u8, 180u8, 105u8, - 129u8, 128u8, 114u8, 147u8, 114u8, 236u8, 23u8, 21u8, - 15u8, 250u8, 180u8, 19u8, 177u8, 145u8, 77u8, 228u8, - ] - { - let entry = Author; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Authorship", + "Author", + vec![], + [ + 149u8, 42u8, 33u8, 147u8, 190u8, 207u8, 174u8, 227u8, 190u8, + 110u8, 25u8, 131u8, 5u8, 167u8, 237u8, 188u8, 188u8, 33u8, + 177u8, 126u8, 181u8, 49u8, 126u8, 118u8, 46u8, 128u8, 154u8, + 95u8, 15u8, 91u8, 103u8, 113u8, + ], + ) } #[doc = " Whether uncles were already set in this block."] pub fn did_set_uncles( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 64u8, 3u8, 208u8, 187u8, 50u8, 45u8, 37u8, 88u8, 163u8, - 226u8, 37u8, 126u8, 232u8, 107u8, 156u8, 187u8, 29u8, - 15u8, 53u8, 46u8, 28u8, 73u8, 83u8, 123u8, 14u8, 244u8, - 243u8, 43u8, 245u8, 143u8, 15u8, 115u8, - ] - { - let entry = DidSetUncles; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Authorship", + "DidSetUncles", + vec![], + [ + 64u8, 3u8, 208u8, 187u8, 50u8, 45u8, 37u8, 88u8, 163u8, + 226u8, 37u8, 126u8, 232u8, 107u8, 156u8, 187u8, 29u8, 15u8, + 53u8, 46u8, 28u8, 73u8, 83u8, 123u8, 14u8, 244u8, 243u8, + 43u8, 245u8, 143u8, 15u8, 115u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The number of blocks back we should accept uncles."] #[doc = " This means that we will deal with uncle-parents that are"] #[doc = " `UncleGenerations + 1` before `now`."] pub fn uncle_generations( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Authorship", "UncleGenerations")? - == [ - 0u8, 72u8, 57u8, 175u8, 222u8, 143u8, 191u8, 33u8, 163u8, - 157u8, 202u8, 83u8, 186u8, 103u8, 162u8, 103u8, 227u8, 158u8, - 239u8, 212u8, 205u8, 193u8, 226u8, 138u8, 5u8, 220u8, 221u8, - 42u8, 7u8, 146u8, 173u8, 205u8, - ] - { - let pallet = metadata.pallet("Authorship")?; - let constant = pallet.constant("UncleGenerations")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Authorship", + "UncleGenerations", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod staking { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Bond { - pub controller: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub controller: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] pub value: ::core::primitive::u128, pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, } - impl ::subxt::Call for Bond { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "bond"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct BondExtra { #[codec(compact)] pub max_additional: ::core::primitive::u128, } - impl ::subxt::Call for BondExtra { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "bond_extra"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Unbond { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Unbond { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "unbond"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct WithdrawUnbonded { pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for WithdrawUnbonded { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "withdraw_unbonded"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Validate { pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } - impl ::subxt::Call for Validate { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "validate"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Nominate { pub targets: ::std::vec::Vec< - ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, >, } - impl ::subxt::Call for Nominate { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "nominate"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Chill; - impl ::subxt::Call for Chill { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "chill"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetPayee { pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, } - impl ::subxt::Call for SetPayee { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_payee"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetController { - pub controller: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub controller: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for SetController { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_controller"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetValidatorCount { #[codec(compact)] pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidatorCount { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_validator_count"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct IncreaseValidatorCount { #[codec(compact)] pub additional: ::core::primitive::u32, } - impl ::subxt::Call for IncreaseValidatorCount { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "increase_validator_count"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ScaleValidatorCount { pub factor: runtime_types::sp_arithmetic::per_things::Percent, } - impl ::subxt::Call for ScaleValidatorCount { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "scale_validator_count"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceNoEras; - impl ::subxt::Call for ForceNoEras { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "force_no_eras"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceNewEra; - impl ::subxt::Call for ForceNewEra { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "force_new_era"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetInvulnerables { - pub invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - } - impl ::subxt::Call for SetInvulnerables { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_invulnerables"; + pub invulnerables: + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceUnstake { - pub stash: ::subxt::sp_core::crypto::AccountId32, + pub stash: ::subxt::ext::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for ForceUnstake { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "force_unstake"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceNewEraAlways; - impl ::subxt::Call for ForceNewEraAlways { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "force_new_era_always"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CancelDeferredSlash { pub era: ::core::primitive::u32, pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, } - impl ::subxt::Call for CancelDeferredSlash { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "cancel_deferred_slash"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct PayoutStakers { - pub validator_stash: ::subxt::sp_core::crypto::AccountId32, + pub validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, pub era: ::core::primitive::u32, } - impl ::subxt::Call for PayoutStakers { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "payout_stakers"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Rebond { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Rebond { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "rebond"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetHistoryDepth { #[codec(compact)] pub new_history_depth: ::core::primitive::u32, #[codec(compact)] pub era_items_deleted: ::core::primitive::u32, } - impl ::subxt::Call for SetHistoryDepth { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_history_depth"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReapStash { - pub stash: ::subxt::sp_core::crypto::AccountId32, + pub stash: ::subxt::ext::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for ReapStash { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "reap_stash"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Kick { pub who: ::std::vec::Vec< - ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, >, } - impl ::subxt::Call for Kick { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "kick"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetStakingConfigs { pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< @@ -6378,41 +4380,24 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Perbill, >, } - impl ::subxt::Call for SetStakingConfigs { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_staking_configs"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ChillOther { - pub controller: ::subxt::sp_core::crypto::AccountId32, + pub controller: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ChillOther { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "chill_other"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceApplyMinCommission { - pub validator_stash: ::subxt::sp_core::crypto::AccountId32, + pub validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ForceApplyMinCommission { - const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "force_apply_min_commission"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] #[doc = "be the account that controls it."] #[doc = ""] @@ -6432,47 +4417,35 @@ pub mod api { #[doc = "# "] pub fn bond( &self, - controller: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + controller: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, value: ::core::primitive::u128, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, - >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Bond, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 41u8, 8u8, 237u8, 132u8, 236u8, 61u8, 222u8, 146u8, 255u8, - 136u8, 174u8, 104u8, 120u8, 64u8, 198u8, 147u8, 80u8, 237u8, - 65u8, 255u8, 187u8, 55u8, 252u8, 34u8, 252u8, 88u8, 35u8, - 236u8, 249u8, 170u8, 116u8, 208u8, - ] - { - let call = Bond { - controller, - value, - payee, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "bond", + data: Bond { + controller, + value, + payee, + }, + }, + [ + 215u8, 211u8, 69u8, 215u8, 33u8, 158u8, 62u8, 3u8, 31u8, + 216u8, 213u8, 188u8, 151u8, 43u8, 165u8, 154u8, 117u8, 163u8, + 190u8, 227u8, 116u8, 70u8, 155u8, 178u8, 64u8, 174u8, 203u8, + 179u8, 214u8, 187u8, 176u8, 10u8, + ], + ) } #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] #[doc = "for staking."] @@ -6492,35 +4465,23 @@ pub mod api { pub fn bond_extra( &self, max_additional: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - BondExtra, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 170u8, 38u8, 37u8, 71u8, 243u8, 41u8, 24u8, 59u8, 17u8, - 229u8, 61u8, 20u8, 130u8, 167u8, 1u8, 1u8, 158u8, 180u8, - 234u8, 65u8, 196u8, 181u8, 232u8, 146u8, 62u8, 90u8, 194u8, - 183u8, 253u8, 142u8, 251u8, 200u8, - ] - { - let call = BondExtra { max_additional }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "bond_extra", + data: BondExtra { max_additional }, + }, + [ + 60u8, 45u8, 82u8, 223u8, 113u8, 95u8, 0u8, 71u8, 59u8, 108u8, + 228u8, 9u8, 95u8, 210u8, 113u8, 106u8, 252u8, 15u8, 19u8, + 128u8, 11u8, 187u8, 4u8, 151u8, 103u8, 143u8, 24u8, 33u8, + 149u8, 82u8, 35u8, 192u8, + ], + ) } #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] #[doc = "period ends. If this leaves an amount actively bonded less than"] @@ -6544,35 +4505,23 @@ pub mod api { pub fn unbond( &self, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Unbond, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 85u8, 188u8, 141u8, 62u8, 242u8, 15u8, 6u8, 20u8, 96u8, - 220u8, 201u8, 163u8, 29u8, 136u8, 24u8, 4u8, 143u8, 13u8, - 22u8, 118u8, 22u8, 212u8, 164u8, 125u8, 200u8, 219u8, 6u8, - 25u8, 174u8, 92u8, 108u8, 89u8, - ] - { - let call = Unbond { value }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "unbond", + data: Unbond { value }, + }, + [ + 85u8, 62u8, 34u8, 127u8, 60u8, 241u8, 134u8, 60u8, 125u8, + 91u8, 31u8, 193u8, 50u8, 230u8, 237u8, 42u8, 114u8, 230u8, + 240u8, 146u8, 14u8, 109u8, 185u8, 151u8, 148u8, 44u8, 147u8, + 182u8, 192u8, 253u8, 51u8, 87u8, + ], + ) } #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] #[doc = ""] @@ -6592,35 +4541,23 @@ pub mod api { pub fn withdraw_unbonded( &self, num_slashing_spans: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - WithdrawUnbonded, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 252u8, 47u8, 185u8, 86u8, 179u8, 203u8, 20u8, 5u8, 88u8, - 252u8, 212u8, 173u8, 20u8, 202u8, 206u8, 56u8, 10u8, 186u8, - 124u8, 221u8, 42u8, 61u8, 202u8, 110u8, 233u8, 40u8, 210u8, - 135u8, 204u8, 110u8, 133u8, 123u8, - ] - { - let call = WithdrawUnbonded { num_slashing_spans }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "withdraw_unbonded", + data: WithdrawUnbonded { num_slashing_spans }, + }, + [ + 95u8, 223u8, 122u8, 217u8, 76u8, 208u8, 86u8, 129u8, 31u8, + 104u8, 70u8, 154u8, 23u8, 250u8, 165u8, 192u8, 149u8, 249u8, + 158u8, 159u8, 194u8, 224u8, 118u8, 134u8, 204u8, 157u8, 72u8, + 136u8, 19u8, 193u8, 183u8, 84u8, + ], + ) } #[doc = "Declare the desire to validate for the origin controller."] #[doc = ""] @@ -6630,35 +4567,23 @@ pub mod api { pub fn validate( &self, prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Validate, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 138u8, 13u8, 146u8, 216u8, 4u8, 27u8, 20u8, 159u8, 148u8, - 25u8, 169u8, 229u8, 145u8, 2u8, 251u8, 58u8, 13u8, 128u8, - 20u8, 22u8, 194u8, 11u8, 13u8, 65u8, 50u8, 51u8, 158u8, - 239u8, 45u8, 90u8, 6u8, 37u8, - ] - { - let call = Validate { prefs }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "validate", + data: Validate { prefs }, + }, + [ + 191u8, 116u8, 139u8, 35u8, 250u8, 211u8, 86u8, 240u8, 35u8, + 9u8, 19u8, 44u8, 148u8, 35u8, 91u8, 106u8, 200u8, 172u8, + 108u8, 145u8, 194u8, 146u8, 61u8, 145u8, 233u8, 168u8, 2u8, + 26u8, 145u8, 101u8, 114u8, 157u8, + ], + ) } #[doc = "Declare the desire to nominate `targets` for the origin controller."] #[doc = ""] @@ -6674,40 +4599,28 @@ pub mod api { pub fn nominate( &self, targets: ::std::vec::Vec< - ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Nominate, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 199u8, 181u8, 123u8, 171u8, 186u8, 9u8, 23u8, 220u8, 147u8, - 7u8, 252u8, 26u8, 25u8, 195u8, 126u8, 175u8, 181u8, 118u8, - 162u8, 37u8, 99u8, 31u8, 100u8, 249u8, 245u8, 122u8, 235u8, - 11u8, 43u8, 39u8, 198u8, 145u8, - ] - { - let call = Nominate { targets }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "nominate", + data: Nominate { targets }, + }, + [ + 112u8, 162u8, 70u8, 26u8, 74u8, 7u8, 188u8, 193u8, 210u8, + 247u8, 27u8, 189u8, 133u8, 137u8, 33u8, 155u8, 255u8, 171u8, + 122u8, 68u8, 175u8, 247u8, 139u8, 253u8, 97u8, 187u8, 254u8, + 201u8, 66u8, 166u8, 226u8, 90u8, + ], + ) } #[doc = "Declare no desire to either validate or nominate."] #[doc = ""] @@ -6722,35 +4635,23 @@ pub mod api { #[doc = "# "] pub fn chill( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Chill, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "chill", + data: Chill {}, + }, + [ 94u8, 20u8, 196u8, 31u8, 220u8, 125u8, 115u8, 167u8, 140u8, 3u8, 20u8, 132u8, 81u8, 120u8, 215u8, 166u8, 230u8, 56u8, 16u8, 222u8, 31u8, 153u8, 120u8, 62u8, 153u8, 67u8, 220u8, 239u8, 11u8, 234u8, 127u8, 122u8, - ] - { - let call = Chill {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "(Re-)set the payment target for a controller."] #[doc = ""] @@ -6771,37 +4672,25 @@ pub mod api { pub fn set_payee( &self, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetPayee, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 185u8, 62u8, 154u8, 65u8, 135u8, 104u8, 38u8, 171u8, 237u8, - 16u8, 169u8, 38u8, 53u8, 161u8, 170u8, 232u8, 249u8, 185u8, - 24u8, 155u8, 54u8, 88u8, 96u8, 147u8, 171u8, 85u8, 216u8, - 240u8, 52u8, 158u8, 134u8, 72u8, - ] - { - let call = SetPayee { payee }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "set_payee", + data: SetPayee { payee }, + }, + [ + 96u8, 8u8, 254u8, 164u8, 87u8, 46u8, 120u8, 11u8, 197u8, + 63u8, 20u8, 178u8, 167u8, 236u8, 149u8, 245u8, 14u8, 171u8, + 108u8, 195u8, 250u8, 133u8, 0u8, 75u8, 192u8, 159u8, 84u8, + 220u8, 242u8, 133u8, 60u8, 62u8, + ], + ) } #[doc = "(Re-)set the controller of a stash."] #[doc = ""] @@ -6821,39 +4710,27 @@ pub mod api { #[doc = "# "] pub fn set_controller( &self, - controller: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + controller: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetController, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 239u8, 105u8, 43u8, 234u8, 201u8, 103u8, 93u8, 252u8, 26u8, - 52u8, 27u8, 23u8, 219u8, 153u8, 195u8, 150u8, 244u8, 13u8, - 24u8, 241u8, 199u8, 160u8, 119u8, 37u8, 55u8, 239u8, 142u8, - 16u8, 80u8, 45u8, 20u8, 233u8, - ] - { - let call = SetController { controller }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "set_controller", + data: SetController { controller }, + }, + [ + 165u8, 250u8, 213u8, 32u8, 179u8, 163u8, 15u8, 35u8, 14u8, + 152u8, 56u8, 171u8, 43u8, 101u8, 7u8, 167u8, 178u8, 60u8, + 89u8, 186u8, 59u8, 28u8, 82u8, 159u8, 13u8, 96u8, 168u8, + 123u8, 194u8, 212u8, 205u8, 184u8, + ], + ) } #[doc = "Sets the ideal number of validators."] #[doc = ""] @@ -6866,35 +4743,23 @@ pub mod api { pub fn set_validator_count( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetValidatorCount, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 181u8, 82u8, 21u8, 239u8, 81u8, 194u8, 166u8, 66u8, 55u8, - 156u8, 68u8, 22u8, 76u8, 251u8, 241u8, 113u8, 168u8, 8u8, - 193u8, 125u8, 112u8, 82u8, 200u8, 139u8, 55u8, 139u8, 22u8, - 35u8, 171u8, 124u8, 112u8, 52u8, - ] - { - let call = SetValidatorCount { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "set_validator_count", + data: SetValidatorCount { new }, + }, + [ + 55u8, 232u8, 95u8, 66u8, 228u8, 217u8, 11u8, 27u8, 3u8, + 202u8, 199u8, 242u8, 70u8, 160u8, 250u8, 187u8, 194u8, 91u8, + 15u8, 36u8, 215u8, 36u8, 160u8, 108u8, 251u8, 60u8, 240u8, + 202u8, 249u8, 235u8, 28u8, 94u8, + ], + ) } #[doc = "Increments the ideal number of validators."] #[doc = ""] @@ -6906,35 +4771,23 @@ pub mod api { pub fn increase_validator_count( &self, additional: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - IncreaseValidatorCount, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 219u8, 143u8, 69u8, 205u8, 182u8, 155u8, 101u8, 39u8, 59u8, - 214u8, 81u8, 47u8, 247u8, 54u8, 106u8, 92u8, 183u8, 42u8, - 30u8, 57u8, 28u8, 136u8, 13u8, 13u8, 170u8, 101u8, 216u8, - 234u8, 194u8, 90u8, 248u8, 234u8, - ] - { - let call = IncreaseValidatorCount { additional }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "increase_validator_count", + data: IncreaseValidatorCount { additional }, + }, + [ + 239u8, 184u8, 155u8, 213u8, 25u8, 22u8, 193u8, 13u8, 102u8, + 192u8, 82u8, 153u8, 249u8, 192u8, 60u8, 158u8, 8u8, 78u8, + 175u8, 219u8, 46u8, 51u8, 222u8, 193u8, 193u8, 201u8, 78u8, + 90u8, 58u8, 86u8, 196u8, 17u8, + ], + ) } #[doc = "Scale up the ideal number of validators by a factor."] #[doc = ""] @@ -6946,35 +4799,23 @@ pub mod api { pub fn scale_validator_count( &self, factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ScaleValidatorCount, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 170u8, 156u8, 101u8, 109u8, 117u8, 199u8, 38u8, 157u8, 132u8, - 210u8, 54u8, 66u8, 251u8, 10u8, 123u8, 120u8, 237u8, 31u8, - 206u8, 176u8, 224u8, 112u8, 82u8, 70u8, 152u8, 6u8, 166u8, - 118u8, 10u8, 172u8, 254u8, 148u8, - ] - { - let call = ScaleValidatorCount { factor }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "scale_validator_count", + data: ScaleValidatorCount { factor }, + }, + [ + 198u8, 68u8, 227u8, 94u8, 110u8, 157u8, 209u8, 217u8, 112u8, + 37u8, 78u8, 142u8, 12u8, 193u8, 219u8, 167u8, 149u8, 112u8, + 49u8, 139u8, 74u8, 81u8, 172u8, 72u8, 253u8, 224u8, 56u8, + 194u8, 185u8, 90u8, 87u8, 125u8, + ], + ) } #[doc = "Force there to be no new eras indefinitely."] #[doc = ""] @@ -6993,35 +4834,23 @@ pub mod api { #[doc = "# "] pub fn force_no_eras( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceNoEras, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "force_no_eras", + data: ForceNoEras {}, + }, + [ 16u8, 81u8, 207u8, 168u8, 23u8, 236u8, 11u8, 75u8, 141u8, 107u8, 92u8, 2u8, 53u8, 111u8, 252u8, 116u8, 91u8, 120u8, 75u8, 24u8, 125u8, 53u8, 9u8, 28u8, 242u8, 87u8, 245u8, 55u8, 40u8, 103u8, 151u8, 178u8, - ] - { - let call = ForceNoEras {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] #[doc = "reset to normal (non-forced) behaviour."] @@ -7041,111 +4870,77 @@ pub mod api { #[doc = "# "] pub fn force_new_era( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceNewEra, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "force_new_era", + data: ForceNewEra {}, + }, + [ 230u8, 242u8, 169u8, 196u8, 78u8, 145u8, 24u8, 191u8, 113u8, 68u8, 5u8, 138u8, 48u8, 51u8, 109u8, 126u8, 73u8, 136u8, 162u8, 158u8, 174u8, 201u8, 213u8, 230u8, 215u8, 44u8, 200u8, 32u8, 75u8, 27u8, 23u8, 254u8, - ] - { - let call = ForceNewEra {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Set the validators who cannot be slashed (if any)."] #[doc = ""] #[doc = "The dispatch origin must be Root."] pub fn set_invulnerables( &self, - invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetInvulnerables, - DispatchError, - root_mod::Event, + invulnerables: ::std::vec::Vec< + ::subxt::ext::sp_core::crypto::AccountId32, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 0u8, 119u8, 27u8, 243u8, 238u8, 65u8, 133u8, 89u8, 210u8, - 202u8, 154u8, 243u8, 168u8, 158u8, 9u8, 147u8, 146u8, 215u8, - 172u8, 28u8, 171u8, 183u8, 112u8, 42u8, 245u8, 232u8, 238u8, - 94u8, 205u8, 46u8, 0u8, 20u8, - ] - { - let call = SetInvulnerables { invulnerables }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "set_invulnerables", + data: SetInvulnerables { invulnerables }, + }, + [ + 2u8, 148u8, 221u8, 111u8, 153u8, 48u8, 222u8, 36u8, 228u8, + 84u8, 18u8, 35u8, 168u8, 239u8, 53u8, 245u8, 27u8, 76u8, + 18u8, 203u8, 206u8, 9u8, 8u8, 81u8, 35u8, 224u8, 22u8, 133u8, + 58u8, 99u8, 103u8, 39u8, + ], + ) } #[doc = "Force a current staker to become completely unstaked, immediately."] #[doc = ""] #[doc = "The dispatch origin must be Root."] pub fn force_unstake( &self, - stash: ::subxt::sp_core::crypto::AccountId32, + stash: ::subxt::ext::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceUnstake, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 254u8, 115u8, 250u8, 15u8, 235u8, 119u8, 2u8, 131u8, 237u8, - 144u8, 247u8, 66u8, 150u8, 92u8, 12u8, 112u8, 137u8, 195u8, - 246u8, 178u8, 129u8, 64u8, 214u8, 4u8, 183u8, 18u8, 94u8, - 104u8, 157u8, 174u8, 231u8, 1u8, - ] - { - let call = ForceUnstake { - stash, - num_slashing_spans, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "force_unstake", + data: ForceUnstake { + stash, + num_slashing_spans, + }, + }, + [ + 94u8, 247u8, 238u8, 47u8, 250u8, 6u8, 96u8, 175u8, 173u8, + 123u8, 161u8, 187u8, 162u8, 214u8, 176u8, 233u8, 33u8, 33u8, + 167u8, 239u8, 40u8, 223u8, 19u8, 131u8, 230u8, 39u8, 175u8, + 200u8, 36u8, 182u8, 76u8, 207u8, + ], + ) } #[doc = "Force there to be a new era at the end of sessions indefinitely."] #[doc = ""] @@ -7158,35 +4953,23 @@ pub mod api { #[doc = "have enough blocks to get a result."] pub fn force_new_era_always( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceNewEraAlways, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "force_new_era_always", + data: ForceNewEraAlways {}, + }, + [ 179u8, 118u8, 189u8, 54u8, 248u8, 141u8, 207u8, 142u8, 80u8, 37u8, 241u8, 185u8, 138u8, 254u8, 117u8, 147u8, 225u8, 118u8, 34u8, 177u8, 197u8, 158u8, 8u8, 82u8, 202u8, 108u8, 208u8, 26u8, 64u8, 33u8, 74u8, 43u8, - ] - { - let call = ForceNewEraAlways {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Cancel enactment of a deferred slash."] #[doc = ""] @@ -7197,35 +4980,23 @@ pub mod api { &self, era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelDeferredSlash, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 217u8, 175u8, 246u8, 108u8, 78u8, 134u8, 98u8, 49u8, 178u8, - 209u8, 98u8, 178u8, 52u8, 242u8, 173u8, 135u8, 171u8, 70u8, - 129u8, 239u8, 62u8, 150u8, 84u8, 142u8, 243u8, 193u8, 179u8, - 249u8, 114u8, 231u8, 8u8, 252u8, - ] - { - let call = CancelDeferredSlash { era, slash_indices }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "cancel_deferred_slash", + data: CancelDeferredSlash { era, slash_indices }, + }, + [ + 120u8, 57u8, 162u8, 105u8, 91u8, 250u8, 129u8, 240u8, 110u8, + 234u8, 170u8, 98u8, 164u8, 65u8, 106u8, 101u8, 19u8, 88u8, + 146u8, 210u8, 171u8, 44u8, 37u8, 50u8, 65u8, 178u8, 37u8, + 223u8, 239u8, 197u8, 116u8, 168u8, + ], + ) } #[doc = "Pay out all the stakers behind a single validator for a single era."] #[doc = ""] @@ -7250,40 +5021,28 @@ pub mod api { #[doc = "# "] pub fn payout_stakers( &self, - validator_stash: ::subxt::sp_core::crypto::AccountId32, + validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, era: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - PayoutStakers, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 235u8, 65u8, 65u8, 249u8, 162u8, 235u8, 127u8, 48u8, 216u8, - 51u8, 252u8, 111u8, 186u8, 191u8, 174u8, 245u8, 144u8, 77u8, - 135u8, 124u8, 205u8, 160u8, 148u8, 130u8, 81u8, 213u8, 195u8, - 105u8, 21u8, 65u8, 186u8, 157u8, - ] - { - let call = PayoutStakers { - validator_stash, - era, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "payout_stakers", + data: PayoutStakers { + validator_stash, + era, + }, + }, + [ + 184u8, 194u8, 33u8, 118u8, 7u8, 203u8, 89u8, 119u8, 214u8, + 76u8, 178u8, 20u8, 82u8, 111u8, 57u8, 132u8, 212u8, 43u8, + 232u8, 91u8, 252u8, 49u8, 42u8, 115u8, 1u8, 181u8, 154u8, + 207u8, 144u8, 206u8, 205u8, 33u8, + ], + ) } #[doc = "Rebond a portion of the stash scheduled to be unlocked."] #[doc = ""] @@ -7297,35 +5056,23 @@ pub mod api { pub fn rebond( &self, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Rebond, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 138u8, 156u8, 164u8, 170u8, 178u8, 236u8, 221u8, 242u8, - 157u8, 176u8, 173u8, 145u8, 254u8, 94u8, 158u8, 27u8, 138u8, - 103u8, 116u8, 31u8, 41u8, 106u8, 199u8, 180u8, 233u8, 172u8, - 38u8, 7u8, 76u8, 29u8, 5u8, 225u8, - ] - { - let call = Rebond { value }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "rebond", + data: Rebond { value }, + }, + [ + 25u8, 22u8, 191u8, 172u8, 133u8, 101u8, 139u8, 102u8, 134u8, + 16u8, 136u8, 56u8, 137u8, 162u8, 4u8, 253u8, 196u8, 30u8, + 234u8, 49u8, 102u8, 68u8, 145u8, 96u8, 148u8, 219u8, 162u8, + 17u8, 177u8, 184u8, 34u8, 113u8, + ], + ) } #[doc = "Set `HistoryDepth` value. This function will delete any history information"] #[doc = "when `HistoryDepth` is reduced."] @@ -7353,38 +5100,26 @@ pub mod api { &self, new_history_depth: ::core::primitive::u32, era_items_deleted: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHistoryDepth, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 128u8, 149u8, 139u8, 192u8, 213u8, 239u8, 248u8, 215u8, 57u8, - 145u8, 177u8, 225u8, 43u8, 214u8, 228u8, 14u8, 213u8, 181u8, - 18u8, 40u8, 242u8, 1u8, 210u8, 87u8, 143u8, 78u8, 0u8, 23u8, - 145u8, 46u8, 210u8, 168u8, - ] - { - let call = SetHistoryDepth { - new_history_depth, - era_items_deleted, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "set_history_depth", + data: SetHistoryDepth { + new_history_depth, + era_items_deleted, + }, + }, + [ + 174u8, 55u8, 231u8, 132u8, 219u8, 215u8, 118u8, 202u8, 13u8, + 151u8, 193u8, 248u8, 141u8, 180u8, 56u8, 103u8, 90u8, 182u8, + 194u8, 198u8, 120u8, 251u8, 143u8, 218u8, 81u8, 59u8, 13u8, + 161u8, 247u8, 57u8, 178u8, 122u8, + ], + ) } #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] #[doc = "be considered `dust` in the staking system. The requirements are:"] @@ -7400,40 +5135,28 @@ pub mod api { #[doc = "Refunds the transaction fees upon successful execution."] pub fn reap_stash( &self, - stash: ::subxt::sp_core::crypto::AccountId32, + stash: ::subxt::ext::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReapStash, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 84u8, 192u8, 207u8, 193u8, 133u8, 53u8, 93u8, 148u8, 153u8, - 112u8, 54u8, 145u8, 68u8, 195u8, 42u8, 158u8, 17u8, 230u8, - 197u8, 218u8, 179u8, 101u8, 237u8, 105u8, 17u8, 232u8, 125u8, - 163u8, 209u8, 134u8, 3u8, 248u8, - ] - { - let call = ReapStash { - stash, - num_slashing_spans, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "reap_stash", + data: ReapStash { + stash, + num_slashing_spans, + }, + }, + [ + 34u8, 168u8, 120u8, 161u8, 95u8, 199u8, 106u8, 233u8, 61u8, + 240u8, 166u8, 31u8, 183u8, 165u8, 158u8, 179u8, 32u8, 130u8, + 27u8, 164u8, 112u8, 44u8, 14u8, 125u8, 227u8, 87u8, 70u8, + 203u8, 194u8, 24u8, 212u8, 177u8, + ], + ) } #[doc = "Remove the given nominations from the calling validator."] #[doc = ""] @@ -7449,40 +5172,28 @@ pub mod api { pub fn kick( &self, who: ::std::vec::Vec< - ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Kick, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 145u8, 201u8, 168u8, 147u8, 25u8, 39u8, 62u8, 48u8, 236u8, - 44u8, 45u8, 233u8, 178u8, 196u8, 117u8, 117u8, 74u8, 193u8, - 131u8, 101u8, 210u8, 40u8, 18u8, 207u8, 99u8, 160u8, 103u8, - 89u8, 69u8, 72u8, 155u8, 89u8, - ] - { - let call = Kick { who }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "kick", + data: Kick { who }, + }, + [ + 32u8, 26u8, 202u8, 6u8, 186u8, 180u8, 58u8, 121u8, 185u8, + 208u8, 123u8, 10u8, 53u8, 179u8, 167u8, 203u8, 96u8, 229u8, + 7u8, 144u8, 231u8, 172u8, 145u8, 141u8, 162u8, 180u8, 212u8, + 42u8, 34u8, 5u8, 199u8, 82u8, + ], + ) } #[doc = "Update the various staking configurations ."] #[doc = ""] @@ -7509,42 +5220,30 @@ pub mod api { max_validator_count : runtime_types :: pallet_staking :: pallet :: pallet :: ConfigOp < :: core :: primitive :: u32 >, chill_threshold : runtime_types :: pallet_staking :: pallet :: pallet :: ConfigOp < runtime_types :: sp_arithmetic :: per_things :: Percent >, min_commission : runtime_types :: pallet_staking :: pallet :: pallet :: ConfigOp < runtime_types :: sp_arithmetic :: per_things :: Perbill >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetStakingConfigs, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 249u8, 192u8, 107u8, 126u8, 200u8, 50u8, 63u8, 120u8, 116u8, - 53u8, 183u8, 80u8, 134u8, 135u8, 49u8, 112u8, 232u8, 140u8, - 177u8, 175u8, 136u8, 220u8, 209u8, 179u8, 219u8, 110u8, 19u8, - 165u8, 191u8, 173u8, 65u8, 13u8, - ] - { - let call = SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "set_staking_configs", + data: SetStakingConfigs { + min_nominator_bond, + min_validator_bond, + max_nominator_count, + max_validator_count, + chill_threshold, + min_commission, + }, + }, + [ + 176u8, 168u8, 155u8, 176u8, 27u8, 79u8, 223u8, 92u8, 88u8, + 93u8, 223u8, 69u8, 179u8, 250u8, 138u8, 138u8, 87u8, 220u8, + 36u8, 3u8, 126u8, 213u8, 16u8, 68u8, 3u8, 16u8, 218u8, 151u8, + 98u8, 169u8, 217u8, 75u8, + ], + ) } #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] #[doc = ""] @@ -7574,72 +5273,48 @@ pub mod api { #[doc = "who do not satisfy these requirements."] pub fn chill_other( &self, - controller: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ChillOther, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 219u8, 114u8, 146u8, 43u8, 175u8, 216u8, 70u8, 148u8, 137u8, - 192u8, 77u8, 247u8, 134u8, 80u8, 188u8, 100u8, 79u8, 141u8, - 32u8, 94u8, 15u8, 178u8, 159u8, 233u8, 235u8, 6u8, 243u8, - 253u8, 22u8, 145u8, 146u8, 219u8, - ] - { - let call = ChillOther { controller }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + controller: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "chill_other", + data: ChillOther { controller }, + }, + [ + 140u8, 98u8, 4u8, 203u8, 91u8, 131u8, 123u8, 119u8, 169u8, + 47u8, 188u8, 23u8, 205u8, 170u8, 82u8, 220u8, 166u8, 170u8, + 135u8, 176u8, 68u8, 228u8, 14u8, 67u8, 42u8, 52u8, 140u8, + 231u8, 62u8, 167u8, 80u8, 173u8, + ], + ) } #[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."] pub fn force_apply_min_commission( &self, - validator_stash: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceApplyMinCommission, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 8u8, 57u8, 61u8, 141u8, 175u8, 100u8, 174u8, 161u8, 236u8, - 2u8, 133u8, 169u8, 249u8, 168u8, 236u8, 188u8, 168u8, 221u8, - 88u8, 148u8, 95u8, 24u8, 214u8, 206u8, 165u8, 170u8, 200u8, - 134u8, 38u8, 174u8, 187u8, 119u8, - ] - { - let call = ForceApplyMinCommission { validator_stash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Staking", + call: "force_apply_min_commission", + data: ForceApplyMinCommission { validator_stash }, + }, + [ + 136u8, 163u8, 85u8, 134u8, 240u8, 247u8, 183u8, 227u8, 226u8, + 202u8, 102u8, 186u8, 138u8, 119u8, 78u8, 123u8, 229u8, 135u8, + 129u8, 241u8, 119u8, 106u8, 41u8, 182u8, 121u8, 181u8, 242u8, + 175u8, 74u8, 207u8, 64u8, 106u8, + ], + ) } } } @@ -7647,7 +5322,11 @@ pub mod api { pub type Event = runtime_types::pallet_staking::pallet::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] #[doc = "the remainder from the maximum amount of reward."] #[doc = "\\[era_index, validator_payout, remainder\\]"] @@ -7656,1222 +5335,567 @@ pub mod api { pub ::core::primitive::u128, pub ::core::primitive::u128, ); - impl ::subxt::Event for EraPaid { + impl ::subxt::events::StaticEvent for EraPaid { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "EraPaid"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The nominator has been rewarded by this amount. \\[stash, amount\\]"] pub struct Rewarded( - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, pub ::core::primitive::u128, ); - impl ::subxt::Event for Rewarded { + impl ::subxt::events::StaticEvent for Rewarded { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Rewarded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "One validator (and its nominators) has been slashed by the given amount."] #[doc = "\\[validator, amount\\]"] pub struct Slashed( - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, pub ::core::primitive::u128, ); - impl ::subxt::Event for Slashed { + impl ::subxt::events::StaticEvent for Slashed { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Slashed"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "An old slashing report from a prior era was discarded because it could"] #[doc = "not be processed. \\[session_index\\]"] pub struct OldSlashingReportDiscarded(pub ::core::primitive::u32); - impl ::subxt::Event for OldSlashingReportDiscarded { + impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "OldSlashingReportDiscarded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new set of stakers was elected."] pub struct StakersElected; - impl ::subxt::Event for StakersElected { + impl ::subxt::events::StaticEvent for StakersElected { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "StakersElected"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has bonded this amount. \\[stash, amount\\]"] #[doc = ""] #[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 ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, pub ::core::primitive::u128, ); - impl ::subxt::Event for Bonded { + impl ::subxt::events::StaticEvent for Bonded { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Bonded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has unbonded this amount. \\[stash, amount\\]"] pub struct Unbonded( - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, pub ::core::primitive::u128, ); - impl ::subxt::Event for Unbonded { + impl ::subxt::events::StaticEvent for Unbonded { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Unbonded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue. \\[stash, amount\\]"] pub struct Withdrawn( - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, pub ::core::primitive::u128, ); - impl ::subxt::Event for Withdrawn { + impl ::subxt::events::StaticEvent for Withdrawn { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Withdrawn"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A nominator has been kicked from a validator. \\[nominator, stash\\]"] pub struct Kicked( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, ); - impl ::subxt::Event for Kicked { + impl ::subxt::events::StaticEvent for Kicked { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Kicked"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The election failed. No new era is planned."] pub struct StakingElectionFailed; - impl ::subxt::Event for StakingElectionFailed { + impl ::subxt::events::StaticEvent for StakingElectionFailed { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "StakingElectionFailed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has stopped participating as either a validator or nominator."] #[doc = "\\[stash\\]"] - pub struct Chilled(pub ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::Event for Chilled { + pub struct Chilled(pub ::subxt::ext::sp_core::crypto::AccountId32); + impl ::subxt::events::StaticEvent for Chilled { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Chilled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The stakers' rewards are getting paid. \\[era_index, validator_stash\\]"] pub struct PayoutStarted( pub ::core::primitive::u32, - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, ); - impl ::subxt::Event for PayoutStarted { + impl ::subxt::events::StaticEvent for PayoutStarted { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "PayoutStarted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A validator has set their preferences."] pub struct ValidatorPrefsSet( - pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::ext::sp_core::crypto::AccountId32, pub runtime_types::pallet_staking::ValidatorPrefs, ); - impl ::subxt::Event for ValidatorPrefsSet { + impl ::subxt::events::StaticEvent for ValidatorPrefsSet { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "ValidatorPrefsSet"; } } pub mod storage { use super::runtime_types; - pub struct HistoryDepth; - impl ::subxt::StorageEntry for HistoryDepth { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "HistoryDepth"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of eras to keep in history."] + #[doc = ""] + #[doc = " Information is kept for eras in `[current_era - history_depth; current_era]`."] + #[doc = ""] + #[doc = " Must be more than the number of eras delayed by session otherwise. I.e. active era must"] + #[doc = " always be in history. I.e. `active_era > current_era - history_depth` must be"] + #[doc = " guaranteed."] + pub fn history_depth( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "HistoryDepth", + vec![], + [ + 41u8, 54u8, 118u8, 245u8, 75u8, 136u8, 220u8, 25u8, 55u8, + 255u8, 149u8, 177u8, 49u8, 155u8, 167u8, 188u8, 170u8, 29u8, + 251u8, 44u8, 240u8, 250u8, 225u8, 205u8, 102u8, 74u8, 25u8, + 47u8, 52u8, 235u8, 204u8, 167u8, + ], + ) } - } - pub struct ValidatorCount; - impl ::subxt::StorageEntry for ValidatorCount { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ValidatorCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain + #[doc = " The ideal number of staking participants."] + pub fn validator_count( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ValidatorCount", + vec![], + [ + 245u8, 75u8, 214u8, 110u8, 66u8, 164u8, 86u8, 206u8, 69u8, + 89u8, 12u8, 111u8, 117u8, 16u8, 228u8, 184u8, 207u8, 6u8, + 0u8, 126u8, 221u8, 67u8, 125u8, 218u8, 188u8, 245u8, 156u8, + 188u8, 34u8, 85u8, 208u8, 197u8, + ], + ) } - } - pub struct MinimumValidatorCount; - impl ::subxt::StorageEntry for MinimumValidatorCount { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "MinimumValidatorCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain + #[doc = " Minimum number of staking participants before emergency conditions are imposed."] + pub fn minimum_validator_count( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "MinimumValidatorCount", + vec![], + [ + 82u8, 95u8, 128u8, 55u8, 136u8, 134u8, 71u8, 117u8, 135u8, + 76u8, 44u8, 46u8, 174u8, 34u8, 170u8, 228u8, 175u8, 1u8, + 234u8, 162u8, 91u8, 252u8, 127u8, 68u8, 243u8, 241u8, 13u8, + 107u8, 214u8, 70u8, 87u8, 249u8, + ], + ) } - } - pub struct Invulnerables; - impl ::subxt::StorageEntry for Invulnerables { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "Invulnerables"; - type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain + #[doc = " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're"] + #[doc = " easy to initialize and the performance hit is minimal (we expect no more than four"] + #[doc = " invulnerables) and restricted to testnets."] + pub fn invulnerables( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Invulnerables", + vec![], + [ + 77u8, 78u8, 63u8, 199u8, 150u8, 167u8, 135u8, 130u8, 192u8, + 51u8, 202u8, 119u8, 68u8, 49u8, 241u8, 68u8, 82u8, 90u8, + 226u8, 201u8, 96u8, 170u8, 21u8, 173u8, 236u8, 116u8, 148u8, + 8u8, 174u8, 92u8, 7u8, 11u8, + ], + ) } - } - pub struct Bonded<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Bonded<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "Bonded"; - type Value = ::subxt::sp_core::crypto::AccountId32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct MinNominatorBond; - impl ::subxt::StorageEntry for MinNominatorBond { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "MinNominatorBond"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct MinValidatorBond; - impl ::subxt::StorageEntry for MinValidatorBond { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "MinValidatorBond"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct MinCommission; - impl ::subxt::StorageEntry for MinCommission { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "MinCommission"; - type Value = runtime_types::sp_arithmetic::per_things::Perbill; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Ledger<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Ledger<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "Ledger"; - type Value = runtime_types::pallet_staking::StakingLedger; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct Payee<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Payee<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "Payee"; - type Value = runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Validators<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Validators<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "Validators"; - type Value = runtime_types::pallet_staking::ValidatorPrefs; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct CounterForValidators; - impl ::subxt::StorageEntry for CounterForValidators { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "CounterForValidators"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct MaxValidatorsCount; - impl ::subxt::StorageEntry for MaxValidatorsCount { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "MaxValidatorsCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Nominators<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Nominators<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "Nominators"; - type Value = runtime_types::pallet_staking::Nominations; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct CounterForNominators; - impl ::subxt::StorageEntry for CounterForNominators { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "CounterForNominators"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct MaxNominatorsCount; - impl ::subxt::StorageEntry for MaxNominatorsCount { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "MaxNominatorsCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentEra; - impl ::subxt::StorageEntry for CurrentEra { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "CurrentEra"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ActiveEra; - impl ::subxt::StorageEntry for ActiveEra { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ActiveEra"; - type Value = runtime_types::pallet_staking::ActiveEraInfo; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ErasStartSessionIndex<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasStartSessionIndex<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasStartSessionIndex"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ErasStakers<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, - ); - impl ::subxt::StorageEntry for ErasStakers<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasStakers"; - type Value = runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct ErasStakersClipped<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, - ); - impl ::subxt::StorageEntry for ErasStakersClipped<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasStakersClipped"; - type Value = runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct ErasValidatorPrefs<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, - ); - impl ::subxt::StorageEntry for ErasValidatorPrefs<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasValidatorPrefs"; - type Value = runtime_types::pallet_staking::ValidatorPrefs; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct ErasValidatorReward<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasValidatorReward<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasValidatorReward"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ErasRewardPoints<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasRewardPoints<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasRewardPoints"; - type Value = runtime_types::pallet_staking::EraRewardPoints< - ::subxt::sp_core::crypto::AccountId32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ErasTotalStake<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasTotalStake<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ErasTotalStake"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ForceEra; - impl ::subxt::StorageEntry for ForceEra { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ForceEra"; - type Value = runtime_types::pallet_staking::Forcing; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SlashRewardFraction; - impl ::subxt::StorageEntry for SlashRewardFraction { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "SlashRewardFraction"; - type Value = runtime_types::sp_arithmetic::per_things::Perbill; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CanceledSlashPayout; - impl ::subxt::StorageEntry for CanceledSlashPayout { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "CanceledSlashPayout"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct UnappliedSlashes<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for UnappliedSlashes<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "UnappliedSlashes"; - type Value = ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct BondedEras; - impl ::subxt::StorageEntry for BondedEras { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "BondedEras"; - type Value = - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ValidatorSlashInEra<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, - ); - impl ::subxt::StorageEntry for ValidatorSlashInEra<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ValidatorSlashInEra"; - type Value = ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct NominatorSlashInEra<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, - ); - impl ::subxt::StorageEntry for NominatorSlashInEra<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "NominatorSlashInEra"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct SlashingSpans<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SlashingSpans<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "SlashingSpans"; - type Value = runtime_types::pallet_staking::slashing::SlashingSpans; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct SpanSlash<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a ::core::primitive::u32, - ); - impl ::subxt::StorageEntry for SpanSlash<'_> { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "SpanSlash"; - type Value = runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct EarliestUnappliedSlash; - impl ::subxt::StorageEntry for EarliestUnappliedSlash { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "EarliestUnappliedSlash"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentPlannedSession; - impl ::subxt::StorageEntry for CurrentPlannedSession { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "CurrentPlannedSession"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct OffendingValidators; - impl ::subxt::StorageEntry for OffendingValidators { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "OffendingValidators"; - type Value = - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageVersion; - impl ::subxt::StorageEntry for StorageVersion { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::pallet_staking::Releases; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ChillThreshold; - impl ::subxt::StorageEntry for ChillThreshold { - const PALLET: &'static str = "Staking"; - const STORAGE: &'static str = "ChillThreshold"; - type Value = runtime_types::sp_arithmetic::per_things::Percent; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - #[doc = " Number of eras to keep in history."] - #[doc = ""] - #[doc = " Information is kept for eras in `[current_era - history_depth; current_era]`."] - #[doc = ""] - #[doc = " Must be more than the number of eras delayed by session otherwise. I.e. active era must"] - #[doc = " always be in history. I.e. `active_era > current_era - history_depth` must be"] - #[doc = " guaranteed."] - pub fn history_depth( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 41u8, 54u8, 118u8, 245u8, 75u8, 136u8, 220u8, 25u8, 55u8, - 255u8, 149u8, 177u8, 49u8, 155u8, 167u8, 188u8, 170u8, - 29u8, 251u8, 44u8, 240u8, 250u8, 225u8, 205u8, 102u8, - 74u8, 25u8, 47u8, 52u8, 235u8, 204u8, 167u8, - ] - { - let entry = HistoryDepth; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " The ideal number of staking participants."] - pub fn validator_count( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 245u8, 75u8, 214u8, 110u8, 66u8, 164u8, 86u8, 206u8, - 69u8, 89u8, 12u8, 111u8, 117u8, 16u8, 228u8, 184u8, - 207u8, 6u8, 0u8, 126u8, 221u8, 67u8, 125u8, 218u8, 188u8, - 245u8, 156u8, 188u8, 34u8, 85u8, 208u8, 197u8, - ] - { - let entry = ValidatorCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Minimum number of staking participants before emergency conditions are imposed."] - pub fn minimum_validator_count( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 82u8, 95u8, 128u8, 55u8, 136u8, 134u8, 71u8, 117u8, - 135u8, 76u8, 44u8, 46u8, 174u8, 34u8, 170u8, 228u8, - 175u8, 1u8, 234u8, 162u8, 91u8, 252u8, 127u8, 68u8, - 243u8, 241u8, 13u8, 107u8, 214u8, 70u8, 87u8, 249u8, - ] - { - let entry = MinimumValidatorCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're"] - #[doc = " easy to initialize and the performance hit is minimal (we expect no more than four"] - #[doc = " invulnerables) and restricted to testnets."] - pub fn invulnerables( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 93u8, 29u8, 166u8, 244u8, 19u8, 78u8, 182u8, - 235u8, 37u8, 199u8, 127u8, 211u8, 124u8, 168u8, 145u8, - 111u8, 251u8, 33u8, 36u8, 167u8, 119u8, 124u8, 206u8, - 205u8, 14u8, 186u8, 68u8, 16u8, 150u8, 45u8, 158u8, - ] - { - let entry = Invulnerables; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " Map from all locked \"stash\" accounts to the controller account."] + pub fn bonded( + &self, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Bonded", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 35u8, 197u8, 156u8, 60u8, 22u8, 59u8, 103u8, 83u8, 77u8, + 15u8, 118u8, 193u8, 155u8, 97u8, 229u8, 36u8, 119u8, 128u8, + 224u8, 162u8, 21u8, 46u8, 199u8, 221u8, 15u8, 74u8, 59u8, + 70u8, 77u8, 218u8, 73u8, 165u8, + ], + ) } #[doc = " Map from all locked \"stash\" accounts to the controller account."] - pub fn bonded( + pub fn bonded_root( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 9u8, 214u8, 190u8, 93u8, 116u8, 143u8, 174u8, 103u8, - 102u8, 25u8, 123u8, 201u8, 12u8, 44u8, 188u8, 241u8, - 74u8, 33u8, 35u8, 79u8, 210u8, 243u8, 174u8, 190u8, 46u8, - 48u8, 21u8, 10u8, 243u8, 16u8, 99u8, 48u8, - ] - { - let entry = Bonded(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Map from all locked \"stash\" accounts to the controller account."] - pub fn bonded_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Bonded<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 9u8, 214u8, 190u8, 93u8, 116u8, 143u8, 174u8, 103u8, - 102u8, 25u8, 123u8, 201u8, 12u8, 44u8, 188u8, 241u8, - 74u8, 33u8, 35u8, 79u8, 210u8, 243u8, 174u8, 190u8, 46u8, - 48u8, 21u8, 10u8, 243u8, 16u8, 99u8, 48u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Bonded", + Vec::new(), + [ + 35u8, 197u8, 156u8, 60u8, 22u8, 59u8, 103u8, 83u8, 77u8, + 15u8, 118u8, 193u8, 155u8, 97u8, 229u8, 36u8, 119u8, 128u8, + 224u8, 162u8, 21u8, 46u8, 199u8, 221u8, 15u8, 74u8, 59u8, + 70u8, 77u8, 218u8, 73u8, 165u8, + ], + ) } #[doc = " The minimum active bond to become and maintain the role of a nominator."] pub fn min_nominator_bond( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 187u8, 66u8, 149u8, 226u8, 72u8, 219u8, 57u8, 246u8, - 102u8, 47u8, 71u8, 12u8, 219u8, 204u8, 127u8, 223u8, - 58u8, 134u8, 81u8, 165u8, 200u8, 142u8, 196u8, 158u8, - 26u8, 38u8, 165u8, 19u8, 91u8, 251u8, 119u8, 84u8, - ] - { - let entry = MinNominatorBond; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "MinNominatorBond", + vec![], + [ + 187u8, 66u8, 149u8, 226u8, 72u8, 219u8, 57u8, 246u8, 102u8, + 47u8, 71u8, 12u8, 219u8, 204u8, 127u8, 223u8, 58u8, 134u8, + 81u8, 165u8, 200u8, 142u8, 196u8, 158u8, 26u8, 38u8, 165u8, + 19u8, 91u8, 251u8, 119u8, 84u8, + ], + ) } #[doc = " The minimum active bond to become and maintain the role of a validator."] pub fn min_validator_bond( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 48u8, 105u8, 85u8, 178u8, 142u8, 208u8, 208u8, 19u8, - 236u8, 130u8, 129u8, 169u8, 35u8, 245u8, 66u8, 182u8, - 92u8, 20u8, 22u8, 109u8, 155u8, 174u8, 87u8, 118u8, - 242u8, 216u8, 193u8, 154u8, 4u8, 5u8, 66u8, 56u8, - ] - { - let entry = MinValidatorBond; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "MinValidatorBond", + vec![], + [ + 48u8, 105u8, 85u8, 178u8, 142u8, 208u8, 208u8, 19u8, 236u8, + 130u8, 129u8, 169u8, 35u8, 245u8, 66u8, 182u8, 92u8, 20u8, + 22u8, 109u8, 155u8, 174u8, 87u8, 118u8, 242u8, 216u8, 193u8, + 154u8, 4u8, 5u8, 66u8, 56u8, + ], + ) } #[doc = " The minimum amount of commission that validators can set."] #[doc = ""] #[doc = " If set to `0`, no limit exists."] pub fn min_commission( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 198u8, 29u8, 53u8, 56u8, 181u8, 170u8, 164u8, 240u8, - 27u8, 171u8, 69u8, 57u8, 151u8, 40u8, 23u8, 166u8, 157u8, - 68u8, 208u8, 20u8, 2u8, 78u8, 63u8, 235u8, 166u8, 50u8, - 3u8, 246u8, 237u8, 146u8, 170u8, 91u8, - ] - { - let entry = MinCommission; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_arithmetic::per_things::Perbill, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "MinCommission", + vec![], + [ + 61u8, 101u8, 69u8, 27u8, 220u8, 179u8, 5u8, 71u8, 66u8, + 227u8, 84u8, 98u8, 18u8, 141u8, 183u8, 49u8, 98u8, 46u8, + 123u8, 114u8, 198u8, 85u8, 15u8, 175u8, 243u8, 239u8, 133u8, + 129u8, 146u8, 174u8, 254u8, 158u8, + ], + ) } #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] pub fn ledger( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_staking::StakingLedger, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 54u8, 158u8, 148u8, 211u8, 91u8, 48u8, 159u8, 56u8, - 149u8, 116u8, 43u8, 31u8, 45u8, 102u8, 252u8, 12u8, 1u8, - 176u8, 189u8, 68u8, 97u8, 88u8, 13u8, 204u8, 148u8, 12u8, - 34u8, 0u8, 180u8, 162u8, 202u8, 8u8, - ] - { - let entry = Ledger(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::StakingLedger, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Ledger", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 117u8, 177u8, 209u8, 237u8, 0u8, 30u8, 228u8, 128u8, 150u8, + 69u8, 138u8, 21u8, 9u8, 74u8, 178u8, 113u8, 238u8, 111u8, + 57u8, 222u8, 242u8, 241u8, 191u8, 50u8, 225u8, 51u8, 99u8, + 211u8, 210u8, 163u8, 60u8, 205u8, + ], + ) } #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger_iter( + pub fn ledger_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Ledger<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 54u8, 158u8, 148u8, 211u8, 91u8, 48u8, 159u8, 56u8, - 149u8, 116u8, 43u8, 31u8, 45u8, 102u8, 252u8, 12u8, 1u8, - 176u8, 189u8, 68u8, 97u8, 88u8, 13u8, 204u8, 148u8, 12u8, - 34u8, 0u8, 180u8, 162u8, 202u8, 8u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::StakingLedger, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Ledger", + Vec::new(), + [ + 117u8, 177u8, 209u8, 237u8, 0u8, 30u8, 228u8, 128u8, 150u8, + 69u8, 138u8, 21u8, 9u8, 74u8, 178u8, 113u8, 238u8, 111u8, + 57u8, 222u8, 242u8, 241u8, 191u8, 50u8, 225u8, 51u8, 99u8, + 211u8, 210u8, 163u8, 60u8, 205u8, + ], + ) } #[doc = " Where the reward payment should be made. Keyed by stash."] pub fn payee( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::RewardDestination< + ::subxt::ext::sp_core::crypto::AccountId32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 108u8, 35u8, 28u8, 189u8, 146u8, 103u8, 200u8, 73u8, - 220u8, 230u8, 193u8, 7u8, 66u8, 147u8, 55u8, 34u8, 1u8, - 21u8, 255u8, 100u8, 64u8, 175u8, 16u8, 106u8, 130u8, - 202u8, 103u8, 62u8, 79u8, 143u8, 115u8, 222u8, - ] - { - let entry = Payee(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Payee", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 195u8, 125u8, 82u8, 213u8, 216u8, 64u8, 76u8, 63u8, 187u8, + 163u8, 20u8, 230u8, 153u8, 13u8, 189u8, 232u8, 119u8, 118u8, + 107u8, 17u8, 102u8, 245u8, 36u8, 42u8, 232u8, 137u8, 177u8, + 165u8, 169u8, 246u8, 199u8, 57u8, + ], + ) } #[doc = " Where the reward payment should be made. Keyed by stash."] - pub fn payee_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Payee<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 108u8, 35u8, 28u8, 189u8, 146u8, 103u8, 200u8, 73u8, - 220u8, 230u8, 193u8, 7u8, 66u8, 147u8, 55u8, 34u8, 1u8, - 21u8, 255u8, 100u8, 64u8, 175u8, 16u8, 106u8, 130u8, - 202u8, 103u8, 62u8, 79u8, 143u8, 115u8, 222u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn payee_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::RewardDestination< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Payee", + Vec::new(), + [ + 195u8, 125u8, 82u8, 213u8, 216u8, 64u8, 76u8, 63u8, 187u8, + 163u8, 20u8, 230u8, 153u8, 13u8, 189u8, 232u8, 119u8, 118u8, + 107u8, 17u8, 102u8, 245u8, 36u8, 42u8, 232u8, 137u8, 177u8, + 165u8, 169u8, 246u8, 199u8, 57u8, + ], + ) } #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] pub fn validators( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 45u8, 57u8, 106u8, 30u8, 123u8, 251u8, 148u8, 37u8, 52u8, - 129u8, 103u8, 88u8, 54u8, 216u8, 174u8, 181u8, 51u8, - 181u8, 70u8, 6u8, 136u8, 7u8, 239u8, 44u8, 83u8, 153u8, - 124u8, 187u8, 225u8, 112u8, 23u8, 76u8, - ] - { - let entry = Validators(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Validators", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 80u8, 77u8, 66u8, 18u8, 197u8, 250u8, 41u8, 185u8, 43u8, + 24u8, 149u8, 164u8, 208u8, 60u8, 144u8, 29u8, 251u8, 195u8, + 236u8, 196u8, 108u8, 58u8, 80u8, 115u8, 246u8, 66u8, 226u8, + 241u8, 201u8, 172u8, 229u8, 152u8, + ], + ) } #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] - pub fn validators_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Validators<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 45u8, 57u8, 106u8, 30u8, 123u8, 251u8, 148u8, 37u8, 52u8, - 129u8, 103u8, 88u8, 54u8, 216u8, 174u8, 181u8, 51u8, - 181u8, 70u8, 6u8, 136u8, 7u8, 239u8, 44u8, 83u8, 153u8, - 124u8, 187u8, 225u8, 112u8, 23u8, 76u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn validators_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Validators", + Vec::new(), + [ + 80u8, 77u8, 66u8, 18u8, 197u8, 250u8, 41u8, 185u8, 43u8, + 24u8, 149u8, 164u8, 208u8, 60u8, 144u8, 29u8, 251u8, 195u8, + 236u8, 196u8, 108u8, 58u8, 80u8, 115u8, 246u8, 66u8, 226u8, + 241u8, 201u8, 172u8, 229u8, 152u8, + ], + ) } #[doc = "Counter for the related counted storage map"] pub fn counter_for_validators( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 139u8, 25u8, 223u8, 6u8, 160u8, 239u8, 212u8, 85u8, 36u8, - 185u8, 69u8, 63u8, 21u8, 156u8, 144u8, 241u8, 112u8, - 85u8, 49u8, 78u8, 88u8, 11u8, 8u8, 48u8, 118u8, 34u8, - 62u8, 159u8, 239u8, 122u8, 90u8, 45u8, - ] - { - let entry = CounterForValidators; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "CounterForValidators", + vec![], + [ + 139u8, 25u8, 223u8, 6u8, 160u8, 239u8, 212u8, 85u8, 36u8, + 185u8, 69u8, 63u8, 21u8, 156u8, 144u8, 241u8, 112u8, 85u8, + 49u8, 78u8, 88u8, 11u8, 8u8, 48u8, 118u8, 34u8, 62u8, 159u8, + 239u8, 122u8, 90u8, 45u8, + ], + ) } #[doc = " The maximum validator count before we stop allowing new validators to join."] #[doc = ""] #[doc = " When this value is not set, no limits are enforced."] pub fn max_validators_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 250u8, 62u8, 16u8, 68u8, 192u8, 216u8, 236u8, 211u8, - 217u8, 9u8, 213u8, 49u8, 41u8, 37u8, 58u8, 62u8, 131u8, - 112u8, 64u8, 26u8, 133u8, 7u8, 130u8, 1u8, 71u8, 158u8, - 14u8, 55u8, 169u8, 239u8, 223u8, 245u8, - ] - { - let entry = MaxValidatorsCount; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "MaxValidatorsCount", + vec![], + [ + 250u8, 62u8, 16u8, 68u8, 192u8, 216u8, 236u8, 211u8, 217u8, + 9u8, 213u8, 49u8, 41u8, 37u8, 58u8, 62u8, 131u8, 112u8, 64u8, + 26u8, 133u8, 7u8, 130u8, 1u8, 71u8, 158u8, 14u8, 55u8, 169u8, + 239u8, 223u8, 245u8, + ], + ) } #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] #[doc = " they wish to support."] @@ -8891,40 +5915,27 @@ pub mod api { #[doc = " [`Call::chill_other`] dispatchable by anyone."] pub fn nominators( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_staking::Nominations, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 26u8, 169u8, 68u8, 99u8, 216u8, 95u8, 198u8, 5u8, - 123u8, 21u8, 83u8, 220u8, 140u8, 122u8, 111u8, 22u8, - 133u8, 9u8, 155u8, 35u8, 58u8, 232u8, 143u8, 62u8, 229u8, - 228u8, 98u8, 175u8, 114u8, 152u8, 253u8, - ] - { - let entry = Nominators(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Nominations, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Nominators", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 1u8, 154u8, 55u8, 170u8, 215u8, 64u8, 56u8, 83u8, 254u8, + 19u8, 152u8, 85u8, 164u8, 171u8, 206u8, 129u8, 184u8, 45u8, + 221u8, 181u8, 229u8, 133u8, 200u8, 231u8, 16u8, 146u8, 247u8, + 21u8, 77u8, 122u8, 165u8, 134u8, + ], + ) } #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] #[doc = " they wish to support."] @@ -8942,110 +5953,69 @@ pub mod api { #[doc = ""] #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] #[doc = " [`Call::chill_other`] dispatchable by anyone."] - pub fn nominators_iter( + pub fn nominators_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Nominators<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 26u8, 169u8, 68u8, 99u8, 216u8, 95u8, 198u8, 5u8, - 123u8, 21u8, 83u8, 220u8, 140u8, 122u8, 111u8, 22u8, - 133u8, 9u8, 155u8, 35u8, 58u8, 232u8, 143u8, 62u8, 229u8, - 228u8, 98u8, 175u8, 114u8, 152u8, 253u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Nominations, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "Nominators", + Vec::new(), + [ + 1u8, 154u8, 55u8, 170u8, 215u8, 64u8, 56u8, 83u8, 254u8, + 19u8, 152u8, 85u8, 164u8, 171u8, 206u8, 129u8, 184u8, 45u8, + 221u8, 181u8, 229u8, 133u8, 200u8, 231u8, 16u8, 146u8, 247u8, + 21u8, 77u8, 122u8, 165u8, 134u8, + ], + ) } #[doc = "Counter for the related counted storage map"] pub fn counter_for_nominators( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 31u8, 94u8, 130u8, 138u8, 75u8, 8u8, 38u8, 162u8, 181u8, - 5u8, 125u8, 116u8, 9u8, 51u8, 22u8, 234u8, 40u8, 117u8, - 215u8, 46u8, 82u8, 117u8, 225u8, 1u8, 9u8, 208u8, 83u8, - 63u8, 39u8, 187u8, 207u8, 191u8, - ] - { - let entry = CounterForNominators; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "CounterForNominators", + vec![], + [ + 31u8, 94u8, 130u8, 138u8, 75u8, 8u8, 38u8, 162u8, 181u8, 5u8, + 125u8, 116u8, 9u8, 51u8, 22u8, 234u8, 40u8, 117u8, 215u8, + 46u8, 82u8, 117u8, 225u8, 1u8, 9u8, 208u8, 83u8, 63u8, 39u8, + 187u8, 207u8, 191u8, + ], + ) } #[doc = " The maximum nominator count before we stop allowing new validators to join."] #[doc = ""] #[doc = " When this value is not set, no limits are enforced."] pub fn max_nominators_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 180u8, 190u8, 180u8, 66u8, 235u8, 173u8, 76u8, 160u8, - 197u8, 92u8, 96u8, 165u8, 220u8, 188u8, 32u8, 119u8, 3u8, - 73u8, 86u8, 49u8, 104u8, 17u8, 186u8, 98u8, 221u8, 175u8, - 109u8, 254u8, 207u8, 245u8, 125u8, 179u8, - ] - { - let entry = MaxNominatorsCount; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "MaxNominatorsCount", + vec![], + [ + 180u8, 190u8, 180u8, 66u8, 235u8, 173u8, 76u8, 160u8, 197u8, + 92u8, 96u8, 165u8, 220u8, 188u8, 32u8, 119u8, 3u8, 73u8, + 86u8, 49u8, 104u8, 17u8, 186u8, 98u8, 221u8, 175u8, 109u8, + 254u8, 207u8, 245u8, 125u8, 179u8, + ], + ) } #[doc = " The current era index."] #[doc = ""] @@ -9053,37 +6023,23 @@ pub mod api { #[doc = " set, it might be active or not."] pub fn current_era( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 105u8, 150u8, 49u8, 122u8, 4u8, 78u8, 8u8, 121u8, 34u8, - 136u8, 157u8, 227u8, 59u8, 139u8, 7u8, 253u8, 7u8, 10u8, - 117u8, 71u8, 240u8, 74u8, 86u8, 36u8, 198u8, 37u8, 153u8, - 93u8, 196u8, 22u8, 192u8, 243u8, - ] - { - let entry = CurrentEra; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "CurrentEra", + vec![], + [ + 105u8, 150u8, 49u8, 122u8, 4u8, 78u8, 8u8, 121u8, 34u8, + 136u8, 157u8, 227u8, 59u8, 139u8, 7u8, 253u8, 7u8, 10u8, + 117u8, 71u8, 240u8, 74u8, 86u8, 36u8, 198u8, 37u8, 153u8, + 93u8, 196u8, 22u8, 192u8, 243u8, + ], + ) } #[doc = " The active era information, it holds index and start."] #[doc = ""] @@ -9091,39 +6047,23 @@ pub mod api { #[doc = " equal to [`SessionInterface::validators`]."] pub fn active_era( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_staking::ActiveEraInfo, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 230u8, 144u8, 49u8, 201u8, 36u8, 253u8, 97u8, 135u8, - 57u8, 169u8, 157u8, 138u8, 21u8, 35u8, 14u8, 2u8, 151u8, - 214u8, 176u8, 211u8, 48u8, 105u8, 38u8, 123u8, 98u8, - 255u8, 14u8, 35u8, 177u8, 247u8, 31u8, 28u8, - ] - { - let entry = ActiveEra; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::ActiveEraInfo, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ActiveEra", + vec![], + [ + 15u8, 112u8, 251u8, 183u8, 108u8, 61u8, 28u8, 71u8, 44u8, + 150u8, 162u8, 4u8, 143u8, 121u8, 11u8, 37u8, 83u8, 29u8, + 193u8, 21u8, 210u8, 116u8, 190u8, 236u8, 213u8, 235u8, 49u8, + 97u8, 189u8, 142u8, 251u8, 124u8, + ], + ) } #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[doc = ""] @@ -9131,75 +6071,51 @@ pub mod api { #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] pub fn eras_start_session_index( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, - 230u8, 229u8, 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, - 163u8, 91u8, 32u8, 246u8, 122u8, 78u8, 149u8, 214u8, - 103u8, 249u8, 119u8, 20u8, 101u8, 116u8, 110u8, 185u8, - ] - { - let entry = ErasStartSessionIndex(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasStartSessionIndex", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, 230u8, + 229u8, 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, 163u8, 91u8, + 32u8, 246u8, 122u8, 78u8, 149u8, 214u8, 103u8, 249u8, 119u8, + 20u8, 101u8, 116u8, 110u8, 185u8, + ], + ) } #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[doc = ""] #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] - pub fn eras_start_session_index_iter( + pub fn eras_start_session_index_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStartSessionIndex<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, - 230u8, 229u8, 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, - 163u8, 91u8, 32u8, 246u8, 122u8, 78u8, 149u8, 214u8, - 103u8, 249u8, 119u8, 20u8, 101u8, 116u8, 110u8, 185u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasStartSessionIndex", + Vec::new(), + [ + 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, 230u8, + 229u8, 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, 163u8, 91u8, + 32u8, 246u8, 122u8, 78u8, 149u8, 214u8, 103u8, 249u8, 119u8, + 20u8, 101u8, 116u8, 110u8, 185u8, + ], + ) } #[doc = " Exposure of validator at era."] #[doc = ""] @@ -9209,42 +6125,37 @@ pub mod api { #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] pub fn eras_stakers( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + _1: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 250u8, 76u8, 183u8, 219u8, 180u8, 156u8, 138u8, - 111u8, 153u8, 154u8, 90u8, 14u8, 194u8, 56u8, 133u8, - 197u8, 199u8, 35u8, 20u8, 188u8, 129u8, 169u8, 38u8, - 10u8, 219u8, 186u8, 107u8, 179u8, 160u8, 244u8, 210u8, - ] - { - let entry = ErasStakers(_0, _1); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasStakers", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 192u8, 50u8, 152u8, 151u8, 92u8, 180u8, 206u8, 15u8, 139u8, + 210u8, 128u8, 65u8, 92u8, 253u8, 43u8, 35u8, 139u8, 171u8, + 73u8, 185u8, 32u8, 78u8, 20u8, 197u8, 154u8, 90u8, 233u8, + 231u8, 23u8, 22u8, 187u8, 156u8, + ], + ) } #[doc = " Exposure of validator at era."] #[doc = ""] @@ -9252,38 +6163,28 @@ pub mod api { #[doc = ""] #[doc = " Is it removed after `HISTORY_DEPTH` eras."] #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] - pub fn eras_stakers_iter( + pub fn eras_stakers_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakers<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 250u8, 76u8, 183u8, 219u8, 180u8, 156u8, 138u8, - 111u8, 153u8, 154u8, 90u8, 14u8, 194u8, 56u8, 133u8, - 197u8, 199u8, 35u8, 20u8, 188u8, 129u8, 169u8, 38u8, - 10u8, 219u8, 186u8, 107u8, 179u8, 160u8, 244u8, 210u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasStakers", + Vec::new(), + [ + 192u8, 50u8, 152u8, 151u8, 92u8, 180u8, 206u8, 15u8, 139u8, + 210u8, 128u8, 65u8, 92u8, 253u8, 43u8, 35u8, 139u8, 171u8, + 73u8, 185u8, 32u8, 78u8, 20u8, 197u8, 154u8, 90u8, 233u8, + 231u8, 23u8, 22u8, 187u8, 156u8, + ], + ) } #[doc = " Clipped Exposure of validator at era."] #[doc = ""] @@ -9298,42 +6199,37 @@ pub mod api { #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] pub fn eras_stakers_clipped( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + _1: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 91u8, 87u8, 165u8, 255u8, 253u8, 169u8, 48u8, 28u8, - 254u8, 124u8, 93u8, 108u8, 252u8, 15u8, 141u8, 139u8, - 152u8, 118u8, 226u8, 122u8, 178u8, 110u8, 4u8, 242u8, - 62u8, 77u8, 157u8, 122u8, 149u8, 225u8, 201u8, 231u8, - ] - { - let entry = ErasStakersClipped(_0, _1); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasStakersClipped", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 43u8, 159u8, 113u8, 223u8, 122u8, 169u8, 98u8, 153u8, 26u8, + 55u8, 71u8, 119u8, 174u8, 48u8, 158u8, 45u8, 214u8, 26u8, + 136u8, 215u8, 46u8, 161u8, 185u8, 17u8, 174u8, 204u8, 206u8, + 246u8, 49u8, 87u8, 134u8, 169u8, + ], + ) } #[doc = " Clipped Exposure of validator at era."] #[doc = ""] @@ -9346,38 +6242,28 @@ pub mod api { #[doc = ""] #[doc = " Is it removed after `HISTORY_DEPTH` eras."] #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] - pub fn eras_stakers_clipped_iter( + pub fn eras_stakers_clipped_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakersClipped<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 91u8, 87u8, 165u8, 255u8, 253u8, 169u8, 48u8, 28u8, - 254u8, 124u8, 93u8, 108u8, 252u8, 15u8, 141u8, 139u8, - 152u8, 118u8, 226u8, 122u8, 178u8, 110u8, 4u8, 242u8, - 62u8, 77u8, 157u8, 122u8, 149u8, 225u8, 201u8, 231u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasStakersClipped", + Vec::new(), + [ + 43u8, 159u8, 113u8, 223u8, 122u8, 169u8, 98u8, 153u8, 26u8, + 55u8, 71u8, 119u8, 174u8, 48u8, 158u8, 45u8, 214u8, 26u8, + 136u8, 215u8, 46u8, 161u8, 185u8, 17u8, 174u8, 204u8, 206u8, + 246u8, 49u8, 87u8, 134u8, 169u8, + ], + ) } #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] #[doc = ""] @@ -9386,480 +6272,331 @@ pub mod api { #[doc = " Is it removed after `HISTORY_DEPTH` eras."] pub fn eras_validator_prefs( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 8u8, 55u8, 222u8, 216u8, 126u8, 126u8, 131u8, 18u8, - 145u8, 58u8, 91u8, 123u8, 92u8, 19u8, 178u8, 200u8, - 133u8, 140u8, 3u8, 207u8, 101u8, 70u8, 204u8, 172u8, - 98u8, 137u8, 149u8, 74u8, 99u8, 141u8, 150u8, 228u8, - ] - { - let entry = ErasValidatorPrefs(_0, _1); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasValidatorPrefs", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 6u8, 196u8, 209u8, 138u8, 252u8, 18u8, 203u8, 86u8, 129u8, + 62u8, 4u8, 56u8, 234u8, 114u8, 141u8, 136u8, 127u8, 224u8, + 142u8, 89u8, 150u8, 33u8, 31u8, 50u8, 140u8, 108u8, 124u8, + 77u8, 188u8, 102u8, 230u8, 174u8, + ], + ) } #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] #[doc = ""] #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[doc = ""] #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - pub fn eras_validator_prefs_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorPrefs<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 8u8, 55u8, 222u8, 216u8, 126u8, 126u8, 131u8, 18u8, - 145u8, 58u8, 91u8, 123u8, 92u8, 19u8, 178u8, 200u8, - 133u8, 140u8, 3u8, 207u8, 101u8, 70u8, 204u8, 172u8, - 98u8, 137u8, 149u8, 74u8, 99u8, 141u8, 150u8, 228u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn eras_validator_prefs_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasValidatorPrefs", + Vec::new(), + [ + 6u8, 196u8, 209u8, 138u8, 252u8, 18u8, 203u8, 86u8, 129u8, + 62u8, 4u8, 56u8, 234u8, 114u8, 141u8, 136u8, 127u8, 224u8, + 142u8, 89u8, 150u8, 33u8, 31u8, 50u8, 140u8, 108u8, 124u8, + 77u8, 188u8, 102u8, 230u8, 174u8, + ], + ) } #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] #[doc = ""] #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] pub fn eras_validator_reward( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, - 231u8, 84u8, 124u8, 155u8, 227u8, 212u8, 212u8, 179u8, - 84u8, 161u8, 223u8, 255u8, 254u8, 107u8, 52u8, 89u8, - 98u8, 169u8, 136u8, 241u8, 104u8, 3u8, 244u8, 161u8, - ] - { - let entry = ErasValidatorReward(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasValidatorReward", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, 231u8, + 84u8, 124u8, 155u8, 227u8, 212u8, 212u8, 179u8, 84u8, 161u8, + 223u8, 255u8, 254u8, 107u8, 52u8, 89u8, 98u8, 169u8, 136u8, + 241u8, 104u8, 3u8, 244u8, 161u8, + ], + ) } #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] #[doc = ""] #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] - pub fn eras_validator_reward_iter( + pub fn eras_validator_reward_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorReward<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, - 231u8, 84u8, 124u8, 155u8, 227u8, 212u8, 212u8, 179u8, - 84u8, 161u8, 223u8, 255u8, 254u8, 107u8, 52u8, 89u8, - 98u8, 169u8, 136u8, 241u8, 104u8, 3u8, 244u8, 161u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasValidatorReward", + Vec::new(), + [ + 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, 231u8, + 84u8, 124u8, 155u8, 227u8, 212u8, 212u8, 179u8, 84u8, 161u8, + 223u8, 255u8, 254u8, 107u8, 52u8, 89u8, 98u8, 169u8, 136u8, + 241u8, 104u8, 3u8, 244u8, 161u8, + ], + ) } #[doc = " Rewards for the last `HISTORY_DEPTH` eras."] #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] pub fn eras_reward_points( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::EraRewardPoints< - ::subxt::sp_core::crypto::AccountId32, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::EraRewardPoints< + ::subxt::ext::sp_core::crypto::AccountId32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 76u8, 221u8, 158u8, 62u8, 3u8, 254u8, 139u8, 170u8, - 103u8, 218u8, 191u8, 103u8, 57u8, 212u8, 208u8, 7u8, - 105u8, 52u8, 117u8, 173u8, 8u8, 34u8, 82u8, 141u8, 51u8, - 72u8, 243u8, 56u8, 206u8, 206u8, 48u8, 140u8, - ] - { - let entry = ErasRewardPoints(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasRewardPoints", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 194u8, 29u8, 20u8, 83u8, 200u8, 47u8, 158u8, 102u8, 88u8, + 65u8, 24u8, 255u8, 120u8, 178u8, 23u8, 232u8, 15u8, 64u8, + 206u8, 0u8, 170u8, 40u8, 18u8, 149u8, 45u8, 90u8, 179u8, + 127u8, 52u8, 59u8, 37u8, 192u8, + ], + ) } #[doc = " Rewards for the last `HISTORY_DEPTH` eras."] #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] - pub fn eras_reward_points_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasRewardPoints<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 76u8, 221u8, 158u8, 62u8, 3u8, 254u8, 139u8, 170u8, - 103u8, 218u8, 191u8, 103u8, 57u8, 212u8, 208u8, 7u8, - 105u8, 52u8, 117u8, 173u8, 8u8, 34u8, 82u8, 141u8, 51u8, - 72u8, 243u8, 56u8, 206u8, 206u8, 48u8, 140u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn eras_reward_points_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::EraRewardPoints< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasRewardPoints", + Vec::new(), + [ + 194u8, 29u8, 20u8, 83u8, 200u8, 47u8, 158u8, 102u8, 88u8, + 65u8, 24u8, 255u8, 120u8, 178u8, 23u8, 232u8, 15u8, 64u8, + 206u8, 0u8, 170u8, 40u8, 18u8, 149u8, 45u8, 90u8, 179u8, + 127u8, 52u8, 59u8, 37u8, 192u8, + ], + ) } #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."] #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] pub fn eras_total_stake( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, - 4u8, 46u8, 77u8, 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, - 110u8, 53u8, 11u8, 247u8, 235u8, 142u8, 234u8, 22u8, - 43u8, 24u8, 36u8, 37u8, 43u8, 170u8, 40u8, - ] - { - let entry = ErasTotalStake(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasTotalStake", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, 4u8, + 46u8, 77u8, 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, 110u8, 53u8, + 11u8, 247u8, 235u8, 142u8, 234u8, 22u8, 43u8, 24u8, 36u8, + 37u8, 43u8, 170u8, 40u8, + ], + ) } #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."] #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] - pub fn eras_total_stake_iter( + pub fn eras_total_stake_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasTotalStake<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, - 4u8, 46u8, 77u8, 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, - 110u8, 53u8, 11u8, 247u8, 235u8, 142u8, 234u8, 22u8, - 43u8, 24u8, 36u8, 37u8, 43u8, 170u8, 40u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ErasTotalStake", + Vec::new(), + [ + 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, 4u8, + 46u8, 77u8, 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, 110u8, 53u8, + 11u8, 247u8, 235u8, 142u8, 234u8, 22u8, 43u8, 24u8, 36u8, + 37u8, 43u8, 170u8, 40u8, + ], + ) } #[doc = " Mode of era forcing."] pub fn force_era( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::Forcing, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 221u8, 41u8, 71u8, 21u8, 28u8, 193u8, 65u8, 97u8, 103u8, - 37u8, 145u8, 146u8, 183u8, 194u8, 57u8, 131u8, 214u8, - 136u8, 68u8, 156u8, 140u8, 194u8, 69u8, 151u8, 115u8, - 177u8, 92u8, 147u8, 29u8, 40u8, 41u8, 31u8, - ] - { - let entry = ForceEra; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Forcing, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ForceEra", + vec![], + [ + 221u8, 41u8, 71u8, 21u8, 28u8, 193u8, 65u8, 97u8, 103u8, + 37u8, 145u8, 146u8, 183u8, 194u8, 57u8, 131u8, 214u8, 136u8, + 68u8, 156u8, 140u8, 194u8, 69u8, 151u8, 115u8, 177u8, 92u8, + 147u8, 29u8, 40u8, 41u8, 31u8, + ], + ) } #[doc = " The percentage of the slash that is distributed to reporters."] #[doc = ""] #[doc = " The rest of the slashed value is handled by the `Slash`."] pub fn slash_reward_fraction( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 92u8, 55u8, 255u8, 233u8, 174u8, 125u8, 32u8, 21u8, 78u8, - 237u8, 123u8, 241u8, 113u8, 243u8, 48u8, 101u8, 190u8, - 165u8, 216u8, 134u8, 35u8, 128u8, 7u8, 207u8, 48u8, 92u8, - 116u8, 179u8, 253u8, 14u8, 87u8, 176u8, - ] - { - let entry = SlashRewardFraction; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_arithmetic::per_things::Perbill, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "SlashRewardFraction", + vec![], + [ + 167u8, 79u8, 143u8, 202u8, 199u8, 100u8, 129u8, 162u8, 23u8, + 165u8, 106u8, 170u8, 244u8, 86u8, 144u8, 242u8, 65u8, 207u8, + 115u8, 224u8, 231u8, 155u8, 55u8, 139u8, 101u8, 129u8, 242u8, + 196u8, 130u8, 50u8, 3u8, 117u8, + ], + ) } #[doc = " The amount of currency given to reporters of a slash event which was"] #[doc = " canceled by extraordinary circumstances (e.g. governance)."] pub fn canceled_slash_payout( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 126u8, 218u8, 66u8, 92u8, 82u8, 124u8, 145u8, 161u8, - 40u8, 176u8, 14u8, 211u8, 178u8, 216u8, 8u8, 156u8, 83u8, - 14u8, 91u8, 15u8, 200u8, 170u8, 3u8, 127u8, 141u8, 139u8, - 151u8, 98u8, 74u8, 96u8, 238u8, 29u8, - ] - { - let entry = CanceledSlashPayout; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "CanceledSlashPayout", + vec![], + [ + 126u8, 218u8, 66u8, 92u8, 82u8, 124u8, 145u8, 161u8, 40u8, + 176u8, 14u8, 211u8, 178u8, 216u8, 8u8, 156u8, 83u8, 14u8, + 91u8, 15u8, 200u8, 170u8, 3u8, 127u8, 141u8, 139u8, 151u8, + 98u8, 74u8, 96u8, 238u8, 29u8, + ], + ) } #[doc = " All unapplied slashes that are queued for later."] pub fn unapplied_slashes( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 213u8, 28u8, 144u8, 139u8, 187u8, 184u8, 7u8, 192u8, - 114u8, 57u8, 238u8, 66u8, 7u8, 254u8, 41u8, 230u8, 189u8, - 188u8, 127u8, 49u8, 201u8, 179u8, 21u8, 157u8, 177u8, - 130u8, 137u8, 151u8, 51u8, 213u8, 242u8, 236u8, - ] - { - let entry = UnappliedSlashes(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "UnappliedSlashes", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 130u8, 4u8, 163u8, 163u8, 28u8, 85u8, 34u8, 156u8, 47u8, + 125u8, 57u8, 0u8, 133u8, 176u8, 130u8, 2u8, 175u8, 180u8, + 167u8, 203u8, 230u8, 82u8, 198u8, 183u8, 55u8, 82u8, 221u8, + 248u8, 100u8, 173u8, 206u8, 151u8, + ], + ) } #[doc = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes_iter( + pub fn unapplied_slashes_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, UnappliedSlashes<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 213u8, 28u8, 144u8, 139u8, 187u8, 184u8, 7u8, 192u8, - 114u8, 57u8, 238u8, 66u8, 7u8, 254u8, 41u8, 230u8, 189u8, - 188u8, 127u8, 49u8, 201u8, 179u8, 21u8, 157u8, 177u8, - 130u8, 137u8, 151u8, 51u8, 213u8, 242u8, 236u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "UnappliedSlashes", + Vec::new(), + [ + 130u8, 4u8, 163u8, 163u8, 28u8, 85u8, 34u8, 156u8, 47u8, + 125u8, 57u8, 0u8, 133u8, 176u8, 130u8, 2u8, 175u8, 180u8, + 167u8, 203u8, 230u8, 82u8, 198u8, 183u8, 55u8, 82u8, 221u8, + 248u8, 100u8, 173u8, 206u8, 151u8, + ], + ) } #[doc = " A mapping from still-bonded eras to the first session index of that era."] #[doc = ""] @@ -9867,403 +6604,280 @@ pub mod api { #[doc = " `[active_era - bounding_duration; active_era]`"] pub fn bonded_eras( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 243u8, 162u8, 236u8, 198u8, 122u8, 182u8, 37u8, 55u8, - 171u8, 156u8, 235u8, 223u8, 226u8, 129u8, 89u8, 206u8, - 2u8, 155u8, 222u8, 154u8, 116u8, 124u8, 4u8, 119u8, - 155u8, 94u8, 248u8, 30u8, 171u8, 51u8, 78u8, 106u8, - ] - { - let entry = BondedEras; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "BondedEras", + vec![], + [ + 243u8, 162u8, 236u8, 198u8, 122u8, 182u8, 37u8, 55u8, 171u8, + 156u8, 235u8, 223u8, 226u8, 129u8, 89u8, 206u8, 2u8, 155u8, + 222u8, 154u8, 116u8, 124u8, 4u8, 119u8, 155u8, 94u8, 248u8, + 30u8, 171u8, 51u8, 78u8, 106u8, + ], + ) } #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] #[doc = " and slash value of the era."] pub fn validator_slash_in_era( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 241u8, 177u8, 227u8, 239u8, 150u8, 186u8, 50u8, 97u8, - 144u8, 224u8, 24u8, 149u8, 189u8, 166u8, 71u8, 232u8, - 221u8, 129u8, 122u8, 248u8, 235u8, 100u8, 130u8, 230u8, - 11u8, 96u8, 214u8, 59u8, 79u8, 40u8, 236u8, 136u8, - ] - { - let entry = ValidatorSlashInEra(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ValidatorSlashInEra", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 237u8, 80u8, 3u8, 237u8, 9u8, 40u8, 212u8, 15u8, 251u8, + 196u8, 85u8, 29u8, 27u8, 151u8, 98u8, 122u8, 189u8, 147u8, + 205u8, 40u8, 202u8, 194u8, 158u8, 96u8, 138u8, 16u8, 116u8, + 71u8, 140u8, 163u8, 121u8, 197u8, + ], + ) } #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] #[doc = " and slash value of the era."] - pub fn validator_slash_in_era_iter( + pub fn validator_slash_in_era_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ValidatorSlashInEra<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 241u8, 177u8, 227u8, 239u8, 150u8, 186u8, 50u8, 97u8, - 144u8, 224u8, 24u8, 149u8, 189u8, 166u8, 71u8, 232u8, - 221u8, 129u8, 122u8, 248u8, 235u8, 100u8, 130u8, 230u8, - 11u8, 96u8, 214u8, 59u8, 79u8, 40u8, 236u8, 136u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ValidatorSlashInEra", + Vec::new(), + [ + 237u8, 80u8, 3u8, 237u8, 9u8, 40u8, 212u8, 15u8, 251u8, + 196u8, 85u8, 29u8, 27u8, 151u8, 98u8, 122u8, 189u8, 147u8, + 205u8, 40u8, 202u8, 194u8, 158u8, 96u8, 138u8, 16u8, 116u8, + 71u8, 140u8, 163u8, 121u8, 197u8, + ], + ) } #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] pub fn nominator_slash_in_era( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 149u8, 144u8, 51u8, 167u8, 71u8, 119u8, 218u8, 110u8, - 25u8, 45u8, 168u8, 149u8, 62u8, 195u8, 248u8, 50u8, - 215u8, 216u8, 228u8, 4u8, 238u8, 4u8, 52u8, 211u8, 65u8, - 223u8, 84u8, 105u8, 186u8, 200u8, 73u8, 133u8, - ] - { - let entry = NominatorSlashInEra(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "NominatorSlashInEra", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 249u8, 85u8, 170u8, 41u8, 179u8, 194u8, 180u8, 12u8, 53u8, + 101u8, 80u8, 96u8, 166u8, 71u8, 239u8, 23u8, 153u8, 19u8, + 152u8, 38u8, 138u8, 136u8, 221u8, 200u8, 18u8, 165u8, 26u8, + 228u8, 195u8, 199u8, 62u8, 4u8, + ], + ) } #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] - pub fn nominator_slash_in_era_iter( + pub fn nominator_slash_in_era_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, NominatorSlashInEra<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 149u8, 144u8, 51u8, 167u8, 71u8, 119u8, 218u8, 110u8, - 25u8, 45u8, 168u8, 149u8, 62u8, 195u8, 248u8, 50u8, - 215u8, 216u8, 228u8, 4u8, 238u8, 4u8, 52u8, 211u8, 65u8, - 223u8, 84u8, 105u8, 186u8, 200u8, 73u8, 133u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "NominatorSlashInEra", + Vec::new(), + [ + 249u8, 85u8, 170u8, 41u8, 179u8, 194u8, 180u8, 12u8, 53u8, + 101u8, 80u8, 96u8, 166u8, 71u8, 239u8, 23u8, 153u8, 19u8, + 152u8, 38u8, 138u8, 136u8, 221u8, 200u8, 18u8, 165u8, 26u8, + 228u8, 195u8, 199u8, 62u8, 4u8, + ], + ) } #[doc = " Slashing spans for stash accounts."] pub fn slashing_spans( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_staking::slashing::SlashingSpans, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 73u8, 200u8, 194u8, 106u8, 157u8, 84u8, 5u8, 119u8, - 5u8, 73u8, 247u8, 125u8, 213u8, 80u8, 37u8, 154u8, 192u8, - 16u8, 2u8, 135u8, 124u8, 139u8, 26u8, 84u8, 223u8, 254u8, - 229u8, 148u8, 45u8, 194u8, 183u8, - ] - { - let entry = SlashingSpans(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::slashing::SlashingSpans, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "SlashingSpans", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 106u8, 115u8, 118u8, 52u8, 89u8, 77u8, 246u8, 5u8, 255u8, + 204u8, 44u8, 5u8, 66u8, 36u8, 227u8, 252u8, 86u8, 159u8, + 186u8, 152u8, 196u8, 21u8, 74u8, 201u8, 133u8, 93u8, 142u8, + 191u8, 20u8, 27u8, 218u8, 157u8, + ], + ) } #[doc = " Slashing spans for stash accounts."] - pub fn slashing_spans_iter( + pub fn slashing_spans_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SlashingSpans<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 73u8, 200u8, 194u8, 106u8, 157u8, 84u8, 5u8, 119u8, - 5u8, 73u8, 247u8, 125u8, 213u8, 80u8, 37u8, 154u8, 192u8, - 16u8, 2u8, 135u8, 124u8, 139u8, 26u8, 84u8, 223u8, 254u8, - 229u8, 148u8, 45u8, 194u8, 183u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::slashing::SlashingSpans, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "SlashingSpans", + Vec::new(), + [ + 106u8, 115u8, 118u8, 52u8, 89u8, 77u8, 246u8, 5u8, 255u8, + 204u8, 44u8, 5u8, 66u8, 36u8, 227u8, 252u8, 86u8, 159u8, + 186u8, 152u8, 196u8, 21u8, 74u8, 201u8, 133u8, 93u8, 142u8, + 191u8, 20u8, 27u8, 218u8, 157u8, + ], + ) } #[doc = " Records information about the maximum slash of a stash within a slashing span,"] #[doc = " as well as how much reward has been paid out."] pub fn span_slash( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - _1: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + _1: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::slashing::SpanRecord< + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 95u8, 42u8, 40u8, 167u8, 201u8, 140u8, 142u8, 55u8, 69u8, - 238u8, 248u8, 118u8, 209u8, 11u8, 117u8, 132u8, 179u8, - 33u8, 17u8, 156u8, 137u8, 220u8, 170u8, 144u8, 235u8, - 99u8, 248u8, 47u8, 99u8, 42u8, 247u8, 189u8, - ] - { - let entry = SpanSlash(_0, _1); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "SpanSlash", + vec![::subxt::storage::address::StorageMapKey::new( + &(_0, _1), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8, + 59u8, 184u8, 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8, + 225u8, 230u8, 224u8, 163u8, 103u8, 157u8, 100u8, 29u8, 86u8, + 167u8, 84u8, 217u8, 109u8, 200u8, + ], + ) } #[doc = " Records information about the maximum slash of a stash within a slashing span,"] #[doc = " as well as how much reward has been paid out."] - pub fn span_slash_iter( + pub fn span_slash_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SpanSlash<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::slashing::SpanRecord< + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 95u8, 42u8, 40u8, 167u8, 201u8, 140u8, 142u8, 55u8, 69u8, - 238u8, 248u8, 118u8, 209u8, 11u8, 117u8, 132u8, 179u8, - 33u8, 17u8, 156u8, 137u8, 220u8, 170u8, 144u8, 235u8, - 99u8, 248u8, 47u8, 99u8, 42u8, 247u8, 189u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "SpanSlash", + Vec::new(), + [ + 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8, + 59u8, 184u8, 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8, + 225u8, 230u8, 224u8, 163u8, 103u8, 157u8, 100u8, 29u8, 86u8, + 167u8, 84u8, 217u8, 109u8, 200u8, + ], + ) } #[doc = " The earliest era for which we have a pending, unapplied slash."] pub fn earliest_unapplied_slash( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 2u8, 167u8, 88u8, 76u8, 113u8, 225u8, 232u8, 80u8, 183u8, - 162u8, 104u8, 28u8, 162u8, 13u8, 120u8, 45u8, 200u8, - 130u8, 147u8, 124u8, 210u8, 111u8, 30u8, 222u8, 70u8, - 79u8, 125u8, 157u8, 56u8, 252u8, 237u8, 216u8, - ] - { - let entry = EarliestUnappliedSlash; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "EarliestUnappliedSlash", + vec![], + [ + 2u8, 167u8, 88u8, 76u8, 113u8, 225u8, 232u8, 80u8, 183u8, + 162u8, 104u8, 28u8, 162u8, 13u8, 120u8, 45u8, 200u8, 130u8, + 147u8, 124u8, 210u8, 111u8, 30u8, 222u8, 70u8, 79u8, 125u8, + 157u8, 56u8, 252u8, 237u8, 216u8, + ], + ) } #[doc = " The last planned session scheduled by the session pallet."] #[doc = ""] #[doc = " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]."] pub fn current_planned_session( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 38u8, 22u8, 56u8, 250u8, 17u8, 154u8, 99u8, 37u8, 155u8, - 253u8, 100u8, 117u8, 5u8, 239u8, 31u8, 190u8, 53u8, - 241u8, 11u8, 185u8, 163u8, 227u8, 10u8, 77u8, 210u8, - 64u8, 156u8, 218u8, 105u8, 16u8, 1u8, 57u8, - ] - { - let entry = CurrentPlannedSession; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "CurrentPlannedSession", + vec![], + [ + 38u8, 22u8, 56u8, 250u8, 17u8, 154u8, 99u8, 37u8, 155u8, + 253u8, 100u8, 117u8, 5u8, 239u8, 31u8, 190u8, 53u8, 241u8, + 11u8, 185u8, 163u8, 227u8, 10u8, 77u8, 210u8, 64u8, 156u8, + 218u8, 105u8, 16u8, 1u8, 57u8, + ], + ) } #[doc = " Indices of validators that have offended in the active era and whether they are currently"] #[doc = " disabled."] @@ -10273,43 +6887,26 @@ pub mod api { #[doc = " validators that have offended in the current era, ensuring a new era is forced if"] #[doc = " `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find"] #[doc = " whether a given validator has previously offended using binary search. It gets cleared when"] - #[doc = " the era ends."] - pub fn offending_validators( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - ::core::primitive::u32, - ::core::primitive::bool, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 94u8, 254u8, 0u8, 50u8, 76u8, 232u8, 51u8, 153u8, 118u8, - 14u8, 70u8, 101u8, 112u8, 215u8, 173u8, 82u8, 182u8, - 104u8, 167u8, 103u8, 187u8, 168u8, 86u8, 16u8, 51u8, - 235u8, 51u8, 119u8, 38u8, 154u8, 42u8, 113u8, - ] - { - let entry = OffendingValidators; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " the era ends."] + pub fn offending_validators( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "OffendingValidators", + vec![], + [ + 94u8, 254u8, 0u8, 50u8, 76u8, 232u8, 51u8, 153u8, 118u8, + 14u8, 70u8, 101u8, 112u8, 215u8, 173u8, 82u8, 182u8, 104u8, + 167u8, 103u8, 187u8, 168u8, 86u8, 16u8, 51u8, 235u8, 51u8, + 119u8, 38u8, 154u8, 42u8, 113u8, + ], + ) } #[doc = " True if network has been upgraded to this version."] #[doc = " Storage version of the pallet."] @@ -10317,159 +6914,106 @@ pub mod api { #[doc = " This is set to v7.0.0 for new networks."] pub fn storage_version( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_staking::Releases, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 156u8, 107u8, 113u8, 89u8, 107u8, 89u8, 171u8, 229u8, - 13u8, 96u8, 203u8, 67u8, 119u8, 153u8, 199u8, 158u8, - 63u8, 114u8, 229u8, 113u8, 81u8, 70u8, 200u8, 9u8, 147u8, - 233u8, 6u8, 7u8, 210u8, 109u8, 149u8, 14u8, - ] - { - let entry = StorageVersion; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_staking::Releases, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "StorageVersion", + vec![], + [ + 156u8, 107u8, 113u8, 89u8, 107u8, 89u8, 171u8, 229u8, 13u8, + 96u8, 203u8, 67u8, 119u8, 153u8, 199u8, 158u8, 63u8, 114u8, + 229u8, 113u8, 81u8, 70u8, 200u8, 9u8, 147u8, 233u8, 6u8, 7u8, + 210u8, 109u8, 149u8, 14u8, + ], + ) } #[doc = " The threshold for when users can start calling `chill_other` for other validators /"] #[doc = " nominators. The threshold is compared to the actual number of validators / nominators"] #[doc = " (`CountFor*`) in the system compared to the configured max (`Max*Count`)."] pub fn chill_threshold( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_arithmetic::per_things::Percent, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 254u8, 131u8, 112u8, 90u8, 234u8, 72u8, 26u8, 240u8, - 38u8, 14u8, 128u8, 234u8, 133u8, 169u8, 66u8, 48u8, - 234u8, 170u8, 159u8, 145u8, 75u8, 135u8, 79u8, 189u8, - 54u8, 89u8, 113u8, 144u8, 16u8, 70u8, 184u8, 43u8, - ] - { - let entry = ChillThreshold; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_arithmetic::per_things::Percent, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Staking", + "ChillThreshold", + vec![], + [ + 174u8, 165u8, 249u8, 105u8, 24u8, 151u8, 115u8, 166u8, 199u8, + 251u8, 28u8, 5u8, 50u8, 95u8, 144u8, 110u8, 220u8, 76u8, + 14u8, 23u8, 179u8, 41u8, 11u8, 248u8, 28u8, 154u8, 159u8, + 255u8, 156u8, 109u8, 98u8, 92u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Maximum number of nominations per nominator."] pub fn max_nominations( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Staking", "MaxNominations")? - == [ - 155u8, 58u8, 120u8, 225u8, 19u8, 30u8, 64u8, 6u8, 16u8, 72u8, - 160u8, 120u8, 99u8, 8u8, 170u8, 47u8, 217u8, 196u8, 184u8, - 183u8, 199u8, 156u8, 76u8, 154u8, 143u8, 172u8, 67u8, 133u8, - 95u8, 36u8, 60u8, 50u8, - ] - { - let pallet = metadata.pallet("Staking")?; - let constant = pallet.constant("MaxNominations")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Staking", + "MaxNominations", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Number of sessions per era."] pub fn sessions_per_era( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Staking", "SessionsPerEra")? - == [ - 73u8, 207u8, 178u8, 212u8, 159u8, 9u8, 41u8, 31u8, 205u8, - 221u8, 166u8, 159u8, 104u8, 218u8, 113u8, 160u8, 174u8, 66u8, - 95u8, 0u8, 237u8, 42u8, 120u8, 171u8, 68u8, 78u8, 136u8, - 162u8, 163u8, 225u8, 199u8, 138u8, - ] - { - let pallet = metadata.pallet("Staking")?; - let constant = pallet.constant("SessionsPerEra")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Staking", + "SessionsPerEra", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Number of eras that staked funds must remain bonded for."] pub fn bonding_duration( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Staking", "BondingDuration")? - == [ - 205u8, 83u8, 35u8, 244u8, 140u8, 127u8, 183u8, 152u8, 242u8, - 60u8, 44u8, 77u8, 252u8, 245u8, 35u8, 157u8, 71u8, 124u8, - 99u8, 243u8, 122u8, 252u8, 104u8, 33u8, 28u8, 86u8, 63u8, - 26u8, 3u8, 22u8, 193u8, 237u8, - ] - { - let pallet = metadata.pallet("Staking")?; - let constant = pallet.constant("BondingDuration")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Staking", + "BondingDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Number of eras that slashes are deferred by, after computation."] #[doc = ""] @@ -10477,26 +7021,20 @@ pub mod api { #[doc = " should be applied immediately, without opportunity for intervention."] pub fn slash_defer_duration( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Staking", "SlashDeferDuration")? - == [ - 119u8, 238u8, 165u8, 29u8, 118u8, 219u8, 225u8, 241u8, 249u8, - 202u8, 99u8, 86u8, 123u8, 152u8, 33u8, 200u8, 166u8, 24u8, - 240u8, 111u8, 6u8, 56u8, 94u8, 70u8, 198u8, 4u8, 223u8, 19u8, - 39u8, 246u8, 190u8, 167u8, - ] - { - let pallet = metadata.pallet("Staking")?; - let constant = pallet.constant("SlashDeferDuration")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Staking", + "SlashDeferDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The maximum number of nominators rewarded for each validator."] #[doc = ""] @@ -10504,67 +7042,55 @@ pub mod api { #[doc = " claim their reward. This used to limit the i/o cost for the nominator payout."] pub fn max_nominator_rewarded_per_validator( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("Staking", "MaxNominatorRewardedPerValidator")? - == [ - 203u8, 67u8, 240u8, 15u8, 205u8, 129u8, 216u8, 42u8, 197u8, - 166u8, 179u8, 175u8, 9u8, 179u8, 182u8, 19u8, 57u8, 206u8, - 237u8, 79u8, 204u8, 135u8, 76u8, 243u8, 108u8, 191u8, 151u8, - 127u8, 38u8, 154u8, 193u8, 142u8, - ] - { - let pallet = metadata.pallet("Staking")?; - let constant = - pallet.constant("MaxNominatorRewardedPerValidator")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Staking", + "MaxNominatorRewardedPerValidator", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively"] #[doc = " determines how many unique eras a staker may be unbonding in."] pub fn max_unlocking_chunks( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Staking", "MaxUnlockingChunks")? - == [ - 60u8, 255u8, 33u8, 12u8, 50u8, 253u8, 93u8, 203u8, 3u8, - 245u8, 156u8, 201u8, 121u8, 119u8, 72u8, 58u8, 38u8, 133u8, - 127u8, 51u8, 21u8, 223u8, 40u8, 23u8, 116u8, 158u8, 77u8, - 24u8, 139u8, 219u8, 197u8, 150u8, - ] - { - let pallet = metadata.pallet("Staking")?; - let constant = pallet.constant("MaxUnlockingChunks")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Staking", + "MaxUnlockingChunks", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod offences { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Events type."] pub type Event = runtime_types::pallet_offences::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] #[doc = "\\[kind, timeslot\\]."] @@ -10572,225 +7098,131 @@ pub mod api { pub kind: [::core::primitive::u8; 16usize], pub timeslot: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Event for Offence { + impl ::subxt::events::StaticEvent for Offence { const PALLET: &'static str = "Offences"; const EVENT: &'static str = "Offence"; } } pub mod storage { use super::runtime_types; - pub struct Reports<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Reports<'_> { - const PALLET: &'static str = "Offences"; - const STORAGE: &'static str = "Reports"; - type Value = runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::sp_core::crypto::AccountId32, - ( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ), - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ConcurrentReportsIndex<'a>( - pub &'a [::core::primitive::u8; 16usize], - pub &'a [::core::primitive::u8], - ); - impl ::subxt::StorageEntry for ConcurrentReportsIndex<'_> { - const PALLET: &'static str = "Offences"; - const STORAGE: &'static str = "ConcurrentReportsIndex"; - type Value = ::std::vec::Vec<::subxt::sp_core::H256>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct ReportsByKindIndex<'a>(pub &'a [::core::primitive::u8; 16usize]); - impl ::subxt::StorageEntry for ReportsByKindIndex<'_> { - const PALLET: &'static str = "Offences"; - const STORAGE: &'static str = "ReportsByKindIndex"; - type Value = ::std::vec::Vec<::core::primitive::u8>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The primary structure that holds all offence records keyed by report identifiers."] pub fn reports( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::sp_core::crypto::AccountId32, - ( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ), + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_staking::offence::OffenceDetails< + ::subxt::ext::sp_core::crypto::AccountId32, + ( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - >, - ::subxt::BasicError, + ), >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 82u8, 209u8, 30u8, 189u8, 152u8, 16u8, 7u8, 24u8, 178u8, - 140u8, 17u8, 226u8, 97u8, 37u8, 80u8, 211u8, 252u8, 36u8, - 196u8, 121u8, 113u8, 79u8, 209u8, 113u8, 236u8, 148u8, - 243u8, 100u8, 46u8, 193u8, 180u8, 83u8, - ] - { - let entry = Reports(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Offences", + "Reports", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 144u8, 30u8, 66u8, 199u8, 102u8, 236u8, 175u8, 201u8, 206u8, + 170u8, 55u8, 162u8, 137u8, 120u8, 220u8, 213u8, 57u8, 252u8, + 0u8, 88u8, 210u8, 68u8, 5u8, 25u8, 77u8, 114u8, 204u8, 23u8, + 190u8, 32u8, 211u8, 30u8, + ], + ) } #[doc = " The primary structure that holds all offence records keyed by report identifiers."] - pub fn reports_iter( + pub fn reports_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Reports<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_staking::offence::OffenceDetails< + ::subxt::ext::sp_core::crypto::AccountId32, + ( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ), >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 82u8, 209u8, 30u8, 189u8, 152u8, 16u8, 7u8, 24u8, 178u8, - 140u8, 17u8, 226u8, 97u8, 37u8, 80u8, 211u8, 252u8, 36u8, - 196u8, 121u8, 113u8, 79u8, 209u8, 113u8, 236u8, 148u8, - 243u8, 100u8, 46u8, 193u8, 180u8, 83u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Offences", + "Reports", + Vec::new(), + [ + 144u8, 30u8, 66u8, 199u8, 102u8, 236u8, 175u8, 201u8, 206u8, + 170u8, 55u8, 162u8, 137u8, 120u8, 220u8, 213u8, 57u8, 252u8, + 0u8, 88u8, 210u8, 68u8, 5u8, 25u8, 77u8, 114u8, 204u8, 23u8, + 190u8, 32u8, 211u8, 30u8, + ], + ) } #[doc = " A vector of reports of the same kind that happened at the same time slot."] pub fn concurrent_reports_index( &self, - _0: &'a [::core::primitive::u8; 16usize], - _1: &'a [::core::primitive::u8], - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::subxt::sp_core::H256>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 110u8, 42u8, 178u8, 19u8, 180u8, 109u8, 26u8, 134u8, - 74u8, 223u8, 19u8, 172u8, 149u8, 194u8, 228u8, 11u8, - 205u8, 189u8, 157u8, 52u8, 179u8, 177u8, 19u8, 65u8, - 35u8, 176u8, 62u8, 98u8, 108u8, 236u8, 242u8, 240u8, - ] - { - let entry = ConcurrentReportsIndex(_0, _1); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &[::core::primitive::u8; 16usize], + _1: &&[::core::primitive::u8], + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::H256>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Offences", + "ConcurrentReportsIndex", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 106u8, 21u8, 104u8, 5u8, 4u8, 66u8, 28u8, 70u8, 161u8, 195u8, + 238u8, 28u8, 69u8, 241u8, 221u8, 113u8, 140u8, 103u8, 181u8, + 143u8, 60u8, 177u8, 13u8, 129u8, 224u8, 149u8, 77u8, 32u8, + 75u8, 74u8, 101u8, 65u8, + ], + ) } #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ConcurrentReportsIndex<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 110u8, 42u8, 178u8, 19u8, 180u8, 109u8, 26u8, 134u8, - 74u8, 223u8, 19u8, 172u8, 149u8, 194u8, 228u8, 11u8, - 205u8, 189u8, 157u8, 52u8, 179u8, 177u8, 19u8, 65u8, - 35u8, 176u8, 62u8, 98u8, 108u8, 236u8, 242u8, 240u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn concurrent_reports_index_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::H256>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Offences", + "ConcurrentReportsIndex", + Vec::new(), + [ + 106u8, 21u8, 104u8, 5u8, 4u8, 66u8, 28u8, 70u8, 161u8, 195u8, + 238u8, 28u8, 69u8, 241u8, 221u8, 113u8, 140u8, 103u8, 181u8, + 143u8, 60u8, 177u8, 13u8, 129u8, 224u8, 149u8, 77u8, 32u8, + 75u8, 74u8, 101u8, 65u8, + ], + ) } #[doc = " Enumerates all reports of a kind along with the time they happened."] #[doc = ""] @@ -10800,38 +7232,27 @@ pub mod api { #[doc = " different types are not supported at the moment so we are doing the manual serialization."] pub fn reports_by_kind_index( &self, - _0: &'a [::core::primitive::u8; 16usize], - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, - 36u8, 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, - 164u8, 50u8, 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, - 242u8, 106u8, 21u8, 136u8, 98u8, 215u8, 180u8, 145u8, - ] - { - let entry = ReportsByKindIndex(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &[::core::primitive::u8; 16usize], + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Offences", + "ReportsByKindIndex", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, + 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, + 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, + 136u8, 98u8, 215u8, 180u8, 145u8, + ], + ) } #[doc = " Enumerates all reports of a kind along with the time they happened."] #[doc = ""] @@ -10839,90 +7260,58 @@ pub mod api { #[doc = ""] #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"] #[doc = " different types are not supported at the moment so we are doing the manual serialization."] - pub fn reports_by_kind_index_iter( + pub fn reports_by_kind_index_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ReportsByKindIndex<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, - 36u8, 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, - 164u8, 50u8, 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, - 242u8, 106u8, 21u8, 136u8, 98u8, 215u8, 180u8, 145u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Offences", + "ReportsByKindIndex", + Vec::new(), + [ + 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, + 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, + 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, + 136u8, 98u8, 215u8, 180u8, 145u8, + ], + ) } } } } pub mod historical { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; } pub mod session { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetKeys { pub keys: runtime_types::polkadot_runtime::SessionKeys, pub proof: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetKeys { - const PALLET: &'static str = "Session"; - const FUNCTION: &'static str = "set_keys"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct PurgeKeys; - impl ::subxt::Call for PurgeKeys { - const PALLET: &'static str = "Session"; - const FUNCTION: &'static str = "purge_keys"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Sets the session key(s) of the function caller to `keys`."] #[doc = "Allows an account to set its session key prior to becoming a validator."] #[doc = "This doesn't take effect until the next session."] @@ -10941,35 +7330,23 @@ pub mod api { &self, keys: runtime_types::polkadot_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetKeys, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 194u8, 88u8, 145u8, 74u8, 215u8, 181u8, 126u8, 21u8, 193u8, - 174u8, 42u8, 142u8, 229u8, 213u8, 104u8, 36u8, 134u8, 83u8, - 245u8, 106u8, 9u8, 42u8, 75u8, 206u8, 161u8, 248u8, 232u8, - 31u8, 160u8, 213u8, 70u8, 228u8, - ] - { - let call = SetKeys { keys, proof }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Session", + call: "set_keys", + data: SetKeys { keys, proof }, + }, + [ + 17u8, 127u8, 23u8, 71u8, 118u8, 133u8, 89u8, 105u8, 93u8, + 52u8, 46u8, 201u8, 151u8, 19u8, 124u8, 195u8, 228u8, 229u8, + 22u8, 216u8, 32u8, 54u8, 67u8, 222u8, 91u8, 175u8, 206u8, + 7u8, 238u8, 118u8, 81u8, 112u8, + ], + ) } #[doc = "Removes any session key(s) of the function caller."] #[doc = ""] @@ -10989,35 +7366,23 @@ pub mod api { #[doc = "# "] pub fn purge_keys( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - PurgeKeys, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Session", + call: "purge_keys", + data: PurgeKeys {}, + }, + [ 200u8, 255u8, 4u8, 213u8, 188u8, 92u8, 99u8, 116u8, 163u8, 152u8, 29u8, 35u8, 133u8, 119u8, 246u8, 44u8, 91u8, 31u8, 145u8, 23u8, 213u8, 64u8, 71u8, 242u8, 207u8, 239u8, 231u8, 37u8, 61u8, 63u8, 190u8, 35u8, - ] - { - let call = PurgeKeys {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } } } @@ -11026,9 +7391,9 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "New session has happened. Note that the argument is the session index, not the"] @@ -11036,239 +7401,103 @@ pub mod api { pub struct NewSession { pub session_index: ::core::primitive::u32, } - impl ::subxt::Event for NewSession { + impl ::subxt::events::StaticEvent for NewSession { const PALLET: &'static str = "Session"; const EVENT: &'static str = "NewSession"; } } pub mod storage { use super::runtime_types; - pub struct Validators; - impl ::subxt::StorageEntry for Validators { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "Validators"; - type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentIndex; - impl ::subxt::StorageEntry for CurrentIndex { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "CurrentIndex"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct QueuedChanged; - impl ::subxt::StorageEntry for QueuedChanged { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "QueuedChanged"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct QueuedKeys; - impl ::subxt::StorageEntry for QueuedKeys { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "QueuedKeys"; - type Value = ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::SessionKeys, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct DisabledValidators; - impl ::subxt::StorageEntry for DisabledValidators { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "DisabledValidators"; - type Value = ::std::vec::Vec<::core::primitive::u32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextKeys<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for NextKeys<'_> { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "NextKeys"; - type Value = runtime_types::polkadot_runtime::SessionKeys; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct KeyOwner<'a>( - pub &'a runtime_types::sp_core::crypto::KeyTypeId, - pub &'a [::core::primitive::u8], - ); - impl ::subxt::StorageEntry for KeyOwner<'_> { - const PALLET: &'static str = "Session"; - const STORAGE: &'static str = "KeyOwner"; - type Value = ::subxt::sp_core::crypto::AccountId32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The current set of validators."] pub fn validators( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 186u8, 248u8, 234u8, 74u8, 245u8, 141u8, 90u8, 152u8, - 226u8, 220u8, 255u8, 104u8, 174u8, 1u8, 37u8, 152u8, - 23u8, 208u8, 25u8, 49u8, 33u8, 253u8, 254u8, 251u8, - 141u8, 16u8, 18u8, 175u8, 196u8, 188u8, 163u8, 209u8, - ] - { - let entry = Validators; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "Validators", + vec![], + [ + 144u8, 235u8, 200u8, 43u8, 151u8, 57u8, 147u8, 172u8, 201u8, + 202u8, 242u8, 96u8, 57u8, 76u8, 124u8, 77u8, 42u8, 113u8, + 218u8, 220u8, 230u8, 32u8, 151u8, 152u8, 172u8, 106u8, 60u8, + 227u8, 122u8, 118u8, 137u8, 68u8, + ], + ) } #[doc = " Current index of the session."] pub fn current_index( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 148u8, 179u8, 159u8, 15u8, 197u8, 95u8, 214u8, 30u8, - 209u8, 251u8, 183u8, 231u8, 91u8, 25u8, 181u8, 191u8, - 143u8, 252u8, 227u8, 80u8, 159u8, 66u8, 194u8, 67u8, - 113u8, 74u8, 111u8, 91u8, 218u8, 187u8, 130u8, 40u8, - ] - { - let entry = CurrentIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "CurrentIndex", + vec![], + [ + 148u8, 179u8, 159u8, 15u8, 197u8, 95u8, 214u8, 30u8, 209u8, + 251u8, 183u8, 231u8, 91u8, 25u8, 181u8, 191u8, 143u8, 252u8, + 227u8, 80u8, 159u8, 66u8, 194u8, 67u8, 113u8, 74u8, 111u8, + 91u8, 218u8, 187u8, 130u8, 40u8, + ], + ) } #[doc = " True if the underlying economic identities or weighting behind the validators"] #[doc = " has changed in the queued validator set."] pub fn queued_changed( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 105u8, 140u8, 235u8, 218u8, 96u8, 100u8, 252u8, 10u8, - 58u8, 221u8, 244u8, 251u8, 67u8, 91u8, 80u8, 202u8, - 152u8, 42u8, 50u8, 113u8, 200u8, 247u8, 59u8, 213u8, - 77u8, 195u8, 1u8, 150u8, 220u8, 18u8, 245u8, 46u8, - ] - { - let entry = QueuedChanged; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "QueuedChanged", + vec![], + [ + 105u8, 140u8, 235u8, 218u8, 96u8, 100u8, 252u8, 10u8, 58u8, + 221u8, 244u8, 251u8, 67u8, 91u8, 80u8, 202u8, 152u8, 42u8, + 50u8, 113u8, 200u8, 247u8, 59u8, 213u8, 77u8, 195u8, 1u8, + 150u8, 220u8, 18u8, 245u8, 46u8, + ], + ) } #[doc = " The queued keys for the next session. When the next session begins, these keys"] #[doc = " will be used to determine the validator's session keys."] pub fn queued_keys( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::SessionKeys, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 94u8, 85u8, 104u8, 215u8, 108u8, 102u8, 70u8, 179u8, - 201u8, 132u8, 63u8, 148u8, 29u8, 97u8, 185u8, 117u8, - 153u8, 236u8, 106u8, 21u8, 156u8, 60u8, 178u8, 93u8, - 240u8, 144u8, 101u8, 78u8, 63u8, 247u8, 128u8, 13u8, - ] - { - let entry = QueuedKeys; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_runtime::SessionKeys, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "QueuedKeys", + vec![], + [ + 197u8, 174u8, 245u8, 219u8, 36u8, 118u8, 73u8, 184u8, 156u8, + 93u8, 167u8, 107u8, 142u8, 7u8, 41u8, 51u8, 77u8, 191u8, + 68u8, 95u8, 71u8, 76u8, 253u8, 137u8, 73u8, 194u8, 169u8, + 234u8, 217u8, 76u8, 157u8, 223u8, + ], + ) } #[doc = " Indices of disabled validators."] #[doc = ""] @@ -11277,290 +7506,197 @@ pub mod api { #[doc = " a new set of identities."] pub fn disabled_validators( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 135u8, 22u8, 22u8, 97u8, 82u8, 217u8, 144u8, 141u8, - 121u8, 240u8, 189u8, 16u8, 176u8, 88u8, 177u8, 31u8, - 20u8, 242u8, 73u8, 104u8, 11u8, 110u8, 214u8, 34u8, 52u8, - 217u8, 106u8, 33u8, 174u8, 174u8, 198u8, 84u8, - ] - { - let entry = DisabledValidators; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "DisabledValidators", + vec![], + [ + 135u8, 22u8, 22u8, 97u8, 82u8, 217u8, 144u8, 141u8, 121u8, + 240u8, 189u8, 16u8, 176u8, 88u8, 177u8, 31u8, 20u8, 242u8, + 73u8, 104u8, 11u8, 110u8, 214u8, 34u8, 52u8, 217u8, 106u8, + 33u8, 174u8, 174u8, 198u8, 84u8, + ], + ) } #[doc = " The next session keys for a validator."] pub fn next_keys( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_runtime::SessionKeys, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 18u8, 229u8, 236u8, 115u8, 189u8, 239u8, 3u8, 100u8, 6u8, - 254u8, 237u8, 61u8, 223u8, 21u8, 226u8, 203u8, 214u8, - 213u8, 58u8, 252u8, 168u8, 7u8, 92u8, 5u8, 176u8, 37u8, - 43u8, 104u8, 175u8, 75u8, 42u8, 221u8, - ] - { - let entry = NextKeys(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime::SessionKeys, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "NextKeys", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 94u8, 197u8, 147u8, 245u8, 165u8, 97u8, 186u8, 57u8, 142u8, + 66u8, 132u8, 213u8, 126u8, 3u8, 77u8, 88u8, 191u8, 33u8, + 82u8, 153u8, 11u8, 109u8, 96u8, 252u8, 193u8, 171u8, 158u8, + 131u8, 29u8, 192u8, 248u8, 166u8, + ], + ) } #[doc = " The next session keys for a validator."] - pub fn next_keys_iter( + pub fn next_keys_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, NextKeys<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 18u8, 229u8, 236u8, 115u8, 189u8, 239u8, 3u8, 100u8, 6u8, - 254u8, 237u8, 61u8, 223u8, 21u8, 226u8, 203u8, 214u8, - 213u8, 58u8, 252u8, 168u8, 7u8, 92u8, 5u8, 176u8, 37u8, - 43u8, 104u8, 175u8, 75u8, 42u8, 221u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime::SessionKeys, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "NextKeys", + Vec::new(), + [ + 94u8, 197u8, 147u8, 245u8, 165u8, 97u8, 186u8, 57u8, 142u8, + 66u8, 132u8, 213u8, 126u8, 3u8, 77u8, 88u8, 191u8, 33u8, + 82u8, 153u8, 11u8, 109u8, 96u8, 252u8, 193u8, 171u8, 158u8, + 131u8, 29u8, 192u8, 248u8, 166u8, + ], + ) } #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] pub fn key_owner( &self, - _0: &'a runtime_types::sp_core::crypto::KeyTypeId, - _1: &'a [::core::primitive::u8], - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 49u8, 245u8, 212u8, 141u8, 211u8, 208u8, 109u8, 102u8, - 249u8, 161u8, 41u8, 93u8, 220u8, 230u8, 14u8, 59u8, - 251u8, 176u8, 33u8, 127u8, 93u8, 149u8, 205u8, 229u8, - 113u8, 129u8, 162u8, 177u8, 155u8, 216u8, 151u8, 57u8, - ] - { - let entry = KeyOwner(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::sp_core::crypto::KeyTypeId, + _1: &&[::core::primitive::u8], + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "KeyOwner", + vec![::subxt::storage::address::StorageMapKey::new( + &(_0, _1), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8, + 58u8, 197u8, 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8, + 195u8, 57u8, 53u8, 172u8, 0u8, 148u8, 203u8, 144u8, 149u8, + 64u8, 135u8, 254u8, 242u8, 215u8, + ], + ) } #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner_iter( + pub fn key_owner_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, KeyOwner<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 49u8, 245u8, 212u8, 141u8, 211u8, 208u8, 109u8, 102u8, - 249u8, 161u8, 41u8, 93u8, 220u8, 230u8, 14u8, 59u8, - 251u8, 176u8, 33u8, 127u8, 93u8, 149u8, 205u8, 229u8, - 113u8, 129u8, 162u8, 177u8, 155u8, 216u8, 151u8, 57u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Session", + "KeyOwner", + Vec::new(), + [ + 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8, + 58u8, 197u8, 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8, + 195u8, 57u8, 53u8, 172u8, 0u8, 148u8, 203u8, 144u8, 149u8, + 64u8, 135u8, 254u8, 242u8, 215u8, + ], + ) } } } } pub mod grandpa { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReportEquivocation { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, ::core::primitive::u32, >, >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocation { - const PALLET: &'static str = "Grandpa"; - const FUNCTION: &'static str = "report_equivocation"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReportEquivocationUnsigned { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, ::core::primitive::u32, >, >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocationUnsigned { - const PALLET: &'static str = "Grandpa"; - const FUNCTION: &'static str = "report_equivocation_unsigned"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NoteStalled { pub delay: ::core::primitive::u32, pub best_finalized_block_number: ::core::primitive::u32, } - impl ::subxt::Call for NoteStalled { - const PALLET: &'static str = "Grandpa"; - const FUNCTION: &'static str = "note_stalled"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Report voter equivocation/misbehavior. This method will verify the"] #[doc = "equivocation proof and validate the given key ownership proof"] #[doc = "against the extracted offender. If both are valid, the offence"] #[doc = "will be reported."] pub fn report_equivocation( &self, - equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 >, + equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReportEquivocation, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 230u8, 252u8, 24u8, 207u8, 164u8, 127u8, 177u8, 30u8, 113u8, - 175u8, 207u8, 252u8, 230u8, 225u8, 181u8, 190u8, 236u8, - 110u8, 145u8, 168u8, 200u8, 134u8, 88u8, 234u8, 231u8, 45u8, - 149u8, 169u8, 155u8, 114u8, 62u8, 65u8, - ] - { - let call = ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Grandpa", + call: "report_equivocation", + data: ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + }, + [ + 156u8, 162u8, 189u8, 89u8, 60u8, 156u8, 129u8, 176u8, 62u8, + 35u8, 214u8, 7u8, 68u8, 245u8, 130u8, 117u8, 30u8, 3u8, 73u8, + 218u8, 142u8, 82u8, 13u8, 141u8, 124u8, 19u8, 53u8, 138u8, + 70u8, 4u8, 40u8, 32u8, + ], + ) } #[doc = "Report voter equivocation/misbehavior. This method will verify the"] #[doc = "equivocation proof and validate the given key ownership proof"] @@ -11573,42 +7709,30 @@ pub mod api { #[doc = "reporter."] pub fn report_equivocation_unsigned( &self, - equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 >, + equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReportEquivocationUnsigned, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 141u8, 235u8, 27u8, 135u8, 124u8, 124u8, 234u8, 51u8, 100u8, - 105u8, 188u8, 248u8, 133u8, 10u8, 84u8, 14u8, 40u8, 235u8, - 14u8, 107u8, 63u8, 148u8, 107u8, 172u8, 136u8, 159u8, 86u8, - 23u8, 145u8, 221u8, 93u8, 206u8, - ] - { - let call = ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Grandpa", + call: "report_equivocation_unsigned", + data: ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + }, + [ + 166u8, 26u8, 217u8, 185u8, 215u8, 37u8, 174u8, 170u8, 137u8, + 160u8, 151u8, 43u8, 246u8, 86u8, 58u8, 18u8, 248u8, 73u8, + 99u8, 161u8, 158u8, 93u8, 212u8, 186u8, 224u8, 253u8, 234u8, + 18u8, 151u8, 111u8, 227u8, 249u8, + ], + ) } #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] #[doc = ""] @@ -11626,38 +7750,26 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NoteStalled, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 227u8, 98u8, 249u8, 158u8, 96u8, 124u8, 72u8, 188u8, 27u8, - 215u8, 73u8, 62u8, 103u8, 79u8, 38u8, 48u8, 212u8, 88u8, - 233u8, 187u8, 11u8, 95u8, 39u8, 247u8, 55u8, 184u8, 228u8, - 102u8, 13u8, 251u8, 52u8, 206u8, - ] - { - let call = NoteStalled { - delay, - best_finalized_block_number, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Grandpa", + call: "note_stalled", + data: NoteStalled { + delay, + best_finalized_block_number, + }, + }, + [ + 197u8, 236u8, 137u8, 32u8, 46u8, 200u8, 144u8, 13u8, 89u8, + 181u8, 235u8, 73u8, 167u8, 131u8, 174u8, 93u8, 42u8, 136u8, + 238u8, 59u8, 129u8, 60u8, 83u8, 100u8, 5u8, 182u8, 99u8, + 250u8, 145u8, 180u8, 1u8, 199u8, + ], + ) } } } @@ -11665,7 +7777,11 @@ pub mod api { pub type Event = runtime_types::pallet_grandpa::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "New authority set has been applied."] pub struct NewAuthorities { pub authority_set: ::std::vec::Vec<( @@ -11673,278 +7789,144 @@ pub mod api { ::core::primitive::u64, )>, } - impl ::subxt::Event for NewAuthorities { + impl ::subxt::events::StaticEvent for NewAuthorities { const PALLET: &'static str = "Grandpa"; const EVENT: &'static str = "NewAuthorities"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Current authority set has been paused."] pub struct Paused; - impl ::subxt::Event for Paused { + impl ::subxt::events::StaticEvent for Paused { const PALLET: &'static str = "Grandpa"; const EVENT: &'static str = "Paused"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] - #[doc = "Current authority set has been resumed."] - pub struct Resumed; - impl ::subxt::Event for Resumed { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "Resumed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct State; - impl ::subxt::StorageEntry for State { - const PALLET: &'static str = "Grandpa"; - const STORAGE: &'static str = "State"; - type Value = - runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct PendingChange; - impl ::subxt::StorageEntry for PendingChange { - const PALLET: &'static str = "Grandpa"; - const STORAGE: &'static str = "PendingChange"; - type Value = runtime_types::pallet_grandpa::StoredPendingChange< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextForced; - impl ::subxt::StorageEntry for NextForced { - const PALLET: &'static str = "Grandpa"; - const STORAGE: &'static str = "NextForced"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Stalled; - impl ::subxt::StorageEntry for Stalled { - const PALLET: &'static str = "Grandpa"; - const STORAGE: &'static str = "Stalled"; - type Value = (::core::primitive::u32, ::core::primitive::u32); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentSetId; - impl ::subxt::StorageEntry for CurrentSetId { - const PALLET: &'static str = "Grandpa"; - const STORAGE: &'static str = "CurrentSetId"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SetIdSession<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for SetIdSession<'_> { + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] + #[doc = "Current authority set has been resumed."] + pub struct Resumed; + impl ::subxt::events::StaticEvent for Resumed { const PALLET: &'static str = "Grandpa"; - const STORAGE: &'static str = "SetIdSession"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + const EVENT: &'static str = "Resumed"; } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { #[doc = " State of the current authority set."] pub fn state( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_grandpa::StoredState< - ::core::primitive::u32, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 159u8, 75u8, 78u8, 23u8, 98u8, 89u8, 239u8, 230u8, 192u8, - 67u8, 139u8, 222u8, 151u8, 237u8, 216u8, 20u8, 235u8, - 247u8, 180u8, 24u8, 64u8, 160u8, 58u8, 15u8, 205u8, - 191u8, 120u8, 68u8, 32u8, 5u8, 161u8, 106u8, - ] - { - let entry = State; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "State", + vec![], + [ + 211u8, 149u8, 114u8, 217u8, 206u8, 194u8, 115u8, 67u8, 12u8, + 218u8, 246u8, 213u8, 208u8, 29u8, 216u8, 104u8, 2u8, 39u8, + 123u8, 172u8, 252u8, 210u8, 52u8, 129u8, 147u8, 237u8, 244u8, + 68u8, 252u8, 169u8, 97u8, 148u8, + ], + ) } #[doc = " Pending change: (signaled at, scheduled change)."] pub fn pending_change( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_grandpa::StoredPendingChange< - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_grandpa::StoredPendingChange< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 128u8, 176u8, 209u8, 41u8, 231u8, 111u8, 205u8, 198u8, - 154u8, 44u8, 228u8, 231u8, 44u8, 110u8, 74u8, 9u8, 31u8, - 86u8, 128u8, 244u8, 112u8, 21u8, 120u8, 176u8, 50u8, - 213u8, 122u8, 46u8, 85u8, 255u8, 40u8, 173u8, - ] - { - let entry = PendingChange; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "PendingChange", + vec![], + [ + 178u8, 24u8, 140u8, 7u8, 8u8, 196u8, 18u8, 58u8, 3u8, 226u8, + 181u8, 47u8, 155u8, 160u8, 70u8, 12u8, 75u8, 189u8, 38u8, + 255u8, 104u8, 141u8, 64u8, 34u8, 134u8, 201u8, 102u8, 21u8, + 75u8, 81u8, 218u8, 60u8, + ], + ) } #[doc = " next block number where we can force a change."] pub fn next_forced( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 99u8, 43u8, 245u8, 201u8, 60u8, 9u8, 122u8, 99u8, 188u8, - 29u8, 67u8, 6u8, 193u8, 133u8, 179u8, 67u8, 202u8, 208u8, - 62u8, 179u8, 19u8, 169u8, 196u8, 119u8, 107u8, 75u8, - 100u8, 3u8, 121u8, 18u8, 80u8, 156u8, - ] - { - let entry = NextForced; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "NextForced", + vec![], + [ + 99u8, 43u8, 245u8, 201u8, 60u8, 9u8, 122u8, 99u8, 188u8, + 29u8, 67u8, 6u8, 193u8, 133u8, 179u8, 67u8, 202u8, 208u8, + 62u8, 179u8, 19u8, 169u8, 196u8, 119u8, 107u8, 75u8, 100u8, + 3u8, 121u8, 18u8, 80u8, 156u8, + ], + ) } #[doc = " `true` if we are currently stalled."] pub fn stalled( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 219u8, 8u8, 37u8, 78u8, 150u8, 55u8, 0u8, 57u8, 201u8, - 170u8, 186u8, 189u8, 56u8, 161u8, 44u8, 15u8, 53u8, - 178u8, 224u8, 208u8, 231u8, 109u8, 14u8, 209u8, 57u8, - 205u8, 237u8, 153u8, 231u8, 156u8, 24u8, 185u8, - ] - { - let entry = Stalled; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "Stalled", + vec![], + [ + 219u8, 8u8, 37u8, 78u8, 150u8, 55u8, 0u8, 57u8, 201u8, 170u8, + 186u8, 189u8, 56u8, 161u8, 44u8, 15u8, 53u8, 178u8, 224u8, + 208u8, 231u8, 109u8, 14u8, 209u8, 57u8, 205u8, 237u8, 153u8, + 231u8, 156u8, 24u8, 185u8, + ], + ) } #[doc = " The number of changes (both in terms of keys and underlying economic responsibilities)"] #[doc = " in the \"set\" of Grandpa validators from genesis."] pub fn current_set_id( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u64, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 129u8, 7u8, 62u8, 101u8, 199u8, 60u8, 56u8, 33u8, 54u8, - 158u8, 20u8, 178u8, 244u8, 145u8, 189u8, 197u8, 157u8, - 163u8, 116u8, 36u8, 105u8, 52u8, 149u8, 244u8, 108u8, - 94u8, 109u8, 111u8, 244u8, 137u8, 7u8, 108u8, - ] - { - let entry = CurrentSetId; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "CurrentSetId", + vec![], + [ + 129u8, 7u8, 62u8, 101u8, 199u8, 60u8, 56u8, 33u8, 54u8, + 158u8, 20u8, 178u8, 244u8, 145u8, 189u8, 197u8, 157u8, 163u8, + 116u8, 36u8, 105u8, 52u8, 149u8, 244u8, 108u8, 94u8, 109u8, + 111u8, 244u8, 137u8, 7u8, 108u8, + ], + ) } #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] #[doc = " members were responsible."] @@ -11952,152 +7934,100 @@ pub mod api { #[doc = " TWOX-NOTE: `SetId` is not under user control."] pub fn set_id_session( &self, - _0: &'a ::core::primitive::u64, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, - 110u8, 11u8, 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, - 157u8, 15u8, 33u8, 234u8, 108u8, 13u8, 88u8, 115u8, - 254u8, 9u8, 145u8, 199u8, 102u8, 47u8, 53u8, 134u8, - ] - { - let entry = SetIdSession(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u64, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "SetIdSession", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, 110u8, + 11u8, 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, 157u8, 15u8, + 33u8, 234u8, 108u8, 13u8, 88u8, 115u8, 254u8, 9u8, 145u8, + 199u8, 102u8, 47u8, 53u8, 134u8, + ], + ) } #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] #[doc = " members were responsible."] #[doc = ""] #[doc = " TWOX-NOTE: `SetId` is not under user control."] - pub fn set_id_session_iter( + pub fn set_id_session_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SetIdSession<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, - 110u8, 11u8, 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, - 157u8, 15u8, 33u8, 234u8, 108u8, 13u8, 88u8, 115u8, - 254u8, 9u8, 145u8, 199u8, 102u8, 47u8, 53u8, 134u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Grandpa", + "SetIdSession", + Vec::new(), + [ + 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, 110u8, + 11u8, 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, 157u8, 15u8, + 33u8, 234u8, 108u8, 13u8, 88u8, 115u8, 254u8, 9u8, 145u8, + 199u8, 102u8, 47u8, 53u8, 134u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Max Authorities in use"] pub fn max_authorities( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Grandpa", "MaxAuthorities")? - == [ - 248u8, 195u8, 131u8, 166u8, 10u8, 50u8, 71u8, 223u8, 41u8, - 49u8, 43u8, 99u8, 251u8, 113u8, 75u8, 193u8, 159u8, 15u8, - 77u8, 217u8, 147u8, 205u8, 165u8, 50u8, 6u8, 166u8, 77u8, - 189u8, 102u8, 22u8, 201u8, 19u8, - ] - { - let pallet = metadata.pallet("Grandpa")?; - let constant = pallet.constant("MaxAuthorities")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Grandpa", + "MaxAuthorities", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod im_online { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Heartbeat { pub heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, pub signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, } - impl ::subxt::Call for Heartbeat { - const PALLET: &'static str = "ImOnline"; - const FUNCTION: &'static str = "heartbeat"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "# "] #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] #[doc = " length of `heartbeat.network_state.external_address`"] @@ -12113,38 +8043,26 @@ pub mod api { ::core::primitive::u32, >, signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Heartbeat, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 246u8, 83u8, 28u8, 233u8, 69u8, 55u8, 28u8, 178u8, 82u8, - 159u8, 56u8, 241u8, 111u8, 78u8, 194u8, 15u8, 14u8, 250u8, - 172u8, 148u8, 208u8, 52u8, 33u8, 106u8, 159u8, 210u8, 196u8, - 79u8, 138u8, 194u8, 150u8, 201u8, - ] - { - let call = Heartbeat { - heartbeat, - signature, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ImOnline", + call: "heartbeat", + data: Heartbeat { + heartbeat, + signature, + }, + }, + [ + 212u8, 23u8, 174u8, 246u8, 60u8, 220u8, 178u8, 137u8, 53u8, + 146u8, 165u8, 225u8, 179u8, 209u8, 233u8, 152u8, 129u8, + 210u8, 126u8, 32u8, 216u8, 22u8, 76u8, 196u8, 255u8, 128u8, + 246u8, 161u8, 30u8, 186u8, 249u8, 34u8, + ], + ) } } } @@ -12152,113 +8070,55 @@ pub mod api { pub type Event = runtime_types::pallet_im_online::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new heartbeat was received from `AuthorityId`."] pub struct HeartbeatReceived { pub authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, } - impl ::subxt::Event for HeartbeatReceived { + impl ::subxt::events::StaticEvent for HeartbeatReceived { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "HeartbeatReceived"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "At the end of the session, no offence was committed."] pub struct AllGood; - impl ::subxt::Event for AllGood { + impl ::subxt::events::StaticEvent for AllGood { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "AllGood"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, >, )>, } - impl ::subxt::Event for SomeOffline { + impl ::subxt::events::StaticEvent for SomeOffline { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "SomeOffline"; } } pub mod storage { use super::runtime_types; - pub struct HeartbeatAfter; - impl ::subxt::StorageEntry for HeartbeatAfter { - const PALLET: &'static str = "ImOnline"; - const STORAGE: &'static str = "HeartbeatAfter"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Keys; - impl ::subxt::StorageEntry for Keys { - const PALLET: &'static str = "ImOnline"; - const STORAGE: &'static str = "Keys"; - type Value = - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ReceivedHeartbeats<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::core::primitive::u32, - ); - impl ::subxt::StorageEntry for ReceivedHeartbeats<'_> { - const PALLET: &'static str = "ImOnline"; - const STORAGE: &'static str = "ReceivedHeartbeats"; - type Value = runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct AuthoredBlocks<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, - ); - impl ::subxt::StorageEntry for AuthoredBlocks<'_> { - const PALLET: &'static str = "ImOnline"; - const STORAGE: &'static str = "AuthoredBlocks"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The block number after which it's ok to send heartbeats in the current"] #[doc = " session."] #[doc = ""] @@ -12272,280 +8132,229 @@ pub mod api { #[doc = " more accurate then the value we calculate for `HeartbeatAfter`."] pub fn heartbeat_after( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ImOnline", + "HeartbeatAfter", + vec![], + [ + 108u8, 100u8, 85u8, 198u8, 226u8, 122u8, 94u8, 225u8, 97u8, + 154u8, 135u8, 95u8, 106u8, 28u8, 185u8, 78u8, 192u8, 196u8, + 35u8, 191u8, 12u8, 19u8, 163u8, 46u8, 232u8, 235u8, 193u8, + 81u8, 126u8, 204u8, 25u8, 228u8, + ], + ) + } + #[doc = " The current set of keys that may issue a heartbeat."] + pub fn keys( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 108u8, 100u8, 85u8, 198u8, 226u8, 122u8, 94u8, 225u8, - 97u8, 154u8, 135u8, 95u8, 106u8, 28u8, 185u8, 78u8, - 192u8, 196u8, 35u8, 191u8, 12u8, 19u8, 163u8, 46u8, - 232u8, 235u8, 193u8, 81u8, 126u8, 204u8, 25u8, 228u8, - ] - { - let entry = HeartbeatAfter; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " The current set of keys that may issue a heartbeat."] pub fn keys (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Public > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 105u8, 250u8, 99u8, 106u8, 9u8, 29u8, 73u8, 176u8, 158u8, - 247u8, 28u8, 171u8, 95u8, 1u8, 109u8, 11u8, 231u8, 52u8, - 54u8, 102u8, 142u8, 105u8, 209u8, 31u8, 132u8, 60u8, - 89u8, 181u8, 89u8, 193u8, 241u8, 130u8, - ] - { - let entry = Keys; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ImOnline", + "Keys", + vec![], + [ + 6u8, 198u8, 221u8, 58u8, 14u8, 166u8, 245u8, 103u8, 191u8, + 20u8, 69u8, 233u8, 147u8, 245u8, 24u8, 64u8, 207u8, 180u8, + 39u8, 208u8, 252u8, 236u8, 247u8, 112u8, 187u8, 97u8, 70u8, + 11u8, 248u8, 148u8, 208u8, 106u8, + ], + ) } #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] pub fn received_heartbeats (& self , _0 : & 'a :: core :: primitive :: u32 , _1 : & 'a :: core :: primitive :: u32 , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: frame_support :: traits :: misc :: WrapperOpaque < runtime_types :: pallet_im_online :: BoundedOpaqueNetworkState > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 29u8, 40u8, 67u8, 222u8, 59u8, 104u8, 24u8, 193u8, 249u8, - 200u8, 152u8, 225u8, 72u8, 243u8, 140u8, 114u8, 121u8, - 216u8, 54u8, 145u8, 205u8, 82u8, 133u8, 128u8, 109u8, - 54u8, 153u8, 118u8, 66u8, 147u8, 251u8, 148u8, - ] - { - let entry = ReceivedHeartbeats(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats( + &self, + _0: &::core::primitive::u32, + _1: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + >, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ImOnline", + "ReceivedHeartbeats", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 233u8, 128u8, 140u8, 233u8, 55u8, 146u8, 172u8, 54u8, 54u8, + 57u8, 141u8, 106u8, 168u8, 59u8, 147u8, 253u8, 119u8, 48u8, + 50u8, 251u8, 242u8, 109u8, 251u8, 2u8, 136u8, 80u8, 146u8, + 121u8, 180u8, 219u8, 245u8, 37u8, + ], + ) } #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats_iter( + pub fn received_heartbeats_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ReceivedHeartbeats<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 29u8, 40u8, 67u8, 222u8, 59u8, 104u8, 24u8, 193u8, 249u8, - 200u8, 152u8, 225u8, 72u8, 243u8, 140u8, 114u8, 121u8, - 216u8, 54u8, 145u8, 205u8, 82u8, 133u8, 128u8, 109u8, - 54u8, 153u8, 118u8, 66u8, 147u8, 251u8, 148u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ImOnline", + "ReceivedHeartbeats", + Vec::new(), + [ + 233u8, 128u8, 140u8, 233u8, 55u8, 146u8, 172u8, 54u8, 54u8, + 57u8, 141u8, 106u8, 168u8, 59u8, 147u8, 253u8, 119u8, 48u8, + 50u8, 251u8, 242u8, 109u8, 251u8, 2u8, 136u8, 80u8, 146u8, + 121u8, 180u8, 219u8, 245u8, 37u8, + ], + ) } #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] #[doc = " number of blocks authored by the given authority."] pub fn authored_blocks( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 94u8, 193u8, 107u8, 126u8, 3u8, 13u8, 28u8, 151u8, 197u8, - 226u8, 224u8, 48u8, 138u8, 113u8, 31u8, 57u8, 111u8, - 184u8, 218u8, 215u8, 185u8, 83u8, 209u8, 139u8, 114u8, - 241u8, 68u8, 110u8, 157u8, 208u8, 16u8, 22u8, - ] - { - let entry = AuthoredBlocks(_0, _1); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ImOnline", + "AuthoredBlocks", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, + 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, + 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, + 227u8, 228u8, 223u8, 103u8, 151u8, + ], + ) } #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] #[doc = " number of blocks authored by the given authority."] - pub fn authored_blocks_iter( + pub fn authored_blocks_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, AuthoredBlocks<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 94u8, 193u8, 107u8, 126u8, 3u8, 13u8, 28u8, 151u8, 197u8, - 226u8, 224u8, 48u8, 138u8, 113u8, 31u8, 57u8, 111u8, - 184u8, 218u8, 215u8, 185u8, 83u8, 209u8, 139u8, 114u8, - 241u8, 68u8, 110u8, 157u8, 208u8, 16u8, 22u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ImOnline", + "AuthoredBlocks", + Vec::new(), + [ + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, + 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, + 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, + 227u8, 228u8, 223u8, 103u8, 151u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " A configuration for base priority of unsigned transactions."] #[doc = ""] #[doc = " This is exposed so that it can be tuned for particular runtime, when"] #[doc = " multiple pallets send unsigned transactions."] pub fn unsigned_priority( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("ImOnline", "UnsignedPriority")? - == [ - 78u8, 226u8, 84u8, 70u8, 162u8, 23u8, 167u8, 100u8, 156u8, - 228u8, 119u8, 16u8, 28u8, 202u8, 21u8, 71u8, 72u8, 244u8, - 3u8, 255u8, 243u8, 55u8, 109u8, 238u8, 26u8, 180u8, 207u8, - 175u8, 221u8, 27u8, 213u8, 217u8, - ] - { - let pallet = metadata.pallet("ImOnline")?; - let constant = pallet.constant("UnsignedPriority")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ImOnline", + "UnsignedPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } } } } pub mod authority_discovery { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; } pub mod democracy { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Propose { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Propose { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "propose"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Second { #[codec(compact)] pub proposal: ::core::primitive::u32, #[codec(compact)] pub seconds_upper_bound: ::core::primitive::u32, } - impl ::subxt::Call for Second { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "second"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Vote { #[codec(compact)] pub ref_index: ::core::primitive::u32, @@ -12553,223 +8362,194 @@ pub mod api { ::core::primitive::u128, >, } - impl ::subxt::Call for Vote { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "vote"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct EmergencyCancel { pub ref_index: ::core::primitive::u32, } - impl ::subxt::Call for EmergencyCancel { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "emergency_cancel"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ExternalPropose { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Call for ExternalPropose { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "external_propose"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ExternalProposeMajority { - pub proposal_hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for ExternalProposeMajority { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "external_propose_majority"; + pub proposal_hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ExternalProposeDefault { - pub proposal_hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for ExternalProposeDefault { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "external_propose_default"; + pub proposal_hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct FastTrack { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub voting_period: ::core::primitive::u32, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for FastTrack { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "fast_track"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct VetoExternal { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Call for VetoExternal { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "veto_external"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CancelReferendum { #[codec(compact)] pub ref_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelReferendum { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "cancel_referendum"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct CancelQueued { pub which: ::core::primitive::u32, } - impl ::subxt::Call for CancelQueued { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "cancel_queued"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Delegate { - pub to: ::subxt::sp_core::crypto::AccountId32, + pub to: ::subxt::ext::sp_core::crypto::AccountId32, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } - impl ::subxt::Call for Delegate { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "delegate"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Undelegate; - impl ::subxt::Call for Undelegate { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "undelegate"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClearPublicProposals; - impl ::subxt::Call for ClearPublicProposals { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "clear_public_proposals"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NotePreimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimage { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "note_preimage"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NotePreimageOperational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimageOperational { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "note_preimage_operational"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NoteImminentPreimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NoteImminentPreimage { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "note_imminent_preimage"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NoteImminentPreimageOperational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NoteImminentPreimageOperational { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "note_imminent_preimage_operational"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReapPreimage { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] pub proposal_len_upper_bound: ::core::primitive::u32, } - impl ::subxt::Call for ReapPreimage { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "reap_preimage"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Unlock { - pub target: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for Unlock { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "unlock"; + pub target: ::subxt::ext::sp_core::crypto::AccountId32, } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct RemoveVote { pub index: ::core::primitive::u32, } - impl ::subxt::Call for RemoveVote { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "remove_vote"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveOtherVote { - pub target: ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for RemoveOtherVote { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "remove_other_vote"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct EnactProposal { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub index: ::core::primitive::u32, } - impl ::subxt::Call for EnactProposal { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "enact_proposal"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Blacklist { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for Blacklist { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "blacklist"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CancelProposal { #[codec(compact)] pub prop_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelProposal { - const PALLET: &'static str = "Democracy"; - const FUNCTION: &'static str = "cancel_proposal"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Propose a sensitive action to be taken."] #[doc = ""] #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] @@ -12783,40 +8563,28 @@ pub mod api { #[doc = "Weight: `O(p)`"] pub fn propose( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Propose, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 149u8, 60u8, 16u8, 143u8, 114u8, 16u8, 124u8, 96u8, 97u8, - 5u8, 176u8, 137u8, 188u8, 164u8, 65u8, 145u8, 142u8, 104u8, - 74u8, 120u8, 248u8, 90u8, 109u8, 112u8, 29u8, 226u8, 208u8, - 230u8, 101u8, 8u8, 79u8, 12u8, - ] - { - let call = Propose { - proposal_hash, - value, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "propose", + data: Propose { + proposal_hash, + value, + }, + }, + [ + 151u8, 2u8, 117u8, 57u8, 201u8, 246u8, 181u8, 198u8, 83u8, + 74u8, 99u8, 211u8, 237u8, 53u8, 90u8, 173u8, 161u8, 250u8, + 139u8, 253u8, 223u8, 251u8, 39u8, 108u8, 254u8, 192u8, 233u8, + 23u8, 9u8, 99u8, 169u8, 195u8, + ], + ) } #[doc = "Signals agreement with a particular proposal."] #[doc = ""] @@ -12832,38 +8600,26 @@ pub mod api { &self, proposal: ::core::primitive::u32, seconds_upper_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Second, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 37u8, 226u8, 138u8, 26u8, 138u8, 46u8, 39u8, 147u8, 22u8, - 32u8, 245u8, 40u8, 49u8, 228u8, 218u8, 225u8, 72u8, 89u8, - 37u8, 90u8, 132u8, 31u8, 52u8, 22u8, 234u8, 124u8, 254u8, - 223u8, 56u8, 215u8, 255u8, 79u8, - ] - { - let call = Second { - proposal, - seconds_upper_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "second", + data: Second { + proposal, + seconds_upper_bound, + }, + }, + [ + 152u8, 56u8, 134u8, 181u8, 88u8, 224u8, 68u8, 238u8, 231u8, + 78u8, 237u8, 142u8, 133u8, 16u8, 93u8, 63u8, 253u8, 81u8, + 96u8, 200u8, 43u8, 21u8, 249u8, 92u8, 78u8, 24u8, 101u8, + 217u8, 143u8, 16u8, 213u8, 244u8, + ], + ) } #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] #[doc = "otherwise it is a vote to keep the status quo."] @@ -12880,35 +8636,23 @@ pub mod api { vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Vote, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 1u8, 235u8, 77u8, 58u8, 54u8, 224u8, 30u8, 168u8, 150u8, - 169u8, 20u8, 172u8, 137u8, 191u8, 189u8, 184u8, 28u8, 118u8, - 204u8, 233u8, 146u8, 212u8, 45u8, 139u8, 58u8, 175u8, 231u8, - 169u8, 43u8, 164u8, 149u8, 16u8, - ] - { - let call = Vote { ref_index, vote }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "vote", + data: Vote { ref_index, vote }, + }, + [ + 138u8, 213u8, 229u8, 111u8, 1u8, 191u8, 73u8, 3u8, 145u8, + 28u8, 44u8, 88u8, 163u8, 188u8, 129u8, 188u8, 64u8, 15u8, + 64u8, 103u8, 250u8, 97u8, 234u8, 188u8, 29u8, 205u8, 51u8, + 6u8, 116u8, 58u8, 156u8, 201u8, + ], + ) } #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] #[doc = "referendum."] @@ -12921,35 +8665,23 @@ pub mod api { pub fn emergency_cancel( &self, ref_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - EmergencyCancel, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 4u8, 129u8, 205u8, 102u8, 202u8, 197u8, 75u8, 155u8, 24u8, - 125u8, 157u8, 73u8, 50u8, 243u8, 173u8, 103u8, 49u8, 60u8, - 50u8, 63u8, 54u8, 40u8, 34u8, 227u8, 29u8, 247u8, 179u8, - 102u8, 107u8, 177u8, 117u8, 161u8, - ] - { - let call = EmergencyCancel { ref_index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "emergency_cancel", + data: EmergencyCancel { ref_index }, + }, + [ + 139u8, 213u8, 133u8, 75u8, 34u8, 206u8, 124u8, 245u8, 35u8, + 237u8, 132u8, 92u8, 49u8, 167u8, 117u8, 80u8, 188u8, 93u8, + 198u8, 237u8, 132u8, 77u8, 195u8, 65u8, 29u8, 37u8, 86u8, + 74u8, 214u8, 119u8, 71u8, 204u8, + ], + ) } #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] #[doc = "referendum."] @@ -12962,36 +8694,24 @@ pub mod api { #[doc = " Decoding vec of length V. Charged as maximum"] pub fn external_propose( &self, - proposal_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ExternalPropose, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 50u8, 82u8, 155u8, 206u8, 57u8, 61u8, 64u8, 43u8, 30u8, 71u8, - 89u8, 91u8, 221u8, 46u8, 15u8, 222u8, 15u8, 211u8, 56u8, - 176u8, 84u8, 225u8, 192u8, 92u8, 253u8, 56u8, 207u8, 29u8, - 252u8, 77u8, 245u8, 113u8, - ] - { - let call = ExternalPropose { proposal_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + proposal_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "external_propose", + data: ExternalPropose { proposal_hash }, + }, + [ + 8u8, 206u8, 229u8, 218u8, 203u8, 208u8, 253u8, 113u8, 43u8, + 62u8, 110u8, 155u8, 123u8, 35u8, 187u8, 211u8, 180u8, 225u8, + 41u8, 30u8, 204u8, 110u8, 202u8, 210u8, 143u8, 84u8, 117u8, + 20u8, 215u8, 110u8, 211u8, 89u8, + ], + ) } #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] #[doc = "an external referendum."] @@ -13006,36 +8726,24 @@ pub mod api { #[doc = "Weight: `O(1)`"] pub fn external_propose_majority( &self, - proposal_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ExternalProposeMajority, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 18u8, 92u8, 204u8, 120u8, 189u8, 60u8, 223u8, 166u8, 213u8, - 49u8, 20u8, 131u8, 202u8, 1u8, 87u8, 226u8, 168u8, 156u8, - 144u8, 110u8, 118u8, 125u8, 81u8, 111u8, 229u8, 244u8, 89u8, - 93u8, 202u8, 140u8, 16u8, 220u8, - ] - { - let call = ExternalProposeMajority { proposal_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + proposal_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "external_propose_majority", + data: ExternalProposeMajority { proposal_hash }, + }, + [ + 36u8, 47u8, 192u8, 177u8, 164u8, 82u8, 109u8, 215u8, 98u8, + 28u8, 47u8, 237u8, 159u8, 233u8, 53u8, 9u8, 158u8, 134u8, + 232u8, 249u8, 55u8, 189u8, 48u8, 133u8, 201u8, 46u8, 237u8, + 158u8, 181u8, 163u8, 166u8, 213u8, + ], + ) } #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] #[doc = "schedule an external referendum."] @@ -13050,36 +8758,24 @@ pub mod api { #[doc = "Weight: `O(1)`"] pub fn external_propose_default( &self, - proposal_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ExternalProposeDefault, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 51u8, 75u8, 236u8, 51u8, 53u8, 39u8, 26u8, 231u8, 212u8, - 191u8, 175u8, 233u8, 181u8, 156u8, 210u8, 221u8, 181u8, - 182u8, 113u8, 69u8, 171u8, 70u8, 219u8, 133u8, 88u8, 78u8, - 87u8, 228u8, 177u8, 53u8, 111u8, 115u8, - ] - { - let call = ExternalProposeDefault { proposal_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + proposal_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "external_propose_default", + data: ExternalProposeDefault { proposal_hash }, + }, + [ + 32u8, 100u8, 249u8, 175u8, 187u8, 77u8, 30u8, 65u8, 90u8, + 103u8, 251u8, 21u8, 21u8, 220u8, 8u8, 118u8, 97u8, 160u8, + 152u8, 122u8, 71u8, 140u8, 96u8, 8u8, 245u8, 74u8, 112u8, + 164u8, 55u8, 130u8, 38u8, 14u8, + ], + ) } #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] @@ -13098,42 +8794,30 @@ pub mod api { #[doc = "Weight: `O(1)`"] pub fn fast_track( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - FastTrack, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 232u8, 255u8, 150u8, 13u8, 151u8, 28u8, 253u8, 37u8, 183u8, - 127u8, 53u8, 228u8, 160u8, 11u8, 223u8, 48u8, 74u8, 5u8, - 37u8, 3u8, 84u8, 224u8, 79u8, 172u8, 120u8, 220u8, 158u8, - 191u8, 127u8, 55u8, 126u8, 135u8, - ] - { - let call = FastTrack { - proposal_hash, - voting_period, - delay, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "fast_track", + data: FastTrack { + proposal_hash, + voting_period, + delay, + }, + }, + [ + 125u8, 209u8, 107u8, 120u8, 93u8, 205u8, 129u8, 147u8, 254u8, + 126u8, 45u8, 126u8, 39u8, 0u8, 56u8, 14u8, 233u8, 49u8, + 245u8, 220u8, 156u8, 10u8, 252u8, 31u8, 102u8, 90u8, 163u8, + 236u8, 178u8, 85u8, 13u8, 24u8, + ], + ) } #[doc = "Veto and blacklist the external proposal hash."] #[doc = ""] @@ -13146,36 +8830,24 @@ pub mod api { #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] pub fn veto_external( &self, - proposal_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - VetoExternal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 230u8, 207u8, 43u8, 137u8, 173u8, 97u8, 143u8, 183u8, 193u8, - 78u8, 252u8, 104u8, 237u8, 32u8, 151u8, 164u8, 91u8, 247u8, - 233u8, 36u8, 198u8, 88u8, 63u8, 176u8, 77u8, 87u8, 26u8, - 242u8, 211u8, 47u8, 193u8, 180u8, - ] - { - let call = VetoExternal { proposal_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + proposal_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "veto_external", + data: VetoExternal { proposal_hash }, + }, + [ + 209u8, 18u8, 18u8, 103u8, 186u8, 160u8, 214u8, 124u8, 150u8, + 207u8, 112u8, 90u8, 84u8, 197u8, 95u8, 157u8, 165u8, 65u8, + 109u8, 101u8, 75u8, 201u8, 41u8, 149u8, 75u8, 154u8, 37u8, + 178u8, 239u8, 121u8, 124u8, 23u8, + ], + ) } #[doc = "Remove a referendum."] #[doc = ""] @@ -13187,35 +8859,23 @@ pub mod api { pub fn cancel_referendum( &self, ref_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelReferendum, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 107u8, 144u8, 114u8, 224u8, 39u8, 217u8, 156u8, 202u8, 62u8, - 4u8, 196u8, 63u8, 145u8, 196u8, 107u8, 241u8, 3u8, 61u8, - 202u8, 20u8, 123u8, 158u8, 153u8, 45u8, 192u8, 192u8, 244u8, - 42u8, 224u8, 23u8, 243u8, 225u8, - ] - { - let call = CancelReferendum { ref_index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "cancel_referendum", + data: CancelReferendum { ref_index }, + }, + [ + 51u8, 25u8, 25u8, 251u8, 236u8, 115u8, 130u8, 230u8, 72u8, + 186u8, 119u8, 71u8, 165u8, 137u8, 55u8, 167u8, 187u8, 128u8, + 55u8, 8u8, 212u8, 139u8, 245u8, 232u8, 103u8, 136u8, 229u8, + 113u8, 125u8, 36u8, 1u8, 149u8, + ], + ) } #[doc = "Cancel a proposal queued for enactment."] #[doc = ""] @@ -13227,35 +8887,23 @@ pub mod api { pub fn cancel_queued( &self, which: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelQueued, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 130u8, 218u8, 212u8, 143u8, 89u8, 134u8, 207u8, 161u8, 165u8, - 202u8, 237u8, 237u8, 81u8, 125u8, 165u8, 147u8, 222u8, 198u8, - 236u8, 1u8, 223u8, 74u8, 200u8, 6u8, 208u8, 128u8, 215u8, - 50u8, 46u8, 117u8, 16u8, 143u8, - ] - { - let call = CancelQueued { which }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "cancel_queued", + data: CancelQueued { which }, + }, + [ + 6u8, 97u8, 182u8, 142u8, 165u8, 206u8, 218u8, 245u8, 206u8, + 224u8, 143u8, 164u8, 232u8, 129u8, 202u8, 141u8, 78u8, 65u8, + 79u8, 206u8, 3u8, 195u8, 151u8, 36u8, 8u8, 220u8, 184u8, + 239u8, 28u8, 187u8, 208u8, 174u8, + ], + ) } #[doc = "Delegate the voting power (with some given conviction) of the sending account."] #[doc = ""] @@ -13279,42 +8927,30 @@ pub mod api { #[doc = " voted on. Weight is charged as if maximum votes."] pub fn delegate( &self, - to: ::subxt::sp_core::crypto::AccountId32, + to: ::subxt::ext::sp_core::crypto::AccountId32, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Delegate, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 33u8, 155u8, 180u8, 53u8, 39u8, 251u8, 59u8, 100u8, 16u8, - 124u8, 209u8, 40u8, 42u8, 152u8, 3u8, 109u8, 97u8, 211u8, - 129u8, 151u8, 82u8, 45u8, 16u8, 98u8, 114u8, 250u8, 145u8, - 176u8, 244u8, 39u8, 64u8, 11u8, - ] - { - let call = Delegate { - to, - conviction, - balance, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "delegate", + data: Delegate { + to, + conviction, + balance, + }, + }, + [ + 190u8, 241u8, 243u8, 105u8, 114u8, 112u8, 169u8, 52u8, 119u8, + 174u8, 61u8, 72u8, 165u8, 161u8, 192u8, 234u8, 32u8, 144u8, + 89u8, 214u8, 178u8, 227u8, 251u8, 198u8, 129u8, 21u8, 244u8, + 183u8, 135u8, 33u8, 1u8, 224u8, + ], + ) } #[doc = "Undelegate the voting power of the sending account."] #[doc = ""] @@ -13330,35 +8966,23 @@ pub mod api { #[doc = " voted on. Weight is charged as if maximum votes."] pub fn undelegate( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Undelegate, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "undelegate", + data: Undelegate {}, + }, + [ 165u8, 40u8, 183u8, 209u8, 57u8, 153u8, 111u8, 29u8, 114u8, 109u8, 107u8, 235u8, 97u8, 61u8, 53u8, 155u8, 44u8, 245u8, 28u8, 220u8, 56u8, 134u8, 43u8, 122u8, 248u8, 156u8, 191u8, 154u8, 4u8, 121u8, 152u8, 153u8, - ] - { - let call = Undelegate {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Clears all public proposals."] #[doc = ""] @@ -13367,35 +8991,23 @@ pub mod api { #[doc = "Weight: `O(1)`."] pub fn clear_public_proposals( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClearPublicProposals, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "clear_public_proposals", + data: ClearPublicProposals {}, + }, + [ 59u8, 126u8, 254u8, 223u8, 252u8, 225u8, 75u8, 185u8, 188u8, 181u8, 42u8, 179u8, 211u8, 73u8, 12u8, 141u8, 243u8, 197u8, 46u8, 130u8, 215u8, 196u8, 225u8, 88u8, 48u8, 199u8, 231u8, 249u8, 195u8, 53u8, 184u8, 204u8, - ] - { - let call = ClearPublicProposals {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Register the preimage for an upcoming proposal. This doesn't require the proposal to be"] #[doc = "in the dispatch queue but does require a deposit, returned once enacted."] @@ -13410,69 +9022,45 @@ pub mod api { pub fn note_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NotePreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 121u8, 179u8, 204u8, 32u8, 104u8, 133u8, 99u8, 153u8, 226u8, - 190u8, 89u8, 121u8, 232u8, 154u8, 89u8, 133u8, 124u8, 222u8, - 237u8, 39u8, 50u8, 128u8, 80u8, 115u8, 186u8, 180u8, 151u8, - 139u8, 73u8, 112u8, 148u8, 232u8, - ] - { - let call = NotePreimage { encoded_proposal }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "note_preimage", + data: NotePreimage { encoded_proposal }, + }, + [ + 31u8, 252u8, 248u8, 238u8, 103u8, 1u8, 82u8, 84u8, 135u8, + 152u8, 246u8, 234u8, 251u8, 124u8, 193u8, 73u8, 52u8, 255u8, + 88u8, 31u8, 112u8, 99u8, 191u8, 245u8, 251u8, 202u8, 51u8, + 130u8, 136u8, 114u8, 177u8, 241u8, + ], + ) } #[doc = "Same as `note_preimage` but origin is `OperationalPreimageOrigin`."] pub fn note_preimage_operational( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NotePreimageOperational, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 102u8, 20u8, 213u8, 32u8, 64u8, 28u8, 150u8, 241u8, 173u8, - 182u8, 201u8, 70u8, 52u8, 211u8, 95u8, 211u8, 127u8, 12u8, - 249u8, 57u8, 128u8, 64u8, 185u8, 239u8, 255u8, 191u8, 203u8, - 222u8, 123u8, 187u8, 106u8, 12u8, - ] - { - let call = NotePreimageOperational { encoded_proposal }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "note_preimage_operational", + data: NotePreimageOperational { encoded_proposal }, + }, + [ + 184u8, 81u8, 31u8, 172u8, 81u8, 113u8, 84u8, 246u8, 189u8, + 219u8, 167u8, 32u8, 191u8, 126u8, 165u8, 250u8, 147u8, 199u8, + 241u8, 196u8, 253u8, 34u8, 51u8, 158u8, 2u8, 157u8, 16u8, + 122u8, 210u8, 66u8, 110u8, 234u8, + ], + ) } #[doc = "Register the preimage for an upcoming proposal. This requires the proposal to be"] #[doc = "in the dispatch queue. No deposit is needed. When this call is successful, i.e."] @@ -13489,69 +9077,45 @@ pub mod api { pub fn note_imminent_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NoteImminentPreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 240u8, 77u8, 42u8, 178u8, 110u8, 117u8, 152u8, 158u8, 64u8, - 26u8, 49u8, 37u8, 177u8, 178u8, 203u8, 227u8, 23u8, 251u8, - 242u8, 112u8, 184u8, 234u8, 95u8, 73u8, 86u8, 37u8, 148u8, - 150u8, 6u8, 50u8, 239u8, 64u8, - ] - { - let call = NoteImminentPreimage { encoded_proposal }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "note_imminent_preimage", + data: NoteImminentPreimage { encoded_proposal }, + }, + [ + 32u8, 188u8, 10u8, 215u8, 245u8, 132u8, 234u8, 124u8, 19u8, + 90u8, 225u8, 216u8, 169u8, 105u8, 95u8, 231u8, 12u8, 109u8, + 16u8, 91u8, 153u8, 134u8, 240u8, 82u8, 80u8, 254u8, 117u8, + 230u8, 88u8, 203u8, 68u8, 42u8, + ], + ) } #[doc = "Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`."] pub fn note_imminent_preimage_operational( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NoteImminentPreimageOperational, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 119u8, 17u8, 140u8, 81u8, 7u8, 103u8, 162u8, 112u8, 160u8, - 179u8, 116u8, 34u8, 126u8, 150u8, 64u8, 117u8, 93u8, 225u8, - 197u8, 40u8, 62u8, 238u8, 174u8, 63u8, 148u8, 248u8, 214u8, - 212u8, 228u8, 86u8, 87u8, 195u8, - ] - { - let call = NoteImminentPreimageOperational { encoded_proposal }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "note_imminent_preimage_operational", + data: NoteImminentPreimageOperational { encoded_proposal }, + }, + [ + 7u8, 31u8, 49u8, 238u8, 155u8, 234u8, 187u8, 147u8, 123u8, + 84u8, 50u8, 98u8, 221u8, 39u8, 218u8, 204u8, 175u8, 136u8, + 44u8, 93u8, 140u8, 172u8, 73u8, 98u8, 168u8, 110u8, 31u8, + 82u8, 22u8, 1u8, 205u8, 84u8, + ], + ) } #[doc = "Remove an expired proposal preimage and collect the deposit."] #[doc = ""] @@ -13570,40 +9134,28 @@ pub mod api { #[doc = "Weight: `O(D)` where D is length of proposal."] pub fn reap_preimage( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, proposal_len_upper_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReapPreimage, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 45u8, 191u8, 46u8, 19u8, 87u8, 216u8, 48u8, 29u8, 124u8, - 205u8, 39u8, 178u8, 158u8, 95u8, 163u8, 116u8, 232u8, 58u8, - 6u8, 242u8, 52u8, 215u8, 251u8, 49u8, 1u8, 234u8, 99u8, - 142u8, 76u8, 182u8, 134u8, 173u8, - ] - { - let call = ReapPreimage { - proposal_hash, - proposal_len_upper_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "reap_preimage", + data: ReapPreimage { + proposal_hash, + proposal_len_upper_bound, + }, + }, + [ + 135u8, 43u8, 115u8, 154u8, 93u8, 121u8, 112u8, 65u8, 145u8, + 141u8, 236u8, 252u8, 203u8, 155u8, 63u8, 130u8, 120u8, 221u8, + 13u8, 105u8, 81u8, 179u8, 167u8, 254u8, 213u8, 117u8, 146u8, + 232u8, 18u8, 104u8, 196u8, 112u8, + ], + ) } #[doc = "Unlock tokens that have an expired lock."] #[doc = ""] @@ -13614,36 +9166,24 @@ pub mod api { #[doc = "Weight: `O(R)` with R number of vote of target."] pub fn unlock( &self, - target: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Unlock, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 106u8, 17u8, 189u8, 71u8, 208u8, 26u8, 49u8, 71u8, 162u8, - 196u8, 126u8, 192u8, 242u8, 239u8, 77u8, 196u8, 62u8, 171u8, - 58u8, 176u8, 157u8, 81u8, 65u8, 246u8, 210u8, 43u8, 1u8, - 226u8, 143u8, 149u8, 210u8, 192u8, - ] - { - let call = Unlock { target }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + target: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "unlock", + data: Unlock { target }, + }, + [ + 137u8, 93u8, 240u8, 75u8, 142u8, 148u8, 51u8, 55u8, 88u8, + 159u8, 2u8, 57u8, 24u8, 169u8, 120u8, 121u8, 115u8, 53u8, + 225u8, 176u8, 67u8, 156u8, 20u8, 132u8, 39u8, 54u8, 125u8, + 203u8, 199u8, 85u8, 60u8, 211u8, + ], + ) } #[doc = "Remove a vote for a referendum."] #[doc = ""] @@ -13675,35 +9215,23 @@ pub mod api { pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveVote, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 33u8, 72u8, 14u8, 166u8, 152u8, 18u8, 232u8, 153u8, 163u8, - 96u8, 146u8, 180u8, 98u8, 155u8, 119u8, 75u8, 247u8, 175u8, - 246u8, 183u8, 182u8, 108u8, 250u8, 80u8, 148u8, 86u8, 255u8, - 59u8, 93u8, 197u8, 209u8, 226u8, - ] - { - let call = RemoveVote { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "remove_vote", + data: RemoveVote { index }, + }, + [ + 148u8, 120u8, 14u8, 172u8, 81u8, 152u8, 159u8, 178u8, 106u8, + 244u8, 36u8, 98u8, 120u8, 189u8, 213u8, 93u8, 119u8, 156u8, + 112u8, 34u8, 241u8, 72u8, 206u8, 113u8, 212u8, 161u8, 164u8, + 126u8, 122u8, 82u8, 160u8, 74u8, + ], + ) } #[doc = "Remove a vote for a referendum."] #[doc = ""] @@ -13722,75 +9250,51 @@ pub mod api { #[doc = " Weight is calculated for the maximum number of vote."] pub fn remove_other_vote( &self, - target: ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveOtherVote, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 43u8, 194u8, 32u8, 219u8, 87u8, 143u8, 240u8, 34u8, 236u8, - 232u8, 128u8, 7u8, 99u8, 113u8, 106u8, 124u8, 92u8, 115u8, - 75u8, 228u8, 39u8, 234u8, 192u8, 134u8, 69u8, 109u8, 119u8, - 133u8, 194u8, 110u8, 167u8, 244u8, - ] - { - let call = RemoveOtherVote { target, index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "remove_other_vote", + data: RemoveOtherVote { target, index }, + }, + [ + 137u8, 59u8, 51u8, 72u8, 97u8, 181u8, 74u8, 123u8, 65u8, + 147u8, 63u8, 23u8, 14u8, 6u8, 66u8, 186u8, 105u8, 72u8, + 112u8, 120u8, 51u8, 229u8, 247u8, 96u8, 218u8, 137u8, 220u8, + 65u8, 95u8, 109u8, 253u8, 45u8, + ], + ) } #[doc = "Enact a proposal from a referendum. For now we just make the weight be the maximum."] pub fn enact_proposal( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - EnactProposal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 246u8, 188u8, 9u8, 244u8, 56u8, 81u8, 201u8, 59u8, 212u8, - 11u8, 204u8, 7u8, 173u8, 7u8, 212u8, 34u8, 173u8, 248u8, - 83u8, 225u8, 209u8, 105u8, 249u8, 167u8, 243u8, 49u8, 119u8, - 167u8, 28u8, 31u8, 60u8, 75u8, - ] - { - let call = EnactProposal { - proposal_hash, - index, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "enact_proposal", + data: EnactProposal { + proposal_hash, + index, + }, + }, + [ + 191u8, 244u8, 244u8, 174u8, 95u8, 86u8, 132u8, 63u8, 2u8, + 94u8, 3u8, 117u8, 96u8, 54u8, 100u8, 89u8, 124u8, 117u8, + 205u8, 142u8, 214u8, 192u8, 137u8, 141u8, 178u8, 145u8, + 241u8, 167u8, 163u8, 76u8, 61u8, 31u8, + ], + ) } #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] #[doc = "proposed again."] @@ -13809,40 +9313,28 @@ pub mod api { #[doc = " reasonable value)."] pub fn blacklist( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Blacklist, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 105u8, 99u8, 153u8, 150u8, 122u8, 234u8, 105u8, 238u8, 152u8, - 152u8, 121u8, 181u8, 133u8, 246u8, 159u8, 35u8, 8u8, 65u8, - 15u8, 203u8, 206u8, 75u8, 28u8, 214u8, 111u8, 26u8, 40u8, - 141u8, 68u8, 57u8, 217u8, 244u8, - ] - { - let call = Blacklist { - proposal_hash, - maybe_ref_index, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "blacklist", + data: Blacklist { + proposal_hash, + maybe_ref_index, + }, + }, + [ + 48u8, 144u8, 81u8, 164u8, 54u8, 111u8, 197u8, 134u8, 6u8, + 98u8, 121u8, 179u8, 254u8, 191u8, 204u8, 212u8, 84u8, 255u8, + 86u8, 110u8, 225u8, 130u8, 26u8, 65u8, 133u8, 56u8, 231u8, + 15u8, 245u8, 137u8, 146u8, 242u8, + ], + ) } #[doc = "Remove a proposal."] #[doc = ""] @@ -13854,35 +9346,23 @@ pub mod api { pub fn cancel_proposal( &self, prop_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelProposal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 26u8, 117u8, 180u8, 24u8, 12u8, 177u8, 77u8, 254u8, 113u8, - 53u8, 146u8, 48u8, 164u8, 255u8, 45u8, 205u8, 207u8, 46u8, - 74u8, 184u8, 73u8, 95u8, 216u8, 190u8, 240u8, 64u8, 121u8, - 104u8, 147u8, 141u8, 128u8, 82u8, - ] - { - let call = CancelProposal { prop_index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Democracy", + call: "cancel_proposal", + data: CancelProposal { prop_index }, + }, + [ + 179u8, 3u8, 198u8, 244u8, 241u8, 124u8, 205u8, 58u8, 100u8, + 80u8, 177u8, 254u8, 98u8, 220u8, 189u8, 63u8, 229u8, 60u8, + 157u8, 83u8, 142u8, 6u8, 236u8, 183u8, 193u8, 235u8, 253u8, + 126u8, 153u8, 185u8, 74u8, 117u8, + ], + ) } } } @@ -13890,777 +9370,556 @@ pub mod api { pub type Event = runtime_types::pallet_democracy::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion has been proposed by a public account."] pub struct Proposed { pub proposal_index: ::core::primitive::u32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for Proposed { + impl ::subxt::events::StaticEvent for Proposed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A public proposal has been tabled for referendum vote."] pub struct Tabled { pub proposal_index: ::core::primitive::u32, pub deposit: ::core::primitive::u128, - pub depositors: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub depositors: + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, } - impl ::subxt::Event for Tabled { + impl ::subxt::events::StaticEvent for Tabled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Tabled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An external proposal has been tabled."] pub struct ExternalTabled; - impl ::subxt::Event for ExternalTabled { + impl ::subxt::events::StaticEvent for ExternalTabled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "ExternalTabled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A referendum has begun."] pub struct Started { pub ref_index: ::core::primitive::u32, pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, } - impl ::subxt::Event for Started { + impl ::subxt::events::StaticEvent for Started { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Started"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A proposal has been approved by referendum."] pub struct Passed { pub ref_index: ::core::primitive::u32, } - impl ::subxt::Event for Passed { + impl ::subxt::events::StaticEvent for Passed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Passed"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A proposal has been rejected by referendum."] pub struct NotPassed { pub ref_index: ::core::primitive::u32, } - impl ::subxt::Event for NotPassed { + impl ::subxt::events::StaticEvent for NotPassed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "NotPassed"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A referendum has been cancelled."] pub struct Cancelled { pub ref_index: ::core::primitive::u32, } - impl ::subxt::Event for Cancelled { + impl ::subxt::events::StaticEvent for Cancelled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Cancelled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal has been enacted."] pub struct Executed { pub ref_index: ::core::primitive::u32, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for Executed { + impl ::subxt::events::StaticEvent for Executed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Executed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has delegated their vote to another account."] pub struct Delegated { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub target: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Delegated { + impl ::subxt::events::StaticEvent for Delegated { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Delegated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has cancelled a previous delegation operation."] pub struct Undelegated { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Undelegated { + impl ::subxt::events::StaticEvent for Undelegated { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Undelegated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An external proposal has been vetoed."] pub struct Vetoed { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::sp_core::H256, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub until: ::core::primitive::u32, } - impl ::subxt::Event for Vetoed { + impl ::subxt::events::StaticEvent for Vetoed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Vetoed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal's preimage was noted, and the deposit taken."] pub struct PreimageNoted { - pub proposal_hash: ::subxt::sp_core::H256, - pub who: ::subxt::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::ext::sp_core::H256, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for PreimageNoted { + impl ::subxt::events::StaticEvent for PreimageNoted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageNoted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal preimage was removed and used (the deposit was returned)."] pub struct PreimageUsed { - pub proposal_hash: ::subxt::sp_core::H256, - pub provider: ::subxt::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::ext::sp_core::H256, + pub provider: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for PreimageUsed { + impl ::subxt::events::StaticEvent for PreimageUsed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageUsed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal could not be executed because its preimage was invalid."] pub struct PreimageInvalid { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub ref_index: ::core::primitive::u32, } - impl ::subxt::Event for PreimageInvalid { + impl ::subxt::events::StaticEvent for PreimageInvalid { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageInvalid"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal could not be executed because its preimage was missing."] pub struct PreimageMissing { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub ref_index: ::core::primitive::u32, } - impl ::subxt::Event for PreimageMissing { + impl ::subxt::events::StaticEvent for PreimageMissing { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageMissing"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A registered preimage was removed and the deposit collected by the reaper."] pub struct PreimageReaped { - pub proposal_hash: ::subxt::sp_core::H256, - pub provider: ::subxt::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::ext::sp_core::H256, + pub provider: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, - pub reaper: ::subxt::sp_core::crypto::AccountId32, + pub reaper: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for PreimageReaped { + impl ::subxt::events::StaticEvent for PreimageReaped { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageReaped"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal_hash has been blacklisted permanently."] pub struct Blacklisted { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Blacklisted { + impl ::subxt::events::StaticEvent for Blacklisted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Blacklisted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has voted in a referendum"] pub struct Voted { - pub voter: ::subxt::sp_core::crypto::AccountId32, + pub voter: ::subxt::ext::sp_core::crypto::AccountId32, pub ref_index: ::core::primitive::u32, pub vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, } - impl ::subxt::Event for Voted { + impl ::subxt::events::StaticEvent for Voted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Voted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has secconded a proposal"] pub struct Seconded { - pub seconder: ::subxt::sp_core::crypto::AccountId32, + pub seconder: ::subxt::ext::sp_core::crypto::AccountId32, pub prop_index: ::core::primitive::u32, } - impl ::subxt::Event for Seconded { + impl ::subxt::events::StaticEvent for Seconded { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Seconded"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A proposal got canceled."] pub struct ProposalCanceled { pub prop_index: ::core::primitive::u32, } - impl ::subxt::Event for ProposalCanceled { + impl ::subxt::events::StaticEvent for ProposalCanceled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "ProposalCanceled"; } } pub mod storage { use super::runtime_types; - pub struct PublicPropCount; - impl ::subxt::StorageEntry for PublicPropCount { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "PublicPropCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct PublicProps; - impl ::subxt::StorageEntry for PublicProps { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "PublicProps"; - type Value = ::std::vec::Vec<( - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct DepositOf<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for DepositOf<'_> { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "DepositOf"; - type Value = ( - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::core::primitive::u128, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Preimages<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Preimages<'_> { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "Preimages"; - type Value = runtime_types::pallet_democracy::PreimageStatus< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct ReferendumCount; - impl ::subxt::StorageEntry for ReferendumCount { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "ReferendumCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct LowestUnbaked; - impl ::subxt::StorageEntry for LowestUnbaked { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "LowestUnbaked"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ReferendumInfoOf<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ReferendumInfoOf<'_> { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "ReferendumInfoOf"; - type Value = runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct VotingOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for VotingOf<'_> { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "VotingOf"; - type Value = runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct LastTabledWasExternal; - impl ::subxt::StorageEntry for LastTabledWasExternal { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "LastTabledWasExternal"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextExternal; - impl ::subxt::StorageEntry for NextExternal { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "NextExternal"; - type Value = ( - ::subxt::sp_core::H256, - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Blacklist<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Blacklist<'_> { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "Blacklist"; - type Value = ( - ::core::primitive::u32, - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct Cancellations<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Cancellations<'_> { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "Cancellations"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageVersion; - impl ::subxt::StorageEntry for StorageVersion { - const PALLET: &'static str = "Democracy"; - const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::pallet_democracy::Releases; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The number of (public) proposals that have been made so far."] pub fn public_prop_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 91u8, 14u8, 171u8, 94u8, 37u8, 157u8, 46u8, 157u8, 254u8, - 13u8, 68u8, 144u8, 23u8, 146u8, 128u8, 159u8, 9u8, 174u8, - 74u8, 174u8, 218u8, 197u8, 23u8, 235u8, 152u8, 226u8, - 216u8, 4u8, 120u8, 121u8, 27u8, 138u8, - ] - { - let entry = PublicPropCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "PublicPropCount", + vec![], + [ + 91u8, 14u8, 171u8, 94u8, 37u8, 157u8, 46u8, 157u8, 254u8, + 13u8, 68u8, 144u8, 23u8, 146u8, 128u8, 159u8, 9u8, 174u8, + 74u8, 174u8, 218u8, 197u8, 23u8, 235u8, 152u8, 226u8, 216u8, + 4u8, 120u8, 121u8, 27u8, 138u8, + ], + ) } #[doc = " The public proposals. Unsorted. The second item is the proposal's hash."] pub fn public_props( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 78u8, 208u8, 211u8, 20u8, 85u8, 237u8, 161u8, 149u8, - 99u8, 158u8, 6u8, 54u8, 204u8, 228u8, 132u8, 10u8, 75u8, - 247u8, 148u8, 155u8, 101u8, 183u8, 58u8, 169u8, 21u8, - 172u8, 10u8, 110u8, 130u8, 74u8, 88u8, 52u8, - ] - { - let entry = PublicProps; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::subxt::ext::sp_core::crypto::AccountId32, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "PublicProps", + vec![], + [ + 151u8, 247u8, 196u8, 97u8, 171u8, 230u8, 55u8, 45u8, 220u8, + 16u8, 12u8, 28u8, 22u8, 58u8, 127u8, 179u8, 130u8, 192u8, + 115u8, 165u8, 5u8, 173u8, 87u8, 104u8, 7u8, 186u8, 114u8, + 47u8, 162u8, 182u8, 252u8, 154u8, + ], + ) } #[doc = " Those who have locked a deposit."] #[doc = ""] #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] pub fn deposit_of( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::core::primitive::u128, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 116u8, 57u8, 200u8, 96u8, 150u8, 62u8, 162u8, 169u8, - 28u8, 18u8, 134u8, 161u8, 210u8, 217u8, 80u8, 225u8, - 22u8, 185u8, 177u8, 166u8, 243u8, 232u8, 193u8, 64u8, - 170u8, 89u8, 216u8, 198u8, 43u8, 102u8, 178u8, 55u8, - ] - { - let entry = DepositOf(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "DepositOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 153u8, 236u8, 152u8, 224u8, 221u8, 90u8, 204u8, 183u8, 222u8, + 160u8, 227u8, 26u8, 8u8, 110u8, 230u8, 102u8, 133u8, 186u8, + 66u8, 2u8, 84u8, 31u8, 236u8, 228u8, 202u8, 75u8, 17u8, 97u8, + 133u8, 232u8, 64u8, 7u8, + ], + ) } #[doc = " Those who have locked a deposit."] #[doc = ""] #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] - pub fn deposit_of_iter( + pub fn deposit_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, DepositOf<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 116u8, 57u8, 200u8, 96u8, 150u8, 62u8, 162u8, 169u8, - 28u8, 18u8, 134u8, 161u8, 210u8, 217u8, 80u8, 225u8, - 22u8, 185u8, 177u8, 166u8, 243u8, 232u8, 193u8, 64u8, - 170u8, 89u8, 216u8, 198u8, 43u8, 102u8, 178u8, 55u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "DepositOf", + Vec::new(), + [ + 153u8, 236u8, 152u8, 224u8, 221u8, 90u8, 204u8, 183u8, 222u8, + 160u8, 227u8, 26u8, 8u8, 110u8, 230u8, 102u8, 133u8, 186u8, + 66u8, 2u8, 84u8, 31u8, 236u8, 228u8, 202u8, 75u8, 17u8, 97u8, + 133u8, 232u8, 64u8, 7u8, + ], + ) } #[doc = " Map of hashes to the proposal preimage, along with who registered it and their deposit."] #[doc = " The block number is the block at which it was deposited."] pub fn preimages( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_democracy::PreimageStatus< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::PreimageStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 20u8, 82u8, 223u8, 51u8, 178u8, 115u8, 71u8, 83u8, 23u8, - 15u8, 85u8, 66u8, 0u8, 69u8, 68u8, 20u8, 28u8, 159u8, - 74u8, 41u8, 225u8, 145u8, 247u8, 23u8, 36u8, 155u8, - 101u8, 229u8, 27u8, 24u8, 93u8, 215u8, - ] - { - let entry = Preimages(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "Preimages", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 206u8, 131u8, 7u8, 129u8, 172u8, 231u8, 164u8, 220u8, 129u8, + 0u8, 204u8, 227u8, 231u8, 244u8, 61u8, 145u8, 144u8, 146u8, + 173u8, 215u8, 174u8, 218u8, 192u8, 83u8, 174u8, 99u8, 87u8, + 102u8, 98u8, 235u8, 138u8, 127u8, + ], + ) } #[doc = " Map of hashes to the proposal preimage, along with who registered it and their deposit."] #[doc = " The block number is the block at which it was deposited."] - pub fn preimages_iter( + pub fn preimages_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Preimages<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::PreimageStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 20u8, 82u8, 223u8, 51u8, 178u8, 115u8, 71u8, 83u8, 23u8, - 15u8, 85u8, 66u8, 0u8, 69u8, 68u8, 20u8, 28u8, 159u8, - 74u8, 41u8, 225u8, 145u8, 247u8, 23u8, 36u8, 155u8, - 101u8, 229u8, 27u8, 24u8, 93u8, 215u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "Preimages", + Vec::new(), + [ + 206u8, 131u8, 7u8, 129u8, 172u8, 231u8, 164u8, 220u8, 129u8, + 0u8, 204u8, 227u8, 231u8, 244u8, 61u8, 145u8, 144u8, 146u8, + 173u8, 215u8, 174u8, 218u8, 192u8, 83u8, 174u8, 99u8, 87u8, + 102u8, 98u8, 235u8, 138u8, 127u8, + ], + ) } #[doc = " The next free referendum index, aka the number of referenda started so far."] pub fn referendum_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 153u8, 210u8, 106u8, 244u8, 156u8, 70u8, 124u8, 251u8, - 123u8, 75u8, 7u8, 189u8, 199u8, 145u8, 95u8, 119u8, - 137u8, 11u8, 240u8, 160u8, 151u8, 248u8, 229u8, 231u8, - 89u8, 222u8, 18u8, 237u8, 144u8, 78u8, 99u8, 58u8, - ] - { - let entry = ReferendumCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "ReferendumCount", + vec![], + [ + 153u8, 210u8, 106u8, 244u8, 156u8, 70u8, 124u8, 251u8, 123u8, + 75u8, 7u8, 189u8, 199u8, 145u8, 95u8, 119u8, 137u8, 11u8, + 240u8, 160u8, 151u8, 248u8, 229u8, 231u8, 89u8, 222u8, 18u8, + 237u8, 144u8, 78u8, 99u8, 58u8, + ], + ) } #[doc = " The lowest referendum index representing an unbaked referendum. Equal to"] #[doc = " `ReferendumCount` if there isn't a unbaked referendum."] pub fn lowest_unbaked( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 4u8, 51u8, 108u8, 11u8, 48u8, 165u8, 19u8, 251u8, 182u8, - 76u8, 163u8, 73u8, 227u8, 2u8, 212u8, 74u8, 128u8, 27u8, - 165u8, 164u8, 111u8, 22u8, 209u8, 190u8, 103u8, 7u8, - 116u8, 16u8, 160u8, 144u8, 123u8, 64u8, - ] - { - let entry = LowestUnbaked; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "LowestUnbaked", + vec![], + [ + 4u8, 51u8, 108u8, 11u8, 48u8, 165u8, 19u8, 251u8, 182u8, + 76u8, 163u8, 73u8, 227u8, 2u8, 212u8, 74u8, 128u8, 27u8, + 165u8, 164u8, 111u8, 22u8, 209u8, 190u8, 103u8, 7u8, 116u8, + 16u8, 160u8, 144u8, 123u8, 64u8, + ], + ) } #[doc = " Information concerning any given referendum."] #[doc = ""] #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] pub fn referendum_info_of( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 112u8, 206u8, 173u8, 93u8, 255u8, 76u8, 85u8, 122u8, - 24u8, 97u8, 177u8, 67u8, 44u8, 143u8, 53u8, 159u8, 206u8, - 135u8, 63u8, 74u8, 230u8, 47u8, 27u8, 224u8, 138u8, - 217u8, 194u8, 229u8, 148u8, 249u8, 230u8, 114u8, - ] - { - let entry = ReferendumInfoOf(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "ReferendumInfoOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 132u8, 4u8, 108u8, 126u8, 91u8, 168u8, 18u8, 17u8, 86u8, + 79u8, 219u8, 222u8, 195u8, 137u8, 149u8, 177u8, 101u8, 134u8, + 130u8, 41u8, 217u8, 109u8, 18u8, 18u8, 33u8, 206u8, 117u8, + 131u8, 98u8, 26u8, 51u8, 8u8, + ], + ) } #[doc = " Information concerning any given referendum."] #[doc = ""] #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] - pub fn referendum_info_of_iter( + pub fn referendum_info_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ReferendumInfoOf<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 112u8, 206u8, 173u8, 93u8, 255u8, 76u8, 85u8, 122u8, - 24u8, 97u8, 177u8, 67u8, 44u8, 143u8, 53u8, 159u8, 206u8, - 135u8, 63u8, 74u8, 230u8, 47u8, 27u8, 224u8, 138u8, - 217u8, 194u8, 229u8, 148u8, 249u8, 230u8, 114u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "ReferendumInfoOf", + Vec::new(), + [ + 132u8, 4u8, 108u8, 126u8, 91u8, 168u8, 18u8, 17u8, 86u8, + 79u8, 219u8, 222u8, 195u8, 137u8, 149u8, 177u8, 101u8, 134u8, + 130u8, 41u8, 217u8, 109u8, 18u8, 18u8, 33u8, 206u8, 117u8, + 131u8, 98u8, 26u8, 51u8, 8u8, + ], + ) } #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] @@ -14668,338 +9927,238 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] pub fn voting_of( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 194u8, 13u8, 151u8, 207u8, 194u8, 79u8, 233u8, 214u8, - 193u8, 52u8, 78u8, 62u8, 71u8, 35u8, 139u8, 11u8, 41u8, - 163u8, 143u8, 156u8, 236u8, 207u8, 132u8, 138u8, 2u8, - 176u8, 56u8, 224u8, 67u8, 39u8, 190u8, 13u8, - ] - { - let entry = VotingOf(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "VotingOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 211u8, 38u8, 232u8, 65u8, 215u8, 97u8, 157u8, 208u8, 177u8, + 150u8, 250u8, 226u8, 72u8, 185u8, 187u8, 162u8, 80u8, 67u8, + 195u8, 87u8, 190u8, 180u8, 167u8, 137u8, 253u8, 142u8, 34u8, + 158u8, 249u8, 168u8, 209u8, 18u8, + ], + ) } #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] #[doc = ""] #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] - pub fn voting_of_iter( + pub fn voting_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, VotingOf<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 194u8, 13u8, 151u8, 207u8, 194u8, 79u8, 233u8, 214u8, - 193u8, 52u8, 78u8, 62u8, 71u8, 35u8, 139u8, 11u8, 41u8, - 163u8, 143u8, 156u8, 236u8, 207u8, 132u8, 138u8, 2u8, - 176u8, 56u8, 224u8, 67u8, 39u8, 190u8, 13u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "VotingOf", + Vec::new(), + [ + 211u8, 38u8, 232u8, 65u8, 215u8, 97u8, 157u8, 208u8, 177u8, + 150u8, 250u8, 226u8, 72u8, 185u8, 187u8, 162u8, 80u8, 67u8, + 195u8, 87u8, 190u8, 180u8, 167u8, 137u8, 253u8, 142u8, 34u8, + 158u8, 249u8, 168u8, 209u8, 18u8, + ], + ) } #[doc = " True if the last referendum tabled was submitted externally. False if it was a public"] #[doc = " proposal."] pub fn last_tabled_was_external( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 3u8, 67u8, 106u8, 1u8, 89u8, 204u8, 4u8, 145u8, 121u8, - 44u8, 34u8, 76u8, 18u8, 206u8, 65u8, 214u8, 222u8, 82u8, - 31u8, 223u8, 144u8, 169u8, 17u8, 6u8, 138u8, 36u8, 113u8, - 155u8, 241u8, 106u8, 189u8, 218u8, - ] - { - let entry = LastTabledWasExternal; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "LastTabledWasExternal", + vec![], + [ + 3u8, 67u8, 106u8, 1u8, 89u8, 204u8, 4u8, 145u8, 121u8, 44u8, + 34u8, 76u8, 18u8, 206u8, 65u8, 214u8, 222u8, 82u8, 31u8, + 223u8, 144u8, 169u8, 17u8, 6u8, 138u8, 36u8, 113u8, 155u8, + 241u8, 106u8, 189u8, 218u8, + ], + ) } #[doc = " The referendum to be tabled whenever it would be valid to table an external proposal."] #[doc = " This happens when a referendum needs to be tabled and one of two conditions are met:"] #[doc = " - `LastTabledWasExternal` is `false`; or"] - #[doc = " - `PublicProps` is empty."] pub fn next_external (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < (:: subxt :: sp_core :: H256 , runtime_types :: pallet_democracy :: vote_threshold :: VoteThreshold ,) > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 167u8, 226u8, 113u8, 10u8, 12u8, 157u8, 190u8, 117u8, - 233u8, 177u8, 254u8, 126u8, 2u8, 55u8, 100u8, 249u8, - 78u8, 127u8, 148u8, 239u8, 193u8, 246u8, 123u8, 58u8, - 150u8, 132u8, 209u8, 228u8, 105u8, 195u8, 217u8, 99u8, - ] - { - let entry = NextExternal; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " - `PublicProps` is empty."] + pub fn next_external( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::ext::sp_core::H256, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + ), + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "NextExternal", + vec![], + [ + 123u8, 49u8, 252u8, 184u8, 75u8, 204u8, 16u8, 130u8, 43u8, + 109u8, 62u8, 113u8, 95u8, 0u8, 20u8, 163u8, 186u8, 210u8, + 253u8, 33u8, 58u8, 121u8, 36u8, 80u8, 9u8, 242u8, 180u8, + 230u8, 167u8, 250u8, 32u8, 180u8, + ], + ) } #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] #[doc = " (until when it may not be resubmitted) and who vetoed it."] pub fn blacklist( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u32, - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 9u8, 76u8, 174u8, 143u8, 210u8, 103u8, 197u8, 219u8, - 152u8, 134u8, 67u8, 78u8, 109u8, 39u8, 246u8, 214u8, 3u8, - 51u8, 69u8, 208u8, 32u8, 69u8, 247u8, 14u8, 236u8, 37u8, - 112u8, 226u8, 146u8, 169u8, 153u8, 217u8, - ] - { - let entry = Blacklist(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u32, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "Blacklist", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 93u8, 165u8, 219u8, 135u8, 41u8, 114u8, 144u8, 133u8, 171u8, + 83u8, 153u8, 157u8, 79u8, 14u8, 170u8, 29u8, 179u8, 23u8, + 222u8, 124u8, 237u8, 253u8, 122u8, 21u8, 186u8, 209u8, 184u8, + 89u8, 197u8, 5u8, 178u8, 255u8, + ], + ) } #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] #[doc = " (until when it may not be resubmitted) and who vetoed it."] - pub fn blacklist_iter( + pub fn blacklist_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Blacklist<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 9u8, 76u8, 174u8, 143u8, 210u8, 103u8, 197u8, 219u8, - 152u8, 134u8, 67u8, 78u8, 109u8, 39u8, 246u8, 214u8, 3u8, - 51u8, 69u8, 208u8, 32u8, 69u8, 247u8, 14u8, 236u8, 37u8, - 112u8, 226u8, 146u8, 169u8, 153u8, 217u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u32, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "Blacklist", + Vec::new(), + [ + 93u8, 165u8, 219u8, 135u8, 41u8, 114u8, 144u8, 133u8, 171u8, + 83u8, 153u8, 157u8, 79u8, 14u8, 170u8, 29u8, 179u8, 23u8, + 222u8, 124u8, 237u8, 253u8, 122u8, 21u8, 186u8, 209u8, 184u8, + 89u8, 197u8, 5u8, 178u8, 255u8, + ], + ) } #[doc = " Record of all proposals that have been subject to emergency cancellation."] pub fn cancellations( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 55u8, 142u8, 79u8, 35u8, 110u8, 215u8, 163u8, - 134u8, 172u8, 171u8, 71u8, 180u8, 175u8, 7u8, 29u8, - 126u8, 141u8, 236u8, 234u8, 214u8, 132u8, 192u8, 197u8, - 205u8, 31u8, 106u8, 122u8, 204u8, 71u8, 155u8, 18u8, - ] - { - let entry = Cancellations(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "Cancellations", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, + 186u8, 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8, + 47u8, 7u8, 17u8, 89u8, 169u8, 166u8, 236u8, 101u8, 68u8, + 54u8, 114u8, 141u8, 177u8, 135u8, + ], + ) } #[doc = " Record of all proposals that have been subject to emergency cancellation."] - pub fn cancellations_iter( + pub fn cancellations_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Cancellations<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 55u8, 142u8, 79u8, 35u8, 110u8, 215u8, 163u8, - 134u8, 172u8, 171u8, 71u8, 180u8, 175u8, 7u8, 29u8, - 126u8, 141u8, 236u8, 234u8, 214u8, 132u8, 192u8, 197u8, - 205u8, 31u8, 106u8, 122u8, 204u8, 71u8, 155u8, 18u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "Cancellations", + Vec::new(), + [ + 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, + 186u8, 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8, + 47u8, 7u8, 17u8, 89u8, 169u8, 166u8, 236u8, 101u8, 68u8, + 54u8, 114u8, 141u8, 177u8, 135u8, + ], + ) } #[doc = " Storage version of the pallet."] #[doc = ""] #[doc = " New networks start with last version."] pub fn storage_version( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 39u8, 219u8, 134u8, 64u8, 250u8, 96u8, 95u8, 156u8, - 100u8, 236u8, 18u8, 78u8, 59u8, 146u8, 5u8, 245u8, 113u8, - 125u8, 220u8, 140u8, 125u8, 5u8, 194u8, 134u8, 248u8, - 95u8, 250u8, 108u8, 142u8, 230u8, 21u8, 120u8, - ] - { - let entry = StorageVersion; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_democracy::Releases, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Democracy", + "StorageVersion", + vec![], + [ + 39u8, 219u8, 134u8, 64u8, 250u8, 96u8, 95u8, 156u8, 100u8, + 236u8, 18u8, 78u8, 59u8, 146u8, 5u8, 245u8, 113u8, 125u8, + 220u8, 140u8, 125u8, 5u8, 194u8, 134u8, 248u8, 95u8, 250u8, + 108u8, 142u8, 230u8, 21u8, 120u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The period between a proposal being approved and enacted."] #[doc = ""] #[doc = " It should generally be a little more than the unstake period to ensure that"] @@ -15007,74 +10166,56 @@ pub mod api { #[doc = " where they are on the losing side of a vote."] pub fn enactment_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "EnactmentPeriod")? - == [ - 227u8, 73u8, 197u8, 72u8, 142u8, 160u8, 229u8, 180u8, 110u8, - 6u8, 124u8, 129u8, 184u8, 113u8, 222u8, 215u8, 48u8, 18u8, - 122u8, 154u8, 102u8, 11u8, 104u8, 133u8, 113u8, 173u8, 206u8, - 238u8, 58u8, 198u8, 200u8, 246u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("EnactmentPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "EnactmentPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " How often (in blocks) new public referenda are launched."] pub fn launch_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "LaunchPeriod")? - == [ - 107u8, 166u8, 54u8, 10u8, 127u8, 204u8, 15u8, 249u8, 71u8, - 253u8, 175u8, 240u8, 150u8, 89u8, 148u8, 152u8, 66u8, 26u8, - 113u8, 84u8, 118u8, 106u8, 160u8, 240u8, 157u8, 248u8, 230u8, - 38u8, 62u8, 210u8, 23u8, 60u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("LaunchPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "LaunchPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " How often (in blocks) to check for new votes."] pub fn voting_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "VotingPeriod")? - == [ - 53u8, 228u8, 6u8, 131u8, 171u8, 179u8, 33u8, 29u8, 46u8, - 186u8, 198u8, 72u8, 94u8, 151u8, 172u8, 181u8, 89u8, 81u8, - 247u8, 11u8, 103u8, 94u8, 225u8, 61u8, 194u8, 169u8, 18u8, - 100u8, 162u8, 17u8, 202u8, 243u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("VotingPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "VotingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The minimum period of vote locking."] #[doc = ""] @@ -15082,148 +10223,112 @@ pub mod api { #[doc = " those successful voters are locked into the consequences that their votes entail."] pub fn vote_locking_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "VoteLockingPeriod")? - == [ - 30u8, 71u8, 100u8, 117u8, 139u8, 71u8, 77u8, 189u8, 33u8, - 64u8, 110u8, 164u8, 172u8, 225u8, 163u8, 83u8, 210u8, 130u8, - 108u8, 57u8, 169u8, 55u8, 190u8, 140u8, 68u8, 0u8, 45u8, - 179u8, 115u8, 239u8, 13u8, 179u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("VoteLockingPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "VoteLockingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] pub fn minimum_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "MinimumDeposit")? - == [ - 13u8, 97u8, 190u8, 80u8, 197u8, 219u8, 115u8, 167u8, 134u8, - 146u8, 163u8, 219u8, 46u8, 173u8, 77u8, 197u8, 212u8, 95u8, - 47u8, 29u8, 234u8, 36u8, 175u8, 32u8, 16u8, 46u8, 180u8, - 141u8, 204u8, 178u8, 56u8, 123u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("MinimumDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "MinimumDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Indicator for whether an emergency origin is even allowed to happen. Some chains may"] #[doc = " want to set this permanently to `false`, others may want to condition it on things such"] #[doc = " as an upgrade having happened recently."] pub fn instant_allowed( &self, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "InstantAllowed")? - == [ - 66u8, 19u8, 43u8, 75u8, 149u8, 2u8, 157u8, 136u8, 33u8, - 102u8, 57u8, 127u8, 246u8, 72u8, 14u8, 94u8, 240u8, 2u8, - 162u8, 86u8, 232u8, 70u8, 22u8, 133u8, 209u8, 205u8, 115u8, - 236u8, 17u8, 9u8, 37u8, 14u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("InstantAllowed")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "InstantAllowed", + [ + 165u8, 28u8, 112u8, 190u8, 18u8, 129u8, 182u8, 206u8, 237u8, + 1u8, 68u8, 252u8, 125u8, 234u8, 185u8, 50u8, 149u8, 164u8, + 47u8, 126u8, 134u8, 100u8, 14u8, 86u8, 209u8, 39u8, 20u8, + 4u8, 233u8, 115u8, 102u8, 131u8, + ], + ) } #[doc = " Minimum voting period allowed for a fast-track referendum."] pub fn fast_track_voting_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "FastTrackVotingPeriod")? - == [ - 72u8, 110u8, 169u8, 125u8, 65u8, 142u8, 75u8, 117u8, 252u8, - 246u8, 35u8, 219u8, 65u8, 54u8, 101u8, 225u8, 34u8, 125u8, - 233u8, 19u8, 193u8, 67u8, 103u8, 150u8, 205u8, 226u8, 235u8, - 246u8, 251u8, 38u8, 254u8, 243u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("FastTrackVotingPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "FastTrackVotingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Period in blocks where an external proposal may not be re-submitted after being vetoed."] pub fn cooloff_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "CooloffPeriod")? - == [ - 216u8, 225u8, 208u8, 207u8, 23u8, 216u8, 8u8, 144u8, 183u8, - 173u8, 133u8, 8u8, 63u8, 177u8, 86u8, 208u8, 183u8, 201u8, - 123u8, 18u8, 235u8, 166u8, 192u8, 226u8, 172u8, 212u8, 62u8, - 73u8, 89u8, 181u8, 16u8, 103u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("CooloffPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "CooloffPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The amount of balance that must be deposited per byte of preimage stored."] pub fn preimage_byte_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "PreimageByteDeposit")? - == [ - 123u8, 228u8, 214u8, 37u8, 90u8, 98u8, 166u8, 29u8, 231u8, - 48u8, 110u8, 195u8, 211u8, 149u8, 127u8, 243u8, 22u8, 2u8, - 191u8, 68u8, 128u8, 133u8, 246u8, 20u8, 158u8, 117u8, 181u8, - 154u8, 141u8, 104u8, 128u8, 68u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("PreimageByteDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "PreimageByteDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The maximum number of votes for an account."] #[doc = ""] @@ -15231,87 +10336,77 @@ pub mod api { #[doc = " lead to extrinsic with very big weight: see `delegate` for instance."] pub fn max_votes( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "MaxVotes")? - == [ - 218u8, 111u8, 73u8, 160u8, 254u8, 247u8, 22u8, 113u8, 78u8, - 79u8, 145u8, 255u8, 29u8, 155u8, 89u8, 144u8, 4u8, 167u8, - 134u8, 190u8, 232u8, 124u8, 36u8, 207u8, 7u8, 204u8, 40u8, - 32u8, 38u8, 216u8, 249u8, 29u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("MaxVotes")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "MaxVotes", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The maximum number of public proposals that can exist at any time."] pub fn max_proposals( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Democracy", "MaxProposals")? - == [ - 125u8, 103u8, 31u8, 211u8, 29u8, 50u8, 100u8, 13u8, 229u8, - 120u8, 216u8, 228u8, 4u8, 121u8, 229u8, 90u8, 172u8, 228u8, - 86u8, 73u8, 64u8, 153u8, 249u8, 48u8, 232u8, 150u8, 150u8, - 65u8, 205u8, 182u8, 12u8, 81u8, - ] - { - let pallet = metadata.pallet("Democracy")?; - let constant = pallet.constant("MaxProposals")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Democracy", + "MaxProposals", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod council { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - pub prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub new_members: + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub prime: + ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, pub old_count: ::core::primitive::u32, } - impl ::subxt::Call for SetMembers { - const PALLET: &'static str = "Council"; - const FUNCTION: &'static str = "set_members"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Execute { pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Execute { - const PALLET: &'static str = "Council"; - const FUNCTION: &'static str = "execute"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Propose { #[codec(compact)] pub threshold: ::core::primitive::u32, @@ -15319,24 +10414,24 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Propose { - const PALLET: &'static str = "Council"; - const FUNCTION: &'static str = "propose"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Vote { - pub proposal: ::subxt::sp_core::H256, + pub proposal: ::subxt::ext::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { - const PALLET: &'static str = "Council"; - const FUNCTION: &'static str = "vote"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Close { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] @@ -15344,33 +10439,16 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Close { - const PALLET: &'static str = "Council"; - const FUNCTION: &'static str = "close"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct DisapproveProposal { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Call for DisapproveProposal { - const PALLET: &'static str = "Council"; - const FUNCTION: &'static str = "disapprove_proposal"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Set the collective's membership."] #[doc = ""] #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] @@ -15405,42 +10483,34 @@ pub mod api { #[doc = "# "] pub fn set_members( &self, - new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - old_count: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMembers, - DispatchError, - root_mod::Event, + new_members: ::std::vec::Vec< + ::subxt::ext::sp_core::crypto::AccountId32, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 228u8, 186u8, 17u8, 12u8, 231u8, 231u8, 139u8, 15u8, 96u8, - 200u8, 68u8, 27u8, 61u8, 106u8, 245u8, 199u8, 120u8, 141u8, - 95u8, 215u8, 36u8, 49u8, 0u8, 163u8, 172u8, 252u8, 221u8, - 9u8, 1u8, 222u8, 44u8, 214u8, - ] - { - let call = SetMembers { - new_members, - prime, - old_count, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + prime: ::core::option::Option< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + old_count: ::core::primitive::u32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Council", + call: "set_members", + data: SetMembers { + new_members, + prime, + old_count, + }, + }, + [ + 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, + 114u8, 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, + 126u8, 126u8, 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, + 222u8, 90u8, 1u8, 2u8, 234u8, + ], + ) } #[doc = "Dispatch a proposal from a member using the `Member` origin."] #[doc = ""] @@ -15457,38 +10527,26 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Execute, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 220u8, 252u8, 255u8, 167u8, 88u8, 242u8, 119u8, 7u8, 5u8, - 239u8, 103u8, 220u8, 50u8, 118u8, 103u8, 53u8, 98u8, 181u8, - 118u8, 56u8, 74u8, 223u8, 192u8, 15u8, 175u8, 108u8, 76u8, - 19u8, 109u8, 11u8, 253u8, 48u8, - ] - { - let call = Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Council", + call: "execute", + data: Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + }, + [ + 33u8, 251u8, 197u8, 226u8, 205u8, 157u8, 230u8, 48u8, 209u8, + 221u8, 174u8, 102u8, 151u8, 204u8, 26u8, 44u8, 62u8, 89u8, + 233u8, 113u8, 48u8, 77u8, 110u8, 219u8, 165u8, 108u8, 66u8, + 85u8, 35u8, 59u8, 67u8, 245u8, + ], + ) } #[doc = "Add a new proposal to either be voted on or executed directly."] #[doc = ""] @@ -15522,39 +10580,27 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Propose, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 129u8, 211u8, 11u8, 197u8, 105u8, 143u8, 4u8, 133u8, 237u8, - 211u8, 117u8, 57u8, 39u8, 139u8, 57u8, 198u8, 75u8, 63u8, - 158u8, 17u8, 239u8, 76u8, 189u8, 142u8, 253u8, 137u8, 236u8, - 214u8, 151u8, 121u8, 186u8, 26u8, - ] - { - let call = Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Council", + call: "propose", + data: Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + }, + [ + 247u8, 17u8, 193u8, 12u8, 110u8, 242u8, 5u8, 205u8, 136u8, + 31u8, 130u8, 60u8, 101u8, 145u8, 131u8, 199u8, 221u8, 183u8, + 165u8, 9u8, 182u8, 204u8, 134u8, 160u8, 78u8, 22u8, 83u8, + 178u8, 97u8, 66u8, 183u8, 38u8, + ], + ) } #[doc = "Add an aye or nay vote for the sender to the given proposal."] #[doc = ""] @@ -15573,42 +10619,30 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - proposal: ::subxt::sp_core::H256, + proposal: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Vote, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 184u8, 236u8, 80u8, 133u8, 26u8, 207u8, 3u8, 2u8, 120u8, - 27u8, 38u8, 135u8, 195u8, 86u8, 169u8, 229u8, 125u8, 253u8, - 220u8, 120u8, 231u8, 181u8, 101u8, 84u8, 151u8, 161u8, 39u8, - 154u8, 183u8, 142u8, 165u8, 161u8, - ] - { - let call = Vote { - proposal, - index, - approve, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Council", + call: "vote", + data: Vote { + proposal, + index, + approve, + }, + }, + [ + 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, + 100u8, 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8, + 80u8, 134u8, 14u8, 42u8, 248u8, 205u8, 68u8, 92u8, 79u8, + 11u8, 113u8, 115u8, 157u8, 100u8, + ], + ) } #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] #[doc = ""] @@ -15644,44 +10678,32 @@ pub mod api { #[doc = "# "] pub fn close( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Close, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 242u8, 208u8, 108u8, 202u8, 24u8, 139u8, 8u8, 150u8, 108u8, - 217u8, 30u8, 209u8, 178u8, 1u8, 80u8, 25u8, 154u8, 146u8, - 173u8, 172u8, 227u8, 4u8, 140u8, 228u8, 58u8, 221u8, 189u8, - 135u8, 203u8, 69u8, 105u8, 47u8, - ] - { - let call = Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Council", + call: "close", + data: Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, + }, + [ + 88u8, 8u8, 33u8, 184u8, 4u8, 97u8, 120u8, 237u8, 43u8, 183u8, + 130u8, 139u8, 65u8, 74u8, 166u8, 119u8, 246u8, 65u8, 132u8, + 219u8, 118u8, 69u8, 182u8, 195u8, 111u8, 204u8, 107u8, 78u8, + 152u8, 218u8, 181u8, 208u8, + ], + ) } #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] #[doc = "state."] @@ -15699,36 +10721,24 @@ pub mod api { #[doc = "# "] pub fn disapprove_proposal( &self, - proposal_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - DisapproveProposal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 199u8, 113u8, 221u8, 167u8, 60u8, 241u8, 77u8, 166u8, 205u8, - 191u8, 183u8, 121u8, 191u8, 206u8, 230u8, 212u8, 215u8, - 219u8, 30u8, 51u8, 123u8, 18u8, 17u8, 218u8, 77u8, 227u8, - 197u8, 95u8, 232u8, 59u8, 169u8, 133u8, - ] - { - let call = DisapproveProposal { proposal_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + proposal_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Council", + call: "disapprove_proposal", + data: DisapproveProposal { proposal_hash }, + }, + [ + 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, + 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, + 125u8, 199u8, 51u8, 17u8, 225u8, 133u8, 38u8, 120u8, 76u8, + 164u8, 5u8, 194u8, 201u8, + ], + ) } } } @@ -15736,482 +10746,339 @@ pub mod api { pub type Event = runtime_types::pallet_collective::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] pub struct Proposed { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub threshold: ::core::primitive::u32, } - impl ::subxt::Event for Proposed { + impl ::subxt::events::StaticEvent for Proposed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::sp_core::H256, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub voted: ::core::primitive::bool, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, } - impl ::subxt::Event for Voted { + impl ::subxt::events::StaticEvent for Voted { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Voted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion was approved by the required threshold."] pub struct Approved { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Approved { + impl ::subxt::events::StaticEvent for Approved { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Approved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion was not approved by the required threshold."] pub struct Disapproved { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Disapproved { + impl ::subxt::events::StaticEvent for Disapproved { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Disapproved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] pub struct Executed { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for Executed { + impl ::subxt::events::StaticEvent for Executed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Executed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] pub struct MemberExecuted { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for MemberExecuted { + impl ::subxt::events::StaticEvent for MemberExecuted { const PALLET: &'static str = "Council"; const EVENT: &'static str = "MemberExecuted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] pub struct Closed { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, } - impl ::subxt::Event for Closed { + impl ::subxt::events::StaticEvent for Closed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Closed"; } } pub mod storage { use super::runtime_types; - pub struct Proposals; - impl ::subxt::StorageEntry for Proposals { - const PALLET: &'static str = "Council"; - const STORAGE: &'static str = "Proposals"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::H256, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ProposalOf<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for ProposalOf<'_> { - const PALLET: &'static str = "Council"; - const STORAGE: &'static str = "ProposalOf"; - type Value = runtime_types::polkadot_runtime::Call; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct Voting<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Voting<'_> { - const PALLET: &'static str = "Council"; - const STORAGE: &'static str = "Voting"; - type Value = runtime_types::pallet_collective::Votes< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct ProposalCount; - impl ::subxt::StorageEntry for ProposalCount { - const PALLET: &'static str = "Council"; - const STORAGE: &'static str = "ProposalCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Members; - impl ::subxt::StorageEntry for Members { - const PALLET: &'static str = "Council"; - const STORAGE: &'static str = "Members"; - type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Prime; - impl ::subxt::StorageEntry for Prime { - const PALLET: &'static str = "Council"; - const STORAGE: &'static str = "Prime"; - type Value = ::subxt::sp_core::crypto::AccountId32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The hashes of the active proposals."] pub fn proposals( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::H256, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::H256, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 75u8, 108u8, 245u8, 86u8, 50u8, 107u8, 212u8, - 244u8, 113u8, 232u8, 168u8, 194u8, 33u8, 247u8, 97u8, - 54u8, 115u8, 236u8, 189u8, 59u8, 2u8, 252u8, 84u8, 199u8, - 127u8, 197u8, 72u8, 23u8, 1u8, 118u8, 95u8, - ] - { - let entry = Proposals; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "Proposals", + vec![], + [ + 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, + 96u8, 249u8, 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, + 237u8, 231u8, 238u8, 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, + 220u8, 114u8, 217u8, 100u8, 27u8, + ], + ) } #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 161u8, 189u8, 214u8, 228u8, 141u8, 241u8, 207u8, 45u8, - 15u8, 55u8, 4u8, 183u8, 17u8, 169u8, 209u8, 157u8, 51u8, - 244u8, 241u8, 34u8, 139u8, 219u8, 155u8, 41u8, 116u8, - 117u8, 171u8, 156u8, 247u8, 44u8, 203u8, 214u8, - ] - { - let entry = ProposalOf(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime::Call, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "ProposalOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 60u8, 175u8, 110u8, 170u8, 166u8, 54u8, 206u8, 178u8, 126u8, + 151u8, 46u8, 160u8, 245u8, 230u8, 165u8, 139u8, 9u8, 171u8, + 126u8, 223u8, 199u8, 70u8, 245u8, 146u8, 115u8, 2u8, 78u8, + 33u8, 54u8, 144u8, 247u8, 27u8, + ], + ) } #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of_iter( + pub fn proposal_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 161u8, 189u8, 214u8, 228u8, 141u8, 241u8, 207u8, 45u8, - 15u8, 55u8, 4u8, 183u8, 17u8, 169u8, 209u8, 157u8, 51u8, - 244u8, 241u8, 34u8, 139u8, 219u8, 155u8, 41u8, 116u8, - 117u8, 171u8, 156u8, 247u8, 44u8, 203u8, 214u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime::Call, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "ProposalOf", + Vec::new(), + [ + 60u8, 175u8, 110u8, 170u8, 166u8, 54u8, 206u8, 178u8, 126u8, + 151u8, 46u8, 160u8, 245u8, 230u8, 165u8, 139u8, 9u8, 171u8, + 126u8, 223u8, 199u8, 70u8, 245u8, 146u8, 115u8, 2u8, 78u8, + 33u8, 54u8, 144u8, 247u8, 27u8, + ], + ) } #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_collective::Votes< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 145u8, 223u8, 203u8, 2u8, 137u8, 33u8, 22u8, 239u8, - 175u8, 149u8, 254u8, 185u8, 0u8, 139u8, 71u8, 134u8, - 109u8, 95u8, 45u8, 75u8, 33u8, 228u8, 127u8, 67u8, 53u8, - 119u8, 188u8, 198u8, 11u8, 92u8, 4u8, 177u8, - ] - { - let entry = Voting(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "Voting", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, + 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, + 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, + 217u8, 240u8, 230u8, 107u8, 221u8, + ], + ) } #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_iter( + pub fn voting_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Voting<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 145u8, 223u8, 203u8, 2u8, 137u8, 33u8, 22u8, 239u8, - 175u8, 149u8, 254u8, 185u8, 0u8, 139u8, 71u8, 134u8, - 109u8, 95u8, 45u8, 75u8, 33u8, 228u8, 127u8, 67u8, 53u8, - 119u8, 188u8, 198u8, 11u8, 92u8, 4u8, 177u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "Voting", + Vec::new(), + [ + 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, + 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, + 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, + 217u8, 240u8, 230u8, 107u8, 221u8, + ], + ) } #[doc = " Proposals so far."] pub fn proposal_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, - 143u8, 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, - 154u8, 110u8, 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, - 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, 70u8, - ] - { - let entry = ProposalCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "ProposalCount", + vec![], + [ + 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, + 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, + 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, + 177u8, 127u8, 160u8, 34u8, 70u8, + ], + ) } #[doc = " The current members of the collective. This is stored sorted (just by value)."] pub fn members( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 136u8, 91u8, 140u8, 173u8, 238u8, 221u8, 4u8, 132u8, - 238u8, 99u8, 195u8, 142u8, 10u8, 35u8, 210u8, 227u8, - 22u8, 72u8, 218u8, 222u8, 227u8, 51u8, 55u8, 31u8, 252u8, - 78u8, 195u8, 11u8, 195u8, 242u8, 171u8, 75u8, - ] - { - let entry = Members; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "Members", + vec![], + [ + 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, + 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, + 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, + 71u8, 125u8, 56u8, 129u8, 222u8, + ], + ) } #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] pub fn prime( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 70u8, 101u8, 20u8, 160u8, 173u8, 87u8, 190u8, 85u8, 60u8, - 249u8, 144u8, 77u8, 175u8, 195u8, 51u8, 196u8, 234u8, - 62u8, 243u8, 199u8, 126u8, 12u8, 88u8, 252u8, 1u8, 210u8, - 65u8, 210u8, 33u8, 19u8, 222u8, 11u8, - ] - { - let entry = Prime; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Council", + "Prime", + vec![], + [ + 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, + 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, + 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, + 158u8, 159u8, 217u8, 244u8, 158u8, + ], + ) } } } } pub mod technical_committee { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - pub prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub new_members: + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + pub prime: + ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, pub old_count: ::core::primitive::u32, } - impl ::subxt::Call for SetMembers { - const PALLET: &'static str = "TechnicalCommittee"; - const FUNCTION: &'static str = "set_members"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Execute { pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Execute { - const PALLET: &'static str = "TechnicalCommittee"; - const FUNCTION: &'static str = "execute"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Propose { #[codec(compact)] pub threshold: ::core::primitive::u32, @@ -16219,24 +11086,24 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Propose { - const PALLET: &'static str = "TechnicalCommittee"; - const FUNCTION: &'static str = "propose"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Vote { - pub proposal: ::subxt::sp_core::H256, + pub proposal: ::subxt::ext::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { - const PALLET: &'static str = "TechnicalCommittee"; - const FUNCTION: &'static str = "vote"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Close { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] @@ -16244,33 +11111,16 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Close { - const PALLET: &'static str = "TechnicalCommittee"; - const FUNCTION: &'static str = "close"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct DisapproveProposal { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Call for DisapproveProposal { - const PALLET: &'static str = "TechnicalCommittee"; - const FUNCTION: &'static str = "disapprove_proposal"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Set the collective's membership."] #[doc = ""] #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] @@ -16305,42 +11155,34 @@ pub mod api { #[doc = "# "] pub fn set_members( &self, - new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - old_count: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMembers, - DispatchError, - root_mod::Event, + new_members: ::std::vec::Vec< + ::subxt::ext::sp_core::crypto::AccountId32, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 228u8, 186u8, 17u8, 12u8, 231u8, 231u8, 139u8, 15u8, 96u8, - 200u8, 68u8, 27u8, 61u8, 106u8, 245u8, 199u8, 120u8, 141u8, - 95u8, 215u8, 36u8, 49u8, 0u8, 163u8, 172u8, 252u8, 221u8, - 9u8, 1u8, 222u8, 44u8, 214u8, - ] - { - let call = SetMembers { - new_members, - prime, - old_count, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + prime: ::core::option::Option< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + old_count: ::core::primitive::u32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalCommittee", + call: "set_members", + data: SetMembers { + new_members, + prime, + old_count, + }, + }, + [ + 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, + 114u8, 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, + 126u8, 126u8, 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, + 222u8, 90u8, 1u8, 2u8, 234u8, + ], + ) } #[doc = "Dispatch a proposal from a member using the `Member` origin."] #[doc = ""] @@ -16357,38 +11199,26 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Execute, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 220u8, 252u8, 255u8, 167u8, 88u8, 242u8, 119u8, 7u8, 5u8, - 239u8, 103u8, 220u8, 50u8, 118u8, 103u8, 53u8, 98u8, 181u8, - 118u8, 56u8, 74u8, 223u8, 192u8, 15u8, 175u8, 108u8, 76u8, - 19u8, 109u8, 11u8, 253u8, 48u8, - ] - { - let call = Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalCommittee", + call: "execute", + data: Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + }, + [ + 33u8, 251u8, 197u8, 226u8, 205u8, 157u8, 230u8, 48u8, 209u8, + 221u8, 174u8, 102u8, 151u8, 204u8, 26u8, 44u8, 62u8, 89u8, + 233u8, 113u8, 48u8, 77u8, 110u8, 219u8, 165u8, 108u8, 66u8, + 85u8, 35u8, 59u8, 67u8, 245u8, + ], + ) } #[doc = "Add a new proposal to either be voted on or executed directly."] #[doc = ""] @@ -16422,39 +11252,27 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Propose, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 129u8, 211u8, 11u8, 197u8, 105u8, 143u8, 4u8, 133u8, 237u8, - 211u8, 117u8, 57u8, 39u8, 139u8, 57u8, 198u8, 75u8, 63u8, - 158u8, 17u8, 239u8, 76u8, 189u8, 142u8, 253u8, 137u8, 236u8, - 214u8, 151u8, 121u8, 186u8, 26u8, - ] - { - let call = Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalCommittee", + call: "propose", + data: Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + }, + [ + 247u8, 17u8, 193u8, 12u8, 110u8, 242u8, 5u8, 205u8, 136u8, + 31u8, 130u8, 60u8, 101u8, 145u8, 131u8, 199u8, 221u8, 183u8, + 165u8, 9u8, 182u8, 204u8, 134u8, 160u8, 78u8, 22u8, 83u8, + 178u8, 97u8, 66u8, 183u8, 38u8, + ], + ) } #[doc = "Add an aye or nay vote for the sender to the given proposal."] #[doc = ""] @@ -16473,42 +11291,30 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - proposal: ::subxt::sp_core::H256, + proposal: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Vote, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 184u8, 236u8, 80u8, 133u8, 26u8, 207u8, 3u8, 2u8, 120u8, - 27u8, 38u8, 135u8, 195u8, 86u8, 169u8, 229u8, 125u8, 253u8, - 220u8, 120u8, 231u8, 181u8, 101u8, 84u8, 151u8, 161u8, 39u8, - 154u8, 183u8, 142u8, 165u8, 161u8, - ] - { - let call = Vote { - proposal, - index, - approve, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalCommittee", + call: "vote", + data: Vote { + proposal, + index, + approve, + }, + }, + [ + 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, + 100u8, 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8, + 80u8, 134u8, 14u8, 42u8, 248u8, 205u8, 68u8, 92u8, 79u8, + 11u8, 113u8, 115u8, 157u8, 100u8, + ], + ) } #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] #[doc = ""] @@ -16544,44 +11350,32 @@ pub mod api { #[doc = "# "] pub fn close( &self, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Close, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 242u8, 208u8, 108u8, 202u8, 24u8, 139u8, 8u8, 150u8, 108u8, - 217u8, 30u8, 209u8, 178u8, 1u8, 80u8, 25u8, 154u8, 146u8, - 173u8, 172u8, 227u8, 4u8, 140u8, 228u8, 58u8, 221u8, 189u8, - 135u8, 203u8, 69u8, 105u8, 47u8, - ] - { - let call = Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalCommittee", + call: "close", + data: Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, + }, + [ + 88u8, 8u8, 33u8, 184u8, 4u8, 97u8, 120u8, 237u8, 43u8, 183u8, + 130u8, 139u8, 65u8, 74u8, 166u8, 119u8, 246u8, 65u8, 132u8, + 219u8, 118u8, 69u8, 182u8, 195u8, 111u8, 204u8, 107u8, 78u8, + 152u8, 218u8, 181u8, 208u8, + ], + ) } #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] #[doc = "state."] @@ -16599,36 +11393,24 @@ pub mod api { #[doc = "# "] pub fn disapprove_proposal( &self, - proposal_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - DisapproveProposal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 199u8, 113u8, 221u8, 167u8, 60u8, 241u8, 77u8, 166u8, 205u8, - 191u8, 183u8, 121u8, 191u8, 206u8, 230u8, 212u8, 215u8, - 219u8, 30u8, 51u8, 123u8, 18u8, 17u8, 218u8, 77u8, 227u8, - 197u8, 95u8, 232u8, 59u8, 169u8, 133u8, - ] - { - let call = DisapproveProposal { proposal_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + proposal_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalCommittee", + call: "disapprove_proposal", + data: DisapproveProposal { proposal_hash }, + }, + [ + 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, + 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, + 125u8, 199u8, 51u8, 17u8, 225u8, 133u8, 38u8, 120u8, 76u8, + 164u8, 5u8, 194u8, 201u8, + ], + ) } } } @@ -16636,530 +11418,368 @@ pub mod api { pub type Event = runtime_types::pallet_collective::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] pub struct Proposed { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub threshold: ::core::primitive::u32, } - impl ::subxt::Event for Proposed { + impl ::subxt::events::StaticEvent for Proposed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::sp_core::H256, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub voted: ::core::primitive::bool, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, } - impl ::subxt::Event for Voted { + impl ::subxt::events::StaticEvent for Voted { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Voted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion was approved by the required threshold."] pub struct Approved { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Approved { + impl ::subxt::events::StaticEvent for Approved { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Approved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion was not approved by the required threshold."] pub struct Disapproved { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Disapproved { + impl ::subxt::events::StaticEvent for Disapproved { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Disapproved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] pub struct Executed { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for Executed { + impl ::subxt::events::StaticEvent for Executed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Executed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] pub struct MemberExecuted { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for MemberExecuted { + impl ::subxt::events::StaticEvent for MemberExecuted { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "MemberExecuted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] pub struct Closed { - pub proposal_hash: ::subxt::sp_core::H256, + pub proposal_hash: ::subxt::ext::sp_core::H256, pub yes: ::core::primitive::u32, pub no: ::core::primitive::u32, } - impl ::subxt::Event for Closed { + impl ::subxt::events::StaticEvent for Closed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Closed"; } } pub mod storage { use super::runtime_types; - pub struct Proposals; - impl ::subxt::StorageEntry for Proposals { - const PALLET: &'static str = "TechnicalCommittee"; - const STORAGE: &'static str = "Proposals"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::H256, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ProposalOf<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for ProposalOf<'_> { - const PALLET: &'static str = "TechnicalCommittee"; - const STORAGE: &'static str = "ProposalOf"; - type Value = runtime_types::polkadot_runtime::Call; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct Voting<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Voting<'_> { - const PALLET: &'static str = "TechnicalCommittee"; - const STORAGE: &'static str = "Voting"; - type Value = runtime_types::pallet_collective::Votes< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct ProposalCount; - impl ::subxt::StorageEntry for ProposalCount { - const PALLET: &'static str = "TechnicalCommittee"; - const STORAGE: &'static str = "ProposalCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Members; - impl ::subxt::StorageEntry for Members { - const PALLET: &'static str = "TechnicalCommittee"; - const STORAGE: &'static str = "Members"; - type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Prime; - impl ::subxt::StorageEntry for Prime { - const PALLET: &'static str = "TechnicalCommittee"; - const STORAGE: &'static str = "Prime"; - type Value = ::subxt::sp_core::crypto::AccountId32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The hashes of the active proposals."] pub fn proposals( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::H256, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::H256, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 75u8, 108u8, 245u8, 86u8, 50u8, 107u8, 212u8, - 244u8, 113u8, 232u8, 168u8, 194u8, 33u8, 247u8, 97u8, - 54u8, 115u8, 236u8, 189u8, 59u8, 2u8, 252u8, 84u8, 199u8, - 127u8, 197u8, 72u8, 23u8, 1u8, 118u8, 95u8, - ] - { - let entry = Proposals; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "Proposals", + vec![], + [ + 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, + 96u8, 249u8, 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, + 237u8, 231u8, 238u8, 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, + 220u8, 114u8, 217u8, 100u8, 27u8, + ], + ) } #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 161u8, 189u8, 214u8, 228u8, 141u8, 241u8, 207u8, 45u8, - 15u8, 55u8, 4u8, 183u8, 17u8, 169u8, 209u8, 157u8, 51u8, - 244u8, 241u8, 34u8, 139u8, 219u8, 155u8, 41u8, 116u8, - 117u8, 171u8, 156u8, 247u8, 44u8, 203u8, 214u8, - ] - { - let entry = ProposalOf(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime::Call, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "ProposalOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 60u8, 175u8, 110u8, 170u8, 166u8, 54u8, 206u8, 178u8, 126u8, + 151u8, 46u8, 160u8, 245u8, 230u8, 165u8, 139u8, 9u8, 171u8, + 126u8, 223u8, 199u8, 70u8, 245u8, 146u8, 115u8, 2u8, 78u8, + 33u8, 54u8, 144u8, 247u8, 27u8, + ], + ) } #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of_iter( + pub fn proposal_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 161u8, 189u8, 214u8, 228u8, 141u8, 241u8, 207u8, 45u8, - 15u8, 55u8, 4u8, 183u8, 17u8, 169u8, 209u8, 157u8, 51u8, - 244u8, 241u8, 34u8, 139u8, 219u8, 155u8, 41u8, 116u8, - 117u8, 171u8, 156u8, 247u8, 44u8, 203u8, 214u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime::Call, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "ProposalOf", + Vec::new(), + [ + 60u8, 175u8, 110u8, 170u8, 166u8, 54u8, 206u8, 178u8, 126u8, + 151u8, 46u8, 160u8, 245u8, 230u8, 165u8, 139u8, 9u8, 171u8, + 126u8, 223u8, 199u8, 70u8, 245u8, 146u8, 115u8, 2u8, 78u8, + 33u8, 54u8, 144u8, 247u8, 27u8, + ], + ) } #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_collective::Votes< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 145u8, 223u8, 203u8, 2u8, 137u8, 33u8, 22u8, 239u8, - 175u8, 149u8, 254u8, 185u8, 0u8, 139u8, 71u8, 134u8, - 109u8, 95u8, 45u8, 75u8, 33u8, 228u8, 127u8, 67u8, 53u8, - 119u8, 188u8, 198u8, 11u8, 92u8, 4u8, 177u8, - ] - { - let entry = Voting(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "Voting", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, + 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, + 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, + 217u8, 240u8, 230u8, 107u8, 221u8, + ], + ) } #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_iter( + pub fn voting_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Voting<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 145u8, 223u8, 203u8, 2u8, 137u8, 33u8, 22u8, 239u8, - 175u8, 149u8, 254u8, 185u8, 0u8, 139u8, 71u8, 134u8, - 109u8, 95u8, 45u8, 75u8, 33u8, 228u8, 127u8, 67u8, 53u8, - 119u8, 188u8, 198u8, 11u8, 92u8, 4u8, 177u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "Voting", + Vec::new(), + [ + 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, + 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, + 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, + 217u8, 240u8, 230u8, 107u8, 221u8, + ], + ) } #[doc = " Proposals so far."] pub fn proposal_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, - 143u8, 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, - 154u8, 110u8, 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, - 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, 70u8, - ] - { - let entry = ProposalCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "ProposalCount", + vec![], + [ + 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, + 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, + 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, + 177u8, 127u8, 160u8, 34u8, 70u8, + ], + ) } #[doc = " The current members of the collective. This is stored sorted (just by value)."] pub fn members( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 136u8, 91u8, 140u8, 173u8, 238u8, 221u8, 4u8, 132u8, - 238u8, 99u8, 195u8, 142u8, 10u8, 35u8, 210u8, 227u8, - 22u8, 72u8, 218u8, 222u8, 227u8, 51u8, 55u8, 31u8, 252u8, - 78u8, 195u8, 11u8, 195u8, 242u8, 171u8, 75u8, - ] - { - let entry = Members; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "Members", + vec![], + [ + 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, + 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, + 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, + 71u8, 125u8, 56u8, 129u8, 222u8, + ], + ) } #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] pub fn prime( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 70u8, 101u8, 20u8, 160u8, 173u8, 87u8, 190u8, 85u8, 60u8, - 249u8, 144u8, 77u8, 175u8, 195u8, 51u8, 196u8, 234u8, - 62u8, 243u8, 199u8, 126u8, 12u8, 88u8, 252u8, 1u8, 210u8, - 65u8, 210u8, 33u8, 19u8, 222u8, 11u8, - ] - { - let entry = Prime; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalCommittee", + "Prime", + vec![], + [ + 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, + 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, + 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, + 158u8, 159u8, 217u8, 244u8, 158u8, + ], + ) } } } } pub mod phragmen_election { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Vote { - pub votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub votes: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Vote { - const PALLET: &'static str = "PhragmenElection"; - const FUNCTION: &'static str = "vote"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveVoter; - impl ::subxt::Call for RemoveVoter { - const PALLET: &'static str = "PhragmenElection"; - const FUNCTION: &'static str = "remove_voter"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SubmitCandidacy { #[codec(compact)] pub candidate_count: ::core::primitive::u32, } - impl ::subxt::Call for SubmitCandidacy { - const PALLET: &'static str = "PhragmenElection"; - const FUNCTION: &'static str = "submit_candidacy"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RenounceCandidacy { pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, } - impl ::subxt::Call for RenounceCandidacy { - const PALLET: &'static str = "PhragmenElection"; - const FUNCTION: &'static str = "renounce_candidacy"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveMember { - pub who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub has_replacement: ::core::primitive::bool, } - impl ::subxt::Call for RemoveMember { - const PALLET: &'static str = "PhragmenElection"; - const FUNCTION: &'static str = "remove_member"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CleanDefunctVoters { pub num_voters: ::core::primitive::u32, pub num_defunct: ::core::primitive::u32, } - impl ::subxt::Call for CleanDefunctVoters { - const PALLET: &'static str = "PhragmenElection"; - const FUNCTION: &'static str = "clean_defunct_voters"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] #[doc = "set the initial votes, or update already existing votes."] #[doc = ""] @@ -17185,37 +11805,25 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + votes: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Vote, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 245u8, 122u8, 160u8, 64u8, 234u8, 121u8, 191u8, 224u8, 12u8, - 16u8, 153u8, 70u8, 41u8, 236u8, 211u8, 145u8, 238u8, 112u8, - 11u8, 94u8, 92u8, 160u8, 67u8, 176u8, 126u8, 232u8, 63u8, - 226u8, 207u8, 205u8, 90u8, 61u8, - ] - { - let call = Vote { votes, value }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "PhragmenElection", + call: "vote", + data: Vote { votes, value }, + }, + [ + 71u8, 90u8, 175u8, 225u8, 51u8, 202u8, 197u8, 252u8, 183u8, + 92u8, 239u8, 83u8, 112u8, 144u8, 128u8, 211u8, 109u8, 33u8, + 252u8, 6u8, 156u8, 15u8, 91u8, 88u8, 70u8, 19u8, 32u8, 29u8, + 224u8, 255u8, 26u8, 145u8, + ], + ) } #[doc = "Remove `origin` as a voter."] #[doc = ""] @@ -17224,35 +11832,23 @@ pub mod api { #[doc = "The dispatch origin of this call must be signed and be a voter."] pub fn remove_voter( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveVoter, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "PhragmenElection", + call: "remove_voter", + data: RemoveVoter {}, + }, + [ 254u8, 46u8, 140u8, 4u8, 218u8, 45u8, 150u8, 72u8, 67u8, 131u8, 108u8, 201u8, 46u8, 157u8, 104u8, 161u8, 53u8, 155u8, 130u8, 50u8, 88u8, 149u8, 255u8, 12u8, 17u8, 85u8, 95u8, 69u8, 153u8, 130u8, 221u8, 1u8, - ] - { - let call = RemoveVoter {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] #[doc = ""] @@ -17272,35 +11868,23 @@ pub mod api { pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SubmitCandidacy, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 100u8, 38u8, 146u8, 5u8, 234u8, 101u8, 193u8, 9u8, 245u8, - 237u8, 220u8, 21u8, 36u8, 64u8, 205u8, 103u8, 11u8, 194u8, - 18u8, 96u8, 44u8, 231u8, 125u8, 82u8, 63u8, 51u8, 51u8, - 183u8, 28u8, 33u8, 121u8, 89u8, - ] - { - let call = SubmitCandidacy { candidate_count }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "PhragmenElection", + call: "submit_candidacy", + data: SubmitCandidacy { candidate_count }, + }, + [ + 228u8, 63u8, 217u8, 99u8, 128u8, 104u8, 175u8, 10u8, 30u8, + 35u8, 47u8, 14u8, 254u8, 122u8, 146u8, 239u8, 61u8, 145u8, + 82u8, 7u8, 181u8, 98u8, 238u8, 208u8, 23u8, 84u8, 48u8, + 255u8, 177u8, 255u8, 84u8, 83u8, + ], + ) } #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] #[doc = "outcomes exist:"] @@ -17323,35 +11907,23 @@ pub mod api { pub fn renounce_candidacy( &self, renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RenounceCandidacy, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 184u8, 45u8, 220u8, 198u8, 21u8, 54u8, 15u8, 235u8, 192u8, - 78u8, 96u8, 172u8, 12u8, 152u8, 147u8, 183u8, 172u8, 85u8, - 26u8, 243u8, 250u8, 248u8, 104u8, 76u8, 88u8, 150u8, 197u8, - 130u8, 221u8, 234u8, 53u8, 174u8, - ] - { - let call = RenounceCandidacy { renouncing }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "PhragmenElection", + call: "renounce_candidacy", + data: RenounceCandidacy { renouncing }, + }, + [ + 70u8, 72u8, 208u8, 36u8, 80u8, 245u8, 224u8, 75u8, 60u8, + 142u8, 19u8, 49u8, 142u8, 90u8, 14u8, 69u8, 15u8, 61u8, + 170u8, 235u8, 16u8, 252u8, 86u8, 200u8, 120u8, 127u8, 36u8, + 42u8, 143u8, 130u8, 217u8, 128u8, + ], + ) } #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] #[doc = "the outgoing member is slashed."] @@ -17369,43 +11941,31 @@ pub mod api { #[doc = "# "] pub fn remove_member( &self, - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, has_replacement: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveMember, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 0u8, 99u8, 154u8, 250u8, 4u8, 102u8, 172u8, 220u8, 86u8, - 147u8, 113u8, 248u8, 152u8, 189u8, 179u8, 149u8, 73u8, 97u8, - 201u8, 143u8, 83u8, 11u8, 94u8, 123u8, 149u8, 253u8, 179u8, - 154u8, 132u8, 42u8, 70u8, 189u8, - ] - { - let call = RemoveMember { - who, - has_replacement, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "PhragmenElection", + call: "remove_member", + data: RemoveMember { + who, + has_replacement, + }, + }, + [ + 174u8, 77u8, 175u8, 88u8, 205u8, 45u8, 109u8, 227u8, 27u8, + 175u8, 46u8, 179u8, 170u8, 235u8, 136u8, 43u8, 27u8, 47u8, + 78u8, 201u8, 99u8, 23u8, 79u8, 57u8, 193u8, 94u8, 143u8, + 242u8, 181u8, 226u8, 214u8, 171u8, + ], + ) } #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] #[doc = "deposit of the removed voters are returned."] @@ -17421,38 +11981,26 @@ pub mod api { &self, num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CleanDefunctVoters, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 80u8, 248u8, 122u8, 6u8, 88u8, 255u8, 17u8, 206u8, 104u8, - 208u8, 66u8, 191u8, 118u8, 163u8, 154u8, 9u8, 37u8, 106u8, - 232u8, 178u8, 17u8, 177u8, 225u8, 101u8, 76u8, 207u8, 175u8, - 117u8, 21u8, 203u8, 229u8, 140u8, - ] - { - let call = CleanDefunctVoters { - num_voters, - num_defunct, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "PhragmenElection", + call: "clean_defunct_voters", + data: CleanDefunctVoters { + num_voters, + num_defunct, + }, + }, + [ + 198u8, 162u8, 30u8, 249u8, 191u8, 38u8, 141u8, 123u8, 230u8, + 90u8, 213u8, 103u8, 168u8, 28u8, 5u8, 215u8, 213u8, 152u8, + 46u8, 189u8, 238u8, 209u8, 209u8, 142u8, 159u8, 222u8, 161u8, + 26u8, 161u8, 250u8, 9u8, 100u8, + ], + ) } } } @@ -17460,7 +12008,11 @@ pub mod api { pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] #[doc = "the election, not that enough have has been elected. The inner value must be examined"] #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] @@ -17468,186 +12020,127 @@ pub mod api { #[doc = "begin with."] pub struct NewTerm { pub new_members: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, } - impl ::subxt::Event for NewTerm { + impl ::subxt::events::StaticEvent for NewTerm { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "NewTerm"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "No (or not enough) candidates existed for this round. This is different from"] #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] pub struct EmptyTerm; - impl ::subxt::Event for EmptyTerm { + impl ::subxt::events::StaticEvent for EmptyTerm { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "EmptyTerm"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Internal error happened while trying to perform election."] pub struct ElectionError; - impl ::subxt::Event for ElectionError { + impl ::subxt::events::StaticEvent for ElectionError { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "ElectionError"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] #[doc = "`EmptyTerm`."] pub struct MemberKicked { - pub member: ::subxt::sp_core::crypto::AccountId32, + pub member: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for MemberKicked { + impl ::subxt::events::StaticEvent for MemberKicked { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "MemberKicked"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Someone has renounced their candidacy."] pub struct Renounced { - pub candidate: ::subxt::sp_core::crypto::AccountId32, + pub candidate: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Renounced { + impl ::subxt::events::StaticEvent for Renounced { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "Renounced"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] #[doc = "runner-up."] #[doc = ""] #[doc = "Note that old members and runners-up are also candidates."] pub struct CandidateSlashed { - pub candidate: ::subxt::sp_core::crypto::AccountId32, + pub candidate: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for CandidateSlashed { + impl ::subxt::events::StaticEvent for CandidateSlashed { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "CandidateSlashed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] pub struct SeatHolderSlashed { - pub seat_holder: ::subxt::sp_core::crypto::AccountId32, + pub seat_holder: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for SeatHolderSlashed { + impl ::subxt::events::StaticEvent for SeatHolderSlashed { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "SeatHolderSlashed"; } } pub mod storage { use super::runtime_types; - pub struct Members; - impl ::subxt::StorageEntry for Members { - const PALLET: &'static str = "PhragmenElection"; - const STORAGE: &'static str = "Members"; - type Value = ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct RunnersUp; - impl ::subxt::StorageEntry for RunnersUp { - const PALLET: &'static str = "PhragmenElection"; - const STORAGE: &'static str = "RunnersUp"; - type Value = ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Candidates; - impl ::subxt::StorageEntry for Candidates { - const PALLET: &'static str = "PhragmenElection"; - const STORAGE: &'static str = "Candidates"; - type Value = ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ElectionRounds; - impl ::subxt::StorageEntry for ElectionRounds { - const PALLET: &'static str = "PhragmenElection"; - const STORAGE: &'static str = "ElectionRounds"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Voting<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Voting<'_> { - const PALLET: &'static str = "PhragmenElection"; - const STORAGE: &'static str = "Voting"; - type Value = runtime_types::pallet_elections_phragmen::Voter< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The current elected members."] #[doc = ""] #[doc = " Invariant: Always sorted based on account id."] pub fn members( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 193u8, 166u8, 79u8, 96u8, 31u8, 4u8, 133u8, 133u8, 115u8, - 236u8, 253u8, 177u8, 176u8, 10u8, 50u8, 97u8, 254u8, - 234u8, 169u8, 236u8, 77u8, 243u8, 173u8, 187u8, 129u8, - 122u8, 160u8, 73u8, 25u8, 150u8, 140u8, 56u8, - ] - { - let entry = Members; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "PhragmenElection", + "Members", + vec![], + [ + 2u8, 182u8, 43u8, 180u8, 87u8, 185u8, 26u8, 79u8, 196u8, + 55u8, 28u8, 26u8, 174u8, 133u8, 158u8, 221u8, 101u8, 161u8, + 83u8, 9u8, 221u8, 175u8, 221u8, 220u8, 81u8, 80u8, 1u8, + 236u8, 74u8, 121u8, 10u8, 82u8, + ], + ) } #[doc = " The current reserved runners-up."] #[doc = ""] @@ -17655,42 +12148,28 @@ pub mod api { #[doc = " last (i.e. _best_) runner-up will be replaced."] pub fn runners_up( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 59u8, 65u8, 218u8, 225u8, 49u8, 140u8, 168u8, 143u8, - 195u8, 106u8, 207u8, 181u8, 157u8, 129u8, 140u8, 122u8, - 145u8, 207u8, 179u8, 144u8, 146u8, 206u8, 204u8, 245u8, - 6u8, 201u8, 192u8, 232u8, 84u8, 108u8, 86u8, 187u8, - ] - { - let entry = RunnersUp; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "PhragmenElection", + "RunnersUp", + vec![], + [ + 248u8, 81u8, 190u8, 53u8, 121u8, 49u8, 55u8, 69u8, 116u8, + 177u8, 46u8, 30u8, 131u8, 14u8, 32u8, 198u8, 10u8, 132u8, + 73u8, 117u8, 2u8, 146u8, 188u8, 146u8, 214u8, 227u8, 97u8, + 77u8, 7u8, 131u8, 208u8, 209u8, + ], + ) } #[doc = " The present candidate list. A current member or runner-up can never enter this vector"] #[doc = " and is always implicitly assumed to be a candidate."] @@ -17700,213 +12179,145 @@ pub mod api { #[doc = " Invariant: Always sorted based on account id."] pub fn candidates( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 172u8, 196u8, 249u8, 114u8, 195u8, 161u8, 43u8, 219u8, - 208u8, 127u8, 144u8, 87u8, 13u8, 253u8, 114u8, 209u8, - 199u8, 65u8, 77u8, 7u8, 131u8, 166u8, 212u8, 94u8, 253u8, - 166u8, 234u8, 42u8, 36u8, 175u8, 100u8, 14u8, - ] - { - let entry = Candidates; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "PhragmenElection", + "Candidates", + vec![], + [ + 224u8, 107u8, 141u8, 11u8, 54u8, 86u8, 117u8, 45u8, 195u8, + 252u8, 152u8, 21u8, 165u8, 23u8, 198u8, 117u8, 5u8, 216u8, + 183u8, 163u8, 243u8, 56u8, 11u8, 102u8, 85u8, 107u8, 219u8, + 250u8, 45u8, 80u8, 108u8, 127u8, + ], + ) } #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."] pub fn election_rounds( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 144u8, 146u8, 10u8, 32u8, 149u8, 147u8, 59u8, 205u8, - 61u8, 246u8, 28u8, 169u8, 130u8, 136u8, 143u8, 104u8, - 253u8, 86u8, 228u8, 68u8, 19u8, 184u8, 166u8, 214u8, - 58u8, 103u8, 176u8, 160u8, 240u8, 249u8, 117u8, 115u8, - ] - { - let entry = ElectionRounds; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "PhragmenElection", + "ElectionRounds", + vec![], + [ + 144u8, 146u8, 10u8, 32u8, 149u8, 147u8, 59u8, 205u8, 61u8, + 246u8, 28u8, 169u8, 130u8, 136u8, 143u8, 104u8, 253u8, 86u8, + 228u8, 68u8, 19u8, 184u8, 166u8, 214u8, 58u8, 103u8, 176u8, + 160u8, 240u8, 249u8, 117u8, 115u8, + ], + ) } #[doc = " Votes and locked stake of a particular voter."] #[doc = ""] #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] pub fn voting( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_elections_phragmen::Voter< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 107u8, 14u8, 228u8, 167u8, 43u8, 105u8, 221u8, 70u8, - 234u8, 157u8, 36u8, 16u8, 63u8, 225u8, 89u8, 111u8, - 201u8, 172u8, 98u8, 169u8, 232u8, 175u8, 172u8, 20u8, - 223u8, 80u8, 107u8, 183u8, 252u8, 175u8, 50u8, 171u8, - ] - { - let entry = Voting(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "PhragmenElection", + "Voting", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, + 37u8, 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8, + 14u8, 189u8, 83u8, 185u8, 136u8, 39u8, 171u8, 221u8, 147u8, + 20u8, 168u8, 126u8, 111u8, 137u8, + ], + ) } #[doc = " Votes and locked stake of a particular voter."] #[doc = ""] #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] - pub fn voting_iter( + pub fn voting_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Voting<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_elections_phragmen::Voter< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 107u8, 14u8, 228u8, 167u8, 43u8, 105u8, 221u8, 70u8, - 234u8, 157u8, 36u8, 16u8, 63u8, 225u8, 89u8, 111u8, - 201u8, 172u8, 98u8, 169u8, 232u8, 175u8, 172u8, 20u8, - 223u8, 80u8, 107u8, 183u8, 252u8, 175u8, 50u8, 171u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "PhragmenElection", + "Voting", + Vec::new(), + [ + 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, + 37u8, 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8, + 14u8, 189u8, 83u8, 185u8, 136u8, 39u8, 171u8, 221u8, 147u8, + 20u8, 168u8, 126u8, 111u8, 137u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Identifier for the elections-phragmen pallet's lock"] pub fn pallet_id( &self, - ) -> ::core::result::Result< - [::core::primitive::u8; 8usize], - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "PalletId")? - == [ - 95u8, 63u8, 229u8, 200u8, 231u8, 11u8, 95u8, 106u8, 62u8, - 240u8, 37u8, 146u8, 230u8, 74u8, 169u8, 185u8, 160u8, 90u8, - 136u8, 209u8, 127u8, 221u8, 173u8, 200u8, 243u8, 198u8, 18u8, - 226u8, 144u8, 188u8, 105u8, 230u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("PalletId")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 8usize]>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "PalletId", + [ + 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8, + 36u8, 82u8, 148u8, 70u8, 147u8, 209u8, 40u8, 210u8, 229u8, + 181u8, 191u8, 170u8, 205u8, 138u8, 97u8, 127u8, 59u8, 124u8, + 244u8, 252u8, 30u8, 213u8, 179u8, + ], + ) } #[doc = " How much should be locked up in order to submit one's candidacy."] pub fn candidacy_bond( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "CandidacyBond")? - == [ - 14u8, 234u8, 73u8, 125u8, 101u8, 97u8, 55u8, 15u8, 230u8, - 193u8, 135u8, 62u8, 132u8, 7u8, 151u8, 65u8, 210u8, 170u8, - 155u8, 50u8, 143u8, 209u8, 184u8, 111u8, 170u8, 206u8, 167u8, - 195u8, 213u8, 27u8, 123u8, 241u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("CandidacyBond")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "CandidacyBond", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Base deposit associated with voting."] #[doc = ""] @@ -17914,281 +12325,210 @@ pub mod api { #[doc = " creating a gigantic number of votes."] pub fn voting_bond_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "VotingBondBase")? - == [ - 180u8, 167u8, 175u8, 40u8, 243u8, 172u8, 143u8, 55u8, 194u8, - 84u8, 98u8, 81u8, 247u8, 171u8, 109u8, 53u8, 136u8, 143u8, - 225u8, 114u8, 75u8, 55u8, 241u8, 160u8, 116u8, 229u8, 255u8, - 7u8, 104u8, 187u8, 103u8, 64u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("VotingBondBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "VotingBondBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount of bond that need to be locked for each vote (32 bytes)."] pub fn voting_bond_factor( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "VotingBondFactor")? - == [ - 221u8, 163u8, 2u8, 102u8, 69u8, 249u8, 39u8, 153u8, 236u8, - 75u8, 249u8, 122u8, 29u8, 193u8, 16u8, 199u8, 113u8, 87u8, - 171u8, 97u8, 72u8, 40u8, 76u8, 2u8, 35u8, 125u8, 30u8, 126u8, - 137u8, 118u8, 98u8, 147u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("VotingBondFactor")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "VotingBondFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Number of members to elect."] pub fn desired_members( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "DesiredMembers")? - == [ - 202u8, 93u8, 82u8, 184u8, 101u8, 152u8, 110u8, 247u8, 155u8, - 43u8, 205u8, 219u8, 41u8, 184u8, 141u8, 32u8, 33u8, 30u8, - 129u8, 33u8, 132u8, 18u8, 172u8, 114u8, 226u8, 81u8, 21u8, - 55u8, 197u8, 42u8, 65u8, 162u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("DesiredMembers")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "DesiredMembers", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Number of runners_up to keep."] pub fn desired_runners_up( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "DesiredRunnersUp")? - == [ - 126u8, 79u8, 206u8, 94u8, 16u8, 223u8, 112u8, 34u8, 160u8, - 227u8, 74u8, 26u8, 14u8, 191u8, 98u8, 119u8, 230u8, 187u8, - 18u8, 37u8, 13u8, 143u8, 128u8, 62u8, 131u8, 158u8, 138u8, - 110u8, 16u8, 216u8, 42u8, 113u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("DesiredRunnersUp")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "DesiredRunnersUp", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " How long each seat is kept. This defines the next block number at which an election"] #[doc = " round will happen. If set to zero, no elections are ever triggered and the module will"] #[doc = " be in passive mode."] pub fn term_duration( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("PhragmenElection", "TermDuration")? - == [ - 193u8, 236u8, 82u8, 251u8, 38u8, 164u8, 72u8, 149u8, 65u8, - 240u8, 45u8, 82u8, 210u8, 168u8, 68u8, 219u8, 11u8, 241u8, - 118u8, 117u8, 248u8, 9u8, 1u8, 187u8, 98u8, 189u8, 18u8, - 119u8, 255u8, 89u8, 192u8, 231u8, - ] - { - let pallet = metadata.pallet("PhragmenElection")?; - let constant = pallet.constant("TermDuration")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "PhragmenElection", + "TermDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod technical_membership { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddMember { - pub who: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for AddMember { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "add_member"; + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveMember { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Call for RemoveMember { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "remove_member"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SwapMember { - pub remove: ::subxt::sp_core::crypto::AccountId32, - pub add: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for SwapMember { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "swap_member"; + pub remove: ::subxt::ext::sp_core::crypto::AccountId32, + pub add: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ResetMembers { - pub members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - } - impl ::subxt::Call for ResetMembers { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "reset_members"; + pub members: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ChangeKey { - pub new: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for ChangeKey { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "change_key"; + pub new: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetPrime { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetPrime { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "set_prime"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClearPrime; - impl ::subxt::Call for ClearPrime { - const PALLET: &'static str = "TechnicalMembership"; - const FUNCTION: &'static str = "clear_prime"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Add a member `who` to the set."] #[doc = ""] #[doc = "May only be called from `T::AddOrigin`."] pub fn add_member( &self, - who: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddMember, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 1u8, 149u8, 115u8, 222u8, 93u8, 9u8, 208u8, 58u8, 22u8, - 148u8, 215u8, 141u8, 204u8, 48u8, 107u8, 210u8, 202u8, 165u8, - 43u8, 159u8, 45u8, 161u8, 255u8, 127u8, 225u8, 100u8, 161u8, - 195u8, 197u8, 206u8, 57u8, 166u8, - ] - { - let call = AddMember { who }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + who: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "add_member", + data: AddMember { who }, + }, + [ + 106u8, 33u8, 171u8, 114u8, 223u8, 105u8, 71u8, 15u8, 77u8, + 253u8, 40u8, 204u8, 244u8, 142u8, 103u8, 177u8, 200u8, 243u8, + 114u8, 241u8, 36u8, 135u8, 175u8, 255u8, 124u8, 193u8, 30u8, + 46u8, 186u8, 172u8, 176u8, 98u8, + ], + ) } #[doc = "Remove a member `who` from the set."] #[doc = ""] #[doc = "May only be called from `T::RemoveOrigin`."] pub fn remove_member( &self, - who: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveMember, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 137u8, 249u8, 148u8, 139u8, 147u8, 47u8, 226u8, 228u8, 139u8, - 219u8, 109u8, 128u8, 254u8, 51u8, 227u8, 154u8, 105u8, 91u8, - 229u8, 69u8, 217u8, 241u8, 107u8, 229u8, 41u8, 202u8, 228u8, - 227u8, 160u8, 162u8, 45u8, 211u8, - ] - { - let call = RemoveMember { who }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + who: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "remove_member", + data: RemoveMember { who }, + }, + [ + 100u8, 17u8, 75u8, 92u8, 58u8, 100u8, 34u8, 187u8, 41u8, + 160u8, 137u8, 58u8, 78u8, 166u8, 161u8, 116u8, 1u8, 67u8, + 201u8, 144u8, 103u8, 84u8, 55u8, 246u8, 133u8, 180u8, 148u8, + 86u8, 175u8, 175u8, 70u8, 73u8, + ], + ) } #[doc = "Swap out one member `remove` for another `add`."] #[doc = ""] @@ -18197,37 +12537,25 @@ pub mod api { #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] pub fn swap_member( &self, - remove: ::subxt::sp_core::crypto::AccountId32, - add: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SwapMember, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 159u8, 62u8, 254u8, 117u8, 56u8, 185u8, 99u8, 29u8, 146u8, - 210u8, 40u8, 77u8, 169u8, 224u8, 215u8, 34u8, 106u8, 95u8, - 204u8, 109u8, 72u8, 67u8, 11u8, 183u8, 33u8, 84u8, 133u8, - 4u8, 5u8, 13u8, 188u8, 123u8, - ] - { - let call = SwapMember { remove, add }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + remove: ::subxt::ext::sp_core::crypto::AccountId32, + add: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "swap_member", + data: SwapMember { remove, add }, + }, + [ + 66u8, 84u8, 183u8, 29u8, 104u8, 163u8, 220u8, 217u8, 103u8, + 234u8, 233u8, 138u8, 191u8, 147u8, 51u8, 98u8, 46u8, 51u8, + 179u8, 200u8, 23u8, 59u8, 112u8, 53u8, 8u8, 75u8, 135u8, + 232u8, 116u8, 201u8, 60u8, 249u8, + ], + ) } #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] #[doc = "pass `members` pre-sorted."] @@ -18235,36 +12563,24 @@ pub mod api { #[doc = "May only be called from `T::ResetOrigin`."] pub fn reset_members( &self, - members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ResetMembers, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 246u8, 84u8, 91u8, 191u8, 61u8, 245u8, 171u8, 80u8, 18u8, - 120u8, 61u8, 86u8, 23u8, 115u8, 161u8, 203u8, 128u8, 34u8, - 166u8, 128u8, 33u8, 28u8, 229u8, 81u8, 103u8, 217u8, 173u8, - 151u8, 31u8, 118u8, 151u8, 217u8, - ] - { - let call = ResetMembers { members }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + members: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "reset_members", + data: ResetMembers { members }, + }, + [ + 9u8, 35u8, 28u8, 59u8, 158u8, 232u8, 89u8, 78u8, 101u8, 53u8, + 240u8, 98u8, 13u8, 104u8, 235u8, 161u8, 201u8, 150u8, 117u8, + 32u8, 75u8, 209u8, 166u8, 252u8, 57u8, 131u8, 96u8, 215u8, + 51u8, 81u8, 42u8, 123u8, + ], + ) } #[doc = "Swap out the sending member for some other key `new`."] #[doc = ""] @@ -18273,107 +12589,71 @@ pub mod api { #[doc = "Prime membership is passed from the origin account to `new`, if extant."] pub fn change_key( &self, - new: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ChangeKey, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 198u8, 93u8, 41u8, 52u8, 241u8, 11u8, 225u8, 82u8, 30u8, - 114u8, 111u8, 204u8, 13u8, 31u8, 34u8, 82u8, 171u8, 58u8, - 180u8, 65u8, 3u8, 246u8, 33u8, 167u8, 200u8, 23u8, 150u8, - 235u8, 130u8, 172u8, 202u8, 216u8, - ] - { - let call = ChangeKey { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + new: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "change_key", + data: ChangeKey { new }, + }, + [ + 53u8, 60u8, 54u8, 231u8, 151u8, 0u8, 27u8, 175u8, 250u8, + 80u8, 74u8, 184u8, 184u8, 63u8, 90u8, 216u8, 186u8, 136u8, + 74u8, 214u8, 111u8, 186u8, 137u8, 140u8, 108u8, 194u8, 128u8, + 97u8, 168u8, 184u8, 112u8, 60u8, + ], + ) } #[doc = "Set the prime member. Must be a current member."] #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] pub fn set_prime( &self, - who: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetPrime, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 185u8, 53u8, 61u8, 154u8, 234u8, 77u8, 195u8, 126u8, 19u8, - 39u8, 78u8, 205u8, 109u8, 210u8, 137u8, 245u8, 128u8, 110u8, - 2u8, 201u8, 20u8, 153u8, 146u8, 177u8, 4u8, 144u8, 229u8, - 125u8, 91u8, 131u8, 199u8, 15u8, - ] - { - let call = SetPrime { who }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + who: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "set_prime", + data: SetPrime { who }, + }, + [ + 123u8, 95u8, 75u8, 129u8, 19u8, 34u8, 192u8, 65u8, 169u8, + 47u8, 184u8, 246u8, 55u8, 250u8, 31u8, 158u8, 57u8, 197u8, + 22u8, 112u8, 167u8, 198u8, 136u8, 17u8, 15u8, 203u8, 101u8, + 149u8, 15u8, 39u8, 16u8, 232u8, + ], + ) } #[doc = "Remove the prime member if it exists."] #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] pub fn clear_prime( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClearPrime, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "TechnicalMembership", + call: "clear_prime", + data: ClearPrime {}, + }, + [ 186u8, 182u8, 225u8, 90u8, 71u8, 124u8, 69u8, 100u8, 234u8, 25u8, 53u8, 23u8, 182u8, 32u8, 176u8, 81u8, 54u8, 140u8, 235u8, 126u8, 247u8, 7u8, 155u8, 62u8, 35u8, 135u8, 48u8, 61u8, 88u8, 160u8, 183u8, 72u8, - ] - { - let call = ClearPrime {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } } } @@ -18381,233 +12661,187 @@ pub mod api { pub type Event = runtime_types::pallet_membership::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The given member was added; see the transaction for who."] pub struct MemberAdded; - impl ::subxt::Event for MemberAdded { + impl ::subxt::events::StaticEvent for MemberAdded { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MemberAdded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The given member was removed; see the transaction for who."] pub struct MemberRemoved; - impl ::subxt::Event for MemberRemoved { + impl ::subxt::events::StaticEvent for MemberRemoved { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MemberRemoved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Two members were swapped; see the transaction for who."] pub struct MembersSwapped; - impl ::subxt::Event for MembersSwapped { + impl ::subxt::events::StaticEvent for MembersSwapped { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MembersSwapped"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The membership was reset; see the transaction for who the new set is."] pub struct MembersReset; - impl ::subxt::Event for MembersReset { + impl ::subxt::events::StaticEvent for MembersReset { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MembersReset"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "One of the members' keys changed."] pub struct KeyChanged; - impl ::subxt::Event for KeyChanged { + impl ::subxt::events::StaticEvent for KeyChanged { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "KeyChanged"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Phantom member, never used."] pub struct Dummy; - impl ::subxt::Event for Dummy { + impl ::subxt::events::StaticEvent for Dummy { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "Dummy"; } } pub mod storage { use super::runtime_types; - pub struct Members; - impl ::subxt::StorageEntry for Members { - const PALLET: &'static str = "TechnicalMembership"; - const STORAGE: &'static str = "Members"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::crypto::AccountId32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Prime; - impl ::subxt::StorageEntry for Prime { - const PALLET: &'static str = "TechnicalMembership"; - const STORAGE: &'static str = "Prime"; - type Value = ::subxt::sp_core::crypto::AccountId32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The current membership, stored as an ordered Vec."] pub fn members( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::crypto::AccountId32, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::crypto::AccountId32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 156u8, 246u8, 35u8, 153u8, 141u8, 104u8, 106u8, 242u8, - 233u8, 125u8, 1u8, 18u8, 97u8, 147u8, 157u8, 89u8, 3u8, - 206u8, 177u8, 219u8, 97u8, 7u8, 84u8, 90u8, 7u8, 178u8, - 80u8, 21u8, 166u8, 246u8, 160u8, 217u8, - ] - { - let entry = Members; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalMembership", + "Members", + vec![], + [ + 56u8, 56u8, 29u8, 90u8, 26u8, 115u8, 252u8, 185u8, 37u8, + 108u8, 16u8, 46u8, 136u8, 139u8, 30u8, 19u8, 235u8, 78u8, + 176u8, 129u8, 180u8, 57u8, 178u8, 239u8, 211u8, 6u8, 64u8, + 129u8, 195u8, 46u8, 178u8, 157u8, + ], + ) } #[doc = " The current prime member, if one exists."] pub fn prime( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 70u8, 101u8, 20u8, 160u8, 173u8, 87u8, 190u8, 85u8, 60u8, - 249u8, 144u8, 77u8, 175u8, 195u8, 51u8, 196u8, 234u8, - 62u8, 243u8, 199u8, 126u8, 12u8, 88u8, 252u8, 1u8, 210u8, - 65u8, 210u8, 33u8, 19u8, 222u8, 11u8, - ] - { - let entry = Prime; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::crypto::AccountId32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "TechnicalMembership", + "Prime", + vec![], + [ + 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, + 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, + 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, + 158u8, 159u8, 217u8, 244u8, 158u8, + ], + ) } } } } pub mod treasury { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for ProposeSpend { - const PALLET: &'static str = "Treasury"; - const FUNCTION: &'static str = "propose_spend"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RejectProposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for RejectProposal { - const PALLET: &'static str = "Treasury"; - const FUNCTION: &'static str = "reject_proposal"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ApproveProposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveProposal { - const PALLET: &'static str = "Treasury"; - const FUNCTION: &'static str = "approve_proposal"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Spend { #[codec(compact)] pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for Spend { - const PALLET: &'static str = "Treasury"; - const FUNCTION: &'static str = "spend"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveApproval { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for RemoveApproval { - const PALLET: &'static str = "Treasury"; - const FUNCTION: &'static str = "remove_approval"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Put forward a suggestion for spending. A deposit proportional to the value"] #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"] #[doc = "proposal is awarded."] @@ -18620,39 +12854,27 @@ pub mod api { pub fn propose_spend( &self, value: ::core::primitive::u128, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ProposeSpend, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 117u8, 11u8, 194u8, 76u8, 160u8, 114u8, 119u8, 94u8, 47u8, - 239u8, 193u8, 54u8, 42u8, 208u8, 225u8, 47u8, 22u8, 90u8, - 166u8, 169u8, 192u8, 145u8, 159u8, 38u8, 209u8, 134u8, 102u8, - 91u8, 65u8, 129u8, 251u8, 3u8, - ] - { - let call = ProposeSpend { value, beneficiary }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Treasury", + call: "propose_spend", + data: ProposeSpend { value, beneficiary }, + }, + [ + 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, + 244u8, 78u8, 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, + 108u8, 153u8, 203u8, 223u8, 8u8, 117u8, 126u8, 250u8, 255u8, + 52u8, 245u8, 69u8, 45u8, 136u8, + ], + ) } #[doc = "Reject a proposed spend. The original deposit will be slashed."] #[doc = ""] @@ -18666,35 +12888,23 @@ pub mod api { pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RejectProposal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 153u8, 238u8, 223u8, 212u8, 86u8, 178u8, 184u8, 150u8, 117u8, - 91u8, 69u8, 30u8, 196u8, 134u8, 56u8, 54u8, 236u8, 145u8, - 202u8, 139u8, 135u8, 254u8, 80u8, 189u8, 40u8, 56u8, 148u8, - 108u8, 42u8, 118u8, 74u8, 242u8, - ] - { - let call = RejectProposal { proposal_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Treasury", + call: "reject_proposal", + data: RejectProposal { proposal_id }, + }, + [ + 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8, + 140u8, 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8, + 143u8, 144u8, 34u8, 132u8, 44u8, 244u8, 105u8, 186u8, 223u8, + 234u8, 17u8, 145u8, 209u8, 145u8, + ], + ) } #[doc = "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary"] #[doc = "and the original deposit will be returned."] @@ -18709,35 +12919,23 @@ pub mod api { pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ApproveProposal, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 191u8, 81u8, 78u8, 230u8, 230u8, 192u8, 144u8, 232u8, 81u8, - 70u8, 227u8, 212u8, 194u8, 228u8, 231u8, 147u8, 57u8, 222u8, - 156u8, 77u8, 173u8, 60u8, 92u8, 84u8, 255u8, 64u8, 240u8, - 45u8, 131u8, 200u8, 206u8, 231u8, - ] - { - let call = ApproveProposal { proposal_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Treasury", + call: "approve_proposal", + data: ApproveProposal { proposal_id }, + }, + [ + 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8, + 108u8, 33u8, 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8, + 170u8, 153u8, 156u8, 17u8, 59u8, 164u8, 123u8, 227u8, 175u8, + 195u8, 220u8, 160u8, 60u8, 186u8, + ], + ) } #[doc = "Propose and approve a spend of treasury funds."] #[doc = ""] @@ -18750,42 +12948,30 @@ pub mod api { pub fn spend( &self, amount: ::core::primitive::u128, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Spend, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 112u8, 73u8, 16u8, 107u8, 190u8, 200u8, 211u8, 68u8, 179u8, - 105u8, 127u8, 30u8, 210u8, 77u8, 137u8, 128u8, 167u8, 59u8, - 177u8, 185u8, 237u8, 200u8, 174u8, 218u8, 137u8, 208u8, 70u8, - 23u8, 226u8, 38u8, 151u8, 153u8, - ] - { - let call = Spend { - amount, - beneficiary, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Treasury", + call: "spend", + data: Spend { + amount, + beneficiary, + }, + }, + [ + 177u8, 178u8, 242u8, 136u8, 135u8, 237u8, 114u8, 71u8, 233u8, + 239u8, 7u8, 84u8, 14u8, 228u8, 58u8, 31u8, 158u8, 185u8, + 25u8, 91u8, 70u8, 33u8, 19u8, 92u8, 100u8, 162u8, 5u8, 48u8, + 20u8, 120u8, 9u8, 109u8, + ], + ) } #[doc = "Force a previously approved proposal to be removed from the approval queue."] #[doc = "The original deposit will no longer be returned."] @@ -18805,35 +12991,23 @@ pub mod api { pub fn remove_approval( &self, proposal_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveApproval, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 235u8, 199u8, 214u8, 142u8, 168u8, 99u8, 226u8, 70u8, 161u8, - 36u8, 122u8, 95u8, 242u8, 2u8, 191u8, 163u8, 192u8, 26u8, - 185u8, 75u8, 47u8, 155u8, 80u8, 175u8, 88u8, 85u8, 83u8, 8u8, - 138u8, 130u8, 12u8, 228u8, - ] - { - let call = RemoveApproval { proposal_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Treasury", + call: "remove_approval", + data: RemoveApproval { proposal_id }, + }, + [ + 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8, + 251u8, 154u8, 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8, + 97u8, 34u8, 186u8, 53u8, 225u8, 144u8, 155u8, 107u8, 172u8, + 54u8, 250u8, 184u8, 178u8, 86u8, + ], + ) } } } @@ -18842,515 +13016,389 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "New proposal."] pub struct Proposed { pub proposal_index: ::core::primitive::u32, } - impl ::subxt::Event for Proposed { + impl ::subxt::events::StaticEvent for Proposed { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Proposed"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "We have ended a spend period and will now allocate funds."] pub struct Spending { pub budget_remaining: ::core::primitive::u128, } - impl ::subxt::Event for Spending { + impl ::subxt::events::StaticEvent for Spending { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Spending"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some funds have been allocated."] pub struct Awarded { pub proposal_index: ::core::primitive::u32, pub award: ::core::primitive::u128, - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Awarded { + impl ::subxt::events::StaticEvent for Awarded { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Awarded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proposal was rejected; funds were slashed."] pub struct Rejected { pub proposal_index: ::core::primitive::u32, pub slashed: ::core::primitive::u128, } - impl ::subxt::Event for Rejected { + impl ::subxt::events::StaticEvent for Rejected { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Rejected"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "Some of our funds have been burnt."] pub struct Burnt { pub burnt_funds: ::core::primitive::u128, } - impl ::subxt::Event for Burnt { + impl ::subxt::events::StaticEvent for Burnt { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Burnt"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "Spending has finished; this is the amount that rolls over until next spend."] pub struct Rollover { pub rollover_balance: ::core::primitive::u128, } - impl ::subxt::Event for Rollover { + impl ::subxt::events::StaticEvent for Rollover { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Rollover"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "Some funds have been deposited."] pub struct Deposit { pub value: ::core::primitive::u128, } - impl ::subxt::Event for Deposit { + impl ::subxt::events::StaticEvent for Deposit { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Deposit"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new spend proposal has been approved."] pub struct SpendApproved { pub proposal_index: ::core::primitive::u32, pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for SpendApproved { + impl ::subxt::events::StaticEvent for SpendApproved { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "SpendApproved"; } } pub mod storage { use super::runtime_types; - pub struct ProposalCount; - impl ::subxt::StorageEntry for ProposalCount { - const PALLET: &'static str = "Treasury"; - const STORAGE: &'static str = "ProposalCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Proposals<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Proposals<'_> { - const PALLET: &'static str = "Treasury"; - const STORAGE: &'static str = "Proposals"; - type Value = runtime_types::pallet_treasury::Proposal< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Approvals; - impl ::subxt::StorageEntry for Approvals { - const PALLET: &'static str = "Treasury"; - const STORAGE: &'static str = "Approvals"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Number of proposals that have been made."] pub fn proposal_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, - 143u8, 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, - 154u8, 110u8, 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, - 30u8, 83u8, 39u8, 177u8, 127u8, 160u8, 34u8, 70u8, - ] - { - let entry = ProposalCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Treasury", + "ProposalCount", + vec![], + [ + 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, + 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, + 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, + 177u8, 127u8, 160u8, 34u8, 70u8, + ], + ) } #[doc = " Proposals that have been made."] pub fn proposals( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_treasury::Proposal< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_treasury::Proposal< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 242u8, 203u8, 56u8, 166u8, 200u8, 95u8, 110u8, - 47u8, 71u8, 71u8, 45u8, 12u8, 93u8, 222u8, 120u8, 40u8, - 130u8, 29u8, 236u8, 189u8, 49u8, 115u8, 238u8, 135u8, - 64u8, 252u8, 171u8, 29u8, 229u8, 63u8, 31u8, - ] - { - let entry = Proposals(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Treasury", + "Proposals", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, + 38u8, 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, + 108u8, 91u8, 37u8, 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, + 198u8, 224u8, 246u8, 160u8, + ], + ) } #[doc = " Proposals that have been made."] - pub fn proposals_iter( + pub fn proposals_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Proposals<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_treasury::Proposal< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 242u8, 203u8, 56u8, 166u8, 200u8, 95u8, 110u8, - 47u8, 71u8, 71u8, 45u8, 12u8, 93u8, 222u8, 120u8, 40u8, - 130u8, 29u8, 236u8, 189u8, 49u8, 115u8, 238u8, 135u8, - 64u8, 252u8, 171u8, 29u8, 229u8, 63u8, 31u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Treasury", + "Proposals", + Vec::new(), + [ + 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, + 38u8, 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8, + 108u8, 91u8, 37u8, 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8, + 198u8, 224u8, 246u8, 160u8, + ], + ) } #[doc = " Proposal indices that have been approved but not yet awarded."] pub fn approvals( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 152u8, 185u8, 127u8, 54u8, 169u8, 155u8, 124u8, 22u8, - 142u8, 132u8, 254u8, 197u8, 162u8, 152u8, 15u8, 18u8, - 192u8, 138u8, 196u8, 231u8, 234u8, 178u8, 111u8, 181u8, - 20u8, 131u8, 149u8, 36u8, 222u8, 4u8, 119u8, 135u8, - ] - { - let entry = Approvals; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Treasury", + "Approvals", + vec![], + [ + 202u8, 106u8, 189u8, 40u8, 127u8, 172u8, 108u8, 50u8, 193u8, + 4u8, 248u8, 226u8, 176u8, 101u8, 212u8, 222u8, 64u8, 206u8, + 244u8, 175u8, 111u8, 106u8, 86u8, 96u8, 19u8, 109u8, 218u8, + 152u8, 30u8, 59u8, 96u8, 1u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Fraction of a proposal's value that should be bonded in order to place the proposal."] #[doc = " An accepted proposal gets these back. A rejected proposal does not."] pub fn proposal_bond( &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "ProposalBond")? - == [ - 254u8, 112u8, 56u8, 108u8, 71u8, 90u8, 128u8, 114u8, 54u8, - 239u8, 87u8, 235u8, 71u8, 56u8, 11u8, 132u8, 179u8, 134u8, - 115u8, 139u8, 109u8, 136u8, 59u8, 69u8, 108u8, 160u8, 18u8, - 120u8, 34u8, 213u8, 166u8, 13u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("ProposalBond")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Permill, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "ProposalBond", + [ + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, + ], + ) } #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] pub fn proposal_bond_minimum( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "ProposalBondMinimum")? - == [ - 233u8, 16u8, 162u8, 158u8, 32u8, 30u8, 243u8, 215u8, 145u8, - 211u8, 68u8, 173u8, 77u8, 212u8, 78u8, 195u8, 144u8, 4u8, - 72u8, 249u8, 90u8, 11u8, 26u8, 64u8, 65u8, 90u8, 193u8, 69u8, - 145u8, 33u8, 163u8, 122u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("ProposalBondMinimum")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "ProposalBondMinimum", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn proposal_bond_maximum( &self, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "ProposalBondMaximum")? - == [ - 12u8, 199u8, 104u8, 127u8, 224u8, 233u8, 186u8, 181u8, 74u8, - 51u8, 175u8, 78u8, 57u8, 170u8, 220u8, 114u8, 122u8, 205u8, - 53u8, 5u8, 92u8, 121u8, 71u8, 10u8, 35u8, 190u8, 184u8, - 233u8, 193u8, 92u8, 27u8, 189u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("ProposalBondMaximum")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + ::core::option::Option<::core::primitive::u128>, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "ProposalBondMaximum", + [ + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, + 194u8, 88u8, 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, + 154u8, 237u8, 134u8, 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, + 43u8, 243u8, 122u8, 60u8, 216u8, + ], + ) } #[doc = " Period between successive spends."] pub fn spend_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "SpendPeriod")? - == [ - 71u8, 58u8, 201u8, 70u8, 240u8, 191u8, 67u8, 71u8, 12u8, - 146u8, 142u8, 91u8, 114u8, 44u8, 213u8, 89u8, 113u8, 124u8, - 210u8, 82u8, 61u8, 48u8, 9u8, 121u8, 236u8, 143u8, 99u8, - 246u8, 5u8, 195u8, 15u8, 247u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("SpendPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "SpendPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] pub fn burn( &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "Burn")? - == [ - 179u8, 112u8, 148u8, 197u8, 209u8, 103u8, 231u8, 44u8, 227u8, - 103u8, 105u8, 229u8, 107u8, 183u8, 25u8, 151u8, 112u8, 20u8, - 24u8, 1u8, 72u8, 183u8, 179u8, 243u8, 0u8, 136u8, 204u8, - 139u8, 164u8, 52u8, 22u8, 168u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("Burn")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Permill, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "Burn", + [ + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, + ], + ) } #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] pub fn pallet_id( &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "PalletId")? - == [ - 65u8, 140u8, 92u8, 164u8, 174u8, 209u8, 169u8, 31u8, 29u8, - 55u8, 10u8, 151u8, 10u8, 165u8, 68u8, 7u8, 110u8, 108u8, - 233u8, 42u8, 19u8, 211u8, 98u8, 108u8, 73u8, 14u8, 235u8, - 97u8, 23u8, 118u8, 211u8, 21u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("PalletId")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_support::PalletId, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "PalletId", + [ + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, + 154u8, 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, + 186u8, 24u8, 243u8, 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, + 189u8, 30u8, 94u8, 22u8, 39u8, + ], + ) } #[doc = " The maximum number of approvals that can wait in the spending queue."] #[doc = ""] #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] pub fn max_approvals( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Treasury", "MaxApprovals")? - == [ - 90u8, 101u8, 189u8, 20u8, 137u8, 178u8, 7u8, 81u8, 148u8, - 6u8, 59u8, 229u8, 228u8, 66u8, 13u8, 179u8, 199u8, 159u8, - 168u8, 227u8, 3u8, 76u8, 124u8, 35u8, 199u8, 142u8, 79u8, - 78u8, 254u8, 63u8, 2u8, 175u8, - ] - { - let pallet = metadata.pallet("Treasury")?; - let constant = pallet.constant("MaxApprovals")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Treasury", + "MaxApprovals", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod claims { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Claim { - pub dest: ::subxt::sp_core::crypto::AccountId32, + pub dest: ::subxt::ext::sp_core::crypto::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, } - impl ::subxt::Call for Claim { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "claim"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct MintClaim { pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub value: ::core::primitive::u128, @@ -19363,55 +13411,38 @@ pub mod api { runtime_types::polkadot_runtime_common::claims::StatementKind, >, } - impl ::subxt::Call for MintClaim { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "mint_claim"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClaimAttest { - pub dest: ::subxt::sp_core::crypto::AccountId32, + pub dest: ::subxt::ext::sp_core::crypto::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, pub statement: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ClaimAttest { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "claim_attest"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Attest { pub statement: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for Attest { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "attest"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct MoveClaim { 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::sp_core::crypto::AccountId32>, + ::core::option::Option<::subxt::ext::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for MoveClaim { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "move_claim"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Make a claim to collect your DOTs."] #[doc = ""] #[doc = "The dispatch origin for this call must be _None_."] @@ -19438,40 +13469,28 @@ pub mod api { #[doc = ""] pub fn claim( &self, - dest: ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Claim, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 8u8, 205u8, 188u8, 57u8, 197u8, 203u8, 156u8, 65u8, 246u8, - 236u8, 199u8, 6u8, 152u8, 34u8, 251u8, 178u8, 206u8, 127u8, - 167u8, 59u8, 43u8, 162u8, 154u8, 89u8, 215u8, 192u8, 18u8, - 100u8, 66u8, 7u8, 97u8, 229u8, - ] - { - let call = Claim { - dest, - ethereum_signature, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Claims", + call: "claim", + data: Claim { + dest, + ethereum_signature, + }, + }, + [ + 33u8, 63u8, 71u8, 104u8, 200u8, 179u8, 248u8, 38u8, 193u8, + 198u8, 250u8, 49u8, 106u8, 26u8, 109u8, 183u8, 33u8, 50u8, + 217u8, 28u8, 50u8, 107u8, 249u8, 80u8, 199u8, 10u8, 192u8, + 1u8, 54u8, 41u8, 146u8, 11u8, + ], + ) } #[doc = "Mint a new claim to collect DOTs."] #[doc = ""] @@ -19500,40 +13519,28 @@ pub mod api { statement: ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - MintClaim, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 10u8, 141u8, 200u8, 102u8, 21u8, 205u8, 178u8, 247u8, 154u8, - 245u8, 172u8, 178u8, 26u8, 249u8, 179u8, 236u8, 198u8, 4u8, - 183u8, 239u8, 39u8, 188u8, 146u8, 231u8, 244u8, 6u8, 31u8, - 180u8, 101u8, 157u8, 53u8, 59u8, - ] - { - let call = MintClaim { - who, - value, - vesting_schedule, - statement, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Claims", + call: "mint_claim", + data: MintClaim { + who, + value, + vesting_schedule, + statement, + }, + }, + [ + 213u8, 79u8, 204u8, 40u8, 104u8, 84u8, 82u8, 62u8, 193u8, + 93u8, 246u8, 21u8, 37u8, 244u8, 166u8, 132u8, 208u8, 18u8, + 86u8, 195u8, 156u8, 9u8, 220u8, 120u8, 40u8, 183u8, 28u8, + 103u8, 84u8, 163u8, 153u8, 110u8, + ], + ) } #[doc = "Make a claim to collect your DOTs by signing a statement."] #[doc = ""] @@ -19563,42 +13570,30 @@ pub mod api { #[doc = ""] pub fn claim_attest( &self, - dest: ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClaimAttest, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 116u8, 181u8, 28u8, 215u8, 245u8, 86u8, 215u8, 114u8, 201u8, - 250u8, 168u8, 43u8, 91u8, 74u8, 0u8, 61u8, 40u8, 135u8, 6u8, - 241u8, 18u8, 24u8, 153u8, 152u8, 22u8, 165u8, 172u8, 94u8, - 200u8, 53u8, 92u8, 212u8, - ] - { - let call = ClaimAttest { - dest, - ethereum_signature, - statement, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Claims", + call: "claim_attest", + data: ClaimAttest { + dest, + ethereum_signature, + statement, + }, + }, + [ + 255u8, 10u8, 87u8, 106u8, 101u8, 195u8, 249u8, 25u8, 109u8, + 82u8, 213u8, 95u8, 203u8, 145u8, 224u8, 113u8, 92u8, 141u8, + 31u8, 54u8, 218u8, 47u8, 218u8, 239u8, 211u8, 206u8, 77u8, + 176u8, 19u8, 176u8, 175u8, 135u8, + ], + ) } #[doc = "Attest to a statement, needed to finalize the claims process."] #[doc = ""] @@ -19620,76 +13615,52 @@ pub mod api { pub fn attest( &self, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Attest, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 7u8, 206u8, 87u8, 155u8, 225u8, 220u8, 145u8, 206u8, 87u8, - 132u8, 171u8, 67u8, 104u8, 91u8, 247u8, 39u8, 114u8, 156u8, - 185u8, 28u8, 194u8, 104u8, 32u8, 25u8, 50u8, 94u8, 249u8, - 196u8, 83u8, 36u8, 123u8, 106u8, - ] - { - let call = Attest { statement }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Claims", + call: "attest", + data: Attest { statement }, + }, + [ + 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, + 244u8, 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, + 22u8, 52u8, 223u8, 224u8, 83u8, 21u8, 218u8, 248u8, 100u8, + 107u8, 58u8, 247u8, 10u8, + ], + ) } pub fn move_claim( &self, old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, maybe_preclaim: ::core::option::Option< - ::subxt::sp_core::crypto::AccountId32, - >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - MoveClaim, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 7u8, 59u8, 57u8, 165u8, 149u8, 105u8, 40u8, 11u8, 62u8, - 212u8, 35u8, 185u8, 38u8, 244u8, 14u8, 170u8, 73u8, 160u8, - 100u8, 124u8, 20u8, 147u8, 12u8, 208u8, 124u8, 122u8, 148u8, - 12u8, 173u8, 61u8, 137u8, 20u8, - ] - { - let call = MoveClaim { - old, - new, - maybe_preclaim, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Claims", + call: "move_claim", + data: MoveClaim { + old, + new, + maybe_preclaim, + }, + }, + [ + 63u8, 48u8, 217u8, 16u8, 161u8, 102u8, 165u8, 241u8, 57u8, + 185u8, 230u8, 161u8, 202u8, 11u8, 223u8, 15u8, 57u8, 181u8, + 34u8, 131u8, 235u8, 168u8, 227u8, 152u8, 157u8, 4u8, 192u8, + 243u8, 194u8, 120u8, 130u8, 202u8, + ], + ) } } } @@ -19697,198 +13668,90 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Someone claimed some DOTs."] pub struct Claimed { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub ethereum_address: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Claimed { + impl ::subxt::events::StaticEvent for Claimed { const PALLET: &'static str = "Claims"; const EVENT: &'static str = "Claimed"; } } pub mod storage { use super::runtime_types; - pub struct Claims<'a>( - pub &'a runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ); - impl ::subxt::StorageEntry for Claims<'_> { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "Claims"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct Total; - impl ::subxt::StorageEntry for Total { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "Total"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Vesting<'a>( - pub &'a runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ); - impl ::subxt::StorageEntry for Vesting<'_> { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "Vesting"; - type Value = ( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct Signing<'a>( - pub &'a runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ); - impl ::subxt::StorageEntry for Signing<'_> { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "Signing"; - type Value = - runtime_types::polkadot_runtime_common::claims::StatementKind; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct Preclaims<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Preclaims<'_> { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "Preclaims"; - type Value = - runtime_types::polkadot_runtime_common::claims::EthereumAddress; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { pub fn claims( &self, - _0 : & 'a runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 66u8, 232u8, 109u8, 190u8, 15u8, 207u8, 114u8, 12u8, - 91u8, 228u8, 103u8, 37u8, 152u8, 245u8, 51u8, 121u8, - 179u8, 228u8, 187u8, 121u8, 141u8, 225u8, 122u8, 235u8, - 201u8, 94u8, 207u8, 50u8, 51u8, 166u8, 32u8, 119u8, - ] - { - let entry = Claims(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - pub fn claims_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Claims<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 66u8, 232u8, 109u8, 190u8, 15u8, 207u8, 114u8, 12u8, - 91u8, 228u8, 103u8, 37u8, 152u8, 245u8, 51u8, 121u8, - 179u8, 228u8, 187u8, 121u8, 141u8, 225u8, 122u8, 235u8, - 201u8, 94u8, 207u8, 50u8, 51u8, 166u8, 32u8, 119u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_runtime_common::claims::EthereumAddress, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Claims", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, + 175u8, 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, + 50u8, 37u8, 51u8, 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, + 253u8, 91u8, 60u8, 88u8, 182u8, + ], + ) + } + pub fn claims_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Claims", + Vec::new(), + [ + 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, + 175u8, 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, + 50u8, 37u8, 51u8, 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, + 253u8, 91u8, 60u8, 88u8, 182u8, + ], + ) } pub fn total( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 162u8, 59u8, 237u8, 63u8, 23u8, 44u8, 74u8, 169u8, 131u8, - 166u8, 174u8, 61u8, 127u8, 165u8, 32u8, 115u8, 73u8, - 171u8, 36u8, 10u8, 6u8, 23u8, 19u8, 202u8, 3u8, 189u8, - 29u8, 169u8, 144u8, 187u8, 235u8, 77u8, - ] - { - let entry = Total; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Total", + vec![], + [ + 162u8, 59u8, 237u8, 63u8, 23u8, 44u8, 74u8, 169u8, 131u8, + 166u8, 174u8, 61u8, 127u8, 165u8, 32u8, 115u8, 73u8, 171u8, + 36u8, 10u8, 6u8, 23u8, 19u8, 202u8, 3u8, 189u8, 29u8, 169u8, + 144u8, 187u8, 235u8, 77u8, + ], + ) } #[doc = " Vesting schedule for a claim."] #[doc = " First balance is the total amount that should be held for vesting."] @@ -19896,284 +13759,213 @@ pub mod api { #[doc = " The block number is when the vesting should start."] pub fn vesting( &self, - _0 : & 'a runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 177u8, 83u8, 172u8, 137u8, 213u8, 11u8, 74u8, - 192u8, 92u8, 96u8, 63u8, 139u8, 156u8, 62u8, 207u8, 47u8, - 156u8, 185u8, 145u8, 149u8, 112u8, 101u8, 17u8, 183u8, - 4u8, 220u8, 31u8, 56u8, 175u8, 97u8, 12u8, - ] - { - let entry = Vesting(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_runtime_common::claims::EthereumAddress, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Vesting", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, + 23u8, 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, + 48u8, 205u8, 43u8, 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, + 208u8, 80u8, 53u8, 25u8, 205u8, + ], + ) } #[doc = " Vesting schedule for a claim."] #[doc = " First balance is the total amount that should be held for vesting."] #[doc = " Second balance is how much should be unlocked per block."] #[doc = " The block number is when the vesting should start."] - pub fn vesting_iter( + pub fn vesting_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Vesting<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 177u8, 83u8, 172u8, 137u8, 213u8, 11u8, 74u8, - 192u8, 92u8, 96u8, 63u8, 139u8, 156u8, 62u8, 207u8, 47u8, - 156u8, 185u8, 145u8, 149u8, 112u8, 101u8, 17u8, 183u8, - 4u8, 220u8, 31u8, 56u8, 175u8, 97u8, 12u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Vesting", + Vec::new(), + [ + 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, + 23u8, 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, + 48u8, 205u8, 43u8, 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, + 208u8, 80u8, 53u8, 25u8, 205u8, + ], + ) } #[doc = " The statement kind that must be signed, if any."] pub fn signing( &self, - _0 : & 'a runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 85u8, 167u8, 23u8, 218u8, 101u8, 189u8, 129u8, 64u8, - 189u8, 159u8, 108u8, 22u8, 234u8, 189u8, 122u8, 145u8, - 225u8, 202u8, 158u8, 244u8, 1u8, 19u8, 66u8, 78u8, 250u8, - 208u8, 116u8, 222u8, 118u8, 231u8, 45u8, 170u8, - ] - { - let entry = Signing(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_runtime_common::claims::EthereumAddress, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::claims::StatementKind, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Signing", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, + 212u8, 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, + 23u8, 168u8, 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, + 17u8, 30u8, 125u8, 85u8, 107u8, + ], + ) } #[doc = " The statement kind that must be signed, if any."] - pub fn signing_iter( + pub fn signing_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Signing<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 85u8, 167u8, 23u8, 218u8, 101u8, 189u8, 129u8, 64u8, - 189u8, 159u8, 108u8, 22u8, 234u8, 189u8, 122u8, 145u8, - 225u8, 202u8, 158u8, 244u8, 1u8, 19u8, 66u8, 78u8, 250u8, - 208u8, 116u8, 222u8, 118u8, 231u8, 45u8, 170u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::claims::StatementKind, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Signing", + Vec::new(), + [ + 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, + 212u8, 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, + 23u8, 168u8, 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, + 17u8, 30u8, 125u8, 85u8, 107u8, + ], + ) } - #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] pub fn preclaims (& self , _0 : & 'a :: subxt :: sp_core :: crypto :: AccountId32 , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 208u8, 119u8, 9u8, 98u8, 68u8, 27u8, 159u8, 132u8, - 22u8, 72u8, 80u8, 83u8, 147u8, 224u8, 241u8, 98u8, 143u8, - 219u8, 240u8, 199u8, 54u8, 36u8, 188u8, 187u8, 255u8, - 12u8, 163u8, 136u8, 53u8, 210u8, 206u8, - ] - { - let entry = Preclaims(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] + pub fn preclaims( + &self, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Preclaims", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, + 136u8, 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, + 186u8, 30u8, 0u8, 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, + 184u8, 133u8, 214u8, 67u8, 95u8, + ], + ) } #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] - pub fn preclaims_iter( + pub fn preclaims_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Preclaims<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 208u8, 119u8, 9u8, 98u8, 68u8, 27u8, 159u8, 132u8, - 22u8, 72u8, 80u8, 83u8, 147u8, 224u8, 241u8, 98u8, 143u8, - 219u8, 240u8, 199u8, 54u8, 36u8, 188u8, 187u8, 255u8, - 12u8, 163u8, 136u8, 53u8, 210u8, 206u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Claims", + "Preclaims", + Vec::new(), + [ + 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, + 136u8, 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, + 186u8, 30u8, 0u8, 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, + 184u8, 133u8, 214u8, 67u8, 95u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { pub fn prefix( &self, - ) -> ::core::result::Result< - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Claims", "Prefix")? - == [ - 151u8, 15u8, 166u8, 7u8, 98u8, 182u8, 188u8, 119u8, 175u8, - 44u8, 205u8, 188u8, 45u8, 196u8, 52u8, 235u8, 147u8, 241u8, - 62u8, 53u8, 48u8, 127u8, 177u8, 227u8, 224u8, 81u8, 58u8, - 244u8, 157u8, 148u8, 127u8, 80u8, - ] - { - let pallet = metadata.pallet("Claims")?; - let constant = pallet.constant("Prefix")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Claims", + "Prefix", + [ + 106u8, 50u8, 57u8, 116u8, 43u8, 202u8, 37u8, 248u8, 102u8, + 22u8, 62u8, 22u8, 242u8, 54u8, 152u8, 168u8, 107u8, 64u8, + 72u8, 172u8, 124u8, 40u8, 42u8, 110u8, 104u8, 145u8, 31u8, + 144u8, 242u8, 189u8, 145u8, 208u8, + ], + ) } } } } pub mod vesting { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Vest; - impl ::subxt::Call for Vest { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "vest"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct VestOther { - pub target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for VestOther { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "vest_other"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct VestedTransfer { - pub target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -20181,18 +13973,18 @@ pub mod api { ::core::primitive::u32, >, } - impl ::subxt::Call for VestedTransfer { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "vested_transfer"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceVestedTransfer { - pub source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub source: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - pub target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< @@ -20200,34 +13992,17 @@ pub mod api { ::core::primitive::u32, >, } - impl ::subxt::Call for ForceVestedTransfer { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "force_vested_transfer"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct MergeSchedules { pub schedule1_index: ::core::primitive::u32, pub schedule2_index: ::core::primitive::u32, } - impl ::subxt::Call for MergeSchedules { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "merge_schedules"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Unlock any vested funds of the sender account."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] @@ -20243,35 +14018,23 @@ pub mod api { #[doc = "# "] pub fn vest( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Vest, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Vesting", + call: "vest", + data: Vest {}, + }, + [ 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, 65u8, 181u8, 196u8, 125u8, 45u8, 133u8, 25u8, 33u8, 3u8, 34u8, 21u8, 167u8, 172u8, 54u8, - ] - { - let call = Vest {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Unlock any vested funds of a `target` account."] #[doc = ""] @@ -20290,39 +14053,27 @@ pub mod api { #[doc = "# "] pub fn vest_other( &self, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - VestOther, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 220u8, 214u8, 201u8, 84u8, 89u8, 137u8, 126u8, 80u8, 57u8, - 1u8, 178u8, 144u8, 1u8, 79u8, 232u8, 136u8, 62u8, 227u8, - 26u8, 148u8, 78u8, 92u8, 222u8, 210u8, 5u8, 108u8, 245u8, - 51u8, 208u8, 98u8, 184u8, 8u8, - ] - { - let call = VestOther { target }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Vesting", + call: "vest_other", + data: VestOther { target }, + }, + [ + 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, + 81u8, 243u8, 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, + 128u8, 90u8, 117u8, 164u8, 111u8, 0u8, 251u8, 148u8, 250u8, + 248u8, 102u8, 79u8, 165u8, 175u8, + ], + ) } #[doc = "Create a vested transfer."] #[doc = ""] @@ -20343,43 +14094,31 @@ pub mod api { #[doc = "# "] pub fn vested_transfer( &self, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - VestedTransfer, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 117u8, 107u8, 28u8, 234u8, 240u8, 253u8, 122u8, 25u8, 134u8, - 41u8, 162u8, 36u8, 157u8, 82u8, 214u8, 174u8, 132u8, 24u8, - 241u8, 68u8, 126u8, 122u8, 162u8, 130u8, 62u8, 43u8, 145u8, - 90u8, 49u8, 200u8, 25u8, 137u8, - ] - { - let call = VestedTransfer { target, schedule }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Vesting", + call: "vested_transfer", + data: VestedTransfer { target, schedule }, + }, + [ + 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, + 252u8, 75u8, 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, + 71u8, 108u8, 126u8, 118u8, 49u8, 122u8, 249u8, 132u8, 19u8, + 2u8, 132u8, 160u8, 247u8, 195u8, + ], + ) } #[doc = "Force a vested transfer."] #[doc = ""] @@ -20401,51 +14140,39 @@ pub mod api { #[doc = "# "] pub fn force_vested_transfer( &self, - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + source: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceVestedTransfer, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 32u8, 195u8, 99u8, 57u8, 6u8, 182u8, 106u8, 47u8, 9u8, 19u8, - 255u8, 80u8, 244u8, 205u8, 129u8, 78u8, 6u8, 215u8, 224u8, - 151u8, 14u8, 219u8, 46u8, 11u8, 200u8, 160u8, 79u8, 193u8, - 49u8, 252u8, 180u8, 151u8, - ] - { - let call = ForceVestedTransfer { - source, - target, - schedule, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Vesting", + call: "force_vested_transfer", + data: ForceVestedTransfer { + source, + target, + schedule, + }, + }, + [ + 110u8, 142u8, 63u8, 148u8, 90u8, 229u8, 237u8, 183u8, 240u8, + 237u8, 242u8, 32u8, 88u8, 48u8, 220u8, 101u8, 210u8, 212u8, + 27u8, 7u8, 186u8, 98u8, 28u8, 197u8, 148u8, 140u8, 77u8, + 59u8, 202u8, 166u8, 63u8, 97u8, + ], + ) } #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] #[doc = "the highest possible start and end blocks. If both schedules have already started the"] @@ -20472,38 +14199,26 @@ pub mod api { &self, schedule1_index: ::core::primitive::u32, schedule2_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - MergeSchedules, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 185u8, 253u8, 214u8, 24u8, 208u8, 226u8, 0u8, 212u8, 92u8, - 174u8, 252u8, 44u8, 250u8, 96u8, 66u8, 55u8, 88u8, 252u8, - 152u8, 238u8, 186u8, 85u8, 45u8, 213u8, 49u8, 42u8, 50u8, - 127u8, 30u8, 53u8, 73u8, 7u8, - ] - { - let call = MergeSchedules { - schedule1_index, - schedule2_index, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Vesting", + call: "merge_schedules", + data: MergeSchedules { + schedule1_index, + schedule2_index, + }, + }, + [ + 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, + 154u8, 183u8, 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, + 220u8, 31u8, 153u8, 25u8, 193u8, 251u8, 131u8, 26u8, 166u8, + 157u8, 75u8, 4u8, 110u8, 125u8, + ], + ) } } } @@ -20511,307 +14226,215 @@ pub mod api { pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub unvested: ::core::primitive::u128, } - impl ::subxt::Event for VestingUpdated { + impl ::subxt::events::StaticEvent for VestingUpdated { const PALLET: &'static str = "Vesting"; const EVENT: &'static str = "VestingUpdated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An \\[account\\] has become fully vested."] pub struct VestingCompleted { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for VestingCompleted { + impl ::subxt::events::StaticEvent for VestingCompleted { const PALLET: &'static str = "Vesting"; const EVENT: &'static str = "VestingCompleted"; } } pub mod storage { use super::runtime_types; - pub struct Vesting<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Vesting<'_> { - const PALLET: &'static str = "Vesting"; - const STORAGE: &'static str = "Vesting"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct StorageVersion; - impl ::subxt::StorageEntry for StorageVersion { - const PALLET: &'static str = "Vesting"; - const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::pallet_vesting::Releases; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Information regarding the vesting of a given account."] pub fn vesting( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 237u8, 216u8, 145u8, 89u8, 52u8, 38u8, 126u8, 212u8, - 173u8, 3u8, 57u8, 156u8, 208u8, 160u8, 249u8, 177u8, - 83u8, 140u8, 178u8, 221u8, 106u8, 66u8, 171u8, 25u8, - 230u8, 69u8, 78u8, 223u8, 182u8, 156u8, 218u8, 206u8, - ] - { - let entry = Vesting(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Vesting", + "Vesting", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, + 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, + 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, + 168u8, 239u8, 212u8, 36u8, + ], + ) } #[doc = " Information regarding the vesting of a given account."] - pub fn vesting_iter( + pub fn vesting_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Vesting<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 237u8, 216u8, 145u8, 89u8, 52u8, 38u8, 126u8, 212u8, - 173u8, 3u8, 57u8, 156u8, 208u8, 160u8, 249u8, 177u8, - 83u8, 140u8, 178u8, 221u8, 106u8, 66u8, 171u8, 25u8, - 230u8, 69u8, 78u8, 223u8, 182u8, 156u8, 218u8, 206u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Vesting", + "Vesting", + Vec::new(), + [ + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, + 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, + 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, + 168u8, 239u8, 212u8, 36u8, + ], + ) } #[doc = " Storage version of the pallet."] #[doc = ""] #[doc = " New networks start with latest version, as determined by the genesis build."] pub fn storage_version( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_vesting::Releases, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, - 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, - 66u8, 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, - 122u8, 232u8, 94u8, 189u8, 23u8, 45u8, 191u8, - ] - { - let entry = StorageVersion; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_vesting::Releases, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Vesting", + "StorageVersion", + vec![], + [ + 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, + 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, + 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, 122u8, 232u8, + 94u8, 189u8, 23u8, 45u8, 191u8, + ], + ) } } } pub mod constants { - use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The minimum amount transferred to call `vested_transfer`."] pub fn min_vested_transfer( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Vesting", "MinVestedTransfer")? - == [ - 92u8, 250u8, 99u8, 224u8, 124u8, 3u8, 41u8, 238u8, 116u8, - 235u8, 81u8, 85u8, 152u8, 180u8, 129u8, 205u8, 190u8, 88u8, - 54u8, 86u8, 184u8, 185u8, 221u8, 85u8, 203u8, 161u8, 201u8, - 77u8, 143u8, 170u8, 128u8, 176u8, - ] - { - let pallet = metadata.pallet("Vesting")?; - let constant = pallet.constant("MinVestedTransfer")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Vesting", + "MinVestedTransfer", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } pub fn max_vesting_schedules( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Vesting", "MaxVestingSchedules")? - == [ - 156u8, 82u8, 251u8, 182u8, 112u8, 167u8, 99u8, 73u8, 181u8, - 140u8, 52u8, 5u8, 46u8, 113u8, 139u8, 65u8, 61u8, 139u8, - 212u8, 238u8, 240u8, 112u8, 245u8, 187u8, 124u8, 21u8, 211u8, - 130u8, 61u8, 48u8, 245u8, 137u8, - ] - { - let pallet = metadata.pallet("Vesting")?; - let constant = pallet.constant("MaxVestingSchedules")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Vesting", + "MaxVestingSchedules", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod utility { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Batch { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for Batch { - const PALLET: &'static str = "Utility"; - const FUNCTION: &'static str = "batch"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AsDerivative { pub index: ::core::primitive::u16, pub call: ::std::boxed::Box, } - impl ::subxt::Call for AsDerivative { - const PALLET: &'static str = "Utility"; - const FUNCTION: &'static str = "as_derivative"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct BatchAll { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for BatchAll { - const PALLET: &'static str = "Utility"; - const FUNCTION: &'static str = "batch_all"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct DispatchAs { pub as_origin: ::std::boxed::Box, pub call: ::std::boxed::Box, } - impl ::subxt::Call for DispatchAs { - const PALLET: &'static str = "Utility"; - const FUNCTION: &'static str = "dispatch_as"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceBatch { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for ForceBatch { - const PALLET: &'static str = "Utility"; - const FUNCTION: &'static str = "force_batch"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Send a batch of dispatch calls."] #[doc = ""] #[doc = "May be called from any origin."] @@ -20834,35 +14457,23 @@ pub mod api { pub fn batch( &self, calls: ::std::vec::Vec, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Batch, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 118u8, 153u8, 248u8, 10u8, 95u8, 87u8, 241u8, 183u8, 110u8, - 81u8, 134u8, 246u8, 127u8, 18u8, 37u8, 94u8, 97u8, 157u8, - 203u8, 100u8, 55u8, 106u8, 200u8, 152u8, 69u8, 250u8, 231u8, - 196u8, 214u8, 62u8, 154u8, 59u8, - ] - { - let call = Batch { calls }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Utility", + call: "batch", + data: Batch { calls }, + }, + [ + 230u8, 242u8, 253u8, 157u8, 0u8, 86u8, 104u8, 163u8, 42u8, + 162u8, 114u8, 169u8, 67u8, 132u8, 54u8, 68u8, 32u8, 42u8, + 172u8, 56u8, 29u8, 54u8, 151u8, 226u8, 195u8, 239u8, 113u8, + 87u8, 21u8, 125u8, 40u8, 26u8, + ], + ) } #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] @@ -20881,38 +14492,26 @@ pub mod api { &self, index: ::core::primitive::u16, call: runtime_types::polkadot_runtime::Call, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AsDerivative, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 57u8, 222u8, 171u8, 71u8, 110u8, 45u8, 232u8, 229u8, 107u8, - 186u8, 96u8, 126u8, 103u8, 175u8, 43u8, 13u8, 231u8, 179u8, - 224u8, 41u8, 123u8, 129u8, 107u8, 126u8, 201u8, 243u8, 126u8, - 203u8, 165u8, 104u8, 124u8, 137u8, - ] - { - let call = AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Utility", + call: "as_derivative", + data: AsDerivative { + index, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 209u8, 64u8, 30u8, 168u8, 146u8, 109u8, 20u8, 238u8, 158u8, + 153u8, 28u8, 18u8, 100u8, 210u8, 98u8, 203u8, 144u8, 225u8, + 110u8, 242u8, 244u8, 204u8, 183u8, 255u8, 165u8, 95u8, 166u8, + 131u8, 135u8, 41u8, 116u8, 201u8, + ], + ) } #[doc = "Send a batch of dispatch calls and atomically execute them."] #[doc = "The whole transaction will rollback and fail if any of the calls failed."] @@ -20931,35 +14530,23 @@ pub mod api { pub fn batch_all( &self, calls: ::std::vec::Vec, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - BatchAll, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 5u8, 244u8, 150u8, 6u8, 141u8, 240u8, 33u8, 249u8, 11u8, - 131u8, 248u8, 156u8, 131u8, 121u8, 245u8, 181u8, 218u8, - 132u8, 79u8, 111u8, 188u8, 232u8, 148u8, 209u8, 193u8, 51u8, - 54u8, 231u8, 62u8, 219u8, 129u8, 198u8, - ] - { - let call = BatchAll { calls }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Utility", + call: "batch_all", + data: BatchAll { calls }, + }, + [ + 169u8, 101u8, 230u8, 159u8, 101u8, 77u8, 48u8, 75u8, 209u8, + 42u8, 1u8, 95u8, 117u8, 254u8, 136u8, 162u8, 194u8, 255u8, + 67u8, 45u8, 188u8, 209u8, 155u8, 1u8, 252u8, 9u8, 253u8, + 225u8, 215u8, 210u8, 125u8, 44u8, + ], + ) } #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] @@ -20975,38 +14562,26 @@ pub mod api { &self, as_origin: runtime_types::polkadot_runtime::OriginCaller, call: runtime_types::polkadot_runtime::Call, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - DispatchAs, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 151u8, 231u8, 206u8, 220u8, 213u8, 118u8, 138u8, 198u8, - 252u8, 44u8, 211u8, 231u8, 205u8, 96u8, 86u8, 253u8, 190u8, - 136u8, 200u8, 223u8, 152u8, 183u8, 123u8, 48u8, 168u8, 56u8, - 24u8, 165u8, 79u8, 190u8, 13u8, 230u8, - ] - { - let call = DispatchAs { - as_origin: ::std::boxed::Box::new(as_origin), - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Utility", + call: "dispatch_as", + data: DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), + }, + }, + [ + 21u8, 250u8, 30u8, 78u8, 60u8, 151u8, 157u8, 90u8, 167u8, + 9u8, 134u8, 177u8, 58u8, 69u8, 157u8, 169u8, 203u8, 130u8, + 160u8, 26u8, 170u8, 142u8, 30u8, 206u8, 161u8, 84u8, 94u8, + 205u8, 138u8, 248u8, 120u8, 61u8, + ], + ) } #[doc = "Send a batch of dispatch calls."] #[doc = "Unlike `batch`, it allows errors and won't interrupt."] @@ -21025,35 +14600,23 @@ pub mod api { pub fn force_batch( &self, calls: ::std::vec::Vec, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceBatch, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 82u8, 204u8, 241u8, 136u8, 126u8, 230u8, 50u8, 149u8, 95u8, - 70u8, 61u8, 138u8, 29u8, 63u8, 217u8, 169u8, 1u8, 200u8, - 60u8, 157u8, 190u8, 200u8, 111u8, 171u8, 83u8, 168u8, 81u8, - 225u8, 182u8, 113u8, 24u8, 97u8, - ] - { - let call = ForceBatch { calls }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Utility", + call: "force_batch", + data: ForceBatch { calls }, + }, + [ + 195u8, 179u8, 12u8, 198u8, 131u8, 78u8, 95u8, 171u8, 209u8, + 198u8, 177u8, 95u8, 116u8, 196u8, 112u8, 71u8, 41u8, 13u8, + 73u8, 86u8, 241u8, 226u8, 224u8, 146u8, 110u8, 60u8, 77u8, + 99u8, 131u8, 151u8, 28u8, 141u8, + ], + ) } } } @@ -21061,187 +14624,196 @@ pub mod api { pub type Event = runtime_types::pallet_utility::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] #[doc = "well as the error."] pub struct BatchInterrupted { pub index: ::core::primitive::u32, pub error: runtime_types::sp_runtime::DispatchError, } - impl ::subxt::Event for BatchInterrupted { + impl ::subxt::events::StaticEvent for BatchInterrupted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "BatchInterrupted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Batch of dispatches completed fully with no error."] pub struct BatchCompleted; - impl ::subxt::Event for BatchCompleted { + impl ::subxt::events::StaticEvent for BatchCompleted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "BatchCompleted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Batch of dispatches completed but has errors."] pub struct BatchCompletedWithErrors; - impl ::subxt::Event for BatchCompletedWithErrors { + impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "BatchCompletedWithErrors"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A single item within a Batch of dispatches has completed with no error."] pub struct ItemCompleted; - impl ::subxt::Event for ItemCompleted { + impl ::subxt::events::StaticEvent for ItemCompleted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "ItemCompleted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A single item within a Batch of dispatches has completed with error."] pub struct ItemFailed { pub error: runtime_types::sp_runtime::DispatchError, } - impl ::subxt::Event for ItemFailed { + impl ::subxt::events::StaticEvent for ItemFailed { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "ItemFailed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A call was dispatched."] pub struct DispatchedAs { pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for DispatchedAs { + impl ::subxt::events::StaticEvent for DispatchedAs { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "DispatchedAs"; } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The limit on the number of batched calls."] pub fn batched_calls_limit( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Utility", "batched_calls_limit")? - == [ - 230u8, 161u8, 6u8, 191u8, 162u8, 108u8, 149u8, 245u8, 68u8, - 101u8, 120u8, 129u8, 140u8, 51u8, 77u8, 97u8, 30u8, 155u8, - 115u8, 70u8, 72u8, 235u8, 251u8, 192u8, 5u8, 8u8, 188u8, - 72u8, 132u8, 227u8, 44u8, 2u8, - ] - { - let pallet = metadata.pallet("Utility")?; - let constant = pallet.constant("batched_calls_limit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Utility", + "batched_calls_limit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod identity { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Identity pallet declaration."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddRegistrar { - pub account: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for AddRegistrar { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "add_registrar"; + pub account: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetIdentity { pub info: ::std::boxed::Box< runtime_types::pallet_identity::types::IdentityInfo, >, } - impl ::subxt::Call for SetIdentity { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "set_identity"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetSubs { pub subs: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, } - impl ::subxt::Call for SetSubs { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "set_subs"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClearIdentity; - impl ::subxt::Call for ClearIdentity { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "clear_identity"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RequestJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, #[codec(compact)] pub max_fee: ::core::primitive::u128, } - impl ::subxt::Call for RequestJudgement { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "request_judgement"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct CancelRequest { pub reg_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelRequest { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "cancel_request"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetFee { #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for SetFee { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "set_fee"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetAccountId { #[codec(compact)] pub index: ::core::primitive::u32, - pub new: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for SetAccountId { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "set_account_id"; + pub new: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetFields { #[codec(compact)] pub index: ::core::primitive::u32, @@ -21249,93 +14821,76 @@ pub mod api { runtime_types::pallet_identity::types::IdentityField, >, } - impl ::subxt::Call for SetFields { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "set_fields"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProvideJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, - pub target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, } - impl ::subxt::Call for ProvideJudgement { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "provide_judgement"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct KillIdentity { - pub target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for KillIdentity { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "kill_identity"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddSub { - pub sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub data: runtime_types::pallet_identity::types::Data, } - impl ::subxt::Call for AddSub { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "add_sub"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RenameSub { - pub sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, pub data: runtime_types::pallet_identity::types::Data, } - impl ::subxt::Call for RenameSub { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "rename_sub"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveSub { - pub sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for RemoveSub { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "remove_sub"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct QuitSub; - impl ::subxt::Call for QuitSub { - const PALLET: &'static str = "Identity"; - const FUNCTION: &'static str = "quit_sub"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Add a registrar to the system."] #[doc = ""] #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] @@ -21351,36 +14906,24 @@ pub mod api { #[doc = "# "] pub fn add_registrar( &self, - account: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddRegistrar, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 252u8, 233u8, 148u8, 186u8, 42u8, 127u8, 183u8, 107u8, 205u8, - 34u8, 63u8, 170u8, 82u8, 218u8, 141u8, 136u8, 174u8, 45u8, - 3u8, 226u8, 175u8, 22u8, 18u8, 120u8, 70u8, 4u8, 164u8, - 147u8, 228u8, 52u8, 199u8, 196u8, - ] - { - let call = AddRegistrar { account }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + account: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "add_registrar", + data: AddRegistrar { account }, + }, + [ + 231u8, 221u8, 79u8, 233u8, 107u8, 34u8, 195u8, 186u8, 192u8, + 129u8, 103u8, 159u8, 159u8, 83u8, 151u8, 161u8, 137u8, 164u8, + 143u8, 31u8, 75u8, 42u8, 27u8, 203u8, 19u8, 70u8, 173u8, + 11u8, 241u8, 189u8, 137u8, 127u8, + ], + ) } #[doc = "Set an account's identity information and reserve the appropriate deposit."] #[doc = ""] @@ -21404,37 +14947,25 @@ pub mod api { pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetIdentity, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 174u8, 5u8, 84u8, 201u8, 219u8, 147u8, 45u8, 241u8, 46u8, - 192u8, 221u8, 20u8, 233u8, 128u8, 206u8, 1u8, 71u8, 244u8, - 153u8, 167u8, 150u8, 164u8, 16u8, 58u8, 51u8, 168u8, 58u8, - 184u8, 204u8, 229u8, 135u8, 91u8, - ] - { - let call = SetIdentity { - info: ::std::boxed::Box::new(info), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "set_identity", + data: SetIdentity { + info: ::std::boxed::Box::new(info), + }, + }, + [ + 130u8, 89u8, 118u8, 6u8, 134u8, 166u8, 35u8, 192u8, 73u8, + 6u8, 171u8, 20u8, 225u8, 255u8, 152u8, 142u8, 111u8, 8u8, + 206u8, 200u8, 64u8, 52u8, 110u8, 123u8, 42u8, 101u8, 191u8, + 242u8, 133u8, 139u8, 154u8, 205u8, + ], + ) } #[doc = "Set the sub-accounts of the sender."] #[doc = ""] @@ -21460,38 +14991,26 @@ pub mod api { pub fn set_subs( &self, subs: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetSubs, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 157u8, 141u8, 52u8, 45u8, 109u8, 252u8, 84u8, 0u8, 38u8, - 209u8, 193u8, 212u8, 177u8, 47u8, 219u8, 132u8, 254u8, 234u8, - 43u8, 200u8, 104u8, 149u8, 250u8, 169u8, 119u8, 208u8, 111u8, - 184u8, 70u8, 161u8, 245u8, 33u8, - ] - { - let call = SetSubs { subs }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "set_subs", + data: SetSubs { subs }, + }, + [ + 177u8, 219u8, 84u8, 183u8, 5u8, 32u8, 192u8, 82u8, 174u8, + 68u8, 198u8, 224u8, 56u8, 85u8, 134u8, 171u8, 30u8, 132u8, + 140u8, 236u8, 117u8, 24u8, 150u8, 218u8, 146u8, 194u8, 144u8, + 92u8, 103u8, 206u8, 46u8, 90u8, + ], + ) } #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] #[doc = ""] @@ -21513,35 +15032,23 @@ pub mod api { #[doc = "# "] pub fn clear_identity( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClearIdentity, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "clear_identity", + data: ClearIdentity {}, + }, + [ 75u8, 44u8, 74u8, 122u8, 149u8, 202u8, 114u8, 230u8, 0u8, 255u8, 140u8, 122u8, 14u8, 196u8, 205u8, 249u8, 220u8, 94u8, 216u8, 34u8, 63u8, 14u8, 8u8, 205u8, 74u8, 23u8, 181u8, 129u8, 252u8, 110u8, 231u8, 114u8, - ] - { - let call = ClearIdentity {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Request a judgement from a registrar."] #[doc = ""] @@ -21570,35 +15077,23 @@ pub mod api { &self, reg_index: ::core::primitive::u32, max_fee: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RequestJudgement, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 90u8, 137u8, 162u8, 2u8, 124u8, 245u8, 7u8, 200u8, 235u8, - 138u8, 217u8, 247u8, 77u8, 87u8, 152u8, 2u8, 13u8, 175u8, - 106u8, 202u8, 204u8, 113u8, 24u8, 127u8, 105u8, 136u8, 191u8, - 133u8, 212u8, 138u8, 22u8, 173u8, - ] - { - let call = RequestJudgement { reg_index, max_fee }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "request_judgement", + data: RequestJudgement { reg_index, max_fee }, + }, + [ + 186u8, 149u8, 61u8, 54u8, 159u8, 194u8, 77u8, 161u8, 220u8, + 157u8, 3u8, 216u8, 23u8, 105u8, 119u8, 76u8, 144u8, 198u8, + 157u8, 45u8, 235u8, 139u8, 87u8, 82u8, 81u8, 12u8, 25u8, + 134u8, 225u8, 92u8, 182u8, 101u8, + ], + ) } #[doc = "Cancel a previous request."] #[doc = ""] @@ -21620,35 +15115,23 @@ pub mod api { pub fn cancel_request( &self, reg_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelRequest, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 153u8, 44u8, 7u8, 70u8, 91u8, 44u8, 138u8, 219u8, 118u8, - 67u8, 166u8, 133u8, 90u8, 234u8, 248u8, 42u8, 108u8, 51u8, - 229u8, 196u8, 74u8, 167u8, 40u8, 229u8, 168u8, 159u8, 2u8, - 231u8, 236u8, 58u8, 109u8, 32u8, - ] - { - let call = CancelRequest { reg_index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "cancel_request", + data: CancelRequest { reg_index }, + }, + [ + 83u8, 180u8, 239u8, 126u8, 32u8, 51u8, 17u8, 20u8, 180u8, + 3u8, 59u8, 96u8, 24u8, 32u8, 136u8, 92u8, 58u8, 254u8, 68u8, + 70u8, 50u8, 11u8, 51u8, 91u8, 180u8, 79u8, 81u8, 84u8, 216u8, + 138u8, 6u8, 215u8, + ], + ) } #[doc = "Set the fee required for a judgement to be requested from a registrar."] #[doc = ""] @@ -21667,35 +15150,23 @@ pub mod api { &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetFee, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 222u8, 115u8, 155u8, 44u8, 68u8, 179u8, 201u8, 247u8, 141u8, - 226u8, 124u8, 20u8, 188u8, 47u8, 190u8, 21u8, 212u8, 192u8, - 213u8, 76u8, 241u8, 75u8, 87u8, 142u8, 157u8, 229u8, 136u8, - 254u8, 250u8, 28u8, 69u8, 218u8, - ] - { - let call = SetFee { index, fee }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "set_fee", + data: SetFee { index, fee }, + }, + [ + 21u8, 157u8, 123u8, 182u8, 160u8, 190u8, 117u8, 37u8, 136u8, + 133u8, 104u8, 234u8, 31u8, 145u8, 115u8, 154u8, 125u8, 40u8, + 2u8, 87u8, 118u8, 56u8, 247u8, 73u8, 89u8, 0u8, 251u8, 3u8, + 58u8, 105u8, 239u8, 211u8, + ], + ) } #[doc = "Change the account associated with a registrar."] #[doc = ""] @@ -21713,36 +15184,24 @@ pub mod api { pub fn set_account_id( &self, index: ::core::primitive::u32, - new: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetAccountId, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 191u8, 243u8, 30u8, 116u8, 109u8, 235u8, 23u8, 106u8, 24u8, - 23u8, 80u8, 203u8, 68u8, 40u8, 116u8, 38u8, 68u8, 161u8, - 219u8, 64u8, 249u8, 179u8, 203u8, 113u8, 55u8, 7u8, 180u8, - 161u8, 37u8, 66u8, 6u8, 90u8, - ] - { - let call = SetAccountId { index, new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + new: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "set_account_id", + data: SetAccountId { index, new }, + }, + [ + 245u8, 76u8, 110u8, 237u8, 219u8, 246u8, 219u8, 136u8, 146u8, + 42u8, 139u8, 60u8, 30u8, 188u8, 87u8, 10u8, 231u8, 89u8, + 225u8, 24u8, 152u8, 188u8, 59u8, 194u8, 199u8, 78u8, 169u8, + 90u8, 122u8, 29u8, 80u8, 42u8, + ], + ) } #[doc = "Set the field information for a registrar."] #[doc = ""] @@ -21763,35 +15222,23 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetFields, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 253u8, 43u8, 154u8, 17u8, 161u8, 187u8, 72u8, 96u8, 20u8, - 240u8, 97u8, 43u8, 242u8, 79u8, 115u8, 38u8, 130u8, 243u8, - 176u8, 46u8, 16u8, 126u8, 191u8, 32u8, 106u8, 200u8, 134u8, - 72u8, 244u8, 189u8, 165u8, 125u8, - ] - { - let call = SetFields { index, fields }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "set_fields", + data: SetFields { index, fields }, + }, + [ + 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8, + 81u8, 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8, + 184u8, 28u8, 84u8, 125u8, 93u8, 126u8, 134u8, 92u8, 203u8, + 200u8, 129u8, 240u8, 252u8, + ], + ) } #[doc = "Provide a judgement for an account's identity."] #[doc = ""] @@ -21815,46 +15262,34 @@ pub mod api { pub fn provide_judgement( &self, reg_index: ::core::primitive::u32, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ProvideJudgement, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 238u8, 210u8, 71u8, 239u8, 251u8, 52u8, 145u8, 71u8, 68u8, - 185u8, 103u8, 82u8, 21u8, 164u8, 128u8, 189u8, 123u8, 141u8, - 213u8, 77u8, 139u8, 10u8, 6u8, 229u8, 227u8, 58u8, 236u8, - 123u8, 139u8, 192u8, 200u8, 170u8, - ] - { - let call = ProvideJudgement { - reg_index, - target, - judgement, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "provide_judgement", + data: ProvideJudgement { + reg_index, + target, + judgement, + }, + }, + [ + 221u8, 244u8, 12u8, 17u8, 197u8, 130u8, 189u8, 136u8, 253u8, + 143u8, 5u8, 145u8, 177u8, 105u8, 220u8, 8u8, 157u8, 63u8, + 131u8, 5u8, 152u8, 167u8, 158u8, 47u8, 123u8, 86u8, 225u8, + 88u8, 218u8, 20u8, 82u8, 230u8, + ], + ) } #[doc = "Remove an account's identity and sub-account information and slash the deposits."] #[doc = ""] @@ -21877,39 +15312,27 @@ pub mod api { #[doc = "# "] pub fn kill_identity( &self, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - KillIdentity, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 91u8, 164u8, 242u8, 44u8, 253u8, 203u8, 102u8, 89u8, 218u8, - 150u8, 227u8, 56u8, 179u8, 135u8, 93u8, 107u8, 166u8, 157u8, - 187u8, 180u8, 215u8, 129u8, 56u8, 110u8, 5u8, 243u8, 219u8, - 205u8, 11u8, 229u8, 29u8, 188u8, - ] - { - let call = KillIdentity { target }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "kill_identity", + data: KillIdentity { target }, + }, + [ + 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, + 136u8, 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, + 127u8, 216u8, 205u8, 117u8, 224u8, 121u8, 240u8, 231u8, + 126u8, 181u8, 230u8, 68u8, 13u8, 174u8, + ], + ) } #[doc = "Add the given account to the sender's subs."] #[doc = ""] @@ -21920,40 +15343,28 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn add_sub( &self, - sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddSub, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 105u8, 38u8, 167u8, 99u8, 224u8, 183u8, 88u8, 133u8, 180u8, - 78u8, 211u8, 239u8, 49u8, 128u8, 224u8, 61u8, 23u8, 249u8, - 91u8, 16u8, 216u8, 40u8, 240u8, 77u8, 209u8, 91u8, 174u8, - 211u8, 175u8, 238u8, 131u8, 208u8, - ] - { - let call = AddSub { sub, data }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "add_sub", + data: AddSub { sub, data }, + }, + [ + 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, + 147u8, 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, + 162u8, 173u8, 207u8, 182u8, 130u8, 128u8, 214u8, 242u8, + 101u8, 250u8, 242u8, 24u8, 17u8, 84u8, + ], + ) } #[doc = "Alter the associated name of the given sub-account."] #[doc = ""] @@ -21961,40 +15372,28 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn rename_sub( &self, - sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RenameSub, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 17u8, 110u8, 213u8, 124u8, 4u8, 76u8, 182u8, 53u8, 102u8, - 224u8, 240u8, 250u8, 94u8, 96u8, 181u8, 107u8, 114u8, 127u8, - 37u8, 15u8, 95u8, 7u8, 238u8, 172u8, 30u8, 125u8, 70u8, 7u8, - 97u8, 182u8, 3u8, 197u8, - ] - { - let call = RenameSub { sub, data }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "rename_sub", + data: RenameSub { sub, data }, + }, + [ + 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, + 85u8, 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, + 15u8, 89u8, 59u8, 57u8, 252u8, 163u8, 9u8, 138u8, 216u8, + 189u8, 177u8, 42u8, 96u8, 34u8, + ], + ) } #[doc = "Remove the given account from the sender's subs."] #[doc = ""] @@ -22005,39 +15404,27 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn remove_sub( &self, - sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveSub, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 161u8, 114u8, 68u8, 57u8, 166u8, 240u8, 150u8, 95u8, 176u8, - 93u8, 62u8, 67u8, 185u8, 226u8, 117u8, 97u8, 119u8, 139u8, - 86u8, 52u8, 161u8, 88u8, 30u8, 20u8, 123u8, 20u8, 130u8, - 17u8, 44u8, 17u8, 47u8, 14u8, - ] - { - let call = RemoveSub { sub }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "remove_sub", + data: RemoveSub { sub }, + }, + [ + 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, + 46u8, 157u8, 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, + 224u8, 149u8, 154u8, 158u8, 187u8, 203u8, 215u8, 91u8, 43u8, + 105u8, 69u8, 213u8, 141u8, 124u8, + ], + ) } #[doc = "Remove the sender as a sub-account."] #[doc = ""] @@ -22051,35 +15438,23 @@ pub mod api { #[doc = "controller of an account is maliciously registered as a sub-account."] pub fn quit_sub( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - QuitSub, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Identity", + call: "quit_sub", + data: QuitSub {}, + }, + [ 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8, 169u8, 157u8, 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8, 119u8, 244u8, 42u8, 179u8, 51u8, 254u8, 240u8, 55u8, 25u8, 142u8, 38u8, 87u8, 44u8, - ] - { - let call = QuitSub {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } } } @@ -22087,337 +15462,261 @@ pub mod api { pub type Event = runtime_types::pallet_identity::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A name was set or reset (which will remove all judgements)."] pub struct IdentitySet { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for IdentitySet { + impl ::subxt::events::StaticEvent for IdentitySet { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentitySet"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A name was cleared, and the given balance returned."] pub struct IdentityCleared { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for IdentityCleared { + impl ::subxt::events::StaticEvent for IdentityCleared { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentityCleared"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A name was removed and the given balance slashed."] pub struct IdentityKilled { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for IdentityKilled { + impl ::subxt::events::StaticEvent for IdentityKilled { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentityKilled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A judgement was asked from a registrar."] pub struct JudgementRequested { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub registrar_index: ::core::primitive::u32, } - impl ::subxt::Event for JudgementRequested { + impl ::subxt::events::StaticEvent for JudgementRequested { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementRequested"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A judgement request was retracted."] pub struct JudgementUnrequested { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub registrar_index: ::core::primitive::u32, } - impl ::subxt::Event for JudgementUnrequested { + impl ::subxt::events::StaticEvent for JudgementUnrequested { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementUnrequested"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A judgement was given by a registrar."] pub struct JudgementGiven { - pub target: ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::ext::sp_core::crypto::AccountId32, pub registrar_index: ::core::primitive::u32, } - impl ::subxt::Event for JudgementGiven { + impl ::subxt::events::StaticEvent for JudgementGiven { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementGiven"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A registrar was added."] pub struct RegistrarAdded { pub registrar_index: ::core::primitive::u32, } - impl ::subxt::Event for RegistrarAdded { + impl ::subxt::events::StaticEvent for RegistrarAdded { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "RegistrarAdded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A sub-identity was added to an identity and the deposit paid."] pub struct SubIdentityAdded { - pub sub: ::subxt::sp_core::crypto::AccountId32, - pub main: ::subxt::sp_core::crypto::AccountId32, + pub sub: ::subxt::ext::sp_core::crypto::AccountId32, + pub main: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for SubIdentityAdded { + impl ::subxt::events::StaticEvent for SubIdentityAdded { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityAdded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A sub-identity was removed from an identity and the deposit freed."] pub struct SubIdentityRemoved { - pub sub: ::subxt::sp_core::crypto::AccountId32, - pub main: ::subxt::sp_core::crypto::AccountId32, + pub sub: ::subxt::ext::sp_core::crypto::AccountId32, + pub main: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for SubIdentityRemoved { + impl ::subxt::events::StaticEvent for SubIdentityRemoved { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityRemoved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, - pub main: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } - impl ::subxt::Event for SubIdentityRevoked { - const PALLET: &'static str = "Identity"; - const EVENT: &'static str = "SubIdentityRevoked"; - } - } - pub mod storage { - use super::runtime_types; - pub struct IdentityOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for IdentityOf<'_> { - const PALLET: &'static str = "Identity"; - const STORAGE: &'static str = "IdentityOf"; - type Value = runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct SuperOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SuperOf<'_> { - const PALLET: &'static str = "Identity"; - const STORAGE: &'static str = "SuperOf"; - type Value = ( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_identity::types::Data, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct SubsOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SubsOf<'_> { - const PALLET: &'static str = "Identity"; - const STORAGE: &'static str = "SubsOf"; - type Value = ( - ::core::primitive::u128, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::crypto::AccountId32, - >, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Registrars; - impl ::subxt::StorageEntry for Registrars { - const PALLET: &'static str = "Identity"; - const STORAGE: &'static str = "Registrars"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_identity::types::RegistrarInfo< - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - >, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } + pub struct SubIdentityRevoked { + pub sub: ::subxt::ext::sp_core::crypto::AccountId32, + pub main: ::subxt::ext::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + impl ::subxt::events::StaticEvent for SubIdentityRevoked { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityRevoked"; } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { #[doc = " Information that is pertinent to identify the entity behind an account."] #[doc = ""] #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn identity_of( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 225u8, 101u8, 83u8, 137u8, 207u8, 77u8, 139u8, 227u8, - 36u8, 100u8, 14u8, 30u8, 197u8, 65u8, 248u8, 227u8, - 175u8, 19u8, 189u8, 86u8, 189u8, 244u8, 144u8, 137u8, - 17u8, 249u8, 223u8, 200u8, 115u8, 190u8, 225u8, 30u8, - ] - { - let entry = IdentityOf(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "IdentityOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, + 95u8, 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, + 245u8, 39u8, 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, + 247u8, 104u8, 208u8, 171u8, 82u8, + ], + ) } #[doc = " Information that is pertinent to identify the entity behind an account."] #[doc = ""] #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn identity_of_iter( + pub fn identity_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, IdentityOf<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 225u8, 101u8, 83u8, 137u8, 207u8, 77u8, 139u8, 227u8, - 36u8, 100u8, 14u8, 30u8, 197u8, 65u8, 248u8, 227u8, - 175u8, 19u8, 189u8, 86u8, 189u8, 244u8, 144u8, 137u8, - 17u8, 249u8, 223u8, 200u8, 115u8, 190u8, 225u8, 30u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "IdentityOf", + Vec::new(), + [ + 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, + 95u8, 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8, + 245u8, 39u8, 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8, + 247u8, 104u8, 208u8, 171u8, 82u8, + ], + ) } #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] pub fn super_of( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 128u8, 234u8, 82u8, 152u8, 41u8, 4u8, 220u8, 41u8, 179u8, - 131u8, 72u8, 121u8, 131u8, 17u8, 40u8, 87u8, 186u8, - 159u8, 209u8, 33u8, 97u8, 28u8, 236u8, 196u8, 217u8, - 15u8, 126u8, 197u8, 32u8, 165u8, 78u8, 28u8, - ] - { - let entry = SuperOf(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::pallet_identity::types::Data, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "SuperOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, + 149u8, 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, + 18u8, 204u8, 166u8, 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, + 137u8, 158u8, 111u8, 100u8, 137u8, + ], + ) } #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] - pub fn super_of_iter( + pub fn super_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SuperOf<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 128u8, 234u8, 82u8, 152u8, 41u8, 4u8, 220u8, 41u8, 179u8, - 131u8, 72u8, 121u8, 131u8, 17u8, 40u8, 87u8, 186u8, - 159u8, 209u8, 33u8, 97u8, 28u8, 236u8, 196u8, 217u8, - 15u8, 126u8, 197u8, 32u8, 165u8, 78u8, 28u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::pallet_identity::types::Data, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "SuperOf", + Vec::new(), + [ + 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, + 149u8, 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8, + 18u8, 204u8, 166u8, 193u8, 133u8, 167u8, 248u8, 117u8, 80u8, + 137u8, 158u8, 111u8, 100u8, 137u8, + ], + ) } #[doc = " Alternative \"sub\" identities of this account."] #[doc = ""] @@ -22426,81 +15725,62 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn subs_of( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ( - ::core::primitive::u128, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::crypto::AccountId32, - >, - ), - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 136u8, 240u8, 238u8, 121u8, 194u8, 242u8, 139u8, 155u8, - 32u8, 201u8, 123u8, 76u8, 116u8, 219u8, 193u8, 45u8, - 251u8, 212u8, 46u8, 194u8, 93u8, 30u8, 174u8, 133u8, - 218u8, 147u8, 175u8, 38u8, 200u8, 109u8, 104u8, 52u8, - ] - { - let entry = SubsOf(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u128, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "SubsOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, + 206u8, 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, + 53u8, 7u8, 44u8, 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, + 175u8, 84u8, 6u8, 4u8, + ], + ) } #[doc = " Alternative \"sub\" identities of this account."] #[doc = ""] #[doc = " The first item is the deposit, the second is a vector of the accounts."] #[doc = ""] #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] - pub fn subs_of_iter( + pub fn subs_of_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SubsOf<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 136u8, 240u8, 238u8, 121u8, 194u8, 242u8, 139u8, 155u8, - 32u8, 201u8, 123u8, 76u8, 116u8, 219u8, 193u8, 45u8, - 251u8, 212u8, 46u8, 194u8, 93u8, 30u8, 174u8, 133u8, - 218u8, 147u8, 175u8, 38u8, 200u8, 109u8, 104u8, 52u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u128, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "SubsOf", + Vec::new(), + [ + 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, + 206u8, 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8, + 53u8, 7u8, 44u8, 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8, + 175u8, 84u8, 6u8, 4u8, + ], + ) } #[doc = " The set of registrars. Not expected to get very big as can only be added through a"] #[doc = " special origin (likely a council motion)."] @@ -22508,269 +15788,214 @@ pub mod api { #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] pub fn registrars( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_identity::types::RegistrarInfo< - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - >, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_identity::types::RegistrarInfo< + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, >, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 92u8, 161u8, 80u8, 77u8, 121u8, 65u8, 69u8, 26u8, 171u8, - 158u8, 66u8, 36u8, 81u8, 1u8, 79u8, 144u8, 188u8, 236u8, - 88u8, 158u8, 84u8, 100u8, 71u8, 86u8, 20u8, 68u8, 178u8, - 164u8, 157u8, 105u8, 58u8, 7u8, - ] - { - let entry = Registrars; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Identity", + "Registrars", + vec![], + [ + 157u8, 87u8, 39u8, 240u8, 154u8, 54u8, 241u8, 229u8, 76u8, + 9u8, 62u8, 252u8, 40u8, 143u8, 186u8, 182u8, 233u8, 187u8, + 251u8, 61u8, 236u8, 229u8, 19u8, 55u8, 42u8, 36u8, 82u8, + 173u8, 215u8, 155u8, 229u8, 111u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The amount held on deposit for a registered identity"] pub fn basic_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Identity", "BasicDeposit")? - == [ - 240u8, 163u8, 226u8, 52u8, 199u8, 248u8, 206u8, 2u8, 38u8, - 147u8, 0u8, 126u8, 225u8, 252u8, 36u8, 203u8, 148u8, 244u8, - 120u8, 212u8, 65u8, 221u8, 145u8, 126u8, 119u8, 190u8, 233u8, - 27u8, 185u8, 174u8, 6u8, 150u8, - ] - { - let pallet = metadata.pallet("Identity")?; - let constant = pallet.constant("BasicDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Identity", + "BasicDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount held on deposit per additional field for a registered identity."] pub fn field_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Identity", "FieldDeposit")? - == [ - 165u8, 151u8, 74u8, 173u8, 28u8, 8u8, 195u8, 171u8, 159u8, - 247u8, 246u8, 108u8, 239u8, 176u8, 142u8, 132u8, 101u8, 6u8, - 70u8, 168u8, 25u8, 58u8, 231u8, 151u8, 29u8, 122u8, 83u8, - 8u8, 52u8, 215u8, 151u8, 132u8, - ] - { - let pallet = metadata.pallet("Identity")?; - let constant = pallet.constant("FieldDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Identity", + "FieldDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount held on deposit for a registered subaccount. This should account for the fact"] #[doc = " that one storage item's value will increase by the size of an account ID, and there will"] #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] pub fn sub_account_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Identity", "SubAccountDeposit")? - == [ - 132u8, 115u8, 135u8, 88u8, 142u8, 44u8, 215u8, 122u8, 22u8, - 223u8, 174u8, 100u8, 180u8, 215u8, 108u8, 55u8, 67u8, 4u8, - 220u8, 23u8, 74u8, 148u8, 28u8, 100u8, 91u8, 73u8, 95u8, - 175u8, 213u8, 177u8, 56u8, 25u8, - ] - { - let pallet = metadata.pallet("Identity")?; - let constant = pallet.constant("SubAccountDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Identity", + "SubAccountDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The maximum number of sub-accounts allowed per identified account."] pub fn max_sub_accounts( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Identity", "MaxSubAccounts")? - == [ - 75u8, 1u8, 223u8, 132u8, 121u8, 0u8, 145u8, 246u8, 118u8, - 222u8, 108u8, 45u8, 1u8, 1u8, 238u8, 13u8, 162u8, 100u8, 2u8, - 24u8, 108u8, 168u8, 44u8, 133u8, 240u8, 3u8, 244u8, 76u8, - 150u8, 248u8, 153u8, 144u8, - ] - { - let pallet = metadata.pallet("Identity")?; - let constant = pallet.constant("MaxSubAccounts")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Identity", + "MaxSubAccounts", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O"] #[doc = " required to access an identity, but can be pretty high."] pub fn max_additional_fields( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Identity", "MaxAdditionalFields")? - == [ - 52u8, 246u8, 245u8, 172u8, 242u8, 40u8, 79u8, 11u8, 106u8, - 28u8, 59u8, 171u8, 135u8, 210u8, 67u8, 174u8, 63u8, 72u8, - 28u8, 214u8, 124u8, 140u8, 172u8, 255u8, 36u8, 40u8, 51u8, - 46u8, 207u8, 202u8, 248u8, 125u8, - ] - { - let pallet = metadata.pallet("Identity")?; - let constant = pallet.constant("MaxAdditionalFields")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Identity", + "MaxAdditionalFields", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Maxmimum number of registrars allowed in the system. Needed to bound the complexity"] #[doc = " of, e.g., updating judgements."] pub fn max_registrars( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Identity", "MaxRegistrars")? - == [ - 172u8, 101u8, 183u8, 243u8, 249u8, 249u8, 95u8, 104u8, 100u8, - 120u8, 13u8, 188u8, 132u8, 255u8, 115u8, 90u8, 19u8, 111u8, - 100u8, 17u8, 147u8, 179u8, 209u8, 41u8, 37u8, 25u8, 180u8, - 206u8, 120u8, 211u8, 188u8, 184u8, - ] - { - let pallet = metadata.pallet("Identity")?; - let constant = pallet.constant("MaxRegistrars")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Identity", + "MaxRegistrars", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod proxy { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Proxy { - pub real: ::subxt::sp_core::crypto::AccountId32, + pub real: ::subxt::ext::sp_core::crypto::AccountId32, pub force_proxy_type: ::core::option::Option, pub call: ::std::boxed::Box, } - impl ::subxt::Call for Proxy { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "proxy"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddProxy { - pub delegate: ::subxt::sp_core::crypto::AccountId32, + pub delegate: ::subxt::ext::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for AddProxy { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "add_proxy"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveProxy { - pub delegate: ::subxt::sp_core::crypto::AccountId32, + pub delegate: ::subxt::ext::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for RemoveProxy { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "remove_proxy"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveProxies; - impl ::subxt::Call for RemoveProxies { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "remove_proxies"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Anonymous { pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, pub index: ::core::primitive::u16, } - impl ::subxt::Call for Anonymous { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "anonymous"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct KillAnonymous { - pub spawner: ::subxt::sp_core::crypto::AccountId32, + pub spawner: ::subxt::ext::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub index: ::core::primitive::u16, #[codec(compact)] @@ -22778,64 +16003,47 @@ pub mod api { #[codec(compact)] pub ext_index: ::core::primitive::u32, } - impl ::subxt::Call for KillAnonymous { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "kill_anonymous"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Announce { - pub real: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for Announce { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "announce"; + pub real: ::subxt::ext::sp_core::crypto::AccountId32, + pub call_hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RemoveAnnouncement { - pub real: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for RemoveAnnouncement { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "remove_announcement"; + pub real: ::subxt::ext::sp_core::crypto::AccountId32, + pub call_hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RejectAnnouncement { - pub delegate: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for RejectAnnouncement { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "reject_announcement"; + pub delegate: ::subxt::ext::sp_core::crypto::AccountId32, + pub call_hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProxyAnnounced { - pub delegate: ::subxt::sp_core::crypto::AccountId32, - pub real: ::subxt::sp_core::crypto::AccountId32, + pub delegate: ::subxt::ext::sp_core::crypto::AccountId32, + pub real: ::subxt::ext::sp_core::crypto::AccountId32, pub force_proxy_type: ::core::option::Option, pub call: ::std::boxed::Box, } - impl ::subxt::Call for ProxyAnnounced { - const PALLET: &'static str = "Proxy"; - const FUNCTION: &'static str = "proxy_announced"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] #[doc = "`add_proxy`."] #[doc = ""] @@ -22853,44 +16061,32 @@ pub mod api { #[doc = "# "] pub fn proxy( &self, - real: ::subxt::sp_core::crypto::AccountId32, + real: ::subxt::ext::sp_core::crypto::AccountId32, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Proxy, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 51u8, 175u8, 21u8, 83u8, 132u8, 88u8, 162u8, 49u8, 52u8, - 139u8, 241u8, 197u8, 48u8, 252u8, 27u8, 221u8, 166u8, 226u8, - 61u8, 236u8, 249u8, 207u8, 22u8, 213u8, 23u8, 229u8, 200u8, - 224u8, 125u8, 208u8, 115u8, 138u8, - ] - { - let call = Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "proxy", + data: Proxy { + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 228u8, 178u8, 79u8, 159u8, 147u8, 71u8, 47u8, 204u8, 220u8, + 224u8, 189u8, 73u8, 15u8, 82u8, 202u8, 30u8, 72u8, 217u8, + 199u8, 84u8, 37u8, 127u8, 181u8, 116u8, 238u8, 176u8, 173u8, + 8u8, 151u8, 122u8, 28u8, 230u8, + ], + ) } #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] #[doc = ""] @@ -22907,42 +16103,30 @@ pub mod api { #[doc = "# "] pub fn add_proxy( &self, - delegate: ::subxt::sp_core::crypto::AccountId32, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddProxy, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 97u8, 149u8, 34u8, 218u8, 51u8, 242u8, 47u8, 167u8, 203u8, - 128u8, 248u8, 193u8, 156u8, 141u8, 184u8, 221u8, 209u8, 79u8, - 162u8, 36u8, 48u8, 110u8, 208u8, 62u8, 105u8, 117u8, 192u8, - 18u8, 37u8, 185u8, 136u8, 66u8, - ] - { - let call = AddProxy { - delegate, - proxy_type, - delay, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "add_proxy", + data: AddProxy { + delegate, + proxy_type, + delay, + }, + }, + [ + 25u8, 189u8, 96u8, 67u8, 195u8, 60u8, 158u8, 251u8, 72u8, + 165u8, 156u8, 44u8, 9u8, 143u8, 246u8, 50u8, 58u8, 226u8, + 111u8, 122u8, 160u8, 152u8, 108u8, 106u8, 181u8, 49u8, 232u8, + 177u8, 4u8, 144u8, 27u8, 177u8, + ], + ) } #[doc = "Unregister a proxy account for the sender."] #[doc = ""] @@ -22957,42 +16141,30 @@ pub mod api { #[doc = "# "] pub fn remove_proxy( &self, - delegate: ::subxt::sp_core::crypto::AccountId32, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveProxy, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 246u8, 251u8, 192u8, 17u8, 128u8, 248u8, 24u8, 118u8, 127u8, - 101u8, 140u8, 72u8, 248u8, 161u8, 187u8, 89u8, 193u8, 44u8, - 0u8, 86u8, 16u8, 116u8, 28u8, 227u8, 108u8, 120u8, 177u8, - 213u8, 218u8, 20u8, 196u8, 7u8, - ] - { - let call = RemoveProxy { - delegate, - proxy_type, - delay, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "remove_proxy", + data: RemoveProxy { + delegate, + proxy_type, + delay, + }, + }, + [ + 40u8, 172u8, 127u8, 108u8, 114u8, 22u8, 17u8, 90u8, 153u8, + 200u8, 110u8, 118u8, 149u8, 124u8, 51u8, 245u8, 142u8, 61u8, + 136u8, 138u8, 27u8, 160u8, 32u8, 192u8, 73u8, 24u8, 72u8, + 218u8, 22u8, 32u8, 163u8, 156u8, + ], + ) } #[doc = "Unregister all proxy accounts for the sender."] #[doc = ""] @@ -23006,35 +16178,23 @@ pub mod api { #[doc = "# "] pub fn remove_proxies( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveProxies, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "remove_proxies", + data: RemoveProxies {}, + }, + [ 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, 227u8, 169u8, 58u8, 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, 19u8, 23u8, 121u8, 129u8, - ] - { - let call = RemoveProxies {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] @@ -23064,39 +16224,27 @@ pub mod api { proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Anonymous, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 159u8, 186u8, 126u8, 58u8, 255u8, 163u8, 207u8, 66u8, 165u8, - 182u8, 248u8, 28u8, 134u8, 186u8, 1u8, 122u8, 40u8, 64u8, - 0u8, 124u8, 0u8, 5u8, 140u8, 131u8, 21u8, 66u8, 182u8, 216u8, - 202u8, 29u8, 75u8, 180u8, - ] - { - let call = Anonymous { - proxy_type, - delay, - index, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "anonymous", + data: Anonymous { + proxy_type, + delay, + index, + }, + }, + [ + 181u8, 76u8, 106u8, 208u8, 138u8, 11u8, 212u8, 10u8, 87u8, + 63u8, 201u8, 120u8, 26u8, 75u8, 120u8, 79u8, 225u8, 212u8, + 181u8, 9u8, 166u8, 24u8, 4u8, 15u8, 181u8, 28u8, 173u8, + 184u8, 122u8, 254u8, 20u8, 208u8, + ], + ) } #[doc = "Removes a previously spawned anonymous proxy."] #[doc = ""] @@ -23120,46 +16268,34 @@ pub mod api { #[doc = "# "] pub fn kill_anonymous( &self, - spawner: ::subxt::sp_core::crypto::AccountId32, + spawner: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, index: ::core::primitive::u16, height: ::core::primitive::u32, ext_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - KillAnonymous, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 59u8, 188u8, 45u8, 180u8, 9u8, 242u8, 36u8, 245u8, 25u8, - 57u8, 66u8, 216u8, 82u8, 220u8, 144u8, 233u8, 83u8, 1u8, - 182u8, 185u8, 27u8, 106u8, 33u8, 5u8, 22u8, 171u8, 222u8, - 130u8, 125u8, 73u8, 127u8, 156u8, - ] - { - let call = KillAnonymous { - spawner, - proxy_type, - index, - height, - ext_index, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "kill_anonymous", + data: KillAnonymous { + spawner, + proxy_type, + index, + height, + ext_index, + }, + }, + [ + 216u8, 42u8, 41u8, 194u8, 47u8, 221u8, 65u8, 109u8, 144u8, + 161u8, 223u8, 238u8, 241u8, 199u8, 138u8, 100u8, 77u8, 175u8, + 220u8, 208u8, 64u8, 74u8, 123u8, 253u8, 111u8, 13u8, 188u8, + 235u8, 58u8, 111u8, 144u8, 177u8, + ], + ) } #[doc = "Publish the hash of a proxy-call that will be made in the future."] #[doc = ""] @@ -23184,37 +16320,25 @@ pub mod api { #[doc = "# "] pub fn announce( &self, - real: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Announce, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 102u8, 8u8, 136u8, 179u8, 13u8, 47u8, 158u8, 24u8, 93u8, - 196u8, 52u8, 22u8, 118u8, 98u8, 17u8, 8u8, 12u8, 51u8, 181u8, - 75u8, 215u8, 133u8, 201u8, 180u8, 231u8, 122u8, 198u8, 190u8, - 188u8, 127u8, 228u8, 218u8, - ] - { - let call = Announce { real, call_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + real: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "announce", + data: Announce { real, call_hash }, + }, + [ + 99u8, 237u8, 158u8, 131u8, 185u8, 119u8, 88u8, 167u8, 253u8, + 29u8, 82u8, 216u8, 225u8, 33u8, 181u8, 244u8, 85u8, 176u8, + 106u8, 66u8, 166u8, 174u8, 218u8, 98u8, 119u8, 86u8, 218u8, + 89u8, 150u8, 255u8, 86u8, 40u8, + ], + ) } #[doc = "Remove a given announcement."] #[doc = ""] @@ -23234,37 +16358,25 @@ pub mod api { #[doc = "# "] pub fn remove_announcement( &self, - real: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RemoveAnnouncement, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 209u8, 156u8, 215u8, 188u8, 225u8, 230u8, 171u8, 228u8, - 241u8, 105u8, 43u8, 183u8, 234u8, 18u8, 170u8, 239u8, 232u8, - 188u8, 37u8, 84u8, 156u8, 50u8, 241u8, 170u8, 9u8, 148u8, - 185u8, 172u8, 204u8, 63u8, 187u8, 253u8, - ] - { - let call = RemoveAnnouncement { real, call_hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + real: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "remove_announcement", + data: RemoveAnnouncement { real, call_hash }, + }, + [ + 197u8, 54u8, 240u8, 51u8, 65u8, 218u8, 154u8, 165u8, 24u8, + 54u8, 157u8, 30u8, 144u8, 22u8, 247u8, 177u8, 105u8, 38u8, + 9u8, 25u8, 127u8, 36u8, 97u8, 84u8, 18u8, 3u8, 246u8, 238u8, + 60u8, 17u8, 236u8, 69u8, + ], + ) } #[doc = "Remove the given announcement of a delegate."] #[doc = ""] @@ -23284,40 +16396,28 @@ pub mod api { #[doc = "# "] pub fn reject_announcement( &self, - delegate: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RejectAnnouncement, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 26u8, 67u8, 197u8, 169u8, 243u8, 11u8, 94u8, 153u8, 50u8, - 22u8, 176u8, 103u8, 88u8, 2u8, 13u8, 10u8, 96u8, 7u8, 121u8, - 148u8, 13u8, 96u8, 20u8, 67u8, 76u8, 51u8, 81u8, 54u8, 244u8, - 44u8, 94u8, 52u8, - ] - { - let call = RejectAnnouncement { - delegate, - call_hash, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + delegate: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "reject_announcement", + data: RejectAnnouncement { + delegate, + call_hash, + }, + }, + [ + 205u8, 123u8, 102u8, 30u8, 196u8, 250u8, 247u8, 50u8, 243u8, + 55u8, 67u8, 66u8, 160u8, 147u8, 92u8, 204u8, 75u8, 69u8, + 68u8, 140u8, 40u8, 250u8, 53u8, 203u8, 228u8, 239u8, 62u8, + 66u8, 254u8, 30u8, 126u8, 206u8, + ], + ) } #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] #[doc = "`add_proxy`."] @@ -23338,46 +16438,34 @@ pub mod api { #[doc = "# "] pub fn proxy_announced( &self, - delegate: ::subxt::sp_core::crypto::AccountId32, - real: ::subxt::sp_core::crypto::AccountId32, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::ext::sp_core::crypto::AccountId32, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ProxyAnnounced, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 134u8, 43u8, 27u8, 202u8, 142u8, 8u8, 253u8, 43u8, 76u8, - 95u8, 152u8, 92u8, 151u8, 137u8, 74u8, 39u8, 185u8, 144u8, - 200u8, 115u8, 62u8, 250u8, 186u8, 59u8, 203u8, 244u8, 181u8, - 59u8, 47u8, 128u8, 33u8, 223u8, - ] - { - let call = ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Proxy", + call: "proxy_announced", + data: ProxyAnnounced { + delegate, + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 11u8, 45u8, 62u8, 39u8, 183u8, 91u8, 202u8, 137u8, 241u8, + 208u8, 226u8, 6u8, 184u8, 14u8, 196u8, 104u8, 108u8, 46u8, + 138u8, 21u8, 226u8, 195u8, 41u8, 187u8, 95u8, 136u8, 239u8, + 208u8, 224u8, 203u8, 109u8, 49u8, + ], + ) } } } @@ -23385,313 +16473,245 @@ pub mod api { pub type Event = runtime_types::pallet_proxy::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proxy was executed correctly, with the given."] pub struct ProxyExecuted { pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for ProxyExecuted { + impl ::subxt::events::StaticEvent for ProxyExecuted { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyExecuted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Anonymous account has been created by new proxy with given"] #[doc = "disambiguation index and proxy type."] pub struct AnonymousCreated { - pub anonymous: ::subxt::sp_core::crypto::AccountId32, - pub who: ::subxt::sp_core::crypto::AccountId32, + pub anonymous: ::subxt::ext::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub disambiguation_index: ::core::primitive::u16, } - impl ::subxt::Event for AnonymousCreated { + impl ::subxt::events::StaticEvent for AnonymousCreated { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "AnonymousCreated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An announcement was placed to make a call in the future."] pub struct Announced { - pub real: ::subxt::sp_core::crypto::AccountId32, - pub proxy: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: ::subxt::sp_core::H256, + pub real: ::subxt::ext::sp_core::crypto::AccountId32, + pub proxy: ::subxt::ext::sp_core::crypto::AccountId32, + pub call_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for Announced { + impl ::subxt::events::StaticEvent for Announced { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "Announced"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proxy was added."] pub struct ProxyAdded { - pub delegator: ::subxt::sp_core::crypto::AccountId32, - pub delegatee: ::subxt::sp_core::crypto::AccountId32, + pub delegator: ::subxt::ext::sp_core::crypto::AccountId32, + pub delegatee: ::subxt::ext::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Event for ProxyAdded { + impl ::subxt::events::StaticEvent for ProxyAdded { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyAdded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A proxy was removed."] pub struct ProxyRemoved { - pub delegator: ::subxt::sp_core::crypto::AccountId32, - pub delegatee: ::subxt::sp_core::crypto::AccountId32, + pub delegator: ::subxt::ext::sp_core::crypto::AccountId32, + pub delegatee: ::subxt::ext::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Event for ProxyRemoved { + impl ::subxt::events::StaticEvent for ProxyRemoved { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyRemoved"; } } pub mod storage { use super::runtime_types; - pub struct Proxies<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Proxies<'_> { - const PALLET: &'static str = "Proxy"; - const STORAGE: &'static str = "Proxies"; - type Value = ( - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Announcements<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Announcements<'_> { - const PALLET: &'static str = "Proxy"; - const STORAGE: &'static str = "Announcements"; - type Value = ( - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] #[doc = " which are being delegated to, together with the amount held on deposit."] pub fn proxies( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ( - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, >, - ::core::primitive::u128, - ), - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 252u8, 154u8, 187u8, 5u8, 19u8, 254u8, 127u8, 64u8, - 214u8, 133u8, 33u8, 95u8, 47u8, 5u8, 39u8, 107u8, 27u8, - 117u8, 238u8, 14u8, 44u8, 74u8, 154u8, 158u8, 71u8, 88u8, - 167u8, 75u8, 112u8, 229u8, 107u8, 145u8, - ] - { - let entry = Proxies(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Proxy", + "Proxies", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, + 70u8, 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, + 233u8, 37u8, 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, + 67u8, 161u8, 103u8, 248u8, 14u8, + ], + ) } #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies_iter( + pub fn proxies_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Proxies<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 252u8, 154u8, 187u8, 5u8, 19u8, 254u8, 127u8, 64u8, - 214u8, 133u8, 33u8, 95u8, 47u8, 5u8, 39u8, 107u8, 27u8, - 117u8, 238u8, 14u8, 44u8, 74u8, 154u8, 158u8, 71u8, 88u8, - 167u8, 75u8, 112u8, 229u8, 107u8, 145u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Proxy", + "Proxies", + Vec::new(), + [ + 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, + 70u8, 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, + 233u8, 37u8, 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, + 67u8, 161u8, 103u8, 248u8, 14u8, + ], + ) } #[doc = " The announcements made by the proxy (key)."] pub fn announcements( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ( - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - >, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::H256, + ::core::primitive::u32, >, - ::core::primitive::u128, - ), - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 247u8, 243u8, 109u8, 142u8, 99u8, 156u8, 61u8, 101u8, - 200u8, 211u8, 158u8, 60u8, 159u8, 232u8, 147u8, 125u8, - 139u8, 150u8, 4u8, 129u8, 189u8, 117u8, 74u8, 32u8, 85u8, - 39u8, 46u8, 47u8, 164u8, 130u8, 254u8, 43u8, - ] - { - let entry = Announcements(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Proxy", + "Announcements", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, + 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, + 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, + 237u8, 103u8, 217u8, 53u8, + ], + ) } #[doc = " The announcements made by the proxy (key)."] - pub fn announcements_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Announcements<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 247u8, 243u8, 109u8, 142u8, 99u8, 156u8, 61u8, 101u8, - 200u8, 211u8, 158u8, 60u8, 159u8, 232u8, 147u8, 125u8, - 139u8, 150u8, 4u8, 129u8, 189u8, 117u8, 74u8, 32u8, 85u8, - 39u8, 46u8, 47u8, 164u8, 130u8, 254u8, 43u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn announcements_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::H256, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Proxy", + "Announcements", + Vec::new(), + [ + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, + 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, + 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, + 237u8, 103u8, 217u8, 53u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The base amount of currency needed to reserve for creating a proxy."] #[doc = ""] #[doc = " This is held for an additional storage item whose value size is"] #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] pub fn proxy_deposit_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Proxy", "ProxyDepositBase")? - == [ - 103u8, 165u8, 87u8, 140u8, 136u8, 233u8, 165u8, 158u8, 117u8, - 69u8, 202u8, 102u8, 135u8, 123u8, 209u8, 117u8, 114u8, 254u8, - 28u8, 195u8, 55u8, 55u8, 54u8, 214u8, 19u8, 26u8, 209u8, - 184u8, 93u8, 110u8, 33u8, 139u8, - ] - { - let pallet = metadata.pallet("Proxy")?; - let constant = pallet.constant("ProxyDepositBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Proxy", + "ProxyDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount of currency needed per proxy added."] #[doc = ""] @@ -23700,74 +16720,56 @@ pub mod api { #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] pub fn proxy_deposit_factor( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Proxy", "ProxyDepositFactor")? - == [ - 163u8, 148u8, 34u8, 63u8, 153u8, 113u8, 173u8, 220u8, 242u8, - 64u8, 66u8, 151u8, 198u8, 202u8, 46u8, 157u8, 175u8, 26u8, - 188u8, 96u8, 97u8, 66u8, 86u8, 2u8, 149u8, 133u8, 72u8, 33u8, - 249u8, 42u8, 79u8, 61u8, - ] - { - let pallet = metadata.pallet("Proxy")?; - let constant = pallet.constant("ProxyDepositFactor")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Proxy", + "ProxyDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The maximum amount of proxies allowed for a single account."] pub fn max_proxies( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Proxy", "MaxProxies")? - == [ - 249u8, 153u8, 224u8, 128u8, 161u8, 3u8, 39u8, 192u8, 120u8, - 150u8, 184u8, 92u8, 225u8, 222u8, 76u8, 172u8, 131u8, 87u8, - 231u8, 128u8, 5u8, 62u8, 116u8, 112u8, 103u8, 4u8, 39u8, - 163u8, 71u8, 97u8, 221u8, 19u8, - ] - { - let pallet = metadata.pallet("Proxy")?; - let constant = pallet.constant("MaxProxies")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Proxy", + "MaxProxies", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] pub fn max_pending( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Proxy", "MaxPending")? - == [ - 88u8, 148u8, 146u8, 152u8, 151u8, 208u8, 255u8, 193u8, 239u8, - 105u8, 197u8, 153u8, 151u8, 18u8, 86u8, 13u8, 242u8, 242u8, - 59u8, 92u8, 107u8, 203u8, 102u8, 69u8, 147u8, 147u8, 37u8, - 83u8, 237u8, 9u8, 114u8, 196u8, - ] - { - let pallet = metadata.pallet("Proxy")?; - let constant = pallet.constant("MaxPending")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Proxy", + "MaxPending", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The base amount of currency needed to reserve for creating an announcement."] #[doc = ""] @@ -23775,26 +16777,20 @@ pub mod api { #[doc = " bytes)."] pub fn announcement_deposit_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Proxy", "AnnouncementDepositBase")? - == [ - 167u8, 193u8, 39u8, 36u8, 61u8, 75u8, 122u8, 88u8, 86u8, - 61u8, 154u8, 153u8, 99u8, 130u8, 56u8, 114u8, 66u8, 196u8, - 148u8, 163u8, 29u8, 167u8, 17u8, 95u8, 228u8, 168u8, 43u8, - 130u8, 53u8, 7u8, 180u8, 181u8, - ] - { - let pallet = metadata.pallet("Proxy")?; - let constant = pallet.constant("AnnouncementDepositBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Proxy", + "AnnouncementDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount of currency needed per announcement made."] #[doc = ""] @@ -23802,112 +16798,90 @@ pub mod api { #[doc = " into a pre-existing storage value."] pub fn announcement_deposit_factor( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Proxy", "AnnouncementDepositFactor")? - == [ - 234u8, 50u8, 92u8, 12u8, 170u8, 230u8, 151u8, 220u8, 202u8, - 254u8, 123u8, 123u8, 40u8, 59u8, 188u8, 0u8, 55u8, 153u8, - 188u8, 146u8, 115u8, 250u8, 114u8, 233u8, 64u8, 35u8, 25u8, - 130u8, 189u8, 236u8, 169u8, 233u8, - ] - { - let pallet = metadata.pallet("Proxy")?; - let constant = pallet.constant("AnnouncementDepositFactor")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Proxy", + "AnnouncementDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } } } } pub mod multisig { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AsMultiThreshold1 { pub other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, pub call: ::std::boxed::Box, } - impl ::subxt::Call for AsMultiThreshold1 { - const PALLET: &'static str = "Multisig"; - const FUNCTION: &'static str = "as_multi_threshold_1"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - pub call: - ::subxt::WrapperKeepOpaque, + pub call: ::subxt::utils::WrapperKeepOpaque< + runtime_types::polkadot_runtime::Call, + >, pub store_call: ::core::primitive::bool, pub max_weight: ::core::primitive::u64, } - impl ::subxt::Call for AsMulti { - const PALLET: &'static str = "Multisig"; - const FUNCTION: &'static str = "as_multi"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ApproveAsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, pub call_hash: [::core::primitive::u8; 32usize], pub max_weight: ::core::primitive::u64, } - impl ::subxt::Call for ApproveAsMulti { - const PALLET: &'static str = "Multisig"; - const FUNCTION: &'static str = "approve_as_multi"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CancelAsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::Call for CancelAsMulti { - const PALLET: &'static str = "Multisig"; - const FUNCTION: &'static str = "cancel_as_multi"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] @@ -23927,41 +16901,29 @@ pub mod api { pub fn as_multi_threshold_1( &self, other_signatories: ::std::vec::Vec< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, call: runtime_types::polkadot_runtime::Call, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AsMultiThreshold1, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 111u8, 92u8, 188u8, 136u8, 71u8, 227u8, 141u8, 53u8, 135u8, - 53u8, 106u8, 156u8, 255u8, 15u8, 103u8, 116u8, 159u8, 14u8, - 183u8, 102u8, 237u8, 18u8, 87u8, 181u8, 140u8, 29u8, 74u8, - 195u8, 146u8, 58u8, 102u8, 220u8, - ] - { - let call = AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Multisig", + call: "as_multi_threshold_1", + data: AsMultiThreshold1 { + other_signatories, + call: ::std::boxed::Box::new(call), + }, + }, + [ + 246u8, 222u8, 148u8, 4u8, 239u8, 222u8, 193u8, 79u8, 53u8, + 143u8, 34u8, 82u8, 133u8, 251u8, 125u8, 142u8, 125u8, 208u8, + 2u8, 135u8, 0u8, 12u8, 26u8, 112u8, 241u8, 209u8, 190u8, + 101u8, 40u8, 155u8, 98u8, 108u8, + ], + ) } #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] @@ -24012,52 +16974,40 @@ pub mod api { &self, threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - call: ::subxt::WrapperKeepOpaque< + call: ::subxt::utils::WrapperKeepOpaque< runtime_types::polkadot_runtime::Call, >, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AsMulti, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 172u8, 58u8, 168u8, 231u8, 103u8, 158u8, 131u8, 110u8, 93u8, - 90u8, 82u8, 97u8, 67u8, 237u8, 138u8, 225u8, 158u8, 111u8, - 178u8, 16u8, 254u8, 252u8, 97u8, 21u8, 110u8, 152u8, 46u8, - 61u8, 238u8, 69u8, 100u8, 158u8, - ] - { - let call = AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call, - store_call, - max_weight, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Multisig", + call: "as_multi", + data: AsMulti { + threshold, + other_signatories, + maybe_timepoint, + call, + store_call, + max_weight, + }, + }, + [ + 145u8, 219u8, 104u8, 65u8, 73u8, 34u8, 65u8, 60u8, 105u8, + 39u8, 225u8, 227u8, 64u8, 98u8, 129u8, 181u8, 53u8, 217u8, + 224u8, 3u8, 228u8, 62u8, 231u8, 227u8, 174u8, 153u8, 75u8, + 81u8, 131u8, 104u8, 31u8, 133u8, + ], + ) } #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] @@ -24098,48 +17048,36 @@ pub mod api { &self, threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, call_hash: [::core::primitive::u8; 32usize], max_weight: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ApproveAsMulti, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 114u8, 29u8, 118u8, 154u8, 91u8, 4u8, 127u8, 126u8, 190u8, - 180u8, 57u8, 112u8, 72u8, 8u8, 248u8, 126u8, 25u8, 190u8, - 130u8, 86u8, 160u8, 164u8, 76u8, 64u8, 25u8, 175u8, 132u8, - 225u8, 147u8, 166u8, 12u8, 38u8, - ] - { - let call = ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Multisig", + call: "approve_as_multi", + data: ApproveAsMulti { + threshold, + other_signatories, + maybe_timepoint, + call_hash, + max_weight, + }, + }, + [ + 55u8, 94u8, 230u8, 217u8, 37u8, 143u8, 44u8, 108u8, 123u8, + 250u8, 26u8, 44u8, 236u8, 69u8, 63u8, 90u8, 126u8, 15u8, + 233u8, 142u8, 213u8, 11u8, 141u8, 147u8, 151u8, 24u8, 167u8, + 62u8, 96u8, 227u8, 181u8, 140u8, + ], + ) } #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] #[doc = "for this operation will be unreserved on success."] @@ -24171,46 +17109,34 @@ pub mod api { &self, threshold: ::core::primitive::u16, other_signatories: ::std::vec::Vec< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, call_hash: [::core::primitive::u8; 32usize], - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelAsMulti, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 195u8, 216u8, 37u8, 179u8, 9u8, 19u8, 238u8, 94u8, 156u8, - 5u8, 120u8, 78u8, 129u8, 99u8, 239u8, 142u8, 68u8, 12u8, - 254u8, 46u8, 251u8, 8u8, 193u8, 43u8, 37u8, 68u8, 249u8, - 85u8, 163u8, 85u8, 193u8, 47u8, - ] - { - let call = CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Multisig", + call: "cancel_as_multi", + data: CancelAsMulti { + threshold, + other_signatories, + timepoint, + call_hash, + }, + }, + [ + 30u8, 25u8, 186u8, 142u8, 168u8, 81u8, 235u8, 164u8, 82u8, + 209u8, 66u8, 129u8, 209u8, 78u8, 172u8, 9u8, 163u8, 222u8, + 125u8, 57u8, 2u8, 43u8, 169u8, 174u8, 159u8, 167u8, 25u8, + 226u8, 254u8, 110u8, 80u8, 216u8, + ], + ) } } } @@ -24218,271 +17144,183 @@ pub mod api { pub type Event = runtime_types::pallet_multisig::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new multisig operation has begun."] pub struct NewMultisig { - pub approving: ::subxt::sp_core::crypto::AccountId32, - pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub approving: ::subxt::ext::sp_core::crypto::AccountId32, + pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::Event for NewMultisig { + impl ::subxt::events::StaticEvent for NewMultisig { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "NewMultisig"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A multisig operation has been approved by someone."] pub struct MultisigApproval { - pub approving: ::subxt::sp_core::crypto::AccountId32, + pub approving: ::subxt::ext::sp_core::crypto::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::Event for MultisigApproval { + impl ::subxt::events::StaticEvent for MultisigApproval { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigApproval"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A multisig operation has been executed."] pub struct MultisigExecuted { - pub approving: ::subxt::sp_core::crypto::AccountId32, + pub approving: ::subxt::ext::sp_core::crypto::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for MultisigExecuted { + impl ::subxt::events::StaticEvent for MultisigExecuted { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigExecuted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A multisig operation has been cancelled."] pub struct MultisigCancelled { - pub cancelling: ::subxt::sp_core::crypto::AccountId32, + pub cancelling: ::subxt::ext::sp_core::crypto::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub multisig: ::subxt::ext::sp_core::crypto::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::Event for MultisigCancelled { + impl ::subxt::events::StaticEvent for MultisigCancelled { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigCancelled"; } } pub mod storage { use super::runtime_types; - pub struct Multisigs<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a [::core::primitive::u8; 32usize], - ); - impl ::subxt::StorageEntry for Multisigs<'_> { - const PALLET: &'static str = "Multisig"; - const STORAGE: &'static str = "Multisigs"; - type Value = runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Blake2_128Concat, - ), - ]) - } - } - pub struct Calls<'a>(pub &'a [::core::primitive::u8; 32usize]); - impl ::subxt::StorageEntry for Calls<'_> { - const PALLET: &'static str = "Multisig"; - const STORAGE: &'static str = "Calls"; - type Value = ( - ::subxt::WrapperKeepOpaque, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The set of open multisig operations."] pub fn multisigs( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - _1: &'a [::core::primitive::u8; 32usize], - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::crypto::AccountId32, + _1: &[::core::primitive::u8; 32usize], + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_multisig::Multisig< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 137u8, 130u8, 173u8, 65u8, 126u8, 244u8, 194u8, 167u8, - 93u8, 174u8, 104u8, 131u8, 115u8, 155u8, 93u8, 185u8, - 54u8, 204u8, 155u8, 149u8, 184u8, 24u8, 111u8, 40u8, - 249u8, 215u8, 34u8, 251u8, 224u8, 110u8, 202u8, 2u8, - ] - { - let entry = Multisigs(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("Multisig" , "Multisigs" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [145u8 , 78u8 , 57u8 , 171u8 , 199u8 , 158u8 , 226u8 , 250u8 , 224u8 , 133u8 , 45u8 , 251u8 , 202u8 , 22u8 , 171u8 , 132u8 , 229u8 , 110u8 , 248u8 , 233u8 , 38u8 , 2u8 , 247u8 , 140u8 , 150u8 , 103u8 , 211u8 , 209u8 , 160u8 , 158u8 , 23u8 , 215u8 ,]) } #[doc = " The set of open multisig operations."] - pub fn multisigs_iter( + pub fn multisigs_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Multisigs<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_multisig::Multisig< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 137u8, 130u8, 173u8, 65u8, 126u8, 244u8, 194u8, 167u8, - 93u8, 174u8, 104u8, 131u8, 115u8, 155u8, 93u8, 185u8, - 54u8, 204u8, 155u8, 149u8, 184u8, 24u8, 111u8, 40u8, - 249u8, 215u8, 34u8, 251u8, 224u8, 110u8, 202u8, 2u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Multisig", + "Multisigs", + Vec::new(), + [ + 145u8, 78u8, 57u8, 171u8, 199u8, 158u8, 226u8, 250u8, 224u8, + 133u8, 45u8, 251u8, 202u8, 22u8, 171u8, 132u8, 229u8, 110u8, + 248u8, 233u8, 38u8, 2u8, 247u8, 140u8, 150u8, 103u8, 211u8, + 209u8, 160u8, 158u8, 23u8, 215u8, + ], + ) } pub fn calls( &self, - _0: &'a [::core::primitive::u8; 32usize], - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::subxt::WrapperKeepOpaque< - runtime_types::polkadot_runtime::Call, - >, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 215u8, 30u8, 84u8, 216u8, 201u8, 91u8, 161u8, 0u8, - 194u8, 216u8, 43u8, 91u8, 65u8, 231u8, 38u8, 35u8, 197u8, - 230u8, 146u8, 206u8, 251u8, 122u8, 50u8, 90u8, 60u8, - 177u8, 226u8, 90u8, 181u8, 95u8, 62u8, - ] - { - let entry = Calls(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - pub fn calls_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Calls<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 215u8, 30u8, 84u8, 216u8, 201u8, 91u8, 161u8, 0u8, - 194u8, 216u8, 43u8, 91u8, 65u8, 231u8, 38u8, 35u8, 197u8, - 230u8, 146u8, 206u8, 251u8, 122u8, 50u8, 90u8, 60u8, - 177u8, 226u8, 90u8, 181u8, 95u8, 62u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &[::core::primitive::u8; 32usize], + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::utils::WrapperKeepOpaque< + runtime_types::polkadot_runtime::Call, + >, + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Multisig", + "Calls", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 221u8, 242u8, 184u8, 125u8, 128u8, 166u8, 46u8, 122u8, 150u8, + 0u8, 138u8, 146u8, 248u8, 236u8, 34u8, 84u8, 219u8, 16u8, + 4u8, 173u8, 100u8, 22u8, 182u8, 174u8, 108u8, 167u8, 72u8, + 121u8, 254u8, 47u8, 200u8, 145u8, + ], + ) + } + pub fn calls_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::subxt::utils::WrapperKeepOpaque< + runtime_types::polkadot_runtime::Call, + >, + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Multisig", + "Calls", + Vec::new(), + [ + 221u8, 242u8, 184u8, 125u8, 128u8, 166u8, 46u8, 122u8, 150u8, + 0u8, 138u8, 146u8, 248u8, 236u8, 34u8, 84u8, 219u8, 16u8, + 4u8, 173u8, 100u8, 22u8, 182u8, 174u8, 108u8, 167u8, 72u8, + 121u8, 254u8, 47u8, 200u8, 145u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] #[doc = " store a dispatch call for later."] #[doc = ""] @@ -24491,200 +17329,165 @@ pub mod api { #[doc = " `32 + sizeof(AccountId)` bytes."] pub fn deposit_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Multisig", "DepositBase")? - == [ - 184u8, 205u8, 30u8, 80u8, 201u8, 56u8, 94u8, 154u8, 82u8, - 189u8, 62u8, 221u8, 158u8, 69u8, 166u8, 229u8, 114u8, 175u8, - 18u8, 68u8, 189u8, 36u8, 51u8, 115u8, 82u8, 203u8, 106u8, - 161u8, 186u8, 8u8, 56u8, 4u8, - ] - { - let pallet = metadata.pallet("Multisig")?; - let constant = pallet.constant("DepositBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Multisig", + "DepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] #[doc = ""] #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] pub fn deposit_factor( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Multisig", "DepositFactor")? - == [ - 226u8, 132u8, 1u8, 18u8, 51u8, 22u8, 235u8, 140u8, 210u8, - 182u8, 190u8, 176u8, 59u8, 98u8, 137u8, 93u8, 118u8, 55u8, - 125u8, 33u8, 174u8, 152u8, 70u8, 62u8, 84u8, 46u8, 159u8, - 246u8, 17u8, 40u8, 120u8, 193u8, - ] - { - let pallet = metadata.pallet("Multisig")?; - let constant = pallet.constant("DepositFactor")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Multisig", + "DepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The maximum amount of signatories allowed in the multisig."] pub fn max_signatories( &self, - ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Multisig", "MaxSignatories")? - == [ - 139u8, 36u8, 140u8, 198u8, 176u8, 106u8, 89u8, 194u8, 33u8, - 23u8, 60u8, 134u8, 143u8, 24u8, 176u8, 64u8, 47u8, 109u8, - 159u8, 134u8, 240u8, 231u8, 181u8, 146u8, 136u8, 249u8, - 175u8, 67u8, 41u8, 152u8, 90u8, 15u8, - ] - { - let pallet = metadata.pallet("Multisig")?; - let constant = pallet.constant("MaxSignatories")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Multisig", + "MaxSignatories", + [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, + 227u8, 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, + 184u8, 72u8, 169u8, 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, + 123u8, 128u8, 193u8, 29u8, 70u8, + ], + ) } } } } pub mod bounties { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProposeBounty { #[codec(compact)] pub value: ::core::primitive::u128, pub description: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ProposeBounty { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "propose_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ApproveBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveBounty { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "approve_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProposeCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub curator: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for ProposeCurator { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "propose_curator"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct UnassignCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for UnassignCurator { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "unassign_curator"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AcceptCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for AcceptCurator { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "accept_curator"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AwardBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for AwardBounty { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "award_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClaimBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ClaimBounty { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "claim_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CloseBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for CloseBounty { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "close_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ExtendBountyExpiry { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ExtendBountyExpiry { - const PALLET: &'static str = "Bounties"; - const FUNCTION: &'static str = "extend_bounty_expiry"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Propose a new bounty."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] @@ -24701,35 +17504,23 @@ pub mod api { &self, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ProposeBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 208u8, 22u8, 157u8, 134u8, 214u8, 95u8, 249u8, 10u8, 67u8, - 223u8, 190u8, 192u8, 69u8, 32u8, 7u8, 235u8, 205u8, 145u8, - 90u8, 80u8, 60u8, 4u8, 16u8, 189u8, 59u8, 180u8, 68u8, 77u8, - 69u8, 121u8, 92u8, 33u8, - ] - { - let call = ProposeBounty { value, description }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "propose_bounty", + data: ProposeBounty { value, description }, + }, + [ + 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, + 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, + 59u8, 114u8, 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, + 201u8, 128u8, 102u8, 219u8, + ], + ) } #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] #[doc = "and the original deposit will be returned."] @@ -24742,35 +17533,23 @@ pub mod api { pub fn approve_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ApproveBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 127u8, 220u8, 25u8, 197u8, 19u8, 183u8, 177u8, 17u8, 164u8, - 29u8, 250u8, 136u8, 125u8, 90u8, 247u8, 177u8, 37u8, 180u8, - 77u8, 75u8, 164u8, 32u8, 195u8, 207u8, 58u8, 249u8, 141u8, - 11u8, 53u8, 184u8, 224u8, 135u8, - ] - { - let call = ApproveBounty { bounty_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "approve_bounty", + data: ApproveBounty { bounty_id }, + }, + [ + 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, + 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, + 68u8, 48u8, 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, + 198u8, 183u8, 173u8, + ], + ) } #[doc = "Assign a curator to a funded bounty."] #[doc = ""] @@ -24782,44 +17561,32 @@ pub mod api { pub fn propose_curator( &self, bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + curator: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, fee: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ProposeCurator, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 180u8, 13u8, 171u8, 39u8, 160u8, 233u8, 162u8, 39u8, 100u8, - 144u8, 156u8, 212u8, 139u8, 128u8, 105u8, 49u8, 157u8, 16u8, - 125u8, 72u8, 36u8, 45u8, 199u8, 139u8, 165u8, 100u8, 40u8, - 163u8, 117u8, 32u8, 164u8, 23u8, - ] - { - let call = ProposeCurator { - bounty_id, - curator, - fee, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "propose_curator", + data: ProposeCurator { + bounty_id, + curator, + fee, + }, + }, + [ + 123u8, 148u8, 21u8, 204u8, 216u8, 6u8, 47u8, 83u8, 182u8, + 30u8, 171u8, 48u8, 193u8, 200u8, 197u8, 147u8, 111u8, 88u8, + 14u8, 242u8, 66u8, 175u8, 241u8, 208u8, 95u8, 151u8, 41u8, + 46u8, 213u8, 188u8, 65u8, 196u8, + ], + ) } #[doc = "Unassign curator from a bounty."] #[doc = ""] @@ -24842,35 +17609,23 @@ pub mod api { pub fn unassign_curator( &self, bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - UnassignCurator, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 156u8, 163u8, 248u8, 148u8, 22u8, 231u8, 232u8, 182u8, 48u8, - 87u8, 85u8, 118u8, 169u8, 249u8, 123u8, 199u8, 248u8, 206u8, - 221u8, 196u8, 69u8, 69u8, 52u8, 116u8, 65u8, 165u8, 172u8, - 242u8, 61u8, 109u8, 143u8, 69u8, - ] - { - let call = UnassignCurator { bounty_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "unassign_curator", + data: UnassignCurator { bounty_id }, + }, + [ + 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, + 114u8, 158u8, 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, + 63u8, 223u8, 28u8, 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, + 27u8, 207u8, 247u8, 207u8, 213u8, + ], + ) } #[doc = "Accept the curator role for a bounty."] #[doc = "A deposit will be reserved from curator and refund upon successful payout."] @@ -24883,35 +17638,23 @@ pub mod api { pub fn accept_curator( &self, bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AcceptCurator, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 50u8, 149u8, 252u8, 40u8, 169u8, 113u8, 60u8, 153u8, 123u8, - 146u8, 40u8, 196u8, 176u8, 195u8, 95u8, 94u8, 14u8, 81u8, - 136u8, 225u8, 24u8, 59u8, 87u8, 118u8, 77u8, 60u8, 150u8, - 102u8, 206u8, 219u8, 241u8, 99u8, - ] - { - let call = AcceptCurator { bounty_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "accept_curator", + data: AcceptCurator { bounty_id }, + }, + [ + 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, + 253u8, 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, + 144u8, 30u8, 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8, + 116u8, 112u8, 235u8, 34u8, 166u8, + ], + ) } #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] #[doc = "after a delay."] @@ -24927,42 +17670,30 @@ pub mod api { pub fn award_bounty( &self, bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AwardBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 42u8, 49u8, 134u8, 134u8, 5u8, 98u8, 72u8, 95u8, 227u8, - 156u8, 224u8, 249u8, 209u8, 42u8, 160u8, 15u8, 239u8, 195u8, - 128u8, 251u8, 217u8, 132u8, 15u8, 221u8, 191u8, 105u8, 39u8, - 228u8, 189u8, 174u8, 115u8, 53u8, - ] - { - let call = AwardBounty { - bounty_id, - beneficiary, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "award_bounty", + data: AwardBounty { + bounty_id, + beneficiary, + }, + }, + [ + 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, + 136u8, 29u8, 230u8, 88u8, 17u8, 134u8, 189u8, 15u8, 204u8, + 223u8, 20u8, 168u8, 182u8, 129u8, 48u8, 83u8, 25u8, 125u8, + 25u8, 209u8, 155u8, 170u8, 68u8, + ], + ) } #[doc = "Claim the payout from an awarded bounty after payout delay."] #[doc = ""] @@ -24976,35 +17707,23 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClaimBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 119u8, 9u8, 122u8, 55u8, 224u8, 139u8, 26u8, 186u8, 3u8, - 178u8, 78u8, 41u8, 91u8, 183u8, 222u8, 197u8, 189u8, 172u8, - 154u8, 47u8, 2u8, 164u8, 141u8, 163u8, 211u8, 117u8, 186u8, - 121u8, 130u8, 91u8, 13u8, 241u8, - ] - { - let call = ClaimBounty { bounty_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "claim_bounty", + data: ClaimBounty { bounty_id }, + }, + [ + 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, + 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, + 48u8, 64u8, 115u8, 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, + 68u8, 37u8, 59u8, 85u8, + ], + ) } #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] #[doc = "the curator deposit will be unreserved if possible."] @@ -25019,35 +17738,23 @@ pub mod api { pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CloseBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 119u8, 47u8, 246u8, 188u8, 235u8, 22u8, 53u8, 70u8, 182u8, - 15u8, 247u8, 153u8, 208u8, 191u8, 144u8, 132u8, 30u8, 200u8, - 36u8, 186u8, 194u8, 225u8, 140u8, 160u8, 152u8, 194u8, 38u8, - 223u8, 33u8, 130u8, 120u8, 254u8, - ] - { - let call = CloseBounty { bounty_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "close_bounty", + data: CloseBounty { bounty_id }, + }, + [ + 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, + 211u8, 119u8, 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, + 146u8, 69u8, 169u8, 124u8, 220u8, 236u8, 111u8, 98u8, 188u8, + 100u8, 52u8, 127u8, 245u8, 244u8, 92u8, + ], + ) } #[doc = "Extend the expiry time of an active bounty."] #[doc = ""] @@ -25063,35 +17770,23 @@ pub mod api { &self, bounty_id: ::core::primitive::u32, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ExtendBountyExpiry, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 127u8, 142u8, 138u8, 230u8, 147u8, 187u8, 201u8, 210u8, - 216u8, 61u8, 62u8, 125u8, 168u8, 188u8, 16u8, 73u8, 157u8, - 53u8, 165u8, 236u8, 181u8, 26u8, 28u8, 67u8, 59u8, 234u8, - 189u8, 167u8, 92u8, 242u8, 138u8, 35u8, - ] - { - let call = ExtendBountyExpiry { bounty_id, remark }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Bounties", + call: "extend_bounty_expiry", + data: ExtendBountyExpiry { bounty_id, remark }, + }, + [ + 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, + 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, + 63u8, 138u8, 100u8, 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, + 60u8, 87u8, 40u8, 80u8, 202u8, + ], + ) } } } @@ -25100,456 +17795,316 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "New bounty proposal."] pub struct BountyProposed { pub index: ::core::primitive::u32, } - impl ::subxt::Event for BountyProposed { + impl ::subxt::events::StaticEvent for BountyProposed { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyProposed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A bounty proposal was rejected; funds were slashed."] pub struct BountyRejected { pub index: ::core::primitive::u32, pub bond: ::core::primitive::u128, } - impl ::subxt::Event for BountyRejected { + impl ::subxt::events::StaticEvent for BountyRejected { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyRejected"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A bounty proposal is funded and became active."] pub struct BountyBecameActive { pub index: ::core::primitive::u32, } - impl ::subxt::Event for BountyBecameActive { + impl ::subxt::events::StaticEvent for BountyBecameActive { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyBecameActive"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A bounty is awarded to a beneficiary."] pub struct BountyAwarded { pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for BountyAwarded { + impl ::subxt::events::StaticEvent for BountyAwarded { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyAwarded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A bounty is claimed by beneficiary."] pub struct BountyClaimed { pub index: ::core::primitive::u32, pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for BountyClaimed { + impl ::subxt::events::StaticEvent for BountyClaimed { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyClaimed"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A bounty is cancelled."] pub struct BountyCanceled { pub index: ::core::primitive::u32, } - impl ::subxt::Event for BountyCanceled { + impl ::subxt::events::StaticEvent for BountyCanceled { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyCanceled"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A bounty expiry is extended."] pub struct BountyExtended { pub index: ::core::primitive::u32, } - impl ::subxt::Event for BountyExtended { + impl ::subxt::events::StaticEvent for BountyExtended { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyExtended"; } } pub mod storage { use super::runtime_types; - pub struct BountyCount; - impl ::subxt::StorageEntry for BountyCount { - const PALLET: &'static str = "Bounties"; - const STORAGE: &'static str = "BountyCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Bounties<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Bounties<'_> { - const PALLET: &'static str = "Bounties"; - const STORAGE: &'static str = "Bounties"; - type Value = runtime_types::pallet_bounties::Bounty< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct BountyDescriptions<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for BountyDescriptions<'_> { - const PALLET: &'static str = "Bounties"; - const STORAGE: &'static str = "BountyDescriptions"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct BountyApprovals; - impl ::subxt::StorageEntry for BountyApprovals { - const PALLET: &'static str = "Bounties"; - const STORAGE: &'static str = "BountyApprovals"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Number of bounty proposals that have been made."] pub fn bounty_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, - 186u8, 230u8, 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, - 193u8, 41u8, 83u8, 115u8, 253u8, 182u8, 123u8, 92u8, - 138u8, 12u8, 31u8, 31u8, 213u8, 23u8, 118u8, - ] - { - let entry = BountyCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Bounties", + "BountyCount", + vec![], + [ + 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, + 186u8, 230u8, 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, + 41u8, 83u8, 115u8, 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, + 31u8, 31u8, 213u8, 23u8, 118u8, + ], + ) } #[doc = " Bounties that have been made."] pub fn bounties( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_bounties::Bounty< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 27u8, 154u8, 97u8, 199u8, 230u8, 195u8, 155u8, 198u8, - 4u8, 28u8, 5u8, 202u8, 175u8, 11u8, 243u8, 166u8, 67u8, - 231u8, 125u8, 203u8, 141u8, 168u8, 106u8, 218u8, 129u8, - 25u8, 231u8, 253u8, 126u8, 144u8, 46u8, 255u8, - ] - { - let entry = Bounties(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_bounties::Bounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Bounties", + "Bounties", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, + 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, + 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, + 11u8, 99u8, 126u8, 225u8, 208u8, + ], + ) } #[doc = " Bounties that have been made."] - pub fn bounties_iter( + pub fn bounties_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Bounties<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_bounties::Bounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 27u8, 154u8, 97u8, 199u8, 230u8, 195u8, 155u8, 198u8, - 4u8, 28u8, 5u8, 202u8, 175u8, 11u8, 243u8, 166u8, 67u8, - 231u8, 125u8, 203u8, 141u8, 168u8, 106u8, 218u8, 129u8, - 25u8, 231u8, 253u8, 126u8, 144u8, 46u8, 255u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Bounties", + "Bounties", + Vec::new(), + [ + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, + 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, + 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, + 11u8, 99u8, 126u8, 225u8, 208u8, + ], + ) } #[doc = " The description of each bounty."] pub fn bounty_descriptions( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 41u8, 78u8, 19u8, 48u8, 241u8, 95u8, 175u8, 69u8, 236u8, - 54u8, 84u8, 58u8, 69u8, 28u8, 20u8, 20u8, 214u8, 138u8, - 163u8, 252u8, 239u8, 116u8, 171u8, 136u8, 0u8, 159u8, - 192u8, 51u8, 191u8, 160u8, 131u8, 123u8, - ] - { - let entry = BountyDescriptions(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Bounties", + "BountyDescriptions", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, + 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, + 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8, + 239u8, 111u8, 22u8, 29u8, 13u8, + ], + ) } #[doc = " The description of each bounty."] - pub fn bounty_descriptions_iter( + pub fn bounty_descriptions_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, BountyDescriptions<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 41u8, 78u8, 19u8, 48u8, 241u8, 95u8, 175u8, 69u8, 236u8, - 54u8, 84u8, 58u8, 69u8, 28u8, 20u8, 20u8, 214u8, 138u8, - 163u8, 252u8, 239u8, 116u8, 171u8, 136u8, 0u8, 159u8, - 192u8, 51u8, 191u8, 160u8, 131u8, 123u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Bounties", + "BountyDescriptions", + Vec::new(), + [ + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, + 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, + 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8, + 239u8, 111u8, 22u8, 29u8, 13u8, + ], + ) } #[doc = " Bounty indices that have been approved but not yet funded."] pub fn bounty_approvals( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 18u8, 142u8, 244u8, 64u8, 172u8, 62u8, 230u8, 114u8, - 165u8, 158u8, 123u8, 163u8, 35u8, 125u8, 218u8, 23u8, - 113u8, 73u8, 233u8, 242u8, 181u8, 205u8, 60u8, 54u8, - 64u8, 115u8, 207u8, 94u8, 22u8, 14u8, 238u8, 49u8, - ] - { - let entry = BountyApprovals; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Bounties", + "BountyApprovals", + vec![], + [ + 64u8, 93u8, 54u8, 94u8, 122u8, 9u8, 246u8, 86u8, 234u8, 30u8, + 125u8, 132u8, 49u8, 128u8, 1u8, 219u8, 241u8, 13u8, 217u8, + 186u8, 48u8, 21u8, 5u8, 227u8, 71u8, 157u8, 128u8, 226u8, + 214u8, 49u8, 249u8, 183u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The amount held on deposit for placing a bounty proposal."] pub fn bounty_deposit_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "BountyDepositBase")? - == [ - 239u8, 17u8, 86u8, 242u8, 39u8, 104u8, 7u8, 123u8, 210u8, - 141u8, 18u8, 248u8, 45u8, 172u8, 17u8, 58u8, 175u8, 58u8, - 246u8, 239u8, 147u8, 98u8, 85u8, 237u8, 42u8, 202u8, 25u8, - 227u8, 31u8, 207u8, 98u8, 83u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("BountyDepositBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "BountyDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] pub fn bounty_deposit_payout_delay( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "BountyDepositPayoutDelay")? - == [ - 128u8, 86u8, 220u8, 124u8, 89u8, 11u8, 42u8, 36u8, 116u8, - 160u8, 162u8, 57u8, 129u8, 172u8, 167u8, 210u8, 34u8, 188u8, - 183u8, 109u8, 166u8, 10u8, 161u8, 134u8, 145u8, 60u8, 242u8, - 105u8, 137u8, 133u8, 102u8, 212u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("BountyDepositPayoutDelay")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "BountyDepositPayoutDelay", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Bounty duration in blocks."] pub fn bounty_update_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "BountyUpdatePeriod")? - == [ - 10u8, 209u8, 160u8, 42u8, 47u8, 204u8, 58u8, 28u8, 137u8, - 252u8, 123u8, 123u8, 194u8, 151u8, 43u8, 90u8, 0u8, 154u8, - 132u8, 183u8, 50u8, 168u8, 204u8, 91u8, 235u8, 13u8, 116u8, - 219u8, 47u8, 215u8, 107u8, 136u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("BountyUpdatePeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "BountyUpdatePeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The curator deposit is calculated as a percentage of the curator fee."] #[doc = ""] @@ -25557,171 +18112,135 @@ pub mod api { #[doc = " `CuratorDepositMin`."] pub fn curator_deposit_multiplier( &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "CuratorDepositMultiplier")? - == [ - 119u8, 126u8, 117u8, 41u8, 6u8, 165u8, 141u8, 28u8, 50u8, - 24u8, 197u8, 238u8, 10u8, 25u8, 186u8, 143u8, 77u8, 212u8, - 156u8, 98u8, 147u8, 70u8, 188u8, 56u8, 23u8, 176u8, 175u8, - 248u8, 158u8, 34u8, 97u8, 39u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("CuratorDepositMultiplier")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Permill, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "CuratorDepositMultiplier", + [ + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, + ], + ) } #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_max( &self, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "CuratorDepositMax")? - == [ - 197u8, 116u8, 193u8, 36u8, 38u8, 161u8, 84u8, 35u8, 214u8, - 57u8, 117u8, 1u8, 205u8, 210u8, 187u8, 254u8, 240u8, 142u8, - 234u8, 3u8, 128u8, 248u8, 17u8, 26u8, 220u8, 250u8, 135u8, - 74u8, 60u8, 75u8, 37u8, 102u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("CuratorDepositMax")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + ::core::option::Option<::core::primitive::u128>, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "CuratorDepositMax", + [ + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, + 194u8, 88u8, 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, + 154u8, 237u8, 134u8, 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, + 43u8, 243u8, 122u8, 60u8, 216u8, + ], + ) } #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_min( &self, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "CuratorDepositMin")? - == [ - 103u8, 117u8, 57u8, 115u8, 148u8, 210u8, 125u8, 147u8, 240u8, - 124u8, 116u8, 42u8, 123u8, 201u8, 167u8, 70u8, 33u8, 230u8, - 204u8, 237u8, 197u8, 52u8, 184u8, 86u8, 191u8, 153u8, 56u8, - 233u8, 154u8, 127u8, 129u8, 59u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("CuratorDepositMin")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + ::core::option::Option<::core::primitive::u128>, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "CuratorDepositMin", + [ + 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8, + 194u8, 88u8, 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8, + 154u8, 237u8, 134u8, 204u8, 102u8, 247u8, 52u8, 103u8, 231u8, + 43u8, 243u8, 122u8, 60u8, 216u8, + ], + ) } #[doc = " Minimum value for a bounty."] pub fn bounty_value_minimum( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "BountyValueMinimum")? - == [ - 151u8, 218u8, 51u8, 10u8, 253u8, 91u8, 115u8, 68u8, 30u8, - 12u8, 122u8, 150u8, 203u8, 237u8, 234u8, 220u8, 103u8, 54u8, - 222u8, 239u8, 112u8, 28u8, 3u8, 7u8, 206u8, 89u8, 106u8, - 138u8, 86u8, 88u8, 38u8, 116u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("BountyValueMinimum")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "BountyValueMinimum", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] pub fn data_deposit_per_byte( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "DataDepositPerByte")? - == [ - 70u8, 208u8, 250u8, 66u8, 143u8, 90u8, 112u8, 229u8, 138u8, - 156u8, 116u8, 16u8, 65u8, 250u8, 203u8, 188u8, 255u8, 123u8, - 211u8, 66u8, 19u8, 231u8, 22u8, 224u8, 95u8, 6u8, 164u8, - 26u8, 103u8, 226u8, 234u8, 89u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("DataDepositPerByte")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "DataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Maximum acceptable reason length."] #[doc = ""] #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] pub fn maximum_reason_length( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Bounties", "MaximumReasonLength")? - == [ - 137u8, 135u8, 60u8, 208u8, 169u8, 200u8, 219u8, 180u8, 48u8, - 114u8, 22u8, 9u8, 163u8, 54u8, 133u8, 198u8, 72u8, 186u8, - 183u8, 134u8, 130u8, 198u8, 61u8, 79u8, 86u8, 218u8, 212u8, - 166u8, 195u8, 81u8, 58u8, 191u8, - ] - { - let pallet = metadata.pallet("Bounties")?; - let constant = pallet.constant("MaximumReasonLength")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Bounties", + "MaximumReasonLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod child_bounties { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, @@ -25729,101 +18248,84 @@ pub mod api { pub value: ::core::primitive::u128, pub description: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for AddChildBounty { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "add_child_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProposeCurator { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub curator: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for ProposeCurator { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "propose_curator"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AcceptCurator { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for AcceptCurator { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "accept_curator"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct UnassignCurator { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for UnassignCurator { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "unassign_curator"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AwardChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for AwardChildBounty { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "award_child_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClaimChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ClaimChildBounty { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "claim_child_bounty"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CloseChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for CloseChildBounty { - const PALLET: &'static str = "ChildBounties"; - const FUNCTION: &'static str = "close_child_bounty"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Add a new child-bounty."] #[doc = ""] #[doc = "The dispatch origin for this call must be the curator of parent"] @@ -25848,39 +18350,27 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddChildBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 235u8, 216u8, 166u8, 226u8, 107u8, 159u8, 235u8, 35u8, 207u8, - 154u8, 124u8, 226u8, 242u8, 241u8, 4u8, 20u8, 1u8, 215u8, - 110u8, 127u8, 19u8, 211u8, 36u8, 159u8, 110u8, 146u8, 58u8, - 23u8, 210u8, 51u8, 193u8, 228u8, - ] - { - let call = AddChildBounty { - parent_bounty_id, - value, - description, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "add_child_bounty", + data: AddChildBounty { + parent_bounty_id, + value, + description, + }, + }, + [ + 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, + 45u8, 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, + 203u8, 122u8, 77u8, 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, + 176u8, 102u8, 68u8, 188u8, 8u8, + ], + ) } #[doc = "Propose curator for funded child-bounty."] #[doc = ""] @@ -25901,45 +18391,33 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + curator: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, fee: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ProposeCurator, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 34u8, 219u8, 159u8, 152u8, 29u8, 12u8, 222u8, 91u8, 193u8, - 218u8, 28u8, 0u8, 102u8, 15u8, 180u8, 155u8, 135u8, 175u8, - 182u8, 51u8, 220u8, 97u8, 169u8, 97u8, 135u8, 26u8, 237u8, - 22u8, 100u8, 8u8, 203u8, 229u8, - ] - { - let call = ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "propose_curator", + data: ProposeCurator { + parent_bounty_id, + child_bounty_id, + curator, + fee, + }, + }, + [ + 37u8, 101u8, 96u8, 75u8, 254u8, 212u8, 42u8, 140u8, 72u8, + 107u8, 157u8, 110u8, 147u8, 236u8, 17u8, 138u8, 161u8, 153u8, + 119u8, 177u8, 225u8, 22u8, 83u8, 5u8, 123u8, 38u8, 30u8, + 240u8, 134u8, 208u8, 183u8, 247u8, + ], + ) } #[doc = "Accept the curator role for the child-bounty."] #[doc = ""] @@ -25964,38 +18442,26 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AcceptCurator, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 115u8, 24u8, 36u8, 188u8, 30u8, 11u8, 184u8, 102u8, 151u8, - 96u8, 41u8, 162u8, 104u8, 54u8, 76u8, 251u8, 189u8, 50u8, - 190u8, 50u8, 15u8, 171u8, 231u8, 218u8, 45u8, 129u8, 137u8, - 69u8, 130u8, 39u8, 190u8, 223u8, - ] - { - let call = AcceptCurator { - parent_bounty_id, - child_bounty_id, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "accept_curator", + data: AcceptCurator { + parent_bounty_id, + child_bounty_id, + }, + }, + [ + 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, + 228u8, 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, + 234u8, 142u8, 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, + 123u8, 125u8, 207u8, 10u8, 52u8, + ], + ) } #[doc = "Unassign curator from a child-bounty."] #[doc = ""] @@ -26035,38 +18501,26 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - UnassignCurator, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 210u8, 24u8, 20u8, 200u8, 106u8, 200u8, 33u8, 43u8, 169u8, - 133u8, 157u8, 108u8, 220u8, 36u8, 110u8, 172u8, 218u8, 1u8, - 209u8, 254u8, 69u8, 117u8, 70u8, 173u8, 66u8, 177u8, 54u8, - 128u8, 239u8, 83u8, 60u8, 118u8, - ] - { - let call = UnassignCurator { - parent_bounty_id, - child_bounty_id, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "unassign_curator", + data: UnassignCurator { + parent_bounty_id, + child_bounty_id, + }, + }, + [ + 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, + 86u8, 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, + 89u8, 72u8, 203u8, 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, + 169u8, 118u8, 128u8, 13u8, 211u8, + ], + ) } #[doc = "Award child-bounty to a beneficiary."] #[doc = ""] @@ -26089,43 +18543,31 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AwardChildBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 135u8, 134u8, 237u8, 216u8, 152u8, 75u8, 11u8, 209u8, 152u8, - 99u8, 166u8, 78u8, 162u8, 34u8, 37u8, 158u8, 95u8, 74u8, - 137u8, 50u8, 43u8, 117u8, 166u8, 91u8, 212u8, 30u8, 243u8, - 67u8, 140u8, 66u8, 56u8, 206u8, - ] - { - let call = AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "award_child_bounty", + data: AwardChildBounty { + parent_bounty_id, + child_bounty_id, + beneficiary, + }, + }, + [ + 231u8, 185u8, 73u8, 232u8, 92u8, 116u8, 204u8, 165u8, 216u8, + 194u8, 151u8, 21u8, 127u8, 239u8, 78u8, 45u8, 27u8, 252u8, + 119u8, 23u8, 71u8, 140u8, 137u8, 209u8, 189u8, 128u8, 126u8, + 247u8, 13u8, 42u8, 68u8, 134u8, + ], + ) } #[doc = "Claim the payout from an awarded child-bounty after payout delay."] #[doc = ""] @@ -26147,38 +18589,26 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClaimChildBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 54u8, 194u8, 203u8, 13u8, 230u8, 207u8, 25u8, 249u8, 203u8, - 199u8, 123u8, 79u8, 255u8, 85u8, 40u8, 125u8, 73u8, 5u8, - 126u8, 103u8, 205u8, 222u8, 232u8, 161u8, 178u8, 206u8, 39u8, - 5u8, 16u8, 167u8, 198u8, 93u8, - ] - { - let call = ClaimChildBounty { - parent_bounty_id, - child_bounty_id, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "claim_child_bounty", + data: ClaimChildBounty { + parent_bounty_id, + child_bounty_id, + }, + }, + [ + 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, + 124u8, 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, + 234u8, 171u8, 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, + 107u8, 65u8, 92u8, 41u8, 45u8, + ], + ) } #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] #[doc = "are transferred to parent bounty account. The child-bounty curator"] @@ -26206,38 +18636,26 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CloseChildBounty, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 123u8, 201u8, 206u8, 242u8, 80u8, 37u8, 113u8, 182u8, 237u8, - 187u8, 51u8, 229u8, 226u8, 250u8, 129u8, 203u8, 196u8, 22u8, - 91u8, 154u8, 118u8, 233u8, 254u8, 240u8, 113u8, 86u8, 55u8, - 5u8, 59u8, 15u8, 160u8, 204u8, - ] - { - let call = CloseChildBounty { - parent_bounty_id, - child_bounty_id, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ChildBounties", + call: "close_child_bounty", + data: CloseChildBounty { + parent_bounty_id, + child_bounty_id, + }, + }, + [ + 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, + 240u8, 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, + 96u8, 142u8, 68u8, 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, + 213u8, 249u8, 222u8, 22u8, + ], + ) } } } @@ -26245,604 +18663,405 @@ pub mod api { pub type Event = runtime_types::pallet_child_bounties::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A child-bounty is added."] pub struct Added { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, } - impl ::subxt::Event for Added { + impl ::subxt::events::StaticEvent for Added { const PALLET: &'static str = "ChildBounties"; const EVENT: &'static str = "Added"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A child-bounty is awarded to a beneficiary."] pub struct Awarded { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Awarded { + impl ::subxt::events::StaticEvent for Awarded { const PALLET: &'static str = "ChildBounties"; const EVENT: &'static str = "Awarded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A child-bounty is claimed by beneficiary."] pub struct Claimed { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + pub beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Claimed { + impl ::subxt::events::StaticEvent for Claimed { const PALLET: &'static str = "ChildBounties"; const EVENT: &'static str = "Claimed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A child-bounty is cancelled."] pub struct Canceled { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, } - impl ::subxt::Event for Canceled { + impl ::subxt::events::StaticEvent for Canceled { const PALLET: &'static str = "ChildBounties"; const EVENT: &'static str = "Canceled"; } } pub mod storage { use super::runtime_types; - pub struct ChildBountyCount; - impl ::subxt::StorageEntry for ChildBountyCount { - const PALLET: &'static str = "ChildBounties"; - const STORAGE: &'static str = "ChildBountyCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ParentChildBounties<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ParentChildBounties<'_> { - const PALLET: &'static str = "ChildBounties"; - const STORAGE: &'static str = "ParentChildBounties"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ChildBounties<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::core::primitive::u32, - ); - impl ::subxt::StorageEntry for ChildBounties<'_> { - const PALLET: &'static str = "ChildBounties"; - const STORAGE: &'static str = "ChildBounties"; - type Value = runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Twox64Concat, - ), - ]) - } - } - pub struct ChildBountyDescriptions<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ChildBountyDescriptions<'_> { - const PALLET: &'static str = "ChildBounties"; - const STORAGE: &'static str = "ChildBountyDescriptions"; - type Value = runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct ChildrenCuratorFees<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ChildrenCuratorFees<'_> { - const PALLET: &'static str = "ChildBounties"; - const STORAGE: &'static str = "ChildrenCuratorFees"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Number of total child bounties."] pub fn child_bounty_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, - 94u8, 114u8, 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, - 214u8, 167u8, 7u8, 109u8, 143u8, 158u8, 1u8, 200u8, - 205u8, 17u8, 93u8, 89u8, 26u8, 30u8, 95u8, - ] - { - let entry = ChildBountyCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildBountyCount", + vec![], + [ + 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, + 94u8, 114u8, 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, + 167u8, 7u8, 109u8, 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, + 93u8, 89u8, 26u8, 30u8, 95u8, + ], + ) } #[doc = " Number of child bounties per parent bounty."] #[doc = " Map of parent bounty index to number of child bounties."] pub fn parent_child_bounties( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, - 39u8, 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, - 88u8, 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, - 38u8, 250u8, 77u8, 49u8, 76u8, 188u8, - ] - { - let entry = ParentChildBounties(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ParentChildBounties", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, + 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, + 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, + 250u8, 77u8, 49u8, 76u8, 188u8, + ], + ) } #[doc = " Number of child bounties per parent bounty."] #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties_iter( + pub fn parent_child_bounties_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ParentChildBounties<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, - 39u8, 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, - 88u8, 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, - 38u8, 250u8, 77u8, 49u8, 76u8, 188u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ParentChildBounties", + Vec::new(), + [ + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, + 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, + 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, + 250u8, 77u8, 49u8, 76u8, 188u8, + ], + ) } #[doc = " Child bounties that have been added."] pub fn child_bounties( &self, - _0: &'a ::core::primitive::u32, - _1: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + _1: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 66u8, 224u8, 32u8, 188u8, 0u8, 175u8, 253u8, 132u8, 17u8, - 243u8, 51u8, 237u8, 230u8, 40u8, 198u8, 178u8, 222u8, - 159u8, 99u8, 29u8, 237u8, 147u8, 183u8, 111u8, 103u8, - 195u8, 185u8, 27u8, 252u8, 2u8, 55u8, 108u8, - ] - { - let entry = ChildBounties(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildBounties", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ::subxt::storage::address::StorageMapKey::new( + _1, + ::subxt::storage::address::StorageHasher::Twox64Concat, + ), + ], + [ + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, + 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, + 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, + 116u8, 219u8, 186u8, 165u8, 91u8, + ], + ) } #[doc = " Child bounties that have been added."] - pub fn child_bounties_iter( + pub fn child_bounties_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ChildBounties<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 66u8, 224u8, 32u8, 188u8, 0u8, 175u8, 253u8, 132u8, 17u8, - 243u8, 51u8, 237u8, 230u8, 40u8, 198u8, 178u8, 222u8, - 159u8, 99u8, 29u8, 237u8, 147u8, 183u8, 111u8, 103u8, - 195u8, 185u8, 27u8, 252u8, 2u8, 55u8, 108u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildBounties", + Vec::new(), + [ + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, + 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, + 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, + 116u8, 219u8, 186u8, 165u8, 91u8, + ], + ) } #[doc = " The description of each child-bounty."] pub fn child_bounty_descriptions( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 20u8, 134u8, 50u8, 207u8, 242u8, 159u8, 242u8, 22u8, - 76u8, 80u8, 193u8, 247u8, 73u8, 51u8, 113u8, 241u8, - 186u8, 26u8, 227u8, 44u8, 122u8, 189u8, 171u8, 137u8, - 31u8, 103u8, 184u8, 129u8, 31u8, 98u8, 19u8, 60u8, - ] - { - let entry = ChildBountyDescriptions(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildBountyDescriptions", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, + 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, + 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, + 93u8, 207u8, 212u8, 141u8, 74u8, + ], + ) } #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions_iter( + pub fn child_bounty_descriptions_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ChildBountyDescriptions<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 20u8, 134u8, 50u8, 207u8, 242u8, 159u8, 242u8, 22u8, - 76u8, 80u8, 193u8, 247u8, 73u8, 51u8, 113u8, 241u8, - 186u8, 26u8, 227u8, 44u8, 122u8, 189u8, 171u8, 137u8, - 31u8, 103u8, 184u8, 129u8, 31u8, 98u8, 19u8, 60u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildBountyDescriptions", + Vec::new(), + [ + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, + 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, + 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, + 93u8, 207u8, 212u8, 141u8, 74u8, + ], + ) } #[doc = " The cumulative child-bounty curator fee for each parent bounty."] pub fn children_curator_fees( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u128, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, - 234u8, 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, - 105u8, 69u8, 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, - 101u8, 56u8, 85u8, 211u8, 121u8, 168u8, 0u8, 216u8, - ] - { - let entry = ChildrenCuratorFees(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildrenCuratorFees", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, + 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, + 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, + 211u8, 121u8, 168u8, 0u8, 216u8, + ], + ) } #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees_iter( + pub fn children_curator_fees_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ChildrenCuratorFees<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, - 234u8, 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, - 105u8, 69u8, 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, - 101u8, 56u8, 85u8, 211u8, 121u8, 168u8, 0u8, 216u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ChildBounties", + "ChildrenCuratorFees", + Vec::new(), + [ + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, + 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, + 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, + 211u8, 121u8, 168u8, 0u8, 216u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Maximum number of child bounties that can be added to a parent bounty."] pub fn max_active_child_bounty_count( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ChildBounties", "MaxActiveChildBountyCount")? - == [ - 118u8, 151u8, 94u8, 73u8, 30u8, 79u8, 217u8, 50u8, 98u8, - 108u8, 97u8, 243u8, 136u8, 184u8, 120u8, 141u8, 19u8, 204u8, - 233u8, 46u8, 86u8, 5u8, 76u8, 170u8, 80u8, 113u8, 192u8, 9u8, - 108u8, 89u8, 169u8, 241u8, - ] - { - let pallet = metadata.pallet("ChildBounties")?; - let constant = pallet.constant("MaxActiveChildBountyCount")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ChildBounties", + "MaxActiveChildBountyCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Minimum value for a child-bounty."] pub fn child_bounty_value_minimum( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ChildBounties", "ChildBountyValueMinimum")? - == [ - 42u8, 42u8, 180u8, 115u8, 221u8, 155u8, 245u8, 216u8, 68u8, - 88u8, 3u8, 177u8, 198u8, 36u8, 182u8, 210u8, 63u8, 29u8, 7u8, - 184u8, 208u8, 39u8, 118u8, 169u8, 87u8, 179u8, 105u8, 185u8, - 89u8, 167u8, 150u8, 73u8, - ] - { - let pallet = metadata.pallet("ChildBounties")?; - let constant = pallet.constant("ChildBountyValueMinimum")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ChildBounties", + "ChildBountyValueMinimum", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } } } } pub mod tips { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReportAwesome { pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for ReportAwesome { - const PALLET: &'static str = "Tips"; - const FUNCTION: &'static str = "report_awesome"; + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RetractTip { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for RetractTip { - const PALLET: &'static str = "Tips"; - const FUNCTION: &'static str = "retract_tip"; + pub hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct TipNew { pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, #[codec(compact)] pub tip_value: ::core::primitive::u128, } - impl ::subxt::Call for TipNew { - const PALLET: &'static str = "Tips"; - const FUNCTION: &'static str = "tip_new"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Tip { - pub hash: ::subxt::sp_core::H256, + pub hash: ::subxt::ext::sp_core::H256, #[codec(compact)] pub tip_value: ::core::primitive::u128, } - impl ::subxt::Call for Tip { - const PALLET: &'static str = "Tips"; - const FUNCTION: &'static str = "tip"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CloseTip { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for CloseTip { - const PALLET: &'static str = "Tips"; - const FUNCTION: &'static str = "close_tip"; + pub hash: ::subxt::ext::sp_core::H256, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] - pub struct SlashTip { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Call for SlashTip { - const PALLET: &'static str = "Tips"; - const FUNCTION: &'static str = "slash_tip"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] + pub struct SlashTip { + pub hash: ::subxt::ext::sp_core::H256, + } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] @@ -26865,36 +19084,24 @@ pub mod api { pub fn report_awesome( &self, reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReportAwesome, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 90u8, 58u8, 149u8, 226u8, 88u8, 237u8, 150u8, 165u8, 172u8, - 179u8, 195u8, 226u8, 200u8, 20u8, 152u8, 103u8, 157u8, 208u8, - 86u8, 101u8, 178u8, 54u8, 42u8, 171u8, 172u8, 201u8, 20u8, - 254u8, 165u8, 7u8, 15u8, 197u8, - ] - { - let call = ReportAwesome { reason, who }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + who: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Tips", + call: "report_awesome", + data: ReportAwesome { reason, who }, + }, + [ + 43u8, 6u8, 185u8, 209u8, 110u8, 99u8, 94u8, 100u8, 33u8, 5u8, + 27u8, 199u8, 67u8, 255u8, 252u8, 26u8, 104u8, 192u8, 55u8, + 122u8, 106u8, 129u8, 249u8, 181u8, 246u8, 205u8, 213u8, + 175u8, 241u8, 59u8, 151u8, 197u8, + ], + ) } #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] #[doc = ""] @@ -26917,36 +19124,24 @@ pub mod api { #[doc = "# "] pub fn retract_tip( &self, - hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - RetractTip, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 213u8, 70u8, 11u8, 81u8, 39u8, 125u8, 42u8, 247u8, 80u8, - 55u8, 123u8, 247u8, 45u8, 18u8, 86u8, 205u8, 26u8, 229u8, - 21u8, 106u8, 196u8, 125u8, 63u8, 65u8, 117u8, 219u8, 138u8, - 163u8, 161u8, 115u8, 157u8, 231u8, - ] - { - let call = RetractTip { hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Tips", + call: "retract_tip", + data: RetractTip { hash }, + }, + [ + 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, + 142u8, 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, + 137u8, 227u8, 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8, + 184u8, 187u8, 65u8, 129u8, 131u8, + ], + ) } #[doc = "Give a tip for something new; no finder's fee will be taken."] #[doc = ""] @@ -26973,41 +19168,29 @@ pub mod api { pub fn tip_new( &self, reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, tip_value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - TipNew, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 137u8, 119u8, 91u8, 139u8, 238u8, 180u8, 247u8, 5u8, 194u8, - 35u8, 33u8, 151u8, 50u8, 212u8, 208u8, 134u8, 98u8, 133u8, - 83u8, 212u8, 27u8, 218u8, 186u8, 188u8, 111u8, 102u8, 34u8, - 211u8, 112u8, 48u8, 98u8, 206u8, - ] - { - let call = TipNew { - reason, - who, - tip_value, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Tips", + call: "tip_new", + data: TipNew { + reason, + who, + tip_value, + }, + }, + [ + 146u8, 216u8, 159u8, 132u8, 163u8, 180u8, 42u8, 203u8, 181u8, + 76u8, 217u8, 120u8, 75u8, 32u8, 165u8, 41u8, 250u8, 222u8, + 204u8, 63u8, 61u8, 218u8, 161u8, 37u8, 172u8, 10u8, 66u8, + 218u8, 14u8, 130u8, 160u8, 126u8, + ], + ) } #[doc = "Declare a tip value for an already-open tip."] #[doc = ""] @@ -27035,37 +19218,25 @@ pub mod api { #[doc = "# "] pub fn tip( &self, - hash: ::subxt::sp_core::H256, + hash: ::subxt::ext::sp_core::H256, tip_value: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Tip, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 2u8, 38u8, 219u8, 220u8, 183u8, 243u8, 108u8, 40u8, 179u8, - 21u8, 218u8, 158u8, 126u8, 19u8, 22u8, 115u8, 95u8, 17u8, - 73u8, 219u8, 179u8, 69u8, 60u8, 115u8, 196u8, 170u8, 23u8, - 218u8, 75u8, 9u8, 227u8, 204u8, - ] - { - let call = Tip { hash, tip_value }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Tips", + call: "tip", + data: Tip { hash, tip_value }, + }, + [ + 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, + 206u8, 50u8, 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, + 164u8, 107u8, 170u8, 98u8, 192u8, 37u8, 209u8, 199u8, 130u8, + 15u8, 168u8, 63u8, 181u8, 134u8, + ], + ) } #[doc = "Close and payout a tip."] #[doc = ""] @@ -27085,36 +19256,24 @@ pub mod api { #[doc = "# "] pub fn close_tip( &self, - hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CloseTip, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 85u8, 180u8, 115u8, 177u8, 2u8, 252u8, 139u8, 37u8, 233u8, - 127u8, 115u8, 4u8, 169u8, 169u8, 214u8, 223u8, 181u8, 150u8, - 137u8, 226u8, 99u8, 23u8, 205u8, 31u8, 160u8, 185u8, 97u8, - 128u8, 197u8, 110u8, 142u8, 160u8, - ] - { - let call = CloseTip { hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Tips", + call: "close_tip", + data: CloseTip { hash }, + }, + [ + 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, + 50u8, 81u8, 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, + 107u8, 114u8, 81u8, 200u8, 144u8, 175u8, 29u8, 142u8, 115u8, + 184u8, 102u8, 116u8, 156u8, 173u8, + ], + ) } #[doc = "Remove and slash an already-open tip."] #[doc = ""] @@ -27130,36 +19289,24 @@ pub mod api { #[doc = "# "] pub fn slash_tip( &self, - hash: ::subxt::sp_core::H256, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SlashTip, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 135u8, 7u8, 55u8, 167u8, 26u8, 108u8, 43u8, 20u8, 162u8, - 185u8, 209u8, 88u8, 148u8, 181u8, 51u8, 102u8, 17u8, 105u8, - 162u8, 223u8, 126u8, 46u8, 254u8, 79u8, 64u8, 248u8, 193u8, - 10u8, 110u8, 40u8, 5u8, 199u8, - ] - { - let call = SlashTip { hash }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + hash: ::subxt::ext::sp_core::H256, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Tips", + call: "slash_tip", + data: SlashTip { hash }, + }, + [ + 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, + 0u8, 209u8, 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, + 41u8, 178u8, 20u8, 27u8, 9u8, 184u8, 79u8, 93u8, 208u8, + 148u8, 27u8, 190u8, 176u8, 169u8, + ], + ) } } } @@ -27167,427 +19314,333 @@ pub mod api { pub type Event = runtime_types::pallet_tips::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new tip suggestion has been opened."] pub struct NewTip { - pub tip_hash: ::subxt::sp_core::H256, + pub tip_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for NewTip { + impl ::subxt::events::StaticEvent for NewTip { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "NewTip"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A tip suggestion has reached threshold and is closing."] pub struct TipClosing { - pub tip_hash: ::subxt::sp_core::H256, + pub tip_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for TipClosing { + impl ::subxt::events::StaticEvent for TipClosing { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipClosing"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A tip suggestion has been closed."] pub struct TipClosed { - pub tip_hash: ::subxt::sp_core::H256, - pub who: ::subxt::sp_core::crypto::AccountId32, + pub tip_hash: ::subxt::ext::sp_core::H256, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub payout: ::core::primitive::u128, } - impl ::subxt::Event for TipClosed { + impl ::subxt::events::StaticEvent for TipClosed { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipClosed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A tip suggestion has been retracted."] pub struct TipRetracted { - pub tip_hash: ::subxt::sp_core::H256, + pub tip_hash: ::subxt::ext::sp_core::H256, } - impl ::subxt::Event for TipRetracted { + impl ::subxt::events::StaticEvent for TipRetracted { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipRetracted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A tip suggestion has been slashed."] pub struct TipSlashed { - pub tip_hash: ::subxt::sp_core::H256, - pub finder: ::subxt::sp_core::crypto::AccountId32, + pub tip_hash: ::subxt::ext::sp_core::H256, + pub finder: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, } - impl ::subxt::Event for TipSlashed { + impl ::subxt::events::StaticEvent for TipSlashed { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipSlashed"; } } pub mod storage { use super::runtime_types; - pub struct Tips<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Tips<'_> { - const PALLET: &'static str = "Tips"; - const STORAGE: &'static str = "Tips"; - type Value = runtime_types::pallet_tips::OpenTip< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::sp_core::H256, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Reasons<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Reasons<'_> { - const PALLET: &'static str = "Tips"; - const STORAGE: &'static str = "Reasons"; - type Value = ::std::vec::Vec<::core::primitive::u8>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] #[doc = " This has the insecure enumerable hash function since the key itself is already"] #[doc = " guaranteed to be a secure hash."] pub fn tips( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_tips::OpenTip< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::sp_core::H256, - >, - >, - ::subxt::BasicError, + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_tips::OpenTip< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 147u8, 163u8, 201u8, 236u8, 134u8, 199u8, 172u8, 47u8, - 40u8, 168u8, 105u8, 145u8, 238u8, 204u8, 133u8, 116u8, - 185u8, 240u8, 122u8, 181u8, 102u8, 194u8, 38u8, 40u8, - 230u8, 215u8, 159u8, 71u8, 100u8, 240u8, 169u8, 64u8, - ] - { - let entry = Tips(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Tips", + "Tips", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, + 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, + 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, + 38u8, 142u8, 36u8, 66u8, 0u8, + ], + ) } #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] #[doc = " This has the insecure enumerable hash function since the key itself is already"] #[doc = " guaranteed to be a secure hash."] - pub fn tips_iter( + pub fn tips_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Tips<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_tips::OpenTip< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 147u8, 163u8, 201u8, 236u8, 134u8, 199u8, 172u8, 47u8, - 40u8, 168u8, 105u8, 145u8, 238u8, 204u8, 133u8, 116u8, - 185u8, 240u8, 122u8, 181u8, 102u8, 194u8, 38u8, 40u8, - 230u8, 215u8, 159u8, 71u8, 100u8, 240u8, 169u8, 64u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Tips", + "Tips", + Vec::new(), + [ + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, + 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, + 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, + 38u8, 142u8, 36u8, 66u8, 0u8, + ], + ) } #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] pub fn reasons( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 224u8, 172u8, 6u8, 195u8, 254u8, 210u8, 186u8, 62u8, - 224u8, 53u8, 196u8, 78u8, 84u8, 218u8, 0u8, 135u8, 247u8, - 130u8, 17u8, 93u8, 149u8, 220u8, 36u8, 61u8, 62u8, 60u8, - 210u8, 142u8, 24u8, 145u8, 151u8, 19u8, - ] - { - let entry = Reasons(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Tips", + "Reasons", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, + 35u8, 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, + 210u8, 176u8, 82u8, 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, + 194u8, 166u8, 91u8, 189u8, 134u8, + ], + ) } #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] - pub fn reasons_iter( + pub fn reasons_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Reasons<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 224u8, 172u8, 6u8, 195u8, 254u8, 210u8, 186u8, 62u8, - 224u8, 53u8, 196u8, 78u8, 84u8, 218u8, 0u8, 135u8, 247u8, - 130u8, 17u8, 93u8, 149u8, 220u8, 36u8, 61u8, 62u8, 60u8, - 210u8, 142u8, 24u8, 145u8, 151u8, 19u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Tips", + "Reasons", + Vec::new(), + [ + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, + 35u8, 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, + 210u8, 176u8, 82u8, 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, + 194u8, 166u8, 91u8, 189u8, 134u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Maximum acceptable reason length."] #[doc = ""] #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] pub fn maximum_reason_length( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Tips", "MaximumReasonLength")? - == [ - 137u8, 135u8, 60u8, 208u8, 169u8, 200u8, 219u8, 180u8, 48u8, - 114u8, 22u8, 9u8, 163u8, 54u8, 133u8, 198u8, 72u8, 186u8, - 183u8, 134u8, 130u8, 198u8, 61u8, 79u8, 86u8, 218u8, 212u8, - 166u8, 195u8, 81u8, 58u8, 191u8, - ] - { - let pallet = metadata.pallet("Tips")?; - let constant = pallet.constant("MaximumReasonLength")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Tips", + "MaximumReasonLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] pub fn data_deposit_per_byte( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Tips", "DataDepositPerByte")? - == [ - 70u8, 208u8, 250u8, 66u8, 143u8, 90u8, 112u8, 229u8, 138u8, - 156u8, 116u8, 16u8, 65u8, 250u8, 203u8, 188u8, 255u8, 123u8, - 211u8, 66u8, 19u8, 231u8, 22u8, 224u8, 95u8, 6u8, 164u8, - 26u8, 103u8, 226u8, 234u8, 89u8, - ] - { - let pallet = metadata.pallet("Tips")?; - let constant = pallet.constant("DataDepositPerByte")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Tips", + "DataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] pub fn tip_countdown( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Tips", "TipCountdown")? - == [ - 77u8, 181u8, 253u8, 112u8, 168u8, 146u8, 251u8, 28u8, 30u8, - 194u8, 163u8, 60u8, 23u8, 147u8, 144u8, 89u8, 218u8, 9u8, - 171u8, 173u8, 214u8, 23u8, 123u8, 71u8, 94u8, 107u8, 78u8, - 3u8, 197u8, 203u8, 38u8, 220u8, - ] - { - let pallet = metadata.pallet("Tips")?; - let constant = pallet.constant("TipCountdown")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Tips", + "TipCountdown", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The percent of the final tip which goes to the original reporter of the tip."] pub fn tip_finders_fee( &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Percent, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Tips", "TipFindersFee")? - == [ - 27u8, 137u8, 241u8, 28u8, 69u8, 248u8, 212u8, 12u8, 176u8, - 157u8, 130u8, 223u8, 38u8, 193u8, 191u8, 102u8, 6u8, 0u8, - 9u8, 207u8, 111u8, 16u8, 182u8, 135u8, 198u8, 209u8, 210u8, - 247u8, 21u8, 135u8, 120u8, 62u8, - ] - { - let pallet = metadata.pallet("Tips")?; - let constant = pallet.constant("TipFindersFee")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Percent, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Tips", + "TipFindersFee", + [ + 99u8, 121u8, 176u8, 172u8, 235u8, 159u8, 116u8, 114u8, 179u8, + 91u8, 129u8, 117u8, 204u8, 135u8, 53u8, 7u8, 151u8, 26u8, + 124u8, 151u8, 202u8, 171u8, 171u8, 207u8, 183u8, 177u8, 24u8, + 53u8, 109u8, 185u8, 71u8, 183u8, + ], + ) } #[doc = " The amount held on deposit for placing a tip report."] pub fn tip_report_deposit_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Tips", "TipReportDepositBase")? - == [ - 101u8, 101u8, 22u8, 17u8, 169u8, 8u8, 182u8, 88u8, 11u8, - 146u8, 64u8, 157u8, 3u8, 242u8, 85u8, 122u8, 67u8, 198u8, - 96u8, 217u8, 154u8, 139u8, 58u8, 245u8, 172u8, 177u8, 71u8, - 217u8, 240u8, 7u8, 109u8, 92u8, - ] - { - let pallet = metadata.pallet("Tips")?; - let constant = pallet.constant("TipReportDepositBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Tips", + "TipReportDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } } } } pub mod election_provider_multi_phase { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } - impl ::subxt::Call for SubmitUnsigned { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const FUNCTION: &'static str = "submit_unsigned"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetMinimumUntrustedScore { pub maybe_next_score: ::core::option::Option< runtime_types::sp_npos_elections::ElectionScore, >, } - impl ::subxt::Call for SetMinimumUntrustedScore { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const FUNCTION: &'static str = "set_minimum_untrusted_score"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetEmergencyElectionResult { pub supports: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, )>, } - impl ::subxt::Call for SetEmergencyElectionResult { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const FUNCTION: &'static str = "set_emergency_election_result"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Submit { pub raw_solution: ::std::boxed::Box< runtime_types::pallet_election_provider_multi_phase::RawSolution< @@ -27595,34 +19648,17 @@ pub mod api { >, >, } - impl ::subxt::Call for Submit { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const FUNCTION: &'static str = "submit"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct GovernanceFallback { pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for GovernanceFallback { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const FUNCTION: &'static str = "governance_fallback"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Submit a solution for the unsigned phase."] #[doc = ""] #[doc = "The dispatch origin fo this call must be __none__."] @@ -27641,38 +19677,26 @@ pub mod api { &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SubmitUnsigned, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 212u8, 126u8, 4u8, 62u8, 15u8, 223u8, 54u8, 80u8, 27u8, 96u8, - 170u8, 169u8, 238u8, 149u8, 139u8, 190u8, 179u8, 158u8, - 126u8, 191u8, 50u8, 201u8, 108u8, 200u8, 78u8, 139u8, 92u8, - 69u8, 50u8, 239u8, 51u8, 18u8, - ] - { - let call = SubmitUnsigned { - raw_solution: ::std::boxed::Box::new(raw_solution), - witness, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ElectionProviderMultiPhase", + call: "submit_unsigned", + data: SubmitUnsigned { + raw_solution: ::std::boxed::Box::new(raw_solution), + witness, + }, + }, + [ + 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8, + 197u8, 97u8, 58u8, 242u8, 10u8, 69u8, 250u8, 185u8, 169u8, + 21u8, 8u8, 202u8, 61u8, 36u8, 25u8, 4u8, 148u8, 82u8, 56u8, + 242u8, 18u8, 27u8, 219u8, + ], + ) } #[doc = "Set a new value for `MinimumUntrustedScore`."] #[doc = ""] @@ -27684,35 +19708,23 @@ pub mod api { maybe_next_score: ::core::option::Option< runtime_types::sp_npos_elections::ElectionScore, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMinimumUntrustedScore, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 207u8, 31u8, 247u8, 72u8, 55u8, 18u8, 99u8, 157u8, 155u8, - 89u8, 59u8, 156u8, 254u8, 3u8, 181u8, 85u8, 48u8, 42u8, 73u8, - 243u8, 35u8, 90u8, 142u8, 14u8, 62u8, 48u8, 15u8, 125u8, - 194u8, 103u8, 2u8, 175u8, - ] - { - let call = SetMinimumUntrustedScore { maybe_next_score }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ElectionProviderMultiPhase", + call: "set_minimum_untrusted_score", + data: SetMinimumUntrustedScore { maybe_next_score }, + }, + [ + 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, + 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, + 62u8, 196u8, 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, + 76u8, 4u8, 67u8, 81u8, + ], + ) } #[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`."] @@ -27725,40 +19737,28 @@ pub mod api { pub fn set_emergency_election_result( &self, supports: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, )>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetEmergencyElectionResult, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 195u8, 164u8, 133u8, 193u8, 58u8, 154u8, 182u8, 83u8, 231u8, - 217u8, 199u8, 27u8, 239u8, 143u8, 60u8, 103u8, 139u8, 253u8, - 49u8, 242u8, 8u8, 41u8, 160u8, 192u8, 123u8, 98u8, 137u8, - 13u8, 170u8, 167u8, 246u8, 175u8, - ] - { - let call = SetEmergencyElectionResult { supports }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ElectionProviderMultiPhase", + call: "set_emergency_election_result", + data: SetEmergencyElectionResult { supports }, + }, + [ + 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, + 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, + 251u8, 51u8, 214u8, 204u8, 55u8, 112u8, 46u8, 228u8, 255u8, + 250u8, 151u8, 5u8, 44u8, 133u8, + ], + ) } #[doc = "Submit a solution for the signed phase."] #[doc = ""] @@ -27772,37 +19772,25 @@ pub mod api { pub fn submit( &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Submit, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 2u8, 131u8, 162u8, 38u8, 102u8, 73u8, 144u8, 71u8, 200u8, - 229u8, 140u8, 38u8, 58u8, 159u8, 59u8, 167u8, 91u8, 169u8, - 22u8, 228u8, 127u8, 153u8, 125u8, 241u8, 60u8, 61u8, 103u8, - 192u8, 95u8, 87u8, 81u8, 73u8, - ] - { - let call = Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ElectionProviderMultiPhase", + call: "submit", + data: Submit { + raw_solution: ::std::boxed::Box::new(raw_solution), + }, + }, + [ + 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, + 123u8, 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, + 210u8, 98u8, 248u8, 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, + 225u8, 241u8, 58u8, 193u8, 134u8, + ], + ) } #[doc = "Trigger the governance fallback."] #[doc = ""] @@ -27812,38 +19800,26 @@ pub mod api { &self, maybe_max_voters: ::core::option::Option<::core::primitive::u32>, maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - GovernanceFallback, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 195u8, 190u8, 140u8, 94u8, 209u8, 100u8, 92u8, 194u8, 78u8, - 226u8, 16u8, 168u8, 52u8, 117u8, 88u8, 178u8, 84u8, 248u8, - 117u8, 38u8, 152u8, 71u8, 37u8, 158u8, 77u8, 204u8, 59u8, - 184u8, 22u8, 239u8, 92u8, 209u8, - ] - { - let call = GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ElectionProviderMultiPhase", + call: "governance_fallback", + data: GovernanceFallback { + maybe_max_voters, + maybe_max_targets, + }, + }, + [ + 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, + 143u8, 43u8, 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, + 83u8, 229u8, 227u8, 200u8, 179u8, 4u8, 113u8, 60u8, 99u8, + 190u8, 53u8, 226u8, 142u8, 182u8, + ], + ) } } } @@ -27852,7 +19828,11 @@ pub mod api { runtime_types::pallet_election_provider_multi_phase::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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"] @@ -27864,11 +19844,15 @@ pub mod api { runtime_types::pallet_election_provider_multi_phase::ElectionCompute, pub prev_ejected: ::core::primitive::bool, } - impl ::subxt::Event for SolutionStored { + impl ::subxt::events::StaticEvent for SolutionStored { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "SolutionStored"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The election has been finalized, with `Some` of the given computation, or else if the"] #[doc = "election failed, `None`."] pub struct ElectionFinalized { @@ -27876,167 +19860,71 @@ pub mod api { runtime_types::pallet_election_provider_multi_phase::ElectionCompute, >, } - impl ::subxt::Event for ElectionFinalized { + impl ::subxt::events::StaticEvent for ElectionFinalized { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "ElectionFinalized"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has been rewarded for their signed submission being finalized."] pub struct Rewarded { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub value: ::core::primitive::u128, } - impl ::subxt::Event for Rewarded { + impl ::subxt::events::StaticEvent for Rewarded { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "Rewarded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An account has been slashed for submitting an invalid signed submission."] pub struct Slashed { - pub account: ::subxt::sp_core::crypto::AccountId32, + pub account: ::subxt::ext::sp_core::crypto::AccountId32, pub value: ::core::primitive::u128, } - impl ::subxt::Event for Slashed { + impl ::subxt::events::StaticEvent for Slashed { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "Slashed"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "The signed phase of the given round has started."] pub struct SignedPhaseStarted { pub round: ::core::primitive::u32, } - impl ::subxt::Event for SignedPhaseStarted { + impl ::subxt::events::StaticEvent for SignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "SignedPhaseStarted"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "The unsigned phase of the given round has started."] pub struct UnsignedPhaseStarted { pub round: ::core::primitive::u32, } - impl ::subxt::Event for UnsignedPhaseStarted { + impl ::subxt::events::StaticEvent for UnsignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "UnsignedPhaseStarted"; } } pub mod storage { use super::runtime_types; - pub struct Round; - impl ::subxt::StorageEntry for Round { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "Round"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentPhase; - impl ::subxt::StorageEntry for CurrentPhase { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "CurrentPhase"; - type Value = runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct QueuedSolution; - impl ::subxt::StorageEntry for QueuedSolution { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "QueuedSolution"; - type Value = - runtime_types::pallet_election_provider_multi_phase::ReadySolution< - ::subxt::sp_core::crypto::AccountId32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Snapshot; - impl ::subxt::StorageEntry for Snapshot { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "Snapshot"; - type Value = - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct DesiredTargets; - impl ::subxt::StorageEntry for DesiredTargets { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "DesiredTargets"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SnapshotMetadata; - impl ::subxt::StorageEntry for SnapshotMetadata { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "SnapshotMetadata"; - type Value = runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SignedSubmissionNextIndex; - impl ::subxt::StorageEntry for SignedSubmissionNextIndex { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "SignedSubmissionNextIndex"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SignedSubmissionIndices; - impl ::subxt::StorageEntry for SignedSubmissionIndices { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "SignedSubmissionIndices"; - type Value = runtime_types :: sp_runtime :: bounded :: bounded_btree_map :: BoundedBTreeMap < runtime_types :: sp_npos_elections :: ElectionScore , :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SignedSubmissionsMap<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for SignedSubmissionsMap<'_> { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "SignedSubmissionsMap"; - type Value = runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct MinimumUntrustedScore; - impl ::subxt::StorageEntry for MinimumUntrustedScore { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const STORAGE: &'static str = "MinimumUntrustedScore"; - type Value = runtime_types::sp_npos_elections::ElectionScore; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Internal counter for the number of rounds."] #[doc = ""] #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] @@ -28045,193 +19933,130 @@ pub mod api { #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] pub fn round( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, - 96u8, 35u8, 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, - 166u8, 188u8, 199u8, 210u8, 21u8, 19u8, 70u8, 96u8, - 139u8, 8u8, 53u8, 82u8, 165u8, 239u8, - ] - { - let entry = Round; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "Round", + vec![], + [ + 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, + 96u8, 35u8, 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, + 166u8, 188u8, 199u8, 210u8, 21u8, 19u8, 70u8, 96u8, 139u8, + 8u8, 53u8, 82u8, 165u8, 239u8, + ], + ) } #[doc = " Current phase."] pub fn current_phase( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 162u8, 177u8, 133u8, 63u8, 175u8, 78u8, 85u8, 0u8, 233u8, - 84u8, 10u8, 250u8, 190u8, 39u8, 101u8, 11u8, 52u8, 31u8, - 129u8, 151u8, 63u8, 179u8, 120u8, 28u8, 70u8, 61u8, 91u8, - 153u8, 95u8, 32u8, 33u8, 157u8, - ] - { - let entry = CurrentPhase; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] pub fn queued_solution (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 145u8, 177u8, 147u8, 52u8, 30u8, 135u8, 33u8, 145u8, - 204u8, 82u8, 1u8, 165u8, 208u8, 39u8, 181u8, 2u8, 96u8, - 236u8, 19u8, 144u8, 87u8, 197u8, 25u8, 164u8, 116u8, 0u8, - 120u8, 245u8, 154u8, 30u8, 191u8, 155u8, - ] - { - let entry = QueuedSolution; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "CurrentPhase", + vec![], + [ + 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8, + 53u8, 153u8, 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8, + 35u8, 28u8, 121u8, 44u8, 229u8, 45u8, 196u8, 87u8, 73u8, + 125u8, 216u8, 245u8, 255u8, 15u8, + ], + ) + } + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] + pub fn queued_solution( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_election_provider_multi_phase::ReadySolution< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "QueuedSolution", + vec![], + [ + 149u8, 246u8, 152u8, 57u8, 54u8, 217u8, 14u8, 124u8, 125u8, + 202u8, 242u8, 149u8, 147u8, 201u8, 168u8, 99u8, 249u8, 17u8, + 163u8, 184u8, 254u8, 115u8, 100u8, 108u8, 28u8, 14u8, 139u8, + 215u8, 26u8, 93u8, 215u8, 251u8, + ], + ) } #[doc = " Snapshot data of the round."] #[doc = ""] - #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] pub fn snapshot (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 28u8, 163u8, 105u8, 94u8, 66u8, 226u8, 134u8, 29u8, - 210u8, 211u8, 182u8, 236u8, 180u8, 109u8, 203u8, 44u8, - 1u8, 50u8, 112u8, 201u8, 200u8, 12u8, 88u8, 248u8, 253u8, - 182u8, 56u8, 156u8, 169u8, 179u8, 19u8, 161u8, - ] - { - let entry = Snapshot; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] + pub fn snapshot( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "Snapshot", + vec![], + [ + 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8, + 224u8, 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8, + 36u8, 206u8, 72u8, 27u8, 226u8, 87u8, 146u8, 220u8, 93u8, + 178u8, 26u8, 115u8, 232u8, 71u8, + ], + ) } #[doc = " Desired number of targets to elect for this round."] #[doc = ""] #[doc = " Only exists when [`Snapshot`] is present."] pub fn desired_targets( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, - 167u8, 80u8, 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, - 31u8, 210u8, 2u8, 116u8, 220u8, 231u8, 115u8, 112u8, - 118u8, 118u8, 68u8, 34u8, 151u8, 165u8, - ] - { - let entry = DesiredTargets; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "DesiredTargets", + vec![], + [ + 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, + 167u8, 80u8, 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, + 31u8, 210u8, 2u8, 116u8, 220u8, 231u8, 115u8, 112u8, 118u8, + 118u8, 68u8, 34u8, 151u8, 165u8, + ], + ) } #[doc = " The metadata of the [`RoundSnapshot`]"] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 240u8, 57u8, 126u8, 76u8, 84u8, 244u8, 120u8, 136u8, - 164u8, 49u8, 185u8, 89u8, 126u8, 18u8, 117u8, 235u8, - 33u8, 226u8, 173u8, 254u8, 79u8, 194u8, 154u8, 123u8, - 29u8, 237u8, 116u8, 185u8, 36u8, 248u8, 46u8, 103u8, - ] - { - let entry = SnapshotMetadata; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , () , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SnapshotMetadata", + vec![], + [ + 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8, + 203u8, 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8, + 94u8, 22u8, 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8, + 251u8, 117u8, 220u8, 205u8, 78u8, + ], + ) } #[doc = " The next index to be assigned to an incoming signed submission."] #[doc = ""] @@ -28244,68 +20069,41 @@ pub mod api { #[doc = " because iteration is slow. Instead, we store the value here."] pub fn signed_submission_next_index( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, - 141u8, 182u8, 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, - 238u8, 115u8, 8u8, 6u8, 137u8, 45u8, 2u8, 123u8, 187u8, - 53u8, 215u8, 19u8, 129u8, 54u8, 22u8, - ] - { - let entry = SignedSubmissionNextIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedSubmissionNextIndex", + vec![], + [ + 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, + 141u8, 182u8, 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8, + 115u8, 8u8, 6u8, 137u8, 45u8, 2u8, 123u8, 187u8, 53u8, 215u8, + 19u8, 129u8, 54u8, 22u8, + ], + ) } #[doc = " A sorted, bounded set of `(score, index)`, where each `index` points to a value in"] #[doc = " `SignedSubmissions`."] #[doc = ""] #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] - #[doc = " them one at a time instead of reading and decoding all of them at once."] pub fn signed_submission_indices (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: sp_runtime :: bounded :: bounded_btree_map :: BoundedBTreeMap < runtime_types :: sp_npos_elections :: ElectionScore , :: core :: primitive :: u32 > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 191u8, 143u8, 241u8, 251u8, 74u8, 9u8, 145u8, 136u8, - 135u8, 76u8, 182u8, 85u8, 140u8, 252u8, 58u8, 183u8, - 217u8, 121u8, 213u8, 200u8, 167u8, 89u8, 15u8, 212u8, - 62u8, 90u8, 192u8, 214u8, 130u8, 196u8, 14u8, 175u8, - ] - { - let entry = SignedSubmissionIndices; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " them one at a time instead of reading and decoding all of them at once."] pub fn signed_submission_indices (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: sp_runtime :: bounded :: bounded_btree_map :: BoundedBTreeMap < runtime_types :: sp_npos_elections :: ElectionScore , :: core :: primitive :: u32 > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedSubmissionIndices", + vec![], + [ + 121u8, 119u8, 26u8, 183u8, 167u8, 33u8, 230u8, 159u8, 230u8, + 171u8, 8u8, 52u8, 178u8, 214u8, 245u8, 148u8, 202u8, 6u8, + 7u8, 50u8, 84u8, 174u8, 253u8, 131u8, 235u8, 136u8, 40u8, + 83u8, 2u8, 64u8, 9u8, 83u8, + ], + ) } #[doc = " Unchecked, signed solutions."] #[doc = ""] @@ -28313,31 +20111,21 @@ 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 : & 'a :: core :: primitive :: u32 , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 75u8, 2u8, 76u8, 74u8, 73u8, 167u8, 243u8, 1u8, 31u8, - 26u8, 48u8, 196u8, 177u8, 21u8, 233u8, 66u8, 251u8, 11u8, - 11u8, 252u8, 63u8, 206u8, 115u8, 116u8, 73u8, 232u8, - 241u8, 179u8, 249u8, 34u8, 61u8, 171u8, - ] - { - let entry = SignedSubmissionsMap(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map (& self , _0 : & :: core :: primitive :: u32 ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , 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 :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, + 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, + 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, + 132u8, 118u8, 53u8, 2u8, 135u8, + ], + ) } #[doc = " Unchecked, signed solutions."] #[doc = ""] @@ -28345,39 +20133,18 @@ 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_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SignedSubmissionsMap<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 75u8, 2u8, 76u8, 74u8, 73u8, 167u8, 243u8, 1u8, 31u8, - 26u8, 48u8, 196u8, 177u8, 21u8, 233u8, 66u8, 251u8, 11u8, - 11u8, 252u8, 63u8, 206u8, 115u8, 116u8, 73u8, 232u8, - 241u8, 179u8, 249u8, 34u8, 61u8, 171u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] pub fn signed_submissions_map_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , 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 :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + Vec::new(), + [ + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, + 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, + 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, + 132u8, 118u8, 53u8, 2u8, 135u8, + ], + ) } #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] #[doc = " feasible."] @@ -28385,156 +20152,107 @@ pub mod api { #[doc = " Can be set via `set_minimum_untrusted_score`."] pub fn minimum_untrusted_score( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 18u8, 171u8, 56u8, 63u8, 7u8, 1u8, 53u8, 42u8, 72u8, - 35u8, 26u8, 124u8, 223u8, 95u8, 170u8, 176u8, 134u8, - 140u8, 66u8, 115u8, 51u8, 163u8, 202u8, 82u8, 189u8, - 180u8, 139u8, 98u8, 18u8, 14u8, 176u8, 66u8, - ] - { - let entry = MinimumUntrustedScore; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_npos_elections::ElectionScore, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ElectionProviderMultiPhase", + "MinimumUntrustedScore", + vec![], + [ + 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8, + 38u8, 74u8, 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8, + 217u8, 125u8, 17u8, 194u8, 95u8, 157u8, 73u8, 245u8, 75u8, + 130u8, 248u8, 7u8, 53u8, 226u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " Duration of the unsigned phase."] pub fn unsigned_phase( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "UnsignedPhase")? - == [ - 252u8, 58u8, 254u8, 55u8, 124u8, 222u8, 252u8, 218u8, 73u8, - 211u8, 18u8, 206u8, 233u8, 17u8, 202u8, 176u8, 32u8, 189u8, - 143u8, 185u8, 56u8, 120u8, 184u8, 158u8, 10u8, 166u8, 193u8, - 36u8, 118u8, 58u8, 239u8, 95u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("UnsignedPhase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "UnsignedPhase", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Duration of the signed phase."] pub fn signed_phase( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "SignedPhase")? - == [ - 63u8, 15u8, 168u8, 217u8, 6u8, 184u8, 197u8, 27u8, 10u8, - 102u8, 5u8, 140u8, 61u8, 101u8, 26u8, 255u8, 226u8, 2u8, - 58u8, 242u8, 169u8, 115u8, 80u8, 199u8, 6u8, 8u8, 212u8, - 243u8, 171u8, 167u8, 102u8, 73u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedPhase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedPhase", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] #[doc = " \"better\" in the Signed phase."] pub fn better_signed_threshold( &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::BasicError, + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Perbill, + >, > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "BetterSignedThreshold", - )? == [ - 77u8, 124u8, 224u8, 100u8, 113u8, 25u8, 159u8, 166u8, 136u8, - 195u8, 84u8, 168u8, 142u8, 209u8, 89u8, 249u8, 7u8, 218u8, 51u8, - 240u8, 211u8, 135u8, 183u8, 192u8, 194u8, 195u8, 107u8, 37u8, - 23u8, 191u8, 254u8, 185u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("BetterSignedThreshold")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, + ], + ) } #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] #[doc = " \"better\" in the Unsigned phase."] pub fn better_unsigned_threshold( &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::BasicError, + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Perbill, + >, > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "BetterUnsignedThreshold", - )? == [ - 38u8, 62u8, 189u8, 136u8, 151u8, 166u8, 34u8, 147u8, 119u8, 70u8, - 126u8, 29u8, 200u8, 206u8, 195u8, 24u8, 14u8, 80u8, 151u8, 132u8, - 83u8, 135u8, 206u8, 68u8, 169u8, 75u8, 1u8, 40u8, 186u8, 203u8, - 226u8, 118u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("BetterUnsignedThreshold")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, + ], + ) } #[doc = " The repeat threshold of the offchain worker."] #[doc = ""] @@ -28542,52 +20260,38 @@ pub mod api { #[doc = " to submit the worker's solution."] pub fn offchain_repeat( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "OffchainRepeat")? - == [ - 55u8, 45u8, 136u8, 82u8, 224u8, 82u8, 150u8, 198u8, 78u8, - 58u8, 31u8, 9u8, 161u8, 129u8, 11u8, 112u8, 146u8, 226u8, - 210u8, 94u8, 167u8, 169u8, 146u8, 149u8, 110u8, 122u8, 168u8, - 148u8, 73u8, 100u8, 166u8, 103u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("OffchainRepeat")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "OffchainRepeat", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] pub fn miner_tx_priority( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "MinerTxPriority")? - == [ - 153u8, 173u8, 61u8, 171u8, 80u8, 43u8, 214u8, 150u8, 233u8, - 153u8, 197u8, 226u8, 116u8, 21u8, 156u8, 154u8, 131u8, 241u8, - 214u8, 151u8, 136u8, 203u8, 251u8, 42u8, 170u8, 221u8, 211u8, - 97u8, 45u8, 93u8, 60u8, 5u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("MinerTxPriority")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "MinerTxPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } #[doc = " Maximum number of signed submissions that can be queued."] #[doc = ""] @@ -28598,27 +20302,20 @@ pub mod api { #[doc = " attempts to submit new solutions may cause a runtime panic."] pub fn signed_max_submissions( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "SignedMaxSubmissions", - )? == [ - 51u8, 141u8, 203u8, 103u8, 212u8, 173u8, 160u8, 148u8, 108u8, - 30u8, 104u8, 248u8, 65u8, 237u8, 167u8, 11u8, 102u8, 146u8, - 117u8, 133u8, 0u8, 61u8, 129u8, 138u8, 157u8, 221u8, 248u8, 33u8, - 118u8, 182u8, 199u8, 248u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedMaxSubmissions")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Maximum weight of a signed solution."] #[doc = ""] @@ -28627,251 +20324,178 @@ pub mod api { #[doc = " this value."] pub fn signed_max_weight( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "SignedMaxWeight")? - == [ - 117u8, 253u8, 133u8, 43u8, 175u8, 132u8, 239u8, 225u8, 67u8, - 29u8, 254u8, 37u8, 97u8, 178u8, 196u8, 155u8, 18u8, 178u8, - 230u8, 237u8, 183u8, 47u8, 252u8, 120u8, 8u8, 253u8, 32u8, - 21u8, 210u8, 122u8, 220u8, 10u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedMaxWeight")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedMaxWeight", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] pub fn signed_max_refunds( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "SignedMaxRefunds")? - == [ - 86u8, 134u8, 190u8, 26u8, 28u8, 169u8, 156u8, 24u8, 50u8, - 139u8, 26u8, 80u8, 81u8, 111u8, 60u8, 175u8, 250u8, 7u8, - 92u8, 177u8, 191u8, 226u8, 198u8, 12u8, 179u8, 243u8, 38u8, - 21u8, 212u8, 121u8, 52u8, 148u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedMaxRefunds")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedMaxRefunds", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " Base reward for a signed solution"] pub fn signed_reward_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata - .constant_hash("ElectionProviderMultiPhase", "SignedRewardBase")? - == [ - 32u8, 167u8, 245u8, 56u8, 96u8, 125u8, 239u8, 237u8, 40u8, - 201u8, 204u8, 55u8, 92u8, 234u8, 12u8, 129u8, 215u8, 35u8, - 67u8, 199u8, 150u8, 222u8, 178u8, 242u8, 35u8, 177u8, 104u8, - 145u8, 162u8, 129u8, 28u8, 87u8, - ] - { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedRewardBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "ElectionProviderMultiPhase", + "SignedRewardBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Base deposit for a signed solution."] pub fn signed_deposit_base( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "SignedDepositBase", - )? == [ - 81u8, 103u8, 118u8, 215u8, 167u8, 76u8, 76u8, 213u8, 52u8, 45u8, - 186u8, 167u8, 71u8, 75u8, 193u8, 59u8, 156u8, 7u8, 199u8, 110u8, - 166u8, 131u8, 227u8, 92u8, 168u8, 138u8, 125u8, 16u8, 131u8, - 167u8, 156u8, 157u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedDepositBase")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Per-byte deposit for a signed solution."] pub fn signed_deposit_byte( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "SignedDepositByte", - )? == [ - 86u8, 255u8, 18u8, 115u8, 127u8, 231u8, 26u8, 5u8, 206u8, 90u8, - 51u8, 22u8, 240u8, 61u8, 5u8, 117u8, 191u8, 231u8, 167u8, 48u8, - 13u8, 101u8, 79u8, 17u8, 251u8, 163u8, 23u8, 109u8, 193u8, 190u8, - 92u8, 103u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedDepositByte")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Per-weight deposit for a signed solution."] pub fn signed_deposit_weight( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "SignedDepositWeight", - )? == [ - 229u8, 168u8, 140u8, 127u8, 138u8, 107u8, 171u8, 116u8, 171u8, - 63u8, 205u8, 84u8, 202u8, 17u8, 134u8, 171u8, 204u8, 31u8, 54u8, - 43u8, 138u8, 50u8, 55u8, 112u8, 27u8, 103u8, 183u8, 209u8, 167u8, - 214u8, 19u8, 95u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("SignedDepositWeight")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The maximum number of electing voters to put in the snapshot. At the moment, snapshots"] #[doc = " are only over a single block, but once multi-block elections are introduced they will"] #[doc = " take place over multiple blocks."] pub fn max_electing_voters( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "MaxElectingVoters", - )? == [ - 202u8, 136u8, 180u8, 3u8, 16u8, 142u8, 77u8, 250u8, 154u8, 116u8, - 78u8, 110u8, 72u8, 135u8, 115u8, 120u8, 109u8, 12u8, 156u8, - 129u8, 250u8, 120u8, 71u8, 221u8, 93u8, 172u8, 53u8, 44u8, 192u8, - 164u8, 213u8, 68u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("MaxElectingVoters")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The maximum number of electable targets to put in the snapshot."] pub fn max_electable_targets( &self, - ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash( + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( "ElectionProviderMultiPhase", "MaxElectableTargets", - )? == [ - 71u8, 15u8, 36u8, 77u8, 111u8, 52u8, 73u8, 94u8, 27u8, 213u8, - 122u8, 58u8, 126u8, 157u8, 17u8, 238u8, 168u8, 174u8, 0u8, 94u8, - 15u8, 86u8, 206u8, 115u8, 222u8, 234u8, 25u8, 195u8, 107u8, - 138u8, 213u8, 39u8, - ] { - let pallet = metadata.pallet("ElectionProviderMultiPhase")?; - let constant = pallet.constant("MaxElectableTargets")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, + 227u8, 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, + 184u8, 72u8, 169u8, 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, + 123u8, 128u8, 193u8, 29u8, 70u8, + ], + ) } } } } pub mod voter_list { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Rebag { - pub dislocated: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for Rebag { - const PALLET: &'static str = "VoterList"; - const FUNCTION: &'static str = "rebag"; + pub dislocated: ::subxt::ext::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct PutInFrontOf { - pub lighter: ::subxt::sp_core::crypto::AccountId32, + pub lighter: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Call for PutInFrontOf { - const PALLET: &'static str = "VoterList"; - const FUNCTION: &'static str = "put_in_front_of"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] #[doc = "changed its score that it should properly fall into a different bag than its current"] #[doc = "one."] @@ -28884,36 +20508,24 @@ pub mod api { #[doc = "If `dislocated` does not exists, it returns an error."] pub fn rebag( &self, - dislocated: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Rebag, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 46u8, 138u8, 28u8, 6u8, 58u8, 153u8, 5u8, 41u8, 44u8, 7u8, - 228u8, 72u8, 135u8, 184u8, 185u8, 132u8, 146u8, 181u8, 47u8, - 166u8, 149u8, 21u8, 155u8, 29u8, 159u8, 79u8, 83u8, 137u8, - 156u8, 17u8, 60u8, 23u8, - ] - { - let call = Rebag { dislocated }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + dislocated: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "VoterList", + call: "rebag", + data: Rebag { dislocated }, + }, + [ + 8u8, 182u8, 221u8, 221u8, 242u8, 48u8, 178u8, 182u8, 236u8, + 54u8, 188u8, 107u8, 32u8, 24u8, 90u8, 76u8, 28u8, 67u8, 8u8, + 231u8, 6u8, 162u8, 169u8, 77u8, 246u8, 88u8, 156u8, 189u8, + 248u8, 19u8, 235u8, 236u8, + ], + ) } #[doc = "Move the caller's Id directly in front of `lighter`."] #[doc = ""] @@ -28925,36 +20537,24 @@ pub mod api { #[doc = "- and `origin` has a greater `Score` than `lighter`."] pub fn put_in_front_of( &self, - lighter: ::subxt::sp_core::crypto::AccountId32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - PutInFrontOf, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 79u8, 254u8, 222u8, 19u8, 17u8, 80u8, 7u8, 68u8, 54u8, 9u8, - 23u8, 133u8, 108u8, 29u8, 166u8, 177u8, 230u8, 247u8, 226u8, - 189u8, 3u8, 241u8, 100u8, 178u8, 234u8, 204u8, 118u8, 215u8, - 84u8, 28u8, 21u8, 136u8, - ] - { - let call = PutInFrontOf { lighter }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + lighter: ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "VoterList", + call: "put_in_front_of", + data: PutInFrontOf { lighter }, + }, + [ + 247u8, 154u8, 37u8, 142u8, 28u8, 130u8, 53u8, 223u8, 255u8, + 154u8, 21u8, 149u8, 244u8, 21u8, 105u8, 77u8, 189u8, 74u8, + 182u8, 160u8, 30u8, 157u8, 133u8, 5u8, 167u8, 158u8, 131u8, + 244u8, 130u8, 172u8, 146u8, 167u8, + ], + ) } } } @@ -28962,268 +20562,167 @@ pub mod api { pub type Event = runtime_types::pallet_bags_list::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Moved an account from one bag to another."] pub struct Rebagged { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub from: ::core::primitive::u64, pub to: ::core::primitive::u64, } - impl ::subxt::Event for Rebagged { + impl ::subxt::events::StaticEvent for Rebagged { const PALLET: &'static str = "VoterList"; const EVENT: &'static str = "Rebagged"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Updated the score of some account to the given amount."] pub struct ScoreUpdated { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub new_score: ::core::primitive::u64, } - impl ::subxt::Event for ScoreUpdated { + impl ::subxt::events::StaticEvent for ScoreUpdated { const PALLET: &'static str = "VoterList"; const EVENT: &'static str = "ScoreUpdated"; } } pub mod storage { use super::runtime_types; - pub struct ListNodes<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for ListNodes<'_> { - const PALLET: &'static str = "VoterList"; - const STORAGE: &'static str = "ListNodes"; - type Value = runtime_types::pallet_bags_list::list::Node; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct CounterForListNodes; - impl ::subxt::StorageEntry for CounterForListNodes { - const PALLET: &'static str = "VoterList"; - const STORAGE: &'static str = "CounterForListNodes"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ListBags<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for ListBags<'_> { - const PALLET: &'static str = "VoterList"; - const STORAGE: &'static str = "ListBags"; - type Value = runtime_types::pallet_bags_list::list::Bag; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " A single node, within some bag."] #[doc = ""] #[doc = " Nodes store links forward and back within their respective bags."] pub fn list_nodes( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_bags_list::list::Node, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 144u8, 72u8, 250u8, 207u8, 66u8, 204u8, 6u8, 146u8, - 219u8, 225u8, 6u8, 82u8, 111u8, 172u8, 171u8, 184u8, - 35u8, 129u8, 246u8, 162u8, 224u8, 116u8, 244u8, 80u8, - 197u8, 146u8, 243u8, 123u8, 209u8, 135u8, 164u8, 201u8, - ] - { - let entry = ListNodes(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_bags_list::list::Node, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "VoterList", + "ListNodes", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, + 3u8, 117u8, 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, + 175u8, 181u8, 8u8, 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, + 122u8, 115u8, 57u8, 97u8, + ], + ) } #[doc = " A single node, within some bag."] #[doc = ""] #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes_iter( + pub fn list_nodes_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ListNodes<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 144u8, 72u8, 250u8, 207u8, 66u8, 204u8, 6u8, 146u8, - 219u8, 225u8, 6u8, 82u8, 111u8, 172u8, 171u8, 184u8, - 35u8, 129u8, 246u8, 162u8, 224u8, 116u8, 244u8, 80u8, - 197u8, 146u8, 243u8, 123u8, 209u8, 135u8, 164u8, 201u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_bags_list::list::Node, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "VoterList", + "ListNodes", + Vec::new(), + [ + 176u8, 186u8, 93u8, 51u8, 100u8, 184u8, 240u8, 29u8, 70u8, + 3u8, 117u8, 47u8, 23u8, 66u8, 231u8, 234u8, 53u8, 8u8, 234u8, + 175u8, 181u8, 8u8, 161u8, 154u8, 48u8, 178u8, 147u8, 227u8, + 122u8, 115u8, 57u8, 97u8, + ], + ) } #[doc = "Counter for the related counted storage map"] pub fn counter_for_list_nodes( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, - 182u8, 24u8, 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, - 131u8, 87u8, 0u8, 241u8, 230u8, 160u8, 142u8, 128u8, - 153u8, 83u8, 36u8, 88u8, 247u8, 70u8, 130u8, - ] - { - let entry = CounterForListNodes; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "VoterList", + "CounterForListNodes", + vec![], + [ + 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, + 182u8, 24u8, 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, 131u8, + 87u8, 0u8, 241u8, 230u8, 160u8, 142u8, 128u8, 153u8, 83u8, + 36u8, 88u8, 247u8, 70u8, 130u8, + ], + ) } #[doc = " A bag stored in storage."] #[doc = ""] #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] pub fn list_bags( &self, - _0: &'a ::core::primitive::u64, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_bags_list::list::Bag, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 117u8, 35u8, 42u8, 116u8, 5u8, 68u8, 168u8, 75u8, 112u8, - 29u8, 54u8, 49u8, 169u8, 103u8, 22u8, 163u8, 53u8, 122u8, - 181u8, 32u8, 97u8, 41u8, 56u8, 89u8, 77u8, 200u8, 0u8, - 123u8, 226u8, 178u8, 81u8, 138u8, - ] - { - let entry = ListBags(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u64, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_bags_list::list::Bag, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "VoterList", + "ListBags", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, + 155u8, 76u8, 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, + 236u8, 179u8, 4u8, 18u8, 232u8, 146u8, 216u8, 51u8, 135u8, + 116u8, 196u8, 117u8, 143u8, 153u8, + ], + ) } #[doc = " A bag stored in storage."] #[doc = ""] #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags_iter( + pub fn list_bags_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ListBags<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 117u8, 35u8, 42u8, 116u8, 5u8, 68u8, 168u8, 75u8, 112u8, - 29u8, 54u8, 49u8, 169u8, 103u8, 22u8, 163u8, 53u8, 122u8, - 181u8, 32u8, 97u8, 41u8, 56u8, 89u8, 77u8, 200u8, 0u8, - 123u8, 226u8, 178u8, 81u8, 138u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_bags_list::list::Bag, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "VoterList", + "ListBags", + Vec::new(), + [ + 38u8, 86u8, 63u8, 92u8, 85u8, 59u8, 225u8, 244u8, 14u8, + 155u8, 76u8, 249u8, 153u8, 140u8, 179u8, 7u8, 96u8, 170u8, + 236u8, 179u8, 4u8, 18u8, 232u8, 146u8, 216u8, 51u8, 135u8, + 116u8, 196u8, 117u8, 143u8, 153u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The list of thresholds separating the various bags."] #[doc = ""] #[doc = " Ids are separated into unsorted bags according to their score. This specifies the"] @@ -29269,2097 +20768,1402 @@ pub mod api { #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] pub fn bag_thresholds( &self, - ) -> ::core::result::Result< - ::std::vec::Vec<::core::primitive::u64>, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("VoterList", "BagThresholds")? - == [ - 95u8, 68u8, 224u8, 175u8, 149u8, 202u8, 192u8, 181u8, 221u8, - 32u8, 210u8, 34u8, 242u8, 160u8, 84u8, 54u8, 221u8, 57u8, - 122u8, 238u8, 246u8, 239u8, 28u8, 125u8, 175u8, 46u8, 183u8, - 129u8, 6u8, 103u8, 171u8, 172u8, - ] - { - let pallet = metadata.pallet("VoterList")?; - let constant = pallet.constant("BagThresholds")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u64>, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "VoterList", + "BagThresholds", + [ + 103u8, 102u8, 255u8, 165u8, 124u8, 54u8, 5u8, 172u8, 112u8, + 234u8, 25u8, 175u8, 178u8, 19u8, 251u8, 73u8, 91u8, 192u8, + 227u8, 81u8, 249u8, 45u8, 126u8, 116u8, 7u8, 37u8, 9u8, + 200u8, 167u8, 182u8, 12u8, 131u8, + ], + ) } } } } pub mod parachains_origin { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; } pub mod configuration { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetValidationUpgradeCooldown { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidationUpgradeCooldown { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_validation_upgrade_cooldown"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetValidationUpgradeDelay { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidationUpgradeDelay { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_validation_upgrade_delay"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetCodeRetentionPeriod { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetCodeRetentionPeriod { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_code_retention_period"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxCodeSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxCodeSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_code_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxPovSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxPovSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_pov_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxHeadDataSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxHeadDataSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_head_data_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetParathreadCores { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetParathreadCores { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_parathread_cores"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetParathreadRetries { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetParathreadRetries { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_parathread_retries"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetGroupRotationFrequency { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetGroupRotationFrequency { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_group_rotation_frequency"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetChainAvailabilityPeriod { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetChainAvailabilityPeriod { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_chain_availability_period"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetThreadAvailabilityPeriod { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetThreadAvailabilityPeriod { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_thread_availability_period"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetSchedulingLookahead { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetSchedulingLookahead { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_scheduling_lookahead"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetMaxValidatorsPerCore { pub new: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for SetMaxValidatorsPerCore { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_validators_per_core"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetMaxValidators { pub new: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for SetMaxValidators { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_validators"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetDisputePeriod { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputePeriod { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_dispute_period"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetDisputePostConclusionAcceptancePeriod { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputePostConclusionAcceptancePeriod { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = - "set_dispute_post_conclusion_acceptance_period"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetDisputeMaxSpamSlots { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputeMaxSpamSlots { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_dispute_max_spam_slots"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetDisputeConclusionByTimeOutPeriod { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputeConclusionByTimeOutPeriod { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = - "set_dispute_conclusion_by_time_out_period"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetNoShowSlots { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetNoShowSlots { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_no_show_slots"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetNDelayTranches { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetNDelayTranches { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_n_delay_tranches"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetZerothDelayTrancheWidth { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetZerothDelayTrancheWidth { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_zeroth_delay_tranche_width"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetNeededApprovals { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetNeededApprovals { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_needed_approvals"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetRelayVrfModuloSamples { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetRelayVrfModuloSamples { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_relay_vrf_modulo_samples"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxUpwardQueueCount { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardQueueCount { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_upward_queue_count"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxUpwardQueueSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardQueueSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_upward_queue_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxDownwardMessageSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxDownwardMessageSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_downward_message_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetUmpServiceTotalWeight { pub new: ::core::primitive::u64, } - impl ::subxt::Call for SetUmpServiceTotalWeight { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_ump_service_total_weight"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxUpwardMessageSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardMessageSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_upward_message_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMaxUpwardMessageNumPerCandidate { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardMessageNumPerCandidate { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_max_upward_message_num_per_candidate"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpOpenRequestTtl { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpOpenRequestTtl { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_open_request_ttl"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpSenderDeposit { pub new: ::core::primitive::u128, } - impl ::subxt::Call for SetHrmpSenderDeposit { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_sender_deposit"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpRecipientDeposit { pub new: ::core::primitive::u128, } - impl ::subxt::Call for SetHrmpRecipientDeposit { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_recipient_deposit"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpChannelMaxCapacity { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpChannelMaxCapacity { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_channel_max_capacity"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpChannelMaxTotalSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpChannelMaxTotalSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_channel_max_total_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpMaxParachainInboundChannels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParachainInboundChannels { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_max_parachain_inbound_channels"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpMaxParathreadInboundChannels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParathreadInboundChannels { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_max_parathread_inbound_channels"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpChannelMaxMessageSize { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpChannelMaxMessageSize { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_channel_max_message_size"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpMaxParachainOutboundChannels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParachainOutboundChannels { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_max_parachain_outbound_channels"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpMaxParathreadOutboundChannels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParathreadOutboundChannels { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = - "set_hrmp_max_parathread_outbound_channels"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetHrmpMaxMessageNumPerCandidate { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxMessageNumPerCandidate { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_hrmp_max_message_num_per_candidate"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetUmpMaxIndividualWeight { pub new: ::core::primitive::u64, } - impl ::subxt::Call for SetUmpMaxIndividualWeight { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_ump_max_individual_weight"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetPvfCheckingEnabled { pub new: ::core::primitive::bool, } - impl ::subxt::Call for SetPvfCheckingEnabled { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_pvf_checking_enabled"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetPvfVotingTtl { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetPvfVotingTtl { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_pvf_voting_ttl"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct SetMinimumValidationUpgradeDelay { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMinimumValidationUpgradeDelay { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_minimum_validation_upgrade_delay"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SetBypassConsistencyCheck { pub new: ::core::primitive::bool, } - impl ::subxt::Call for SetBypassConsistencyCheck { - const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_bypass_consistency_check"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Set the validation upgrade cooldown."] pub fn set_validation_upgrade_cooldown( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetValidationUpgradeCooldown, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 153u8, 60u8, 171u8, 164u8, 241u8, 214u8, 235u8, 141u8, 4u8, - 32u8, 129u8, 253u8, 128u8, 148u8, 185u8, 51u8, 65u8, 34u8, - 68u8, 72u8, 202u8, 159u8, 74u8, 243u8, 35u8, 138u8, 208u8, - 26u8, 182u8, 189u8, 41u8, 11u8, - ] - { - let call = SetValidationUpgradeCooldown { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_validation_upgrade_cooldown", + data: SetValidationUpgradeCooldown { new }, + }, + [ + 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, + 190u8, 56u8, 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, + 230u8, 144u8, 42u8, 167u8, 175u8, 220u8, 102u8, 37u8, 60u8, + 10u8, 118u8, 79u8, 146u8, 203u8, + ], + ) } #[doc = "Set the validation upgrade delay."] pub fn set_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetValidationUpgradeDelay, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 136u8, 220u8, 63u8, 166u8, 202u8, 19u8, 241u8, 32u8, 100u8, - 14u8, 101u8, 244u8, 241u8, 141u8, 144u8, 213u8, 185u8, 88u8, - 193u8, 2u8, 55u8, 154u8, 24u8, 77u8, 66u8, 167u8, 69u8, - 245u8, 224u8, 63u8, 196u8, 200u8, - ] - { - let call = SetValidationUpgradeDelay { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_validation_upgrade_delay", + data: SetValidationUpgradeDelay { new }, + }, + [ + 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, + 68u8, 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, + 62u8, 110u8, 76u8, 9u8, 218u8, 69u8, 55u8, 2u8, 233u8, 109u8, + 83u8, 117u8, 141u8, 253u8, + ], + ) } #[doc = "Set the acceptance period for an included candidate."] pub fn set_code_retention_period( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetCodeRetentionPeriod, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 94u8, 104u8, 13u8, 127u8, 95u8, 137u8, 66u8, 224u8, 22u8, - 53u8, 14u8, 161u8, 67u8, 85u8, 78u8, 161u8, 92u8, 81u8, - 190u8, 213u8, 113u8, 235u8, 64u8, 19u8, 112u8, 164u8, 71u8, - 88u8, 183u8, 234u8, 237u8, 9u8, - ] - { - let call = SetCodeRetentionPeriod { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_code_retention_period", + data: SetCodeRetentionPeriod { new }, + }, + [ + 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, + 245u8, 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, + 12u8, 195u8, 27u8, 159u8, 96u8, 197u8, 145u8, 69u8, 241u8, + 59u8, 74u8, 220u8, 62u8, 205u8, + ], + ) } #[doc = "Set the max validation code size for incoming upgrades."] pub fn set_max_code_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxCodeSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 74u8, 39u8, 190u8, 155u8, 121u8, 60u8, 233u8, 95u8, 177u8, - 57u8, 116u8, 107u8, 200u8, 44u8, 2u8, 215u8, 209u8, 50u8, - 37u8, 112u8, 136u8, 107u8, 202u8, 142u8, 114u8, 25u8, 43u8, - 134u8, 250u8, 15u8, 81u8, 13u8, - ] - { - let call = SetMaxCodeSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_code_size", + data: SetMaxCodeSize { new }, + }, + [ + 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, + 13u8, 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, + 73u8, 142u8, 115u8, 109u8, 132u8, 118u8, 194u8, 211u8, 82u8, + 20u8, 75u8, 55u8, 218u8, 46u8, + ], + ) } #[doc = "Set the max POV block size for incoming upgrades."] pub fn set_max_pov_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxPovSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 77u8, 199u8, 18u8, 53u8, 223u8, 107u8, 57u8, 141u8, 8u8, - 138u8, 180u8, 175u8, 73u8, 88u8, 205u8, 185u8, 56u8, 106u8, - 43u8, 87u8, 109u8, 9u8, 103u8, 103u8, 50u8, 158u8, 11u8, - 77u8, 162u8, 38u8, 57u8, 27u8, - ] - { - let call = SetMaxPovSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_pov_size", + data: SetMaxPovSize { new }, + }, + [ + 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, + 194u8, 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, + 95u8, 10u8, 21u8, 33u8, 219u8, 234u8, 82u8, 122u8, 75u8, + 53u8, 14u8, 126u8, 218u8, 23u8, + ], + ) } #[doc = "Set the max head data size for paras."] pub fn set_max_head_data_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxHeadDataSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 30u8, 132u8, 5u8, 207u8, 126u8, 145u8, 187u8, 129u8, 36u8, - 235u8, 179u8, 61u8, 243u8, 87u8, 178u8, 107u8, 8u8, 21u8, - 43u8, 39u8, 119u8, 138u8, 146u8, 146u8, 109u8, 189u8, 56u8, - 160u8, 14u8, 78u8, 230u8, 149u8, - ] - { - let call = SetMaxHeadDataSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_head_data_size", + data: SetMaxHeadDataSize { new }, + }, + [ + 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, + 112u8, 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, + 103u8, 39u8, 21u8, 125u8, 62u8, 177u8, 74u8, 25u8, 41u8, + 11u8, 200u8, 79u8, 139u8, 171u8, + ], + ) } #[doc = "Set the number of parathread execution cores."] pub fn set_parathread_cores( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetParathreadCores, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 5u8, 198u8, 156u8, 226u8, 125u8, 16u8, 2u8, 64u8, 28u8, - 189u8, 213u8, 85u8, 6u8, 112u8, 173u8, 183u8, 174u8, 207u8, - 129u8, 110u8, 201u8, 161u8, 163u8, 191u8, 20u8, 14u8, 65u8, - 106u8, 234u8, 203u8, 39u8, 75u8, - ] - { - let call = SetParathreadCores { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_parathread_cores", + data: SetParathreadCores { new }, + }, + [ + 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, + 99u8, 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, + 137u8, 132u8, 41u8, 106u8, 167u8, 81u8, 195u8, 172u8, 107u8, + 28u8, 138u8, 254u8, 180u8, 61u8, + ], + ) } #[doc = "Set the number of retries for a particular parathread."] pub fn set_parathread_retries( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetParathreadRetries, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 146u8, 134u8, 204u8, 109u8, 167u8, 35u8, 255u8, 245u8, 98u8, - 24u8, 213u8, 33u8, 144u8, 194u8, 196u8, 196u8, 66u8, 220u8, - 168u8, 156u8, 171u8, 179u8, 154u8, 30u8, 221u8, 45u8, 65u8, - 192u8, 194u8, 130u8, 87u8, 100u8, - ] - { - let call = SetParathreadRetries { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_parathread_retries", + data: SetParathreadRetries { new }, + }, + [ + 192u8, 81u8, 152u8, 41u8, 40u8, 3u8, 251u8, 205u8, 244u8, + 133u8, 42u8, 197u8, 21u8, 221u8, 80u8, 196u8, 222u8, 69u8, + 153u8, 39u8, 161u8, 90u8, 4u8, 38u8, 167u8, 131u8, 237u8, + 42u8, 135u8, 37u8, 156u8, 108u8, + ], + ) } #[doc = "Set the parachain validator-group rotation frequency"] pub fn set_group_rotation_frequency( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetGroupRotationFrequency, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 102u8, 192u8, 226u8, 120u8, 69u8, 117u8, 239u8, 156u8, 111u8, - 239u8, 197u8, 191u8, 221u8, 18u8, 140u8, 214u8, 154u8, 212u8, - 151u8, 35u8, 176u8, 2u8, 162u8, 131u8, 115u8, 102u8, 177u8, - 106u8, 35u8, 214u8, 151u8, 227u8, - ] - { - let call = SetGroupRotationFrequency { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_group_rotation_frequency", + data: SetGroupRotationFrequency { new }, + }, + [ + 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, + 22u8, 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, + 188u8, 229u8, 150u8, 19u8, 12u8, 222u8, 25u8, 254u8, 48u8, + 218u8, 200u8, 208u8, 132u8, 251u8, + ], + ) } #[doc = "Set the availability period for parachains."] pub fn set_chain_availability_period( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetChainAvailabilityPeriod, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 3u8, 83u8, 31u8, 241u8, 73u8, 137u8, 18u8, 95u8, 119u8, - 143u8, 28u8, 110u8, 151u8, 229u8, 172u8, 208u8, 50u8, 25u8, - 89u8, 222u8, 128u8, 125u8, 112u8, 25u8, 204u8, 141u8, 175u8, - 69u8, 57u8, 161u8, 189u8, 167u8, - ] - { - let call = SetChainAvailabilityPeriod { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_chain_availability_period", + data: SetChainAvailabilityPeriod { new }, + }, + [ + 171u8, 21u8, 54u8, 241u8, 19u8, 100u8, 54u8, 143u8, 97u8, + 191u8, 193u8, 96u8, 7u8, 86u8, 255u8, 109u8, 255u8, 93u8, + 113u8, 28u8, 182u8, 75u8, 120u8, 208u8, 91u8, 125u8, 156u8, + 38u8, 56u8, 230u8, 24u8, 139u8, + ], + ) } #[doc = "Set the availability period for parathreads."] pub fn set_thread_availability_period( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetThreadAvailabilityPeriod, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 242u8, 204u8, 158u8, 5u8, 123u8, 163u8, 6u8, 209u8, 44u8, - 73u8, 112u8, 249u8, 96u8, 160u8, 188u8, 151u8, 107u8, 21u8, - 9u8, 100u8, 104u8, 184u8, 97u8, 77u8, 122u8, 254u8, 88u8, - 94u8, 22u8, 15u8, 57u8, 44u8, - ] - { - let call = SetThreadAvailabilityPeriod { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_thread_availability_period", + data: SetThreadAvailabilityPeriod { new }, + }, + [ + 208u8, 27u8, 246u8, 33u8, 90u8, 200u8, 75u8, 177u8, 19u8, + 107u8, 236u8, 43u8, 159u8, 156u8, 184u8, 10u8, 146u8, 71u8, + 212u8, 129u8, 44u8, 19u8, 162u8, 172u8, 162u8, 46u8, 166u8, + 10u8, 67u8, 112u8, 206u8, 50u8, + ], + ) } #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] pub fn set_scheduling_lookahead( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetSchedulingLookahead, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 146u8, 149u8, 10u8, 57u8, 122u8, 116u8, 61u8, 181u8, 97u8, - 240u8, 87u8, 37u8, 227u8, 233u8, 123u8, 26u8, 243u8, 58u8, - 54u8, 93u8, 111u8, 204u8, 108u8, 18u8, 167u8, 20u8, 255u8, - 173u8, 46u8, 212u8, 246u8, 201u8, - ] - { - let call = SetSchedulingLookahead { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_scheduling_lookahead", + data: SetSchedulingLookahead { new }, + }, + [ + 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, + 119u8, 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, + 204u8, 167u8, 100u8, 199u8, 157u8, 186u8, 174u8, 40u8, 218u8, + 19u8, 230u8, 253u8, 7u8, + ], + ) } #[doc = "Set the maximum number of validators to assign to any core."] pub fn set_max_validators_per_core( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxValidatorsPerCore, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 27u8, 160u8, 153u8, 252u8, 121u8, 42u8, 94u8, 131u8, 199u8, - 216u8, 15u8, 65u8, 94u8, 69u8, 127u8, 130u8, 179u8, 236u8, - 49u8, 32u8, 239u8, 37u8, 58u8, 0u8, 50u8, 5u8, 255u8, 30u8, - 203u8, 230u8, 135u8, 202u8, - ] - { - let call = SetMaxValidatorsPerCore { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_validators_per_core", + data: SetMaxValidatorsPerCore { new }, + }, + [ + 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, + 117u8, 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, + 163u8, 82u8, 248u8, 130u8, 32u8, 103u8, 225u8, 151u8, 145u8, + 36u8, 98u8, 158u8, 6u8, 245u8, + ], + ) } #[doc = "Set the maximum number of validators to use in parachain consensus."] pub fn set_max_validators( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxValidators, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 192u8, 156u8, 115u8, 10u8, 225u8, 94u8, 190u8, 180u8, 242u8, - 131u8, 202u8, 13u8, 82u8, 27u8, 8u8, 144u8, 70u8, 92u8, - 136u8, 206u8, 205u8, 3u8, 242u8, 130u8, 77u8, 114u8, 242u8, - 111u8, 99u8, 24u8, 238u8, 55u8, - ] - { - let call = SetMaxValidators { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_validators", + data: SetMaxValidators { new }, + }, + [ + 143u8, 212u8, 59u8, 147u8, 4u8, 55u8, 142u8, 209u8, 237u8, + 76u8, 7u8, 178u8, 41u8, 81u8, 4u8, 203u8, 184u8, 149u8, 32u8, + 1u8, 106u8, 180u8, 121u8, 20u8, 137u8, 169u8, 144u8, 77u8, + 38u8, 53u8, 243u8, 127u8, + ], + ) } #[doc = "Set the dispute period, in number of sessions to keep for disputes."] pub fn set_dispute_period( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetDisputePeriod, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 232u8, 96u8, 104u8, 249u8, 183u8, 148u8, 126u8, 80u8, 64u8, - 39u8, 2u8, 208u8, 183u8, 189u8, 139u8, 201u8, 61u8, 63u8, - 42u8, 155u8, 215u8, 32u8, 212u8, 158u8, 90u8, 80u8, 159u8, - 23u8, 249u8, 204u8, 218u8, 217u8, - ] - { - let call = SetDisputePeriod { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_dispute_period", + data: SetDisputePeriod { new }, + }, + [ + 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, + 125u8, 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, + 152u8, 47u8, 75u8, 56u8, 63u8, 61u8, 33u8, 163u8, 151u8, + 97u8, 105u8, 99u8, 55u8, 180u8, + ], + ) } #[doc = "Set the dispute post conclusion acceptance period."] pub fn set_dispute_post_conclusion_acceptance_period( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetDisputePostConclusionAcceptancePeriod, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata - .call_hash::()? - }; - if runtime_call_hash - == [ - 45u8, 140u8, 213u8, 62u8, 212u8, 31u8, 126u8, 94u8, 102u8, - 176u8, 203u8, 240u8, 28u8, 25u8, 116u8, 77u8, 187u8, 147u8, - 32u8, 20u8, 25u8, 124u8, 164u8, 162u8, 246u8, 223u8, 146u8, - 28u8, 35u8, 4u8, 174u8, 47u8, - ] - { - let call = SetDisputePostConclusionAcceptancePeriod { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_dispute_post_conclusion_acceptance_period", + data: SetDisputePostConclusionAcceptancePeriod { new }, + }, + [ + 66u8, 56u8, 45u8, 87u8, 51u8, 49u8, 91u8, 95u8, 255u8, 185u8, + 54u8, 165u8, 85u8, 142u8, 238u8, 251u8, 174u8, 81u8, 3u8, + 61u8, 92u8, 97u8, 203u8, 20u8, 107u8, 50u8, 208u8, 250u8, + 208u8, 159u8, 225u8, 175u8, + ], + ) } #[doc = "Set the maximum number of dispute spam slots."] pub fn set_dispute_max_spam_slots( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetDisputeMaxSpamSlots, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 180u8, 195u8, 6u8, 141u8, 89u8, 252u8, 245u8, 202u8, 36u8, - 123u8, 105u8, 35u8, 161u8, 60u8, 233u8, 213u8, 191u8, 65u8, - 68u8, 4u8, 19u8, 201u8, 226u8, 103u8, 124u8, 181u8, 201u8, - 91u8, 84u8, 170u8, 48u8, 154u8, - ] - { - let call = SetDisputeMaxSpamSlots { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_dispute_max_spam_slots", + data: SetDisputeMaxSpamSlots { new }, + }, + [ + 177u8, 58u8, 3u8, 205u8, 145u8, 85u8, 160u8, 162u8, 13u8, + 171u8, 124u8, 54u8, 58u8, 209u8, 88u8, 131u8, 230u8, 248u8, + 142u8, 18u8, 121u8, 129u8, 196u8, 121u8, 25u8, 15u8, 252u8, + 229u8, 89u8, 230u8, 14u8, 68u8, + ], + ) } #[doc = "Set the dispute conclusion by time out period."] pub fn set_dispute_conclusion_by_time_out_period( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetDisputeConclusionByTimeOutPeriod, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 50u8, 221u8, 129u8, 199u8, 147u8, 98u8, 11u8, 104u8, 133u8, - 161u8, 53u8, 163u8, 100u8, 155u8, 228u8, 167u8, 146u8, 87u8, - 186u8, 228u8, 147u8, 44u8, 142u8, 160u8, 119u8, 146u8, 10u8, - 155u8, 5u8, 35u8, 8u8, 165u8, - ] - { - let call = SetDisputeConclusionByTimeOutPeriod { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_dispute_conclusion_by_time_out_period", + data: SetDisputeConclusionByTimeOutPeriod { new }, + }, + [ + 238u8, 102u8, 27u8, 169u8, 68u8, 116u8, 198u8, 64u8, 190u8, + 33u8, 36u8, 98u8, 176u8, 157u8, 123u8, 148u8, 126u8, 85u8, + 32u8, 19u8, 49u8, 40u8, 172u8, 41u8, 195u8, 182u8, 44u8, + 255u8, 136u8, 204u8, 250u8, 6u8, + ], + ) } #[doc = "Set the no show slots, in number of number of consensus slots."] #[doc = "Must be at least 1."] pub fn set_no_show_slots( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetNoShowSlots, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 235u8, 5u8, 35u8, 159u8, 200u8, 58u8, 171u8, 179u8, 78u8, - 70u8, 161u8, 47u8, 237u8, 245u8, 77u8, 81u8, 1u8, 138u8, - 145u8, 137u8, 45u8, 126u8, 255u8, 227u8, 130u8, 217u8, 36u8, - 251u8, 72u8, 235u8, 16u8, 231u8, - ] - { - let call = SetNoShowSlots { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_no_show_slots", + data: SetNoShowSlots { new }, + }, + [ + 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, + 16u8, 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, + 238u8, 115u8, 126u8, 140u8, 236u8, 17u8, 177u8, 192u8, 210u8, + 239u8, 126u8, 107u8, 117u8, 207u8, + ], + ) } #[doc = "Set the total number of delay tranches."] pub fn set_n_delay_tranches( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetNDelayTranches, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 109u8, 208u8, 13u8, 18u8, 178u8, 117u8, 101u8, 169u8, 162u8, - 255u8, 28u8, 88u8, 199u8, 89u8, 83u8, 59u8, 46u8, 105u8, - 186u8, 4u8, 7u8, 171u8, 78u8, 122u8, 197u8, 110u8, 63u8, - 164u8, 140u8, 59u8, 179u8, 236u8, - ] - { - let call = SetNDelayTranches { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_n_delay_tranches", + data: SetNDelayTranches { new }, + }, + [ + 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, + 30u8, 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, + 108u8, 195u8, 65u8, 153u8, 30u8, 181u8, 181u8, 158u8, 252u8, + 120u8, 119u8, 36u8, 146u8, + ], + ) } #[doc = "Set the zeroth delay tranche width."] pub fn set_zeroth_delay_tranche_width( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetZerothDelayTrancheWidth, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 162u8, 20u8, 162u8, 90u8, 59u8, 194u8, 147u8, 255u8, 198u8, - 203u8, 50u8, 13u8, 134u8, 142u8, 6u8, 156u8, 205u8, 128u8, - 222u8, 225u8, 150u8, 68u8, 198u8, 212u8, 198u8, 238u8, 3u8, - 209u8, 224u8, 19u8, 118u8, 147u8, - ] - { - let call = SetZerothDelayTrancheWidth { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_zeroth_delay_tranche_width", + data: SetZerothDelayTrancheWidth { new }, + }, + [ + 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, + 107u8, 91u8, 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, + 62u8, 78u8, 96u8, 231u8, 195u8, 29u8, 158u8, 113u8, 46u8, + 96u8, 29u8, 0u8, 154u8, 80u8, + ], + ) } #[doc = "Set the number of validators needed to approve a block."] pub fn set_needed_approvals( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetNeededApprovals, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 83u8, 164u8, 204u8, 168u8, 93u8, 165u8, 118u8, 111u8, 149u8, - 129u8, 126u8, 250u8, 95u8, 148u8, 193u8, 173u8, 239u8, 1u8, - 14u8, 102u8, 77u8, 150u8, 149u8, 55u8, 82u8, 179u8, 2u8, - 117u8, 19u8, 34u8, 223u8, 173u8, - ] - { - let call = SetNeededApprovals { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_needed_approvals", + data: SetNeededApprovals { new }, + }, + [ + 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, + 227u8, 185u8, 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, + 104u8, 100u8, 26u8, 162u8, 65u8, 58u8, 162u8, 52u8, 211u8, + 66u8, 242u8, 177u8, 230u8, 98u8, + ], + ) } #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] pub fn set_relay_vrf_modulo_samples( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetRelayVrfModuloSamples, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 22u8, 11u8, 132u8, 96u8, 58u8, 253u8, 183u8, 31u8, 137u8, - 231u8, 187u8, 145u8, 119u8, 164u8, 55u8, 142u8, 37u8, 151u8, - 227u8, 112u8, 113u8, 18u8, 200u8, 247u8, 238u8, 10u8, 223u8, - 74u8, 4u8, 132u8, 115u8, 119u8, - ] - { - let call = SetRelayVrfModuloSamples { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_relay_vrf_modulo_samples", + data: SetRelayVrfModuloSamples { new }, + }, + [ + 76u8, 101u8, 207u8, 184u8, 211u8, 8u8, 43u8, 4u8, 165u8, + 147u8, 166u8, 3u8, 189u8, 42u8, 125u8, 130u8, 21u8, 43u8, + 189u8, 120u8, 239u8, 131u8, 235u8, 35u8, 151u8, 15u8, 30u8, + 81u8, 0u8, 2u8, 64u8, 21u8, + ], + ) } #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] pub fn set_max_upward_queue_count( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxUpwardQueueCount, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 16u8, 31u8, 245u8, 94u8, 243u8, 122u8, 55u8, 155u8, 161u8, - 239u8, 5u8, 59u8, 186u8, 207u8, 136u8, 253u8, 255u8, 176u8, - 135u8, 242u8, 199u8, 96u8, 226u8, 150u8, 15u8, 160u8, 60u8, - 101u8, 66u8, 143u8, 93u8, 104u8, - ] - { - let call = SetMaxUpwardQueueCount { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_upward_queue_count", + data: SetMaxUpwardQueueCount { new }, + }, + [ + 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, + 122u8, 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, + 10u8, 149u8, 50u8, 183u8, 165u8, 32u8, 233u8, 105u8, 82u8, + 177u8, 120u8, 25u8, 44u8, 130u8, + ], + ) } #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] pub fn set_max_upward_queue_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxUpwardQueueSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 203u8, 170u8, 21u8, 149u8, 170u8, 246u8, 91u8, 54u8, 197u8, - 91u8, 41u8, 114u8, 210u8, 239u8, 73u8, 236u8, 68u8, 194u8, - 157u8, 116u8, 229u8, 1u8, 34u8, 135u8, 144u8, 191u8, 56u8, - 77u8, 13u8, 92u8, 221u8, 4u8, - ] - { - let call = SetMaxUpwardQueueSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_upward_queue_size", + data: SetMaxUpwardQueueSize { new }, + }, + [ + 18u8, 60u8, 141u8, 57u8, 134u8, 96u8, 140u8, 85u8, 137u8, + 9u8, 209u8, 123u8, 10u8, 165u8, 33u8, 184u8, 34u8, 82u8, + 59u8, 60u8, 30u8, 47u8, 22u8, 163u8, 119u8, 200u8, 197u8, + 192u8, 112u8, 243u8, 156u8, 12u8, + ], + ) } #[doc = "Set the critical downward message size."] pub fn set_max_downward_message_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxDownwardMessageSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 55u8, 181u8, 6u8, 126u8, 31u8, 154u8, 42u8, 194u8, 64u8, - 23u8, 34u8, 255u8, 151u8, 186u8, 52u8, 32u8, 168u8, 233u8, - 44u8, 35u8, 152u8, 78u8, 230u8, 242u8, 169u8, 85u8, 103u8, - 133u8, 177u8, 239u8, 175u8, 119u8, - ] - { - let call = SetMaxDownwardMessageSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_downward_message_size", + data: SetMaxDownwardMessageSize { new }, + }, + [ + 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, + 156u8, 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, + 239u8, 183u8, 68u8, 124u8, 55u8, 211u8, 186u8, 115u8, 70u8, + 195u8, 61u8, 151u8, 32u8, 218u8, + ], + ) } #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] pub fn set_ump_service_total_weight( &self, new: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetUmpServiceTotalWeight, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 14u8, 179u8, 217u8, 169u8, 84u8, 45u8, 193u8, 3u8, 7u8, - 196u8, 56u8, 209u8, 50u8, 148u8, 32u8, 205u8, 99u8, 202u8, - 72u8, 246u8, 151u8, 230u8, 145u8, 98u8, 188u8, 1u8, 136u8, - 241u8, 217u8, 37u8, 6u8, 101u8, - ] - { - let call = SetUmpServiceTotalWeight { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_ump_service_total_weight", + data: SetUmpServiceTotalWeight { new }, + }, + [ + 253u8, 228u8, 226u8, 127u8, 202u8, 30u8, 148u8, 254u8, 133u8, + 38u8, 2u8, 83u8, 173u8, 147u8, 113u8, 224u8, 16u8, 160u8, + 13u8, 238u8, 196u8, 174u8, 104u8, 147u8, 57u8, 14u8, 213u8, + 32u8, 220u8, 162u8, 89u8, 244u8, + ], + ) } #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] pub fn set_max_upward_message_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMaxUpwardMessageSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 134u8, 232u8, 5u8, 70u8, 81u8, 177u8, 81u8, 235u8, 93u8, - 145u8, 193u8, 42u8, 150u8, 61u8, 236u8, 20u8, 38u8, 176u8, - 124u8, 170u8, 248u8, 149u8, 57u8, 88u8, 17u8, 46u8, 202u8, - 74u8, 35u8, 82u8, 190u8, 223u8, - ] - { - let call = SetMaxUpwardMessageSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_upward_message_size", + data: SetMaxUpwardMessageSize { new }, + }, + [ + 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, + 115u8, 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, + 34u8, 73u8, 142u8, 94u8, 116u8, 151u8, 113u8, 92u8, 151u8, + 227u8, 116u8, 250u8, 101u8, 179u8, + ], + ) } #[doc = "Sets the maximum number of messages that a candidate can contain."] pub fn set_max_upward_message_num_per_candidate( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetMaxUpwardMessageNumPerCandidate, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 14u8, 79u8, 128u8, 66u8, 119u8, 24u8, 26u8, 116u8, 249u8, - 254u8, 86u8, 228u8, 248u8, 75u8, 111u8, 90u8, 101u8, 96u8, - 124u8, 25u8, 245u8, 115u8, 119u8, 14u8, 213u8, 180u8, 224u8, - 224u8, 188u8, 172u8, 152u8, 16u8, - ] - { - let call = SetMaxUpwardMessageNumPerCandidate { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_max_upward_message_num_per_candidate", + data: SetMaxUpwardMessageNumPerCandidate { new }, + }, + [ + 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, + 196u8, 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, + 169u8, 87u8, 255u8, 211u8, 38u8, 142u8, 37u8, 74u8, 144u8, + 204u8, 75u8, 94u8, 154u8, 149u8, + ], + ) } #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] pub fn set_hrmp_open_request_ttl( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpOpenRequestTtl, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 168u8, 254u8, 189u8, 22u8, 61u8, 90u8, 131u8, 1u8, 103u8, - 208u8, 179u8, 85u8, 80u8, 215u8, 9u8, 3u8, 34u8, 73u8, 130u8, - 19u8, 166u8, 77u8, 131u8, 148u8, 183u8, 86u8, 186u8, 148u8, - 109u8, 173u8, 74u8, 94u8, - ] - { - let call = SetHrmpOpenRequestTtl { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_open_request_ttl", + data: SetHrmpOpenRequestTtl { new }, + }, + [ + 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, + 207u8, 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, + 194u8, 180u8, 96u8, 129u8, 7u8, 138u8, 110u8, 14u8, 229u8, + 98u8, 71u8, 22u8, 229u8, 247u8, + ], + ) } #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] pub fn set_hrmp_sender_deposit( &self, new: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpSenderDeposit, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 250u8, 23u8, 196u8, 206u8, 34u8, 86u8, 28u8, 14u8, 110u8, - 189u8, 38u8, 39u8, 2u8, 16u8, 212u8, 32u8, 65u8, 249u8, - 120u8, 163u8, 89u8, 232u8, 3u8, 49u8, 155u8, 174u8, 96u8, - 21u8, 240u8, 185u8, 140u8, 243u8, - ] - { - let call = SetHrmpSenderDeposit { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_sender_deposit", + data: SetHrmpSenderDeposit { new }, + }, + [ + 49u8, 38u8, 173u8, 114u8, 66u8, 140u8, 15u8, 151u8, 193u8, + 54u8, 128u8, 108u8, 72u8, 71u8, 28u8, 65u8, 129u8, 199u8, + 105u8, 61u8, 96u8, 119u8, 16u8, 53u8, 115u8, 120u8, 152u8, + 122u8, 182u8, 171u8, 233u8, 48u8, + ], + ) } #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] #[doc = "channel."] pub fn set_hrmp_recipient_deposit( &self, new: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpRecipientDeposit, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 104u8, 35u8, 129u8, 31u8, 111u8, 57u8, 190u8, 42u8, 159u8, - 220u8, 86u8, 136u8, 200u8, 4u8, 62u8, 241u8, 141u8, 90u8, - 200u8, 132u8, 141u8, 154u8, 117u8, 206u8, 79u8, 160u8, 124u8, - 186u8, 231u8, 250u8, 86u8, 87u8, - ] - { - let call = SetHrmpRecipientDeposit { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_recipient_deposit", + data: SetHrmpRecipientDeposit { new }, + }, + [ + 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, + 150u8, 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, + 89u8, 43u8, 6u8, 173u8, 8u8, 235u8, 52u8, 18u8, 78u8, 129u8, + 227u8, 61u8, 74u8, 83u8, + ], + ) } #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] pub fn set_hrmp_channel_max_capacity( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpChannelMaxCapacity, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 211u8, 49u8, 82u8, 59u8, 16u8, 97u8, 253u8, 64u8, 185u8, - 216u8, 235u8, 10u8, 84u8, 194u8, 231u8, 115u8, 153u8, 20u8, - 31u8, 86u8, 47u8, 226u8, 245u8, 214u8, 134u8, 194u8, 13u8, - 254u8, 230u8, 66u8, 54u8, 240u8, - ] - { - let call = SetHrmpChannelMaxCapacity { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_channel_max_capacity", + data: SetHrmpChannelMaxCapacity { new }, + }, + [ + 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, + 190u8, 60u8, 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, + 30u8, 197u8, 11u8, 33u8, 211u8, 224u8, 49u8, 165u8, 149u8, + 155u8, 197u8, 44u8, 6u8, 167u8, + ], + ) } #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] pub fn set_hrmp_channel_max_total_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpChannelMaxTotalSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 254u8, 196u8, 171u8, 29u8, 208u8, 179u8, 204u8, 58u8, 64u8, - 41u8, 52u8, 73u8, 153u8, 245u8, 29u8, 132u8, 129u8, 29u8, - 94u8, 241u8, 136u8, 20u8, 12u8, 20u8, 255u8, 244u8, 252u8, - 98u8, 136u8, 222u8, 7u8, 19u8, - ] - { - let call = SetHrmpChannelMaxTotalSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_channel_max_total_size", + data: SetHrmpChannelMaxTotalSize { new }, + }, + [ + 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, + 34u8, 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, + 105u8, 64u8, 183u8, 235u8, 39u8, 133u8, 70u8, 77u8, 233u8, + 201u8, 222u8, 8u8, 43u8, 159u8, + ], + ) } #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] pub fn set_hrmp_max_parachain_inbound_channels( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetHrmpMaxParachainInboundChannels, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 219u8, 88u8, 3u8, 249u8, 16u8, 182u8, 182u8, 233u8, 152u8, - 24u8, 29u8, 96u8, 227u8, 50u8, 156u8, 98u8, 71u8, 196u8, - 158u8, 103u8, 114u8, 55u8, 65u8, 199u8, 211u8, 225u8, 235u8, - 172u8, 218u8, 123u8, 158u8, 57u8, - ] - { - let call = SetHrmpMaxParachainInboundChannels { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_max_parachain_inbound_channels", + data: SetHrmpMaxParachainInboundChannels { new }, + }, + [ + 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, + 121u8, 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, + 136u8, 77u8, 103u8, 169u8, 185u8, 8u8, 214u8, 214u8, 23u8, + 195u8, 100u8, 72u8, 45u8, 12u8, + ], + ) } #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] pub fn set_hrmp_max_parathread_inbound_channels( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetHrmpMaxParathreadInboundChannels, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 153u8, 169u8, 153u8, 141u8, 45u8, 21u8, 26u8, 33u8, 207u8, - 234u8, 186u8, 154u8, 12u8, 148u8, 2u8, 226u8, 55u8, 125u8, - 58u8, 127u8, 154u8, 176u8, 3u8, 47u8, 164u8, 63u8, 25u8, - 42u8, 66u8, 131u8, 143u8, 254u8, - ] - { - let call = SetHrmpMaxParathreadInboundChannels { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_max_parathread_inbound_channels", + data: SetHrmpMaxParathreadInboundChannels { new }, + }, + [ + 209u8, 66u8, 180u8, 20u8, 87u8, 242u8, 219u8, 71u8, 22u8, + 145u8, 220u8, 48u8, 44u8, 42u8, 77u8, 69u8, 255u8, 82u8, + 27u8, 125u8, 231u8, 111u8, 23u8, 32u8, 239u8, 28u8, 200u8, + 255u8, 91u8, 207u8, 99u8, 107u8, + ], + ) } #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] pub fn set_hrmp_channel_max_message_size( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpChannelMaxMessageSize, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 237u8, 103u8, 126u8, 197u8, 164u8, 247u8, 67u8, 144u8, 30u8, - 192u8, 161u8, 243u8, 254u8, 26u8, 254u8, 33u8, 59u8, 216u8, - 159u8, 105u8, 166u8, 138u8, 38u8, 124u8, 248u8, 81u8, 11u8, - 223u8, 120u8, 75u8, 176u8, 177u8, - ] - { - let call = SetHrmpChannelMaxMessageSize { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_channel_max_message_size", + data: SetHrmpChannelMaxMessageSize { new }, + }, + [ + 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, + 151u8, 27u8, 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, + 209u8, 125u8, 122u8, 1u8, 79u8, 28u8, 10u8, 14u8, 83u8, 65u8, + 253u8, 173u8, 116u8, 209u8, + ], + ) } #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] pub fn set_hrmp_max_parachain_outbound_channels( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetHrmpMaxParachainOutboundChannels, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 173u8, 184u8, 49u8, 66u8, 158u8, 142u8, 95u8, 225u8, 90u8, - 171u8, 4u8, 20u8, 210u8, 180u8, 54u8, 236u8, 60u8, 5u8, 76u8, - 173u8, 226u8, 203u8, 7u8, 156u8, 54u8, 9u8, 198u8, 171u8, - 250u8, 1u8, 120u8, 240u8, - ] - { - let call = SetHrmpMaxParachainOutboundChannels { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_max_parachain_outbound_channels", + data: SetHrmpMaxParachainOutboundChannels { new }, + }, + [ + 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, + 11u8, 20u8, 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, + 116u8, 136u8, 149u8, 181u8, 207u8, 95u8, 151u8, 7u8, 98u8, + 17u8, 224u8, 157u8, 117u8, 88u8, + ], + ) } #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] pub fn set_hrmp_max_parathread_outbound_channels( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall< SetHrmpMaxParathreadOutboundChannels, - DispatchError, - root_mod::Event, >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 166u8, 73u8, 121u8, 53u8, 27u8, 77u8, 150u8, 115u8, 29u8, - 202u8, 34u8, 4u8, 35u8, 161u8, 113u8, 15u8, 66u8, 60u8, - 214u8, 129u8, 157u8, 143u8, 227u8, 134u8, 213u8, 9u8, 231u8, - 224u8, 187u8, 36u8, 16u8, 68u8, - ] - { - let call = SetHrmpMaxParathreadOutboundChannels { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_max_parathread_outbound_channels", + data: SetHrmpMaxParathreadOutboundChannels { new }, + }, + [ + 31u8, 72u8, 93u8, 21u8, 180u8, 156u8, 101u8, 24u8, 145u8, + 220u8, 194u8, 93u8, 176u8, 164u8, 53u8, 123u8, 36u8, 113u8, + 152u8, 13u8, 222u8, 54u8, 175u8, 170u8, 235u8, 68u8, 236u8, + 130u8, 178u8, 56u8, 140u8, 31u8, + ], + ) } #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] pub fn set_hrmp_max_message_num_per_candidate( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetHrmpMaxMessageNumPerCandidate, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 235u8, 47u8, 114u8, 29u8, 87u8, 198u8, 62u8, 200u8, 235u8, - 184u8, 204u8, 35u8, 251u8, 210u8, 88u8, 150u8, 22u8, 61u8, - 242u8, 196u8, 240u8, 76u8, 45u8, 54u8, 155u8, 111u8, 244u8, - 31u8, 158u8, 48u8, 68u8, 233u8, - ] - { - let call = SetHrmpMaxMessageNumPerCandidate { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_hrmp_max_message_num_per_candidate", + data: SetHrmpMaxMessageNumPerCandidate { new }, + }, + [ + 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, + 57u8, 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, + 250u8, 136u8, 30u8, 29u8, 110u8, 105u8, 219u8, 166u8, 91u8, + 140u8, 44u8, 192u8, 37u8, 185u8, + ], + ) } #[doc = "Sets the maximum amount of weight any individual upward message may consume."] pub fn set_ump_max_individual_weight( &self, new: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetUmpMaxIndividualWeight, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 61u8, 174u8, 42u8, 53u8, 120u8, 56u8, 252u8, 117u8, 173u8, - 223u8, 100u8, 141u8, 209u8, 29u8, 173u8, 240u8, 180u8, 113u8, - 27u8, 24u8, 4u8, 157u8, 107u8, 247u8, 235u8, 121u8, 152u8, - 6u8, 176u8, 254u8, 18u8, 70u8, - ] - { - let call = SetUmpMaxIndividualWeight { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_ump_max_individual_weight", + data: SetUmpMaxIndividualWeight { new }, + }, + [ + 122u8, 12u8, 77u8, 188u8, 26u8, 100u8, 16u8, 182u8, 66u8, + 159u8, 127u8, 111u8, 193u8, 204u8, 119u8, 102u8, 186u8, 12u8, + 25u8, 193u8, 178u8, 253u8, 85u8, 171u8, 199u8, 161u8, 167u8, + 242u8, 104u8, 242u8, 149u8, 161u8, + ], + ) } #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] pub fn set_pvf_checking_enabled( &self, new: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetPvfCheckingEnabled, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 224u8, 199u8, 197u8, 208u8, 178u8, 211u8, 14u8, 102u8, 174u8, - 205u8, 207u8, 181u8, 75u8, 125u8, 209u8, 69u8, 85u8, 1u8, - 98u8, 251u8, 17u8, 42u8, 73u8, 9u8, 252u8, 184u8, 81u8, - 202u8, 132u8, 236u8, 97u8, 121u8, - ] - { - let call = SetPvfCheckingEnabled { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_pvf_checking_enabled", + data: SetPvfCheckingEnabled { new }, + }, + [ + 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, + 29u8, 219u8, 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, + 73u8, 125u8, 54u8, 236u8, 3u8, 80u8, 114u8, 155u8, 244u8, + 132u8, 57u8, 63u8, 158u8, 248u8, + ], + ) } #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] pub fn set_pvf_voting_ttl( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetPvfVotingTtl, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 179u8, 71u8, 42u8, 140u8, 187u8, 43u8, 138u8, 16u8, 104u8, - 41u8, 30u8, 220u8, 131u8, 179u8, 200u8, 184u8, 105u8, 58u8, - 131u8, 225u8, 169u8, 253u8, 46u8, 186u8, 102u8, 52u8, 147u8, - 244u8, 22u8, 255u8, 41u8, 6u8, - ] - { - let call = SetPvfVotingTtl { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_pvf_voting_ttl", + data: SetPvfVotingTtl { new }, + }, + [ + 17u8, 11u8, 98u8, 217u8, 208u8, 102u8, 238u8, 83u8, 118u8, + 123u8, 20u8, 18u8, 46u8, 212u8, 21u8, 164u8, 61u8, 104u8, + 208u8, 204u8, 91u8, 210u8, 40u8, 6u8, 201u8, 147u8, 46u8, + 166u8, 219u8, 227u8, 121u8, 187u8, + ], + ) } #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] #[doc = "upgrade taking place."] @@ -31368,134 +22172,65 @@ pub mod api { pub fn set_minimum_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetMinimumValidationUpgradeDelay, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 225u8, 178u8, 41u8, 194u8, 154u8, 222u8, 247u8, 129u8, 35u8, - 102u8, 248u8, 144u8, 21u8, 74u8, 42u8, 239u8, 135u8, 205u8, - 173u8, 190u8, 112u8, 30u8, 240u8, 106u8, 10u8, 217u8, 208u8, - 11u8, 79u8, 47u8, 198u8, 37u8, - ] - { - let call = SetMinimumValidationUpgradeDelay { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_minimum_validation_upgrade_delay", + data: SetMinimumValidationUpgradeDelay { new }, + }, + [ + 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, + 37u8, 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, + 242u8, 210u8, 182u8, 111u8, 121u8, 109u8, 50u8, 130u8, 46u8, + 127u8, 122u8, 40u8, 141u8, 242u8, + ], + ) } #[doc = "Setting this to true will disable consistency checks for the configuration setters."] #[doc = "Use with caution."] pub fn set_bypass_consistency_check( &self, new: ::core::primitive::bool, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - SetBypassConsistencyCheck, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 5u8, 54u8, 178u8, 218u8, 46u8, 61u8, 99u8, 23u8, 227u8, - 202u8, 201u8, 164u8, 121u8, 226u8, 65u8, 253u8, 29u8, 164u8, - 170u8, 130u8, 32u8, 85u8, 222u8, 10u8, 232u8, 252u8, 73u8, - 23u8, 69u8, 30u8, 1u8, 87u8, - ] - { - let call = SetBypassConsistencyCheck { new }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Configuration", + call: "set_bypass_consistency_check", + data: SetBypassConsistencyCheck { new }, + }, + [ + 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, + 121u8, 26u8, 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, + 177u8, 107u8, 34u8, 74u8, 103u8, 128u8, 252u8, 160u8, 169u8, + 246u8, 125u8, 127u8, 153u8, 129u8, + ], + ) } } } pub mod storage { use super::runtime_types; - pub struct ActiveConfig; - impl ::subxt::StorageEntry for ActiveConfig { - const PALLET: &'static str = "Configuration"; - const STORAGE: &'static str = "ActiveConfig"; - type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct PendingConfigs; - impl ::subxt::StorageEntry for PendingConfigs { - const PALLET: &'static str = "Configuration"; - const STORAGE: &'static str = "PendingConfigs"; - type Value = :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct BypassConsistencyCheck; - impl ::subxt::StorageEntry for BypassConsistencyCheck { - const PALLET: &'static str = "Configuration"; - const STORAGE: &'static str = "BypassConsistencyCheck"; - type Value = ::core::primitive::bool; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - #[doc = " The active configuration for the current session."] pub fn active_config (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 6u8, 31u8, 218u8, 51u8, 202u8, 166u8, 183u8, 192u8, - 151u8, 184u8, 103u8, 73u8, 239u8, 78u8, 183u8, 38u8, - 192u8, 201u8, 27u8, 128u8, 59u8, 48u8, 197u8, 23u8, 43u8, - 39u8, 158u8, 35u8, 194u8, 23u8, 151u8, 145u8, - ] - { - let entry = ActiveConfig; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub struct StorageApi; + impl StorageApi { + #[doc = " The active configuration for the current session."] pub fn active_config (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Configuration", + "ActiveConfig", + vec![], + [ + 159u8, 121u8, 140u8, 88u8, 122u8, 8u8, 91u8, 46u8, 13u8, + 126u8, 128u8, 7u8, 29u8, 95u8, 160u8, 50u8, 194u8, 59u8, + 249u8, 41u8, 224u8, 158u8, 251u8, 44u8, 146u8, 17u8, 34u8, + 244u8, 18u8, 0u8, 156u8, 17u8, + ], + ) } #[doc = " Pending configuration changes."] #[doc = ""] @@ -31503,597 +22238,329 @@ pub mod api { #[doc = " be applied."] #[doc = ""] #[doc = " The list is sorted ascending by session index. Also, this list can only contain at most"] - #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 198u8, 168u8, 227u8, 228u8, 110u8, 98u8, 34u8, 21u8, - 159u8, 114u8, 202u8, 135u8, 39u8, 190u8, 40u8, 214u8, - 170u8, 126u8, 203u8, 10u8, 44u8, 114u8, 254u8, 208u8, - 133u8, 129u8, 8u8, 112u8, 168u8, 135u8, 196u8, 43u8, - ] - { - let entry = PendingConfigs; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Configuration", + "PendingConfigs", + vec![], + [ + 143u8, 101u8, 164u8, 41u8, 30u8, 112u8, 74u8, 127u8, 88u8, + 27u8, 144u8, 27u8, 134u8, 253u8, 172u8, 17u8, 247u8, 247u8, + 75u8, 186u8, 137u8, 195u8, 91u8, 37u8, 148u8, 77u8, 29u8, + 45u8, 131u8, 28u8, 208u8, 241u8, + ], + ) } #[doc = " If this is set, then the configuration setters will bypass the consistency checks. This"] #[doc = " is meant to be used only as the last resort."] pub fn bypass_consistency_check( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::bool, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 42u8, 191u8, 122u8, 163u8, 112u8, 2u8, 148u8, 59u8, 79u8, - 219u8, 184u8, 172u8, 246u8, 136u8, 185u8, 251u8, 189u8, - 226u8, 83u8, 129u8, 162u8, 109u8, 148u8, 75u8, 120u8, - 216u8, 44u8, 28u8, 221u8, 78u8, 177u8, 94u8, - ] - { - let entry = BypassConsistencyCheck; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::bool, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Configuration", + "BypassConsistencyCheck", + vec![], + [ + 42u8, 191u8, 122u8, 163u8, 112u8, 2u8, 148u8, 59u8, 79u8, + 219u8, 184u8, 172u8, 246u8, 136u8, 185u8, 251u8, 189u8, + 226u8, 83u8, 129u8, 162u8, 109u8, 148u8, 75u8, 120u8, 216u8, + 44u8, 28u8, 221u8, 78u8, 177u8, 94u8, + ], + ) } } } } pub mod paras_shared { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - } + pub struct TransactionApi; + impl TransactionApi {} } pub mod storage { use super::runtime_types; - pub struct CurrentSessionIndex; - impl ::subxt::StorageEntry for CurrentSessionIndex { - const PALLET: &'static str = "ParasShared"; - const STORAGE: &'static str = "CurrentSessionIndex"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ActiveValidatorIndices; - impl ::subxt::StorageEntry for ActiveValidatorIndices { - const PALLET: &'static str = "ParasShared"; - const STORAGE: &'static str = "ActiveValidatorIndices"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ActiveValidatorKeys; - impl ::subxt::StorageEntry for ActiveValidatorKeys { - const PALLET: &'static str = "ParasShared"; - const STORAGE: &'static str = "ActiveValidatorKeys"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The current session index."] pub fn current_session_index( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 83u8, 15u8, 20u8, 55u8, 103u8, 65u8, 76u8, 202u8, 69u8, - 14u8, 221u8, 93u8, 38u8, 163u8, 167u8, 83u8, 18u8, 245u8, - 33u8, 175u8, 7u8, 97u8, 67u8, 186u8, 96u8, 57u8, 147u8, - 120u8, 107u8, 91u8, 147u8, 64u8, - ] - { - let entry = CurrentSessionIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasShared", + "CurrentSessionIndex", + vec![], + [ + 83u8, 15u8, 20u8, 55u8, 103u8, 65u8, 76u8, 202u8, 69u8, 14u8, + 221u8, 93u8, 38u8, 163u8, 167u8, 83u8, 18u8, 245u8, 33u8, + 175u8, 7u8, 97u8, 67u8, 186u8, 96u8, 57u8, 147u8, 120u8, + 107u8, 91u8, 147u8, 64u8, + ], + ) } #[doc = " All the validators actively participating in parachain consensus."] #[doc = " Indices are into the broader validator set."] pub fn active_validator_indices( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 128u8, 98u8, 186u8, 22u8, 178u8, 51u8, 151u8, 235u8, - 201u8, 2u8, 245u8, 177u8, 4u8, 125u8, 1u8, 245u8, 56u8, - 102u8, 166u8, 129u8, 211u8, 189u8, 137u8, 149u8, 234u8, - 252u8, 97u8, 139u8, 151u8, 16u8, 129u8, 24u8, - ] - { - let entry = ActiveValidatorIndices; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasShared", + "ActiveValidatorIndices", + vec![], + [ + 123u8, 26u8, 202u8, 53u8, 219u8, 42u8, 54u8, 92u8, 144u8, + 74u8, 228u8, 234u8, 129u8, 216u8, 161u8, 98u8, 199u8, 12u8, + 13u8, 231u8, 23u8, 166u8, 185u8, 209u8, 191u8, 33u8, 231u8, + 252u8, 232u8, 44u8, 213u8, 221u8, + ], + ) } #[doc = " The parachain attestation keys of the validators actively participating in parachain consensus."] #[doc = " This should be the same length as `ActiveValidatorIndices`."] pub fn active_validator_keys( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::validator_app::Public, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 130u8, 19u8, 46u8, 117u8, 211u8, 113u8, 90u8, 42u8, - 173u8, 87u8, 209u8, 185u8, 102u8, 142u8, 161u8, 60u8, - 118u8, 246u8, 161u8, 183u8, 103u8, 255u8, 75u8, 180u8, - 250u8, 35u8, 235u8, 102u8, 216u8, 196u8, 190u8, 129u8, - ] - { - let entry = ActiveValidatorKeys; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasShared", + "ActiveValidatorKeys", + vec![], + [ + 33u8, 14u8, 54u8, 86u8, 184u8, 171u8, 194u8, 35u8, 187u8, + 252u8, 181u8, 79u8, 229u8, 134u8, 50u8, 235u8, 162u8, 216u8, + 108u8, 160u8, 175u8, 172u8, 239u8, 114u8, 57u8, 238u8, 9u8, + 54u8, 57u8, 196u8, 105u8, 15u8, + ], + ) } } } } pub mod para_inclusion { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - } + pub struct TransactionApi; + impl TransactionApi {} } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub type Event = runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A candidate was backed. `[candidate, head_data]`"] pub struct CandidateBacked( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, pub runtime_types::polkadot_parachain::primitives::HeadData, pub runtime_types::polkadot_primitives::v2::CoreIndex, pub runtime_types::polkadot_primitives::v2::GroupIndex, ); - impl ::subxt::Event for CandidateBacked { + impl ::subxt::events::StaticEvent for CandidateBacked { const PALLET: &'static str = "ParaInclusion"; const EVENT: &'static str = "CandidateBacked"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A candidate was included. `[candidate, head_data]`"] pub struct CandidateIncluded( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, pub runtime_types::polkadot_parachain::primitives::HeadData, pub runtime_types::polkadot_primitives::v2::CoreIndex, pub runtime_types::polkadot_primitives::v2::GroupIndex, ); - impl ::subxt::Event for CandidateIncluded { + impl ::subxt::events::StaticEvent for CandidateIncluded { const PALLET: &'static str = "ParaInclusion"; const EVENT: &'static str = "CandidateIncluded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A candidate timed out. `[candidate, head_data]`"] pub struct CandidateTimedOut( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, pub runtime_types::polkadot_parachain::primitives::HeadData, pub runtime_types::polkadot_primitives::v2::CoreIndex, ); - impl ::subxt::Event for CandidateTimedOut { + impl ::subxt::events::StaticEvent for CandidateTimedOut { const PALLET: &'static str = "ParaInclusion"; const EVENT: &'static str = "CandidateTimedOut"; } } pub mod storage { use super::runtime_types; - pub struct AvailabilityBitfields<'a>( - pub &'a runtime_types::polkadot_primitives::v2::ValidatorIndex, - ); - impl ::subxt::StorageEntry for AvailabilityBitfields<'_> { - const PALLET: &'static str = "ParaInclusion"; - const STORAGE: &'static str = "AvailabilityBitfields"; - type Value = runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct PendingAvailability<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for PendingAvailability<'_> { - const PALLET: &'static str = "ParaInclusion"; - const STORAGE: &'static str = "PendingAvailability"; - type Value = runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct PendingAvailabilityCommitments<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for PendingAvailabilityCommitments<'_> { - const PALLET: &'static str = "ParaInclusion"; - const STORAGE: &'static str = "PendingAvailabilityCommitments"; - type Value = runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : & 'a runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 223u8, 74u8, 17u8, 152u8, 136u8, 20u8, 241u8, 47u8, - 169u8, 34u8, 128u8, 78u8, 121u8, 47u8, 165u8, 35u8, - 222u8, 15u8, 236u8, 90u8, 215u8, 160u8, 10u8, 18u8, - 152u8, 69u8, 38u8, 97u8, 122u8, 247u8, 241u8, 255u8, - ] - { - let entry = AvailabilityBitfields(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] - pub fn availability_bitfields_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, AvailabilityBitfields<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 223u8, 74u8, 17u8, 152u8, 136u8, 20u8, 241u8, 47u8, - 169u8, 34u8, 128u8, 78u8, 121u8, 47u8, 165u8, 35u8, - 222u8, 15u8, 236u8, 90u8, 215u8, 160u8, 10u8, 18u8, - 152u8, 69u8, 38u8, 97u8, 122u8, 247u8, 241u8, 255u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 201u8, 235u8, 244u8, 21u8, 107u8, 106u8, 50u8, 211u8, - 165u8, 102u8, 113u8, 3u8, 54u8, 155u8, 159u8, 255u8, - 117u8, 107u8, 68u8, 174u8, 86u8, 90u8, 172u8, 181u8, - 164u8, 171u8, 215u8, 238u8, 118u8, 111u8, 25u8, 111u8, - ] - { - let entry = PendingAvailability(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " Candidates pending availability by `ParaId`."] - pub fn pending_availability_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingAvailability<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 201u8, 235u8, 244u8, 21u8, 107u8, 106u8, 50u8, 211u8, - 165u8, 102u8, 113u8, 3u8, 54u8, 155u8, 159u8, 255u8, - 117u8, 107u8, 68u8, 174u8, 86u8, 90u8, 172u8, 181u8, - 164u8, 171u8, 215u8, 238u8, 118u8, 111u8, 25u8, 111u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub struct StorageApi; + impl StorageApi { + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : & runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInclusion", + "AvailabilityBitfields", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, + 232u8, 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, + 60u8, 193u8, 142u8, 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, + 114u8, 215u8, 250u8, 111u8, 225u8, + ], + ) + } + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInclusion", + "AvailabilityBitfields", + Vec::new(), + [ + 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, + 232u8, 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, + 60u8, 193u8, 142u8, 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, + 114u8, 215u8, 250u8, 111u8, 225u8, + ], + ) + } + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : & runtime_types :: polkadot_parachain :: primitives :: Id ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInclusion", + "PendingAvailability", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, + 138u8, 67u8, 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, + 81u8, 143u8, 192u8, 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, + 113u8, 72u8, 12u8, 140u8, 242u8, + ], + ) + } + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInclusion", + "PendingAvailability", + Vec::new(), + [ + 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, + 138u8, 67u8, 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, + 81u8, 143u8, 192u8, 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, + 113u8, 72u8, 12u8, 140u8, 242u8, + ], + ) } #[doc = " The commitments of candidates pending availability, by `ParaId`."] pub fn pending_availability_commitments( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata - .storage_hash::() - { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 164u8, 245u8, 130u8, 208u8, 141u8, 88u8, 99u8, 247u8, - 90u8, 215u8, 40u8, 99u8, 239u8, 7u8, 231u8, 13u8, 233u8, - 204u8, 223u8, 137u8, 158u8, 250u8, 24u8, 107u8, 152u8, - 240u8, 195u8, 28u8, 170u8, 219u8, 174u8, 213u8, - ] - { - let entry = PendingAvailabilityCommitments(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInclusion", + "PendingAvailabilityCommitments", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, + 232u8, 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, + 144u8, 43u8, 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, + 195u8, 56u8, 59u8, 54u8, 8u8, + ], + ) } #[doc = " The commitments of candidates pending availability, by `ParaId`."] - pub fn pending_availability_commitments_iter( + pub fn pending_availability_commitments_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingAvailabilityCommitments<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata - .storage_hash::() - { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 164u8, 245u8, 130u8, 208u8, 141u8, 88u8, 99u8, 247u8, - 90u8, 215u8, 40u8, 99u8, 239u8, 7u8, 231u8, 13u8, 233u8, - 204u8, 223u8, 137u8, 158u8, 250u8, 24u8, 107u8, 152u8, - 240u8, 195u8, 28u8, 170u8, 219u8, 174u8, 213u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInclusion", + "PendingAvailabilityCommitments", + Vec::new(), + [ + 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, + 232u8, 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, + 144u8, 43u8, 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, + 195u8, 56u8, 59u8, 54u8, 8u8, + ], + ) } } } } pub mod para_inherent { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Enter { pub data: runtime_types::polkadot_primitives::v2::InherentData< runtime_types::sp_runtime::generic::header::Header< @@ -32102,25 +22569,8 @@ pub mod api { >, >, } - impl ::subxt::Call for Enter { - const PALLET: &'static str = "ParaInherent"; - const FUNCTION: &'static str = "enter"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] pub fn enter( &self, @@ -32130,67 +22580,30 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Enter, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 208u8, 134u8, 126u8, 30u8, 50u8, 219u8, 225u8, 133u8, 3u8, - 2u8, 121u8, 154u8, 133u8, 141u8, 159u8, 193u8, 66u8, 252u8, - 236u8, 234u8, 38u8, 169u8, 202u8, 154u8, 28u8, 171u8, 248u8, - 77u8, 31u8, 114u8, 21u8, 215u8, - ] - { - let call = Enter { data }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ParaInherent", + call: "enter", + data: Enter { data }, + }, + [ + 92u8, 247u8, 59u8, 6u8, 2u8, 102u8, 76u8, 147u8, 46u8, 232u8, + 38u8, 191u8, 145u8, 155u8, 23u8, 39u8, 228u8, 95u8, 57u8, + 249u8, 247u8, 20u8, 9u8, 189u8, 156u8, 187u8, 207u8, 107u8, + 0u8, 13u8, 228u8, 6u8, + ], + ) } } } pub mod storage { use super::runtime_types; - pub struct Included; - impl ::subxt::StorageEntry for Included { - const PALLET: &'static str = "ParaInherent"; - const STORAGE: &'static str = "Included"; - type Value = (); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct OnChainVotes; - impl ::subxt::StorageEntry for OnChainVotes { - const PALLET: &'static str = "ParaInherent"; - const STORAGE: &'static str = "OnChainVotes"; - type Value = runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< - ::subxt::sp_core::H256, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Whether the paras inherent was included within this block."] #[doc = ""] #[doc = " The `Option<()>` is effectively a `bool`, but it never hits storage in the `None` variant"] @@ -32199,159 +22612,53 @@ pub mod api { #[doc = " If this is `None` at the end of the block, we panic and render the block invalid."] pub fn included( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<()>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 208u8, 213u8, 76u8, 64u8, 90u8, 141u8, 144u8, 52u8, - 220u8, 35u8, 143u8, 171u8, 45u8, 59u8, 9u8, 218u8, 29u8, - 186u8, 139u8, 203u8, 205u8, 12u8, 10u8, 2u8, 27u8, 167u8, - 182u8, 244u8, 167u8, 220u8, 44u8, 16u8, - ] - { - let entry = Included; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress<'static, (), (), ()> + { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInherent", + "Included", + vec![], + [ + 208u8, 213u8, 76u8, 64u8, 90u8, 141u8, 144u8, 52u8, 220u8, + 35u8, 143u8, 171u8, 45u8, 59u8, 9u8, 218u8, 29u8, 186u8, + 139u8, 203u8, 205u8, 12u8, 10u8, 2u8, 27u8, 167u8, 182u8, + 244u8, 167u8, 220u8, 44u8, 16u8, + ], + ) } #[doc = " Scraped on chain data for extracting resolved disputes as well as backing votes."] pub fn on_chain_votes( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< - ::subxt::sp_core::H256, - >, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< + ::subxt::ext::sp_core::H256, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 163u8, 22u8, 172u8, 81u8, 10u8, 19u8, 149u8, 111u8, 22u8, - 92u8, 203u8, 33u8, 225u8, 124u8, 69u8, 70u8, 66u8, 188u8, - 33u8, 24u8, 132u8, 234u8, 106u8, 51u8, 248u8, 57u8, - 169u8, 115u8, 164u8, 253u8, 112u8, 235u8, - ] - { - let entry = OnChainVotes; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaInherent", + "OnChainVotes", + vec![], + [ + 187u8, 34u8, 219u8, 197u8, 202u8, 214u8, 140u8, 152u8, 253u8, + 65u8, 206u8, 217u8, 36u8, 40u8, 107u8, 215u8, 135u8, 115u8, + 35u8, 61u8, 180u8, 131u8, 0u8, 184u8, 193u8, 76u8, 165u8, + 63u8, 106u8, 222u8, 126u8, 113u8, + ], + ) } } } } pub mod para_scheduler { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod storage { use super::runtime_types; - pub struct ValidatorGroups; - impl ::subxt::StorageEntry for ValidatorGroups { - const PALLET: &'static str = "ParaScheduler"; - const STORAGE: &'static str = "ValidatorGroups"; - type Value = ::std::vec::Vec< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ParathreadQueue; - impl ::subxt::StorageEntry for ParathreadQueue { - const PALLET: &'static str = "ParaScheduler"; - const STORAGE: &'static str = "ParathreadQueue"; - type Value = runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct AvailabilityCores; - impl ::subxt::StorageEntry for AvailabilityCores { - const PALLET: &'static str = "ParaScheduler"; - const STORAGE: &'static str = "AvailabilityCores"; - type Value = ::std::vec::Vec< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::CoreOccupied, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ParathreadClaimIndex; - impl ::subxt::StorageEntry for ParathreadClaimIndex { - const PALLET: &'static str = "ParaScheduler"; - const STORAGE: &'static str = "ParathreadClaimIndex"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SessionStartBlock; - impl ::subxt::StorageEntry for SessionStartBlock { - const PALLET: &'static str = "ParaScheduler"; - const STORAGE: &'static str = "SessionStartBlock"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Scheduled; - impl ::subxt::StorageEntry for Scheduled { - const PALLET: &'static str = "ParaScheduler"; - const STORAGE: &'static str = "Scheduled"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::scheduler::CoreAssignment, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " All the validator groups. One for each core. Indices are into `ActiveValidators` - not the"] #[doc = " broader set of Polkadot validators, but instead just the subset used for parachains during"] #[doc = " this session."] @@ -32360,70 +22667,43 @@ pub mod api { #[doc = " Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k."] pub fn validator_groups( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< ::std::vec::Vec< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, + runtime_types::polkadot_primitives::v2::ValidatorIndex, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 84u8, 195u8, 53u8, 111u8, 186u8, 61u8, 3u8, 36u8, 10u8, - 9u8, 66u8, 119u8, 116u8, 213u8, 86u8, 153u8, 18u8, 149u8, - 83u8, 92u8, 232u8, 212u8, 175u8, 52u8, 74u8, 135u8, - 137u8, 34u8, 123u8, 232u8, 131u8, 22u8, - ] - { - let entry = ValidatorGroups; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaScheduler", + "ValidatorGroups", + vec![], + [ + 175u8, 187u8, 69u8, 76u8, 211u8, 36u8, 162u8, 147u8, 83u8, + 65u8, 83u8, 44u8, 241u8, 112u8, 246u8, 14u8, 237u8, 255u8, + 248u8, 58u8, 44u8, 207u8, 159u8, 112u8, 31u8, 90u8, 15u8, + 85u8, 4u8, 212u8, 215u8, 211u8, + ], + ) } #[doc = " A queue of upcoming claims and which core they should be mapped onto."] #[doc = ""] #[doc = " The number of queued claims is bounded at the `scheduling_lookahead`"] - #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] pub fn parathread_queue (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 55u8, 142u8, 211u8, 227u8, 167u8, 35u8, 168u8, 23u8, - 227u8, 185u8, 5u8, 154u8, 147u8, 237u8, 137u8, 133u8, - 81u8, 121u8, 70u8, 159u8, 206u8, 56u8, 20u8, 17u8, 79u8, - 19u8, 238u8, 114u8, 60u8, 96u8, 1u8, 20u8, - ] - { - let entry = ParathreadQueue; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] pub fn parathread_queue (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaScheduler", + "ParathreadQueue", + vec![], + [ + 79u8, 144u8, 191u8, 114u8, 235u8, 55u8, 133u8, 208u8, 73u8, + 97u8, 73u8, 148u8, 96u8, 185u8, 110u8, 95u8, 132u8, 54u8, + 244u8, 86u8, 50u8, 218u8, 121u8, 226u8, 153u8, 58u8, 232u8, + 202u8, 132u8, 147u8, 168u8, 48u8, + ], + ) } #[doc = " One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be"] #[doc = " temporarily `Some` if scheduled but not occupied."] @@ -32435,41 +22715,27 @@ pub mod api { #[doc = " * The number of validators divided by `configuration.max_validators_per_core`."] pub fn availability_cores( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::CoreOccupied, - >, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + ::core::option::Option< + runtime_types::polkadot_primitives::v2::CoreOccupied, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 170u8, 116u8, 249u8, 112u8, 156u8, 147u8, 94u8, 44u8, - 114u8, 10u8, 32u8, 91u8, 229u8, 56u8, 60u8, 222u8, 212u8, - 176u8, 107u8, 159u8, 143u8, 217u8, 200u8, 158u8, 86u8, - 88u8, 220u8, 204u8, 162u8, 148u8, 207u8, 150u8, - ] - { - let entry = AvailabilityCores; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaScheduler", + "AvailabilityCores", + vec![], + [ + 103u8, 94u8, 52u8, 17u8, 118u8, 25u8, 254u8, 190u8, 74u8, + 91u8, 64u8, 205u8, 243u8, 113u8, 143u8, 166u8, 193u8, 110u8, + 214u8, 151u8, 24u8, 112u8, 69u8, 131u8, 235u8, 78u8, 240u8, + 120u8, 240u8, 68u8, 56u8, 215u8, + ], + ) } #[doc = " An index used to ensure that only one claim on a parathread exists in the queue or is"] #[doc = " currently being handled by an occupied core."] @@ -32477,39 +22743,23 @@ pub mod api { #[doc = " Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500."] pub fn parathread_claim_index( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 187u8, 105u8, 221u8, 0u8, 103u8, 9u8, 52u8, 127u8, 47u8, - 155u8, 147u8, 84u8, 249u8, 213u8, 140u8, 75u8, 99u8, - 238u8, 220u8, 242u8, 220u8, 99u8, 204u8, 178u8, 153u8, - 170u8, 72u8, 34u8, 83u8, 238u8, 211u8, 150u8, - ] - { - let entry = ParathreadClaimIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaScheduler", + "ParathreadClaimIndex", + vec![], + [ + 64u8, 17u8, 173u8, 35u8, 14u8, 16u8, 149u8, 200u8, 118u8, + 211u8, 130u8, 15u8, 124u8, 112u8, 44u8, 220u8, 156u8, 132u8, + 119u8, 148u8, 24u8, 120u8, 252u8, 246u8, 204u8, 119u8, 206u8, + 85u8, 44u8, 210u8, 135u8, 83u8, + ], + ) } #[doc = " The block number where the session start occurred. Used to track how many group rotations have occurred."] #[doc = ""] @@ -32519,243 +22769,175 @@ pub mod api { #[doc = " block following the session change, block number of which we save in this storage value."] pub fn session_start_block( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 122u8, 37u8, 150u8, 1u8, 185u8, 201u8, 168u8, 67u8, 55u8, - 17u8, 101u8, 18u8, 133u8, 212u8, 6u8, 73u8, 191u8, 204u8, - 229u8, 22u8, 185u8, 120u8, 24u8, 245u8, 121u8, 215u8, - 124u8, 210u8, 49u8, 28u8, 26u8, 80u8, - ] - { - let entry = SessionStartBlock; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaScheduler", + "SessionStartBlock", + vec![], + [ + 122u8, 37u8, 150u8, 1u8, 185u8, 201u8, 168u8, 67u8, 55u8, + 17u8, 101u8, 18u8, 133u8, 212u8, 6u8, 73u8, 191u8, 204u8, + 229u8, 22u8, 185u8, 120u8, 24u8, 245u8, 121u8, 215u8, 124u8, + 210u8, 49u8, 28u8, 26u8, 80u8, + ], + ) } #[doc = " Currently scheduled cores - free but up to be occupied."] #[doc = ""] #[doc = " Bounded by the number of cores: one for each parachain and parathread multiplexer."] #[doc = ""] #[doc = " The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/"] - #[doc = " for the upcoming block."] pub fn scheduled (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 29u8, 43u8, 158u8, 142u8, 50u8, 67u8, 4u8, 30u8, 158u8, - 99u8, 47u8, 13u8, 151u8, 141u8, 163u8, 63u8, 140u8, - 179u8, 247u8, 106u8, 53u8, 66u8, 90u8, 107u8, 95u8, - 174u8, 63u8, 123u8, 176u8, 68u8, 90u8, 232u8, - ] - { - let entry = Scheduled; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " for the upcoming block."] pub fn scheduled (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaScheduler", + "Scheduled", + vec![], + [ + 246u8, 105u8, 102u8, 107u8, 143u8, 92u8, 220u8, 69u8, 71u8, + 102u8, 212u8, 157u8, 56u8, 112u8, 42u8, 179u8, 183u8, 139u8, + 128u8, 81u8, 239u8, 84u8, 103u8, 126u8, 82u8, 247u8, 39u8, + 39u8, 231u8, 218u8, 131u8, 53u8, + ], + ) } } } } pub mod paras { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceSetCurrentCode { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for ForceSetCurrentCode { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "force_set_current_code"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceSetCurrentHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, } - impl ::subxt::Call for ForceSetCurrentHead { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "force_set_current_head"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceScheduleCodeUpgrade { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, pub relay_parent_number: ::core::primitive::u32, } - impl ::subxt::Call for ForceScheduleCodeUpgrade { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "force_schedule_code_upgrade"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceNoteNewHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, } - impl ::subxt::Call for ForceNoteNewHead { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "force_note_new_head"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceQueueAction { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ForceQueueAction { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "force_queue_action"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddTrustedValidationCode { pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for AddTrustedValidationCode { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "add_trusted_validation_code"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct PokeUnusedValidationCode { pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, } - impl ::subxt::Call for PokeUnusedValidationCode { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "poke_unused_validation_code"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct IncludePvfCheckStatement { pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, pub signature: runtime_types::polkadot_primitives::v2::validator_app::Signature, } - impl ::subxt::Call for IncludePvfCheckStatement { - const PALLET: &'static str = "Paras"; - const FUNCTION: &'static str = "include_pvf_check_statement"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Set the storage for the parachain validation code immediately."] pub fn force_set_current_code( &self, para: runtime_types::polkadot_parachain::primitives::Id, new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceSetCurrentCode, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 100u8, 36u8, 105u8, 246u8, 77u8, 252u8, 162u8, 139u8, 60u8, - 37u8, 12u8, 148u8, 206u8, 160u8, 134u8, 105u8, 50u8, 52u8, - 156u8, 252u8, 217u8, 174u8, 211u8, 208u8, 88u8, 81u8, 236u8, - 66u8, 27u8, 59u8, 126u8, 5u8, - ] - { - let call = ForceSetCurrentCode { para, new_code }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "force_set_current_code", + data: ForceSetCurrentCode { para, new_code }, + }, + [ + 56u8, 59u8, 48u8, 185u8, 106u8, 99u8, 250u8, 32u8, 207u8, + 2u8, 4u8, 110u8, 165u8, 131u8, 22u8, 33u8, 248u8, 175u8, + 186u8, 6u8, 118u8, 51u8, 74u8, 239u8, 68u8, 122u8, 148u8, + 242u8, 193u8, 131u8, 6u8, 135u8, + ], + ) } #[doc = "Set the storage for the current parachain head data immediately."] pub fn force_set_current_head( &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceSetCurrentHead, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 119u8, 46u8, 120u8, 202u8, 138u8, 190u8, 179u8, 78u8, 155u8, - 167u8, 220u8, 233u8, 170u8, 248u8, 202u8, 92u8, 73u8, 246u8, - 224u8, 56u8, 208u8, 124u8, 215u8, 19u8, 235u8, 246u8, 89u8, - 189u8, 19u8, 205u8, 22u8, 70u8, - ] - { - let call = ForceSetCurrentHead { para, new_head }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "force_set_current_head", + data: ForceSetCurrentHead { para, new_head }, + }, + [ + 203u8, 70u8, 33u8, 168u8, 133u8, 64u8, 146u8, 137u8, 156u8, + 104u8, 183u8, 26u8, 74u8, 227u8, 154u8, 224u8, 75u8, 85u8, + 143u8, 51u8, 60u8, 194u8, 59u8, 94u8, 100u8, 84u8, 194u8, + 100u8, 153u8, 9u8, 222u8, 63u8, + ], + ) } #[doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] pub fn force_schedule_code_upgrade( @@ -32763,74 +22945,50 @@ pub mod api { para: runtime_types::polkadot_parachain::primitives::Id, new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, relay_parent_number: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceScheduleCodeUpgrade, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 254u8, 60u8, 105u8, 37u8, 116u8, 190u8, 30u8, 255u8, 210u8, - 24u8, 120u8, 99u8, 174u8, 215u8, 233u8, 83u8, 57u8, 200u8, - 24u8, 49u8, 220u8, 12u8, 103u8, 30u8, 165u8, 10u8, 125u8, - 255u8, 88u8, 134u8, 199u8, 3u8, - ] - { - let call = ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "force_schedule_code_upgrade", + data: ForceScheduleCodeUpgrade { + para, + new_code, + relay_parent_number, + }, + }, + [ + 30u8, 210u8, 178u8, 31u8, 48u8, 144u8, 167u8, 117u8, 220u8, + 36u8, 175u8, 220u8, 145u8, 193u8, 20u8, 98u8, 149u8, 130u8, + 66u8, 54u8, 20u8, 204u8, 231u8, 116u8, 203u8, 179u8, 253u8, + 106u8, 55u8, 58u8, 116u8, 109u8, + ], + ) } #[doc = "Note a new block head for para within the context of the current block."] pub fn force_note_new_head( &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceNoteNewHead, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 203u8, 31u8, 68u8, 125u8, 105u8, 218u8, 177u8, 205u8, 248u8, - 131u8, 25u8, 170u8, 140u8, 56u8, 183u8, 106u8, 2u8, 118u8, - 79u8, 22u8, 228u8, 91u8, 33u8, 66u8, 245u8, 144u8, 147u8, - 142u8, 14u8, 171u8, 125u8, 233u8, - ] - { - let call = ForceNoteNewHead { para, new_head }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "force_note_new_head", + data: ForceNoteNewHead { para, new_head }, + }, + [ + 83u8, 93u8, 166u8, 142u8, 213u8, 1u8, 243u8, 73u8, 192u8, + 164u8, 104u8, 206u8, 99u8, 250u8, 31u8, 222u8, 231u8, 54u8, + 12u8, 45u8, 92u8, 74u8, 248u8, 50u8, 180u8, 86u8, 251u8, + 172u8, 227u8, 88u8, 45u8, 127u8, + ], + ) } #[doc = "Put a parachain directly into the next session's action queue."] #[doc = "We can't queue it any sooner than this without going into the"] @@ -32838,35 +22996,23 @@ pub mod api { pub fn force_queue_action( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceQueueAction, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 141u8, 235u8, 245u8, 93u8, 24u8, 155u8, 106u8, 136u8, 190u8, - 236u8, 216u8, 131u8, 245u8, 5u8, 186u8, 131u8, 159u8, 240u8, - 95u8, 139u8, 231u8, 12u8, 255u8, 74u8, 194u8, 13u8, 112u8, - 78u8, 110u8, 95u8, 26u8, 133u8, - ] - { - let call = ForceQueueAction { para }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "force_queue_action", + data: ForceQueueAction { para }, + }, + [ + 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, + 137u8, 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, + 36u8, 254u8, 224u8, 99u8, 165u8, 246u8, 8u8, 76u8, 250u8, + 36u8, 141u8, 67u8, 185u8, 17u8, + ], + ) } #[doc = "Adds the validation code to the storage."] #[doc = ""] @@ -32884,35 +23030,23 @@ pub mod api { pub fn add_trusted_validation_code( &self, validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddTrustedValidationCode, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 110u8, 255u8, 249u8, 176u8, 109u8, 54u8, 87u8, 19u8, 7u8, - 62u8, 220u8, 143u8, 196u8, 99u8, 66u8, 49u8, 18u8, 225u8, - 14u8, 42u8, 243u8, 228u8, 232u8, 207u8, 246u8, 34u8, 179u8, - 127u8, 246u8, 239u8, 30u8, 214u8, - ] - { - let call = AddTrustedValidationCode { validation_code }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "add_trusted_validation_code", + data: AddTrustedValidationCode { validation_code }, + }, + [ + 160u8, 199u8, 245u8, 178u8, 58u8, 65u8, 79u8, 199u8, 53u8, + 60u8, 84u8, 225u8, 2u8, 145u8, 154u8, 204u8, 165u8, 171u8, + 173u8, 223u8, 59u8, 196u8, 37u8, 12u8, 243u8, 158u8, 77u8, + 184u8, 58u8, 64u8, 133u8, 71u8, + ], + ) } #[doc = "Remove the validation code from the storage iff the reference count is 0."] #[doc = ""] @@ -32922,37 +23056,25 @@ pub mod api { pub fn poke_unused_validation_code( &self, validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - PokeUnusedValidationCode, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 159u8, 142u8, 14u8, 7u8, 29u8, 74u8, 213u8, 165u8, 206u8, - 45u8, 135u8, 121u8, 0u8, 146u8, 217u8, 59u8, 189u8, 120u8, - 169u8, 227u8, 225u8, 135u8, 15u8, 45u8, 197u8, 201u8, 29u8, - 128u8, 49u8, 165u8, 106u8, 80u8, - ] - { - let call = PokeUnusedValidationCode { - validation_code_hash, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "poke_unused_validation_code", + data: PokeUnusedValidationCode { + validation_code_hash, + }, + }, + [ + 98u8, 9u8, 24u8, 180u8, 8u8, 144u8, 36u8, 28u8, 111u8, 83u8, + 162u8, 160u8, 66u8, 119u8, 177u8, 117u8, 143u8, 233u8, 241u8, + 128u8, 189u8, 118u8, 241u8, 30u8, 74u8, 171u8, 193u8, 177u8, + 233u8, 12u8, 254u8, 146u8, + ], + ) } #[doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] #[doc = "enacts the results if that was the last vote before achieving the supermajority."] @@ -32960,35 +23082,23 @@ pub mod api { &self, stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - IncludePvfCheckStatement, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 187u8, 231u8, 113u8, 29u8, 177u8, 92u8, 2u8, 116u8, 88u8, - 114u8, 19u8, 170u8, 167u8, 254u8, 149u8, 142u8, 24u8, 57u8, - 187u8, 210u8, 72u8, 239u8, 32u8, 75u8, 39u8, 47u8, 158u8, - 205u8, 82u8, 50u8, 175u8, 31u8, - ] - { - let call = IncludePvfCheckStatement { stmt, signature }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Paras", + call: "include_pvf_check_statement", + data: IncludePvfCheckStatement { stmt, signature }, + }, + [ + 22u8, 136u8, 241u8, 59u8, 36u8, 249u8, 239u8, 255u8, 169u8, + 117u8, 19u8, 58u8, 214u8, 16u8, 135u8, 65u8, 13u8, 250u8, + 5u8, 41u8, 144u8, 29u8, 207u8, 73u8, 215u8, 221u8, 1u8, + 253u8, 123u8, 110u8, 6u8, 196u8, + ], + ) } } } @@ -32996,813 +23106,451 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Current code has been updated for a Para. `para_id`"] pub struct CurrentCodeUpdated( pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for CurrentCodeUpdated { + impl ::subxt::events::StaticEvent for CurrentCodeUpdated { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "CurrentCodeUpdated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Current head has been updated for a Para. `para_id`"] pub struct CurrentHeadUpdated( pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for CurrentHeadUpdated { + impl ::subxt::events::StaticEvent for CurrentHeadUpdated { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "CurrentHeadUpdated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A code upgrade has been scheduled for a Para. `para_id`"] pub struct CodeUpgradeScheduled( pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for CodeUpgradeScheduled { + impl ::subxt::events::StaticEvent for CodeUpgradeScheduled { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "CodeUpgradeScheduled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new head has been noted for a Para. `para_id`"] pub struct NewHeadNoted( pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for NewHeadNoted { + impl ::subxt::events::StaticEvent for NewHeadNoted { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "NewHeadNoted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A para has been queued to execute pending actions. `para_id`"] pub struct ActionQueued( pub runtime_types::polkadot_parachain::primitives::Id, pub ::core::primitive::u32, ); - impl ::subxt::Event for ActionQueued { + impl ::subxt::events::StaticEvent for ActionQueued { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "ActionQueued"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The given para either initiated or subscribed to a PVF check for the given validation"] #[doc = "code. `code_hash` `para_id`"] pub struct PvfCheckStarted( pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for PvfCheckStarted { + impl ::subxt::events::StaticEvent for PvfCheckStarted { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "PvfCheckStarted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The given validation code was accepted by the PVF pre-checking vote."] #[doc = "`code_hash` `para_id`"] pub struct PvfCheckAccepted( pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for PvfCheckAccepted { + impl ::subxt::events::StaticEvent for PvfCheckAccepted { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "PvfCheckAccepted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The given validation code was rejected by the PVF pre-checking vote."] #[doc = "`code_hash` `para_id`"] pub struct PvfCheckRejected( pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for PvfCheckRejected { + impl ::subxt::events::StaticEvent for PvfCheckRejected { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "PvfCheckRejected"; } } pub mod storage { use super::runtime_types; - pub struct PvfActiveVoteMap<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ); - impl ::subxt::StorageEntry for PvfActiveVoteMap<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "PvfActiveVoteMap"; - type Value = runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct PvfActiveVoteList; - impl ::subxt::StorageEntry for PvfActiveVoteList { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "PvfActiveVoteList"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Parachains; - impl ::subxt::StorageEntry for Parachains { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "Parachains"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ParaLifecycles<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for ParaLifecycles<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "ParaLifecycles"; - type Value = - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Heads<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for Heads<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "Heads"; - type Value = runtime_types::polkadot_parachain::primitives::HeadData; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct CurrentCodeHash<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for CurrentCodeHash<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "CurrentCodeHash"; - type Value = - runtime_types::polkadot_parachain::primitives::ValidationCodeHash; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct PastCodeHash<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - pub &'a ::core::primitive::u32, - ); - impl ::subxt::StorageEntry for PastCodeHash<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "PastCodeHash"; - type Value = - runtime_types::polkadot_parachain::primitives::ValidationCodeHash; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct PastCodeMeta<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for PastCodeMeta<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "PastCodeMeta"; - type Value = - runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct PastCodePruning; - impl ::subxt::StorageEntry for PastCodePruning { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "PastCodePruning"; - type Value = ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct FutureCodeUpgrades<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for FutureCodeUpgrades<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "FutureCodeUpgrades"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct FutureCodeHash<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for FutureCodeHash<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "FutureCodeHash"; - type Value = - runtime_types::polkadot_parachain::primitives::ValidationCodeHash; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct UpgradeGoAheadSignal<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for UpgradeGoAheadSignal<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "UpgradeGoAheadSignal"; - type Value = runtime_types::polkadot_primitives::v2::UpgradeGoAhead; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct UpgradeRestrictionSignal<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for UpgradeRestrictionSignal<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "UpgradeRestrictionSignal"; - type Value = runtime_types::polkadot_primitives::v2::UpgradeRestriction; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct UpgradeCooldowns; - impl ::subxt::StorageEntry for UpgradeCooldowns { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "UpgradeCooldowns"; - type Value = ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct UpcomingUpgrades; - impl ::subxt::StorageEntry for UpcomingUpgrades { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "UpcomingUpgrades"; - type Value = ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ActionsQueue<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ActionsQueue<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "ActionsQueue"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct UpcomingParasGenesis<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for UpcomingParasGenesis<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "UpcomingParasGenesis"; - type Value = - runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct CodeByHashRefs<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ); - impl ::subxt::StorageEntry for CodeByHashRefs<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "CodeByHashRefs"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct CodeByHash<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ); - impl ::subxt::StorageEntry for CodeByHash<'_> { - const PALLET: &'static str = "Paras"; - const STORAGE: &'static str = "CodeByHash"; - type Value = - runtime_types::polkadot_parachain::primitives::ValidationCode; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " All currently active PVF pre-checking votes."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 113u8, 142u8, 66u8, 141u8, 249u8, 227u8, 84u8, 128u8, - 137u8, 111u8, 215u8, 93u8, 246u8, 49u8, 126u8, 213u8, - 77u8, 139u8, 7u8, 19u8, 254u8, 84u8, 72u8, 96u8, 89u8, - 114u8, 199u8, 150u8, 122u8, 160u8, 222u8, 181u8, - ] - { - let entry = PvfActiveVoteMap(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : & runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PvfActiveVoteMap", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, + 39u8, 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, + 190u8, 39u8, 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, + 43u8, 248u8, 134u8, 124u8, 73u8, + ], + ) } #[doc = " All currently active PVF pre-checking votes."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] - pub fn pvf_active_vote_map_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PvfActiveVoteMap<'a>>, - ::subxt::BasicError, + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PvfActiveVoteMap", + Vec::new(), + [ + 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, + 39u8, 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, + 190u8, 39u8, 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, + 43u8, 248u8, 134u8, 124u8, 73u8, + ], + ) + } + #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] + pub fn pvf_active_vote_list( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 113u8, 142u8, 66u8, 141u8, 249u8, 227u8, 84u8, 128u8, - 137u8, 111u8, 215u8, 93u8, 246u8, 49u8, 126u8, 213u8, - 77u8, 139u8, 7u8, 19u8, 254u8, 84u8, 72u8, 96u8, 89u8, - 114u8, 199u8, 150u8, 122u8, 160u8, 222u8, 181u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] pub fn pvf_active_vote_list (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 30u8, 117u8, 174u8, 227u8, 251u8, 95u8, 176u8, 153u8, - 151u8, 188u8, 89u8, 252u8, 168u8, 203u8, 174u8, 241u8, - 209u8, 45u8, 96u8, 77u8, 117u8, 159u8, 33u8, 1u8, 55u8, - 111u8, 50u8, 189u8, 246u8, 209u8, 42u8, 155u8, - ] - { - let entry = PvfActiveVoteList; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PvfActiveVoteList", + vec![], + [ + 196u8, 23u8, 108u8, 162u8, 29u8, 33u8, 49u8, 219u8, 127u8, + 26u8, 241u8, 58u8, 102u8, 43u8, 156u8, 3u8, 87u8, 153u8, + 195u8, 96u8, 68u8, 132u8, 170u8, 162u8, 18u8, 156u8, 121u8, + 63u8, 53u8, 91u8, 68u8, 69u8, + ], + ) } #[doc = " All parachains. Ordered ascending by `ParaId`. Parathreads are not included."] #[doc = ""] #[doc = " Consider using the [`ParachainsCache`] type of modifying."] pub fn parachains( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 174u8, 146u8, 170u8, 102u8, 125u8, 176u8, 74u8, 177u8, - 28u8, 54u8, 13u8, 73u8, 188u8, 248u8, 78u8, 144u8, 88u8, - 183u8, 224u8, 69u8, 224u8, 31u8, 30u8, 115u8, 191u8, - 166u8, 252u8, 218u8, 114u8, 241u8, 110u8, 39u8, - ] - { - let entry = Parachains; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "Parachains", + vec![], + [ + 85u8, 234u8, 218u8, 69u8, 20u8, 169u8, 235u8, 6u8, 69u8, + 126u8, 28u8, 18u8, 57u8, 93u8, 238u8, 7u8, 167u8, 221u8, + 75u8, 35u8, 36u8, 4u8, 46u8, 55u8, 234u8, 123u8, 122u8, + 173u8, 13u8, 205u8, 58u8, 226u8, + ], + ) } - #[doc = " The current lifecycle of a all known Para IDs."] pub fn para_lifecycles (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: ParaLifecycle > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 38u8, 31u8, 0u8, 253u8, 63u8, 27u8, 13u8, 12u8, 247u8, - 34u8, 21u8, 166u8, 166u8, 236u8, 178u8, 217u8, 230u8, - 117u8, 215u8, 8u8, 149u8, 37u8, 231u8, 160u8, 226u8, - 89u8, 12u8, 162u8, 197u8, 237u8, 235u8, 127u8, - ] - { - let entry = ParaLifecycles(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " The current lifecycle of a all known Para IDs."] + pub fn para_lifecycles( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "ParaLifecycles", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, + 106u8, 4u8, 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, + 110u8, 81u8, 62u8, 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, + 186u8, 209u8, 191u8, 186u8, + ], + ) } #[doc = " The current lifecycle of a all known Para IDs."] - pub fn para_lifecycles_iter( + pub fn para_lifecycles_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ParaLifecycles<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 38u8, 31u8, 0u8, 253u8, 63u8, 27u8, 13u8, 12u8, 247u8, - 34u8, 21u8, 166u8, 166u8, 236u8, 178u8, 217u8, 230u8, - 117u8, 215u8, 8u8, 149u8, 37u8, 231u8, 160u8, 226u8, - 89u8, 12u8, 162u8, 197u8, 237u8, 235u8, 127u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "ParaLifecycles", + Vec::new(), + [ + 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, + 106u8, 4u8, 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, + 110u8, 81u8, 62u8, 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, + 186u8, 209u8, 191u8, 186u8, + ], + ) } #[doc = " The head-data of every registered para."] pub fn heads( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::HeadData, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 242u8, 145u8, 237u8, 33u8, 204u8, 183u8, 18u8, 135u8, - 182u8, 47u8, 220u8, 187u8, 118u8, 79u8, 163u8, 122u8, - 227u8, 215u8, 43u8, 70u8, 24u8, 33u8, 74u8, 113u8, 67u8, - 25u8, 47u8, 210u8, 136u8, 236u8, 83u8, 148u8, - ] - { - let entry = Heads(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::HeadData, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "Heads", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, + 248u8, 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, + 55u8, 200u8, 15u8, 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, + 134u8, 131u8, 142u8, 70u8, 3u8, + ], + ) } #[doc = " The head-data of every registered para."] - pub fn heads_iter( + pub fn heads_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Heads<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 242u8, 145u8, 237u8, 33u8, 204u8, 183u8, 18u8, 135u8, - 182u8, 47u8, 220u8, 187u8, 118u8, 79u8, 163u8, 122u8, - 227u8, 215u8, 43u8, 70u8, 24u8, 33u8, 74u8, 113u8, 67u8, - 25u8, 47u8, 210u8, 136u8, 236u8, 83u8, 148u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::HeadData, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "Heads", + Vec::new(), + [ + 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, + 248u8, 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, + 55u8, 200u8, 15u8, 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, + 134u8, 131u8, 142u8, 70u8, 3u8, + ], + ) } #[doc = " The validation code hash of every live para."] #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn current_code_hash (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 146u8, 139u8, 159u8, 78u8, 13u8, 151u8, 18u8, 117u8, - 15u8, 107u8, 251u8, 200u8, 100u8, 200u8, 170u8, 50u8, - 250u8, 189u8, 162u8, 128u8, 253u8, 51u8, 192u8, 174u8, - 190u8, 48u8, 96u8, 214u8, 33u8, 117u8, 82u8, 247u8, - ] - { - let entry = CurrentCodeHash(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn current_code_hash( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "CurrentCodeHash", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, + 133u8, 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, + 170u8, 203u8, 8u8, 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, + 35u8, 157u8, 195u8, 104u8, 236u8, + ], + ) } #[doc = " The validation code hash of every live para."] #[doc = ""] #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn current_code_hash_iter( + pub fn current_code_hash_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, CurrentCodeHash<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 146u8, 139u8, 159u8, 78u8, 13u8, 151u8, 18u8, 117u8, - 15u8, 107u8, 251u8, 200u8, 100u8, 200u8, 170u8, 50u8, - 250u8, 189u8, 162u8, 128u8, 253u8, 51u8, 192u8, 174u8, - 190u8, 48u8, 96u8, 214u8, 33u8, 117u8, 82u8, 247u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "CurrentCodeHash", + Vec::new(), + [ + 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, + 133u8, 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, + 170u8, 203u8, 8u8, 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, + 35u8, 157u8, 195u8, 104u8, 236u8, + ], + ) } #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] #[doc = " became outdated."] #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn past_code_hash (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , _1 : & 'a :: core :: primitive :: u32 , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 158u8, 40u8, 107u8, 17u8, 201u8, 114u8, 104u8, 4u8, 50u8, - 4u8, 245u8, 186u8, 104u8, 25u8, 142u8, 118u8, 196u8, - 165u8, 252u8, 88u8, 251u8, 92u8, 41u8, 51u8, 222u8, - 217u8, 213u8, 18u8, 114u8, 245u8, 247u8, 188u8, - ] - { - let entry = PastCodeHash(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn past_code_hash( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + _1: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PastCodeHash", + vec![::subxt::storage::address::StorageMapKey::new( + &(_0, _1), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, + 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, + 36u8, 224u8, 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, + 187u8, 71u8, 94u8, 88u8, 124u8, + ], + ) } #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] #[doc = " became outdated."] #[doc = ""] #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn past_code_hash_iter( + pub fn past_code_hash_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PastCodeHash<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 158u8, 40u8, 107u8, 17u8, 201u8, 114u8, 104u8, 4u8, 50u8, - 4u8, 245u8, 186u8, 104u8, 25u8, 142u8, 118u8, 196u8, - 165u8, 252u8, 88u8, 251u8, 92u8, 41u8, 51u8, 222u8, - 217u8, 213u8, 18u8, 114u8, 245u8, 247u8, 188u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PastCodeHash", + Vec::new(), + [ + 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, + 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, + 36u8, 224u8, 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, + 187u8, 71u8, 94u8, 88u8, 124u8, + ], + ) } #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] pub fn past_code_meta (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: paras :: ParaPastCodeMeta < :: core :: primitive :: u32 > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 121u8, 14u8, 91u8, 135u8, 231u8, 67u8, 189u8, 66u8, - 108u8, 27u8, 241u8, 117u8, 101u8, 34u8, 24u8, 16u8, 52u8, - 198u8, 205u8, 155u8, 138u8, 9u8, 140u8, 207u8, 27u8, - 172u8, 212u8, 217u8, 47u8, 134u8, 122u8, 162u8, - ] - { - let entry = PastCodeMeta(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " to keep it available for secondary checkers."] + pub fn past_code_meta( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< + ::core::primitive::u32, + >, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PastCodeMeta", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, + 17u8, 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, + 245u8, 134u8, 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, + 164u8, 168u8, 72u8, 171u8, 228u8, + ], + ) } #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] #[doc = " to keep it available for secondary checkers."] - pub fn past_code_meta_iter( + pub fn past_code_meta_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PastCodeMeta<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 121u8, 14u8, 91u8, 135u8, 231u8, 67u8, 189u8, 66u8, - 108u8, 27u8, 241u8, 117u8, 101u8, 34u8, 24u8, 16u8, 52u8, - 198u8, 205u8, 155u8, 138u8, 9u8, 140u8, 207u8, 27u8, - 172u8, 212u8, 217u8, 47u8, 134u8, 122u8, 162u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PastCodeMeta", + Vec::new(), + [ + 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, + 17u8, 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, + 245u8, 134u8, 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, + 164u8, 168u8, 72u8, 171u8, 228u8, + ], + ) } #[doc = " Which paras have past code that needs pruning and the relay-chain block at which the code was replaced."] #[doc = " Note that this is the actual height of the included block, not the expected height at which the"] @@ -33812,178 +23560,126 @@ pub mod api { #[doc = " Multiple entries for a single para are permitted. Ordered ascending by block number."] pub fn past_code_pruning( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 142u8, 32u8, 134u8, 51u8, 34u8, 214u8, 75u8, 69u8, 77u8, - 178u8, 103u8, 117u8, 180u8, 105u8, 249u8, 178u8, 143u8, - 25u8, 212u8, 207u8, 28u8, 28u8, 175u8, 193u8, 43u8, 58u8, - 51u8, 149u8, 155u8, 204u8, 37u8, 153u8, - ] - { - let entry = PastCodePruning; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "PastCodePruning", + vec![], + [ + 59u8, 26u8, 175u8, 129u8, 174u8, 27u8, 239u8, 77u8, 38u8, + 130u8, 37u8, 134u8, 62u8, 28u8, 218u8, 176u8, 16u8, 137u8, + 175u8, 90u8, 248u8, 44u8, 248u8, 172u8, 231u8, 6u8, 36u8, + 190u8, 109u8, 237u8, 228u8, 135u8, + ], + ) } #[doc = " The block number at which the planned code change is expected for a para."] #[doc = " The change will be applied after the first parablock for this ID included which executes"] #[doc = " in the context of a relay chain block with a number >= `expected_at`."] pub fn future_code_upgrades( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 211u8, 254u8, 201u8, 63u8, 89u8, 112u8, 57u8, 82u8, - 255u8, 163u8, 49u8, 246u8, 197u8, 154u8, 55u8, 10u8, - 65u8, 188u8, 172u8, 110u8, 194u8, 155u8, 37u8, 44u8, - 250u8, 154u8, 4u8, 184u8, 225u8, 79u8, 248u8, 80u8, - ] - { - let entry = FutureCodeUpgrades(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "FutureCodeUpgrades", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, + 235u8, 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, + 7u8, 8u8, 6u8, 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, + 158u8, 115u8, 172u8, 149u8, + ], + ) } #[doc = " The block number at which the planned code change is expected for a para."] #[doc = " The change will be applied after the first parablock for this ID included which executes"] #[doc = " in the context of a relay chain block with a number >= `expected_at`."] - pub fn future_code_upgrades_iter( + pub fn future_code_upgrades_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, FutureCodeUpgrades<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 211u8, 254u8, 201u8, 63u8, 89u8, 112u8, 57u8, 82u8, - 255u8, 163u8, 49u8, 246u8, 197u8, 154u8, 55u8, 10u8, - 65u8, 188u8, 172u8, 110u8, 194u8, 155u8, 37u8, 44u8, - 250u8, 154u8, 4u8, 184u8, 225u8, 79u8, 248u8, 80u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "FutureCodeUpgrades", + Vec::new(), + [ + 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, + 235u8, 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, + 7u8, 8u8, 6u8, 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, + 158u8, 115u8, 172u8, 149u8, + ], + ) } #[doc = " The actual future code hash of a para."] #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn future_code_hash (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 221u8, 2u8, 237u8, 170u8, 64u8, 60u8, 98u8, 146u8, 135u8, - 69u8, 6u8, 38u8, 2u8, 239u8, 22u8, 94u8, 180u8, 163u8, - 76u8, 137u8, 143u8, 124u8, 5u8, 210u8, 129u8, 207u8, - 78u8, 192u8, 144u8, 39u8, 206u8, 195u8, - ] - { - let entry = FutureCodeHash(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn future_code_hash( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "FutureCodeHash", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, + 171u8, 191u8, 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, + 68u8, 194u8, 122u8, 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, + 53u8, 44u8, 145u8, 244u8, 216u8, + ], + ) } #[doc = " The actual future code hash of a para."] #[doc = ""] #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn future_code_hash_iter( + pub fn future_code_hash_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, FutureCodeHash<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 221u8, 2u8, 237u8, 170u8, 64u8, 60u8, 98u8, 146u8, 135u8, - 69u8, 6u8, 38u8, 2u8, 239u8, 22u8, 94u8, 180u8, 163u8, - 76u8, 137u8, 143u8, 124u8, 5u8, 210u8, 129u8, 207u8, - 78u8, 192u8, 144u8, 39u8, 206u8, 195u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "FutureCodeHash", + Vec::new(), + [ + 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, + 171u8, 191u8, 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, + 68u8, 194u8, 122u8, 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, + 53u8, 44u8, 145u8, 244u8, 216u8, + ], + ) } #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] #[doc = ""] @@ -33996,40 +23692,27 @@ pub mod api { #[doc = " the format will require migration of parachains."] pub fn upgrade_go_ahead_signal( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 100u8, 87u8, 135u8, 185u8, 95u8, 13u8, 74u8, 134u8, 19u8, - 97u8, 80u8, 104u8, 177u8, 30u8, 82u8, 145u8, 171u8, - 250u8, 99u8, 214u8, 26u8, 243u8, 118u8, 118u8, 19u8, - 188u8, 187u8, 142u8, 138u8, 68u8, 54u8, 114u8, - ] - { - let entry = UpgradeGoAheadSignal(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpgradeGoAheadSignal", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, + 41u8, 65u8, 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, + 200u8, 176u8, 222u8, 232u8, 70u8, 50u8, 70u8, 97u8, 61u8, + 249u8, 245u8, 120u8, 98u8, 183u8, + ], + ) } #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] #[doc = ""] @@ -34040,38 +23723,25 @@ pub mod api { #[doc = ""] #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] #[doc = " the format will require migration of parachains."] - pub fn upgrade_go_ahead_signal_iter( + pub fn upgrade_go_ahead_signal_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, UpgradeGoAheadSignal<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 100u8, 87u8, 135u8, 185u8, 95u8, 13u8, 74u8, 134u8, 19u8, - 97u8, 80u8, 104u8, 177u8, 30u8, 82u8, 145u8, 171u8, - 250u8, 99u8, 214u8, 26u8, 243u8, 118u8, 118u8, 19u8, - 188u8, 187u8, 142u8, 138u8, 68u8, 54u8, 114u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpgradeGoAheadSignal", + Vec::new(), + [ + 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, + 41u8, 65u8, 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, + 200u8, 176u8, 222u8, 232u8, 70u8, 50u8, 70u8, 97u8, 61u8, + 249u8, 245u8, 120u8, 98u8, 183u8, + ], + ) } #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] #[doc = " an upgrade for this parachain."] @@ -34084,40 +23754,27 @@ pub mod api { #[doc = " the format will require migration of parachains."] pub fn upgrade_restriction_signal( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::UpgradeRestriction, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 173u8, 198u8, 89u8, 108u8, 43u8, 93u8, 143u8, 224u8, - 141u8, 248u8, 238u8, 221u8, 237u8, 220u8, 140u8, 24u8, - 7u8, 14u8, 136u8, 251u8, 159u8, 190u8, 70u8, 98u8, 100u8, - 118u8, 24u8, 212u8, 82u8, 96u8, 120u8, 206u8, - ] - { - let entry = UpgradeRestrictionSignal(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpgradeRestrictionSignal", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, + 176u8, 255u8, 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, + 35u8, 157u8, 91u8, 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, + 163u8, 45u8, 92u8, 44u8, 11u8, + ], + ) } #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] #[doc = " an upgrade for this parachain."] @@ -34128,78 +23785,51 @@ pub mod api { #[doc = ""] #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] #[doc = " the format will require migration of parachains."] - pub fn upgrade_restriction_signal_iter( + pub fn upgrade_restriction_signal_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, UpgradeRestrictionSignal<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 173u8, 198u8, 89u8, 108u8, 43u8, 93u8, 143u8, 224u8, - 141u8, 248u8, 238u8, 221u8, 237u8, 220u8, 140u8, 24u8, - 7u8, 14u8, 136u8, 251u8, 159u8, 190u8, 70u8, 98u8, 100u8, - 118u8, 24u8, 212u8, 82u8, 96u8, 120u8, 206u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpgradeRestrictionSignal", + Vec::new(), + [ + 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, + 176u8, 255u8, 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, + 35u8, 157u8, 91u8, 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, + 163u8, 45u8, 92u8, 44u8, 11u8, + ], + ) } #[doc = " The list of parachains that are awaiting for their upgrade restriction to cooldown."] #[doc = ""] #[doc = " Ordered ascending by block number."] pub fn upgrade_cooldowns( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 120u8, 214u8, 165u8, 35u8, 125u8, 56u8, 152u8, 76u8, - 124u8, 159u8, 160u8, 93u8, 16u8, 30u8, 208u8, 199u8, - 162u8, 74u8, 124u8, 141u8, 137u8, 237u8, 229u8, 61u8, - 62u8, 71u8, 54u8, 92u8, 243u8, 208u8, 114u8, 19u8, - ] - { - let entry = UpgradeCooldowns; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpgradeCooldowns", + vec![], + [ + 205u8, 236u8, 140u8, 145u8, 241u8, 245u8, 60u8, 68u8, 23u8, + 175u8, 226u8, 174u8, 154u8, 107u8, 243u8, 197u8, 61u8, 218u8, + 7u8, 24u8, 109u8, 221u8, 178u8, 80u8, 242u8, 123u8, 33u8, + 119u8, 5u8, 241u8, 179u8, 13u8, + ], + ) } #[doc = " The list of upcoming code upgrades. Each item is a pair of which para performs a code"] #[doc = " upgrade and at which relay-chain block it is expected at."] @@ -34207,248 +23837,170 @@ pub mod api { #[doc = " Ordered ascending by block number."] pub fn upcoming_upgrades( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 16u8, 74u8, 254u8, 39u8, 241u8, 98u8, 106u8, 203u8, - 189u8, 157u8, 66u8, 99u8, 164u8, 176u8, 20u8, 206u8, - 15u8, 212u8, 229u8, 9u8, 117u8, 214u8, 250u8, 8u8, 51u8, - 80u8, 35u8, 236u8, 120u8, 4u8, 246u8, 62u8, - ] - { - let entry = UpcomingUpgrades; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpcomingUpgrades", + vec![], + [ + 165u8, 112u8, 215u8, 149u8, 125u8, 175u8, 206u8, 195u8, + 214u8, 173u8, 0u8, 144u8, 46u8, 197u8, 55u8, 204u8, 144u8, + 68u8, 158u8, 156u8, 145u8, 230u8, 173u8, 101u8, 255u8, 108u8, + 52u8, 199u8, 142u8, 37u8, 55u8, 32u8, + ], + ) } #[doc = " The actions to perform during the start of a specific session index."] pub fn actions_queue( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 197u8, 76u8, 84u8, 133u8, 3u8, 67u8, 57u8, 107u8, - 31u8, 87u8, 33u8, 196u8, 130u8, 119u8, 93u8, 171u8, - 173u8, 76u8, 242u8, 22u8, 15u8, 133u8, 193u8, 122u8, 0u8, - 112u8, 121u8, 233u8, 29u8, 17u8, 185u8, - ] - { - let entry = ActionsQueue(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "ActionsQueue", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, + 143u8, 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, + 219u8, 184u8, 1u8, 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, + 41u8, 123u8, 16u8, 178u8, 161u8, + ], + ) } #[doc = " The actions to perform during the start of a specific session index."] - pub fn actions_queue_iter( + pub fn actions_queue_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ActionsQueue<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 197u8, 76u8, 84u8, 133u8, 3u8, 67u8, 57u8, 107u8, - 31u8, 87u8, 33u8, 196u8, 130u8, 119u8, 93u8, 171u8, - 173u8, 76u8, 242u8, 22u8, 15u8, 133u8, 193u8, 122u8, 0u8, - 112u8, 121u8, 233u8, 29u8, 17u8, 185u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "ActionsQueue", + Vec::new(), + [ + 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, + 143u8, 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, + 219u8, 184u8, 1u8, 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, + 41u8, 123u8, 16u8, 178u8, 161u8, + ], + ) } #[doc = " Upcoming paras instantiation arguments."] #[doc = ""] #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] pub fn upcoming_paras_genesis (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 98u8, 249u8, 92u8, 177u8, 21u8, 84u8, 199u8, 194u8, - 150u8, 213u8, 143u8, 107u8, 99u8, 194u8, 141u8, 225u8, - 55u8, 94u8, 44u8, 147u8, 209u8, 144u8, 118u8, 66u8, - 139u8, 170u8, 68u8, 62u8, 45u8, 137u8, 91u8, 8u8, - ] - { - let entry = UpcomingParasGenesis(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] + pub fn upcoming_paras_genesis( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpcomingParasGenesis", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 84u8, 41u8, 210u8, 81u8, 237u8, 249u8, 162u8, 208u8, 247u8, + 223u8, 208u8, 201u8, 54u8, 43u8, 222u8, 187u8, 8u8, 116u8, + 184u8, 221u8, 107u8, 243u8, 48u8, 168u8, 108u8, 47u8, 133u8, + 236u8, 184u8, 174u8, 130u8, 145u8, + ], + ) } #[doc = " Upcoming paras instantiation arguments."] #[doc = ""] #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] - pub fn upcoming_paras_genesis_iter( + pub fn upcoming_paras_genesis_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, UpcomingParasGenesis<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 98u8, 249u8, 92u8, 177u8, 21u8, 84u8, 199u8, 194u8, - 150u8, 213u8, 143u8, 107u8, 99u8, 194u8, 141u8, 225u8, - 55u8, 94u8, 44u8, 147u8, 209u8, 144u8, 118u8, 66u8, - 139u8, 170u8, 68u8, 62u8, 45u8, 137u8, 91u8, 8u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "UpcomingParasGenesis", + Vec::new(), + [ + 84u8, 41u8, 210u8, 81u8, 237u8, 249u8, 162u8, 208u8, 247u8, + 223u8, 208u8, 201u8, 54u8, 43u8, 222u8, 187u8, 8u8, 116u8, + 184u8, 221u8, 107u8, 243u8, 48u8, 168u8, 108u8, 47u8, 133u8, + 236u8, 184u8, 174u8, 130u8, 145u8, + ], + ) } #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] pub fn code_by_hash_refs( &self, - _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 194u8, 100u8, 213u8, 115u8, 143u8, 181u8, 255u8, 227u8, - 232u8, 163u8, 209u8, 99u8, 2u8, 138u8, 118u8, 169u8, - 210u8, 202u8, 190u8, 194u8, 221u8, 145u8, 171u8, 78u8, - 212u8, 17u8, 245u8, 107u8, 99u8, 5u8, 54u8, 118u8, - ] - { - let entry = CodeByHashRefs(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0 : & runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "CodeByHashRefs", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, + 121u8, 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, + 239u8, 236u8, 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, + 160u8, 143u8, 88u8, 168u8, + ], + ) } #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] - pub fn code_by_hash_refs_iter( + pub fn code_by_hash_refs_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, CodeByHashRefs<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 194u8, 100u8, 213u8, 115u8, 143u8, 181u8, 255u8, 227u8, - 232u8, 163u8, 209u8, 99u8, 2u8, 138u8, 118u8, 169u8, - 210u8, 202u8, 190u8, 194u8, 221u8, 145u8, 171u8, 78u8, - 212u8, 17u8, 245u8, 107u8, 99u8, 5u8, 54u8, 118u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "CodeByHashRefs", + Vec::new(), + [ + 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, + 121u8, 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, + 239u8, 236u8, 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, + 160u8, 143u8, 88u8, 168u8, + ], + ) } #[doc = " Validation code stored by its hash."] #[doc = ""] @@ -34456,220 +24008,127 @@ pub mod api { #[doc = " [`PastCodeHash`]."] pub fn code_by_hash( &self, - _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 41u8, 242u8, 100u8, 156u8, 32u8, 20u8, 72u8, 228u8, - 143u8, 3u8, 169u8, 169u8, 27u8, 111u8, 119u8, 135u8, - 155u8, 17u8, 222u8, 146u8, 43u8, 243u8, 2u8, 32u8, 102u8, - 143u8, 143u8, 55u8, 191u8, 129u8, 128u8, 35u8, - ] - { - let entry = CodeByHash(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0 : & runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCode, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "CodeByHash", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, + 3u8, 6u8, 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, + 173u8, 119u8, 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, + 73u8, 15u8, 210u8, 226u8, + ], + ) } #[doc = " Validation code stored by its hash."] #[doc = ""] #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] #[doc = " [`PastCodeHash`]."] - pub fn code_by_hash_iter( + pub fn code_by_hash_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, CodeByHash<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 41u8, 242u8, 100u8, 156u8, 32u8, 20u8, 72u8, 228u8, - 143u8, 3u8, 169u8, 169u8, 27u8, 111u8, 119u8, 135u8, - 155u8, 17u8, 222u8, 146u8, 43u8, 243u8, 2u8, 32u8, 102u8, - 143u8, 143u8, 55u8, 191u8, 129u8, 128u8, 35u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::ValidationCode, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Paras", + "CodeByHash", + Vec::new(), + [ + 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, + 3u8, 6u8, 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, + 173u8, 119u8, 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, + 73u8, 15u8, 210u8, 226u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { pub fn unsigned_priority( &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Paras", "UnsignedPriority")? - == [ - 78u8, 226u8, 84u8, 70u8, 162u8, 23u8, 167u8, 100u8, 156u8, - 228u8, 119u8, 16u8, 28u8, 202u8, 21u8, 71u8, 72u8, 244u8, - 3u8, 255u8, 243u8, 55u8, 109u8, 238u8, 26u8, 180u8, 207u8, - 175u8, 221u8, 27u8, 213u8, 217u8, - ] - { - let pallet = metadata.pallet("Paras")?; - let constant = pallet.constant("UnsignedPriority")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Paras", + "UnsignedPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + ], + ) } } } } pub mod initializer { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct ForceApprove { pub up_to: ::core::primitive::u32, } - impl ::subxt::Call for ForceApprove { - const PALLET: &'static str = "Initializer"; - const FUNCTION: &'static str = "force_approve"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] #[doc = "chain are valid and should be finalized."] pub fn force_approve( &self, up_to: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceApprove, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 61u8, 29u8, 75u8, 222u8, 82u8, 250u8, 124u8, 164u8, 70u8, - 114u8, 150u8, 28u8, 103u8, 53u8, 185u8, 147u8, 168u8, 239u8, - 207u8, 197u8, 23u8, 158u8, 16u8, 255u8, 139u8, 18u8, 214u8, - 174u8, 53u8, 191u8, 49u8, 73u8, - ] - { - let call = ForceApprove { up_to }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Initializer", + call: "force_approve", + data: ForceApprove { up_to }, + }, + [ + 28u8, 117u8, 86u8, 182u8, 19u8, 127u8, 43u8, 17u8, 153u8, + 80u8, 193u8, 53u8, 120u8, 41u8, 205u8, 23u8, 252u8, 148u8, + 77u8, 227u8, 138u8, 35u8, 182u8, 122u8, 112u8, 232u8, 246u8, + 69u8, 173u8, 97u8, 42u8, 103u8, + ], + ) } } } pub mod storage { use super::runtime_types; - pub struct HasInitialized; - impl ::subxt::StorageEntry for HasInitialized { - const PALLET: &'static str = "Initializer"; - const STORAGE: &'static str = "HasInitialized"; - type Value = (); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct BufferedSessionChanges; - impl ::subxt::StorageEntry for BufferedSessionChanges { - const PALLET: &'static str = "Initializer"; - const STORAGE: &'static str = "BufferedSessionChanges"; - type Value = :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Whether the parachains modules have been initialized within this block."] #[doc = ""] #[doc = " Semantically a `bool`, but this guarantees it should never hit the trie,"] @@ -34680,37 +24139,19 @@ pub mod api { #[doc = " the semantics of this variable."] pub fn has_initialized( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<()>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 251u8, 135u8, 247u8, 61u8, 139u8, 102u8, 12u8, 122u8, - 227u8, 123u8, 11u8, 232u8, 120u8, 80u8, 81u8, 48u8, - 216u8, 115u8, 159u8, 131u8, 133u8, 105u8, 200u8, 122u8, - 114u8, 6u8, 109u8, 4u8, 164u8, 204u8, 214u8, 111u8, - ] - { - let entry = HasInitialized; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress<'static, (), (), ()> + { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Initializer", + "HasInitialized", + vec![], + [ + 251u8, 135u8, 247u8, 61u8, 139u8, 102u8, 12u8, 122u8, 227u8, + 123u8, 11u8, 232u8, 120u8, 80u8, 81u8, 48u8, 216u8, 115u8, + 159u8, 131u8, 133u8, 105u8, 200u8, 122u8, 114u8, 6u8, 109u8, + 4u8, 164u8, 204u8, 214u8, 111u8, + ], + ) } #[doc = " Buffered session changes along with the block number at which they should be applied."] #[doc = ""] @@ -34718,164 +24159,90 @@ pub mod api { #[doc = " the storage."] #[doc = ""] #[doc = " However this is a `Vec` regardless to handle various edge cases that may occur at runtime"] - #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 79u8, 184u8, 104u8, 7u8, 11u8, 216u8, 205u8, 95u8, 155u8, - 51u8, 17u8, 160u8, 239u8, 14u8, 38u8, 99u8, 206u8, 87u8, - 87u8, 67u8, 207u8, 142u8, 1u8, 159u8, 54u8, 36u8, 194u8, - 77u8, 86u8, 124u8, 164u8, 251u8, - ] - { - let entry = BufferedSessionChanges; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Initializer", + "BufferedSessionChanges", + vec![], + [ + 176u8, 60u8, 165u8, 138u8, 99u8, 140u8, 22u8, 169u8, 121u8, + 65u8, 203u8, 85u8, 39u8, 198u8, 91u8, 167u8, 118u8, 49u8, + 129u8, 128u8, 171u8, 232u8, 249u8, 39u8, 6u8, 101u8, 57u8, + 193u8, 85u8, 143u8, 105u8, 29u8, + ], + ) } } } } pub mod dmp { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - } + pub struct TransactionApi; + impl TransactionApi {} } pub mod storage { use super::runtime_types; - pub struct DownwardMessageQueues<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for DownwardMessageQueues<'_> { - const PALLET: &'static str = "Dmp"; - const STORAGE: &'static str = "DownwardMessageQueues"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, + pub struct StorageApi; + impl StorageApi { + #[doc = " The downward messages addressed for a certain para."] + pub fn downward_message_queues( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct DownwardMessageQueueHeads<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for DownwardMessageQueueHeads<'_> { - const PALLET: &'static str = "Dmp"; - const STORAGE: &'static str = "DownwardMessageQueueHeads"; - type Value = ::subxt::sp_core::H256; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - #[doc = " The downward messages addressed for a certain para."] pub fn downward_message_queues (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_core_primitives :: InboundDownwardMessage < :: core :: primitive :: u32 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 104u8, 117u8, 177u8, 125u8, 208u8, 212u8, 216u8, 171u8, - 212u8, 235u8, 43u8, 255u8, 146u8, 230u8, 243u8, 27u8, - 133u8, 109u8, 129u8, 162u8, 247u8, 23u8, 195u8, 9u8, - 219u8, 235u8, 119u8, 220u8, 179u8, 198u8, 130u8, 4u8, - ] - { - let entry = DownwardMessageQueues(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Dmp", + "DownwardMessageQueues", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, + 238u8, 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, + 53u8, 117u8, 148u8, 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, + 88u8, 94u8, 40u8, 18u8, 31u8, + ], + ) } #[doc = " The downward messages addressed for a certain para."] - pub fn downward_message_queues_iter( + pub fn downward_message_queues_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, DownwardMessageQueues<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 104u8, 117u8, 177u8, 125u8, 208u8, 212u8, 216u8, 171u8, - 212u8, 235u8, 43u8, 255u8, 146u8, 230u8, 243u8, 27u8, - 133u8, 109u8, 129u8, 162u8, 247u8, 23u8, 195u8, 9u8, - 219u8, 235u8, 119u8, 220u8, 179u8, 198u8, 130u8, 4u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Dmp", + "DownwardMessageQueues", + Vec::new(), + [ + 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, + 238u8, 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, + 53u8, 117u8, 148u8, 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, + 88u8, 94u8, 40u8, 18u8, 31u8, + ], + ) } #[doc = " A mapping that stores the downward message queue MQC head for each para."] #[doc = ""] @@ -34886,38 +24253,27 @@ pub mod api { #[doc = " - `H(M)`: is the hash of the message being appended."] pub fn downward_message_queue_heads( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::sp_core::H256, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 88u8, 45u8, 62u8, 250u8, 186u8, 97u8, 121u8, 56u8, 136u8, - 216u8, 73u8, 65u8, 253u8, 81u8, 94u8, 162u8, 132u8, - 217u8, 78u8, 126u8, 179u8, 188u8, 167u8, 220u8, 184u8, - 217u8, 138u8, 244u8, 98u8, 158u8, 25u8, 118u8, - ] - { - let entry = DownwardMessageQueueHeads(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::H256, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Dmp", + "DownwardMessageQueueHeads", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, + 134u8, 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, + 38u8, 245u8, 176u8, 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, + 207u8, 163u8, 104u8, 103u8, 38u8, + ], + ) } #[doc = " A mapping that stores the downward message queue MQC head for each para."] #[doc = ""] @@ -34926,78 +24282,48 @@ pub mod api { #[doc = " - `prev_head`: is the previous head hash or zero if none."] #[doc = " - `B`: is the relay-chain block number in which a message was appended."] #[doc = " - `H(M)`: is the hash of the message being appended."] - pub fn downward_message_queue_heads_iter( + pub fn downward_message_queue_heads_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, DownwardMessageQueueHeads<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 88u8, 45u8, 62u8, 250u8, 186u8, 97u8, 121u8, 56u8, 136u8, - 216u8, 73u8, 65u8, 253u8, 81u8, 94u8, 162u8, 132u8, - 217u8, 78u8, 126u8, 179u8, 188u8, 167u8, 220u8, 184u8, - 217u8, 138u8, 244u8, 98u8, 158u8, 25u8, 118u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::subxt::ext::sp_core::H256, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Dmp", + "DownwardMessageQueueHeads", + Vec::new(), + [ + 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, + 134u8, 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, + 38u8, 245u8, 176u8, 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, + 207u8, 163u8, 104u8, 103u8, 38u8, + ], + ) } } } } pub mod ump { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ServiceOverweight { pub index: ::core::primitive::u64, pub weight_limit: ::core::primitive::u64, } - impl ::subxt::Call for ServiceOverweight { - const PALLET: &'static str = "Ump"; - const FUNCTION: &'static str = "service_overweight"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Service a single overweight upward message."] #[doc = ""] #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] @@ -35014,38 +24340,26 @@ pub mod api { &self, index: ::core::primitive::u64, weight_limit: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ServiceOverweight, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 229u8, 167u8, 106u8, 63u8, 141u8, 80u8, 8u8, 201u8, 156u8, - 34u8, 47u8, 104u8, 116u8, 57u8, 35u8, 216u8, 132u8, 3u8, - 201u8, 169u8, 38u8, 107u8, 149u8, 120u8, 42u8, 130u8, 100u8, - 133u8, 214u8, 48u8, 99u8, 146u8, - ] - { - let call = ServiceOverweight { - index, - weight_limit, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Ump", + call: "service_overweight", + data: ServiceOverweight { + index, + weight_limit, + }, + }, + [ + 225u8, 41u8, 132u8, 91u8, 28u8, 116u8, 89u8, 197u8, 194u8, + 131u8, 28u8, 217u8, 102u8, 241u8, 122u8, 230u8, 242u8, 75u8, + 83u8, 67u8, 104u8, 55u8, 133u8, 129u8, 91u8, 25u8, 185u8, + 131u8, 22u8, 253u8, 84u8, 221u8, + ], + ) } } } @@ -35053,34 +24367,50 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_parachains::ump::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Upward message is invalid XCM."] #[doc = "\\[ id \\]"] pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); - impl ::subxt::Event for InvalidFormat { + impl ::subxt::events::StaticEvent for InvalidFormat { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "InvalidFormat"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Upward message is unsupported version of XCM."] #[doc = "\\[ id \\]"] pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); - impl ::subxt::Event for UnsupportedVersion { + impl ::subxt::events::StaticEvent for UnsupportedVersion { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "UnsupportedVersion"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Upward message executed with the given outcome."] #[doc = "\\[ id, outcome \\]"] pub struct ExecutedUpward( pub [::core::primitive::u8; 32usize], pub runtime_types::xcm::v2::traits::Outcome, ); - impl ::subxt::Event for ExecutedUpward { + impl ::subxt::events::StaticEvent for ExecutedUpward { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "ExecutedUpward"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The weight limit for handling upward messages was reached."] #[doc = "\\[ id, remaining, required \\]"] pub struct WeightExhausted( @@ -35088,11 +24418,15 @@ pub mod api { pub ::core::primitive::u64, pub ::core::primitive::u64, ); - impl ::subxt::Event for WeightExhausted { + impl ::subxt::events::StaticEvent for WeightExhausted { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "WeightExhausted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some upward messages have been received and will be processed."] #[doc = "\\[ para, count, size \\]"] pub struct UpwardMessagesReceived( @@ -35100,11 +24434,15 @@ pub mod api { pub ::core::primitive::u32, pub ::core::primitive::u32, ); - impl ::subxt::Event for UpwardMessagesReceived { + impl ::subxt::events::StaticEvent for UpwardMessagesReceived { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "UpwardMessagesReceived"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The weight budget was exceeded for an individual upward message."] #[doc = ""] #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] @@ -35117,11 +24455,15 @@ pub mod api { pub ::core::primitive::u64, pub ::core::primitive::u64, ); - impl ::subxt::Event for OverweightEnqueued { + impl ::subxt::events::StaticEvent for OverweightEnqueued { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "OverweightEnqueued"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Upward message from the overweight queue was executed with the given actual weight"] #[doc = "used."] #[doc = ""] @@ -35130,91 +24472,15 @@ pub mod api { pub ::core::primitive::u64, pub ::core::primitive::u64, ); - impl ::subxt::Event for OverweightServiced { + impl ::subxt::events::StaticEvent for OverweightServiced { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "OverweightServiced"; } } pub mod storage { use super::runtime_types; - pub struct RelayDispatchQueues<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for RelayDispatchQueues<'_> { - const PALLET: &'static str = "Ump"; - const STORAGE: &'static str = "RelayDispatchQueues"; - type Value = ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct RelayDispatchQueueSize<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for RelayDispatchQueueSize<'_> { - const PALLET: &'static str = "Ump"; - const STORAGE: &'static str = "RelayDispatchQueueSize"; - type Value = (::core::primitive::u32, ::core::primitive::u32); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct NeedsDispatch; - impl ::subxt::StorageEntry for NeedsDispatch { - const PALLET: &'static str = "Ump"; - const STORAGE: &'static str = "NeedsDispatch"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextDispatchRoundStartWith; - impl ::subxt::StorageEntry for NextDispatchRoundStartWith { - const PALLET: &'static str = "Ump"; - const STORAGE: &'static str = "NextDispatchRoundStartWith"; - type Value = runtime_types::polkadot_parachain::primitives::Id; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Overweight<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for Overweight<'_> { - const PALLET: &'static str = "Ump"; - const STORAGE: &'static str = "Overweight"; - type Value = ( - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct OverweightCount; - impl ::subxt::StorageEntry for OverweightCount { - const PALLET: &'static str = "Ump"; - const STORAGE: &'static str = "OverweightCount"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] #[doc = ""] #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] @@ -35223,38 +24489,27 @@ pub mod api { #[doc = " The messages are processed in FIFO order."] pub fn relay_dispatch_queues( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 48u8, 215u8, 37u8, 42u8, 115u8, 27u8, 8u8, 249u8, - 65u8, 47u8, 61u8, 96u8, 1u8, 196u8, 143u8, 53u8, 7u8, - 241u8, 126u8, 4u8, 242u8, 42u8, 171u8, 66u8, 162u8, - 203u8, 200u8, 239u8, 50u8, 87u8, 72u8, - ] - { - let entry = RelayDispatchQueues(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "RelayDispatchQueues", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, + 9u8, 62u8, 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, + 90u8, 24u8, 192u8, 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, + 191u8, 144u8, 14u8, 3u8, 141u8, + ], + ) } #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] #[doc = ""] @@ -35262,38 +24517,25 @@ pub mod api { #[doc = " channel management messages."] #[doc = ""] #[doc = " The messages are processed in FIFO order."] - pub fn relay_dispatch_queues_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayDispatchQueues<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 22u8, 48u8, 215u8, 37u8, 42u8, 115u8, 27u8, 8u8, 249u8, - 65u8, 47u8, 61u8, 96u8, 1u8, 196u8, 143u8, 53u8, 7u8, - 241u8, 126u8, 4u8, 242u8, 42u8, 171u8, 66u8, 162u8, - 203u8, 200u8, 239u8, 50u8, 87u8, 72u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + pub fn relay_dispatch_queues_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "RelayDispatchQueues", + Vec::new(), + [ + 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, + 9u8, 62u8, 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, + 90u8, 24u8, 192u8, 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, + 191u8, 144u8, 14u8, 3u8, 141u8, + ], + ) } #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] #[doc = ""] @@ -35308,38 +24550,27 @@ pub mod api { #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] pub fn relay_dispatch_queue_size( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 8u8, 0u8, 54u8, 33u8, 185u8, 112u8, 21u8, 174u8, 15u8, - 147u8, 134u8, 184u8, 108u8, 144u8, 55u8, 138u8, 24u8, - 66u8, 255u8, 197u8, 131u8, 229u8, 35u8, 107u8, 251u8, - 226u8, 78u8, 218u8, 41u8, 251u8, 155u8, 79u8, - ] - { - let entry = RelayDispatchQueueSize(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "RelayDispatchQueueSize", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, + 219u8, 151u8, 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, + 84u8, 163u8, 71u8, 254u8, 19u8, 47u8, 174u8, 63u8, 200u8, + 173u8, 86u8, 199u8, 207u8, 138u8, + ], + ) } #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] #[doc = ""] @@ -35349,41 +24580,28 @@ pub mod api { #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] #[doc = " loading the whole message queue if only the total size and count are required."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] - pub fn relay_dispatch_queue_size_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayDispatchQueueSize<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 8u8, 0u8, 54u8, 33u8, 185u8, 112u8, 21u8, 174u8, 15u8, - 147u8, 134u8, 184u8, 108u8, 144u8, 55u8, 138u8, 24u8, - 66u8, 255u8, 197u8, 131u8, 229u8, 35u8, 107u8, 251u8, - 226u8, 78u8, 218u8, 41u8, 251u8, 155u8, 79u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] + pub fn relay_dispatch_queue_size_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "RelayDispatchQueueSize", + Vec::new(), + [ + 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, + 219u8, 151u8, 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, + 84u8, 163u8, 71u8, 254u8, 19u8, 47u8, 174u8, 63u8, 200u8, + 173u8, 86u8, 199u8, 207u8, 138u8, + ], + ) } #[doc = " The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry."] #[doc = ""] @@ -35392,39 +24610,23 @@ pub mod api { #[doc = " `RelayDispatchQueues` and `RelayDispatchQueueSize`."] pub fn needs_dispatch( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 75u8, 38u8, 232u8, 83u8, 71u8, 101u8, 248u8, 170u8, 5u8, - 32u8, 209u8, 97u8, 190u8, 31u8, 241u8, 1u8, 98u8, 87u8, - 64u8, 208u8, 26u8, 100u8, 93u8, 79u8, 61u8, 114u8, 11u8, - 172u8, 112u8, 164u8, 171u8, 237u8, - ] - { - let entry = NeedsDispatch; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "NeedsDispatch", + vec![], + [ + 176u8, 94u8, 152u8, 112u8, 46u8, 124u8, 89u8, 29u8, 92u8, + 104u8, 192u8, 58u8, 59u8, 186u8, 81u8, 150u8, 157u8, 61u8, + 235u8, 182u8, 222u8, 127u8, 109u8, 11u8, 104u8, 175u8, 141u8, + 219u8, 15u8, 152u8, 255u8, 40u8, + ], + ) } #[doc = " This is the para that gets will get dispatched first during the next upward dispatchable queue"] #[doc = " execution round."] @@ -35433,256 +24635,180 @@ pub mod api { #[doc = " - If `Some(para)`, then `para` must be present in `NeedsDispatch`."] pub fn next_dispatch_round_start_with( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 102u8, 165u8, 118u8, 140u8, 84u8, 122u8, 91u8, 169u8, - 232u8, 125u8, 52u8, 228u8, 15u8, 228u8, 91u8, 79u8, - 218u8, 62u8, 93u8, 42u8, 204u8, 6u8, 34u8, 185u8, 218u8, - 150u8, 7u8, 250u8, 79u8, 142u8, 211u8, 0u8, - ] - { - let entry = NextDispatchRoundStartWith; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::Id, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "NextDispatchRoundStartWith", + vec![], + [ + 157u8, 221u8, 6u8, 175u8, 61u8, 99u8, 250u8, 30u8, 177u8, + 53u8, 37u8, 191u8, 138u8, 65u8, 251u8, 216u8, 37u8, 84u8, + 246u8, 76u8, 8u8, 29u8, 18u8, 253u8, 143u8, 75u8, 129u8, + 141u8, 48u8, 178u8, 135u8, 197u8, + ], + ) } #[doc = " The messages that exceeded max individual message weight budget."] #[doc = ""] #[doc = " These messages stay there until manually dispatched."] pub fn overweight( &self, - _0: &'a ::core::primitive::u64, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 223u8, 155u8, 1u8, 100u8, 77u8, 13u8, 92u8, 235u8, 64u8, - 30u8, 199u8, 178u8, 149u8, 66u8, 155u8, 201u8, 84u8, - 26u8, 81u8, 183u8, 0u8, 113u8, 182u8, 37u8, 69u8, 66u8, - 240u8, 151u8, 254u8, 249u8, 134u8, 51u8, - ] - { - let entry = Overweight(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u64, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec<::core::primitive::u8>, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "Overweight", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, + 42u8, 110u8, 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, + 114u8, 3u8, 232u8, 132u8, 32u8, 201u8, 13u8, 213u8, 175u8, + 236u8, 111u8, 87u8, 146u8, 212u8, + ], + ) } #[doc = " The messages that exceeded max individual message weight budget."] #[doc = ""] #[doc = " These messages stay there until manually dispatched."] - pub fn overweight_iter( + pub fn overweight_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Overweight<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 223u8, 155u8, 1u8, 100u8, 77u8, 13u8, 92u8, 235u8, 64u8, - 30u8, 199u8, 178u8, 149u8, 66u8, 155u8, 201u8, 84u8, - 26u8, 81u8, 183u8, 0u8, 113u8, 182u8, 37u8, 69u8, 66u8, - 240u8, 151u8, 254u8, 249u8, 134u8, 51u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec<::core::primitive::u8>, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "Overweight", + Vec::new(), + [ + 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, + 42u8, 110u8, 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, + 114u8, 3u8, 232u8, 132u8, 32u8, 201u8, 13u8, 213u8, 175u8, + 236u8, 111u8, 87u8, 146u8, 212u8, + ], + ) } #[doc = " The number of overweight messages ever recorded in `Overweight` (and thus the lowest free"] #[doc = " index)."] pub fn overweight_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u64, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, - 97u8, 116u8, 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, - 46u8, 150u8, 126u8, 89u8, 64u8, 233u8, 166u8, 180u8, - 137u8, 52u8, 233u8, 252u8, 255u8, 36u8, 20u8, - ] - { - let entry = OverweightCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Ump", + "OverweightCount", + vec![], + [ + 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, 97u8, + 116u8, 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, 46u8, + 150u8, 126u8, 89u8, 64u8, 233u8, 166u8, 180u8, 137u8, 52u8, + 233u8, 252u8, 255u8, 36u8, 20u8, + ], + ) } } } } pub mod hrmp { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct HrmpInitOpenChannel { pub recipient: runtime_types::polkadot_parachain::primitives::Id, pub proposed_max_capacity: ::core::primitive::u32, pub proposed_max_message_size: ::core::primitive::u32, } - impl ::subxt::Call for HrmpInitOpenChannel { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "hrmp_init_open_channel"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct HrmpAcceptOpenChannel { pub sender: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for HrmpAcceptOpenChannel { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "hrmp_accept_open_channel"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct HrmpCloseChannel { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, } - impl ::subxt::Call for HrmpCloseChannel { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "hrmp_close_channel"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceCleanHrmp { pub para: runtime_types::polkadot_parachain::primitives::Id, pub inbound: ::core::primitive::u32, pub outbound: ::core::primitive::u32, } - impl ::subxt::Call for ForceCleanHrmp { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "force_clean_hrmp"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct ForceProcessHrmpOpen { pub channels: ::core::primitive::u32, } - impl ::subxt::Call for ForceProcessHrmpOpen { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "force_process_hrmp_open"; - } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct ForceProcessHrmpClose { pub channels: ::core::primitive::u32, } - impl ::subxt::Call for ForceProcessHrmpClose { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "force_process_hrmp_close"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct HrmpCancelOpenRequest { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, pub open_requests: ::core::primitive::u32, } - impl ::subxt::Call for HrmpCancelOpenRequest { - const PALLET: &'static str = "Hrmp"; - const FUNCTION: &'static str = "hrmp_cancel_open_request"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] #[doc = "parameters."] #[doc = ""] @@ -35698,39 +24824,27 @@ pub mod api { recipient: runtime_types::polkadot_parachain::primitives::Id, proposed_max_capacity: ::core::primitive::u32, proposed_max_message_size: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - HrmpInitOpenChannel, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 244u8, 142u8, 161u8, 144u8, 109u8, 104u8, 164u8, 198u8, - 201u8, 79u8, 178u8, 136u8, 107u8, 104u8, 83u8, 11u8, 167u8, - 164u8, 223u8, 147u8, 135u8, 35u8, 133u8, 176u8, 236u8, 112u8, - 107u8, 131u8, 184u8, 105u8, 174u8, 12u8, - ] - { - let call = HrmpInitOpenChannel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "hrmp_init_open_channel", + data: HrmpInitOpenChannel { + recipient, + proposed_max_capacity, + proposed_max_message_size, + }, + }, + [ + 170u8, 72u8, 58u8, 42u8, 38u8, 11u8, 110u8, 229u8, 239u8, + 136u8, 99u8, 230u8, 223u8, 225u8, 126u8, 61u8, 234u8, 185u8, + 101u8, 156u8, 40u8, 102u8, 253u8, 123u8, 77u8, 204u8, 217u8, + 86u8, 162u8, 66u8, 25u8, 214u8, + ], + ) } #[doc = "Accept a pending open channel request from the given sender."] #[doc = ""] @@ -35738,35 +24852,23 @@ pub mod api { pub fn hrmp_accept_open_channel( &self, sender: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - HrmpAcceptOpenChannel, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 95u8, 196u8, 155u8, 220u8, 235u8, 120u8, 67u8, 247u8, 245u8, - 20u8, 162u8, 41u8, 4u8, 204u8, 125u8, 16u8, 224u8, 72u8, - 198u8, 237u8, 84u8, 46u8, 201u8, 17u8, 172u8, 55u8, 115u8, - 51u8, 16u8, 140u8, 4u8, 253u8, - ] - { - let call = HrmpAcceptOpenChannel { sender }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "hrmp_accept_open_channel", + data: HrmpAcceptOpenChannel { sender }, + }, + [ + 75u8, 111u8, 52u8, 164u8, 204u8, 100u8, 204u8, 111u8, 127u8, + 84u8, 60u8, 136u8, 95u8, 255u8, 48u8, 157u8, 189u8, 76u8, + 33u8, 177u8, 223u8, 27u8, 74u8, 221u8, 139u8, 1u8, 12u8, + 128u8, 242u8, 7u8, 3u8, 53u8, + ], + ) } #[doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] #[doc = "recipient in the channel being closed."] @@ -35775,35 +24877,23 @@ pub mod api { pub fn hrmp_close_channel( &self, channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - HrmpCloseChannel, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 199u8, 9u8, 55u8, 184u8, 196u8, 45u8, 46u8, 251u8, 48u8, - 23u8, 132u8, 74u8, 188u8, 121u8, 41u8, 18u8, 71u8, 65u8, - 129u8, 14u8, 38u8, 48u8, 253u8, 119u8, 171u8, 202u8, 9u8, - 65u8, 250u8, 98u8, 185u8, 220u8, - ] - { - let call = HrmpCloseChannel { channel_id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "hrmp_close_channel", + data: HrmpCloseChannel { channel_id }, + }, + [ + 11u8, 202u8, 76u8, 107u8, 213u8, 21u8, 191u8, 190u8, 40u8, + 229u8, 60u8, 115u8, 232u8, 136u8, 41u8, 114u8, 21u8, 19u8, + 238u8, 236u8, 202u8, 56u8, 212u8, 232u8, 34u8, 84u8, 27u8, + 70u8, 176u8, 252u8, 218u8, 52u8, + ], + ) } #[doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] #[doc = "a para may have. Normally this happens once per session, but this allows"] @@ -35817,39 +24907,27 @@ pub mod api { para: runtime_types::polkadot_parachain::primitives::Id, inbound: ::core::primitive::u32, outbound: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceCleanHrmp, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 182u8, 231u8, 99u8, 129u8, 130u8, 109u8, 97u8, 108u8, 37u8, - 107u8, 203u8, 70u8, 133u8, 106u8, 226u8, 77u8, 110u8, 189u8, - 227u8, 26u8, 129u8, 189u8, 234u8, 215u8, 112u8, 22u8, 127u8, - 185u8, 152u8, 157u8, 14u8, 66u8, - ] - { - let call = ForceCleanHrmp { - para, - inbound, - outbound, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "force_clean_hrmp", + data: ForceCleanHrmp { + para, + inbound, + outbound, + }, + }, + [ + 171u8, 109u8, 147u8, 49u8, 163u8, 107u8, 36u8, 169u8, 117u8, + 193u8, 231u8, 114u8, 207u8, 38u8, 240u8, 195u8, 155u8, 222u8, + 244u8, 142u8, 93u8, 79u8, 111u8, 43u8, 5u8, 33u8, 190u8, + 30u8, 200u8, 225u8, 173u8, 64u8, + ], + ) } #[doc = "Force process HRMP open channel requests."] #[doc = ""] @@ -35860,35 +24938,23 @@ pub mod api { pub fn force_process_hrmp_open( &self, channels: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceProcessHrmpOpen, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 162u8, 53u8, 194u8, 175u8, 117u8, 32u8, 217u8, 177u8, 9u8, - 255u8, 88u8, 40u8, 8u8, 174u8, 8u8, 11u8, 26u8, 82u8, 213u8, - 40u8, 20u8, 89u8, 227u8, 209u8, 95u8, 162u8, 221u8, 97u8, - 230u8, 98u8, 110u8, 85u8, - ] - { - let call = ForceProcessHrmpOpen { channels }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "force_process_hrmp_open", + data: ForceProcessHrmpOpen { channels }, + }, + [ + 231u8, 80u8, 233u8, 15u8, 131u8, 167u8, 223u8, 28u8, 182u8, + 185u8, 213u8, 24u8, 154u8, 160u8, 68u8, 94u8, 160u8, 59u8, + 78u8, 85u8, 85u8, 149u8, 130u8, 131u8, 9u8, 162u8, 169u8, + 119u8, 165u8, 44u8, 150u8, 50u8, + ], + ) } #[doc = "Force process HRMP close channel requests."] #[doc = ""] @@ -35899,35 +24965,23 @@ pub mod api { pub fn force_process_hrmp_close( &self, channels: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceProcessHrmpClose, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 128u8, 141u8, 191u8, 255u8, 204u8, 137u8, 27u8, 170u8, 180u8, - 166u8, 93u8, 144u8, 70u8, 56u8, 132u8, 100u8, 5u8, 114u8, - 252u8, 163u8, 164u8, 246u8, 234u8, 152u8, 193u8, 79u8, 89u8, - 137u8, 46u8, 171u8, 32u8, 119u8, - ] - { - let call = ForceProcessHrmpClose { channels }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "force_process_hrmp_close", + data: ForceProcessHrmpClose { channels }, + }, + [ + 248u8, 138u8, 30u8, 151u8, 53u8, 16u8, 44u8, 116u8, 51u8, + 194u8, 173u8, 252u8, 143u8, 53u8, 184u8, 129u8, 80u8, 80u8, + 25u8, 118u8, 47u8, 183u8, 249u8, 130u8, 8u8, 221u8, 56u8, + 106u8, 182u8, 114u8, 186u8, 161u8, + ], + ) } #[doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] #[doc = "or the recipient for that request. The origin must be either of those."] @@ -35941,38 +24995,26 @@ pub mod api { &self, channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, open_requests: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - HrmpCancelOpenRequest, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 8u8, 83u8, 32u8, 187u8, 220u8, 1u8, 212u8, 226u8, 72u8, 61u8, - 110u8, 211u8, 238u8, 119u8, 95u8, 48u8, 150u8, 51u8, 177u8, - 182u8, 209u8, 174u8, 245u8, 25u8, 194u8, 199u8, 212u8, 131u8, - 77u8, 72u8, 9u8, 120u8, - ] - { - let call = HrmpCancelOpenRequest { - channel_id, - open_requests, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Hrmp", + call: "hrmp_cancel_open_request", + data: HrmpCancelOpenRequest { + channel_id, + open_requests, + }, + }, + [ + 136u8, 217u8, 56u8, 138u8, 227u8, 37u8, 120u8, 83u8, 116u8, + 228u8, 42u8, 111u8, 206u8, 210u8, 177u8, 235u8, 225u8, 98u8, + 172u8, 184u8, 87u8, 65u8, 77u8, 129u8, 7u8, 0u8, 232u8, + 139u8, 134u8, 1u8, 59u8, 19u8, + ], + ) } } } @@ -35980,7 +25022,11 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Open HRMP channel requested."] #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] pub struct OpenChannelRequested( @@ -35989,480 +25035,218 @@ pub mod api { pub ::core::primitive::u32, pub ::core::primitive::u32, ); - impl ::subxt::Event for OpenChannelRequested { + impl ::subxt::events::StaticEvent for OpenChannelRequested { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "OpenChannelRequested"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An HRMP channel request sent by the receiver was canceled by either party."] #[doc = "`[by_parachain, channel_id]`"] pub struct OpenChannelCanceled( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, ); - impl ::subxt::Event for OpenChannelCanceled { + impl ::subxt::events::StaticEvent for OpenChannelCanceled { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "OpenChannelCanceled"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Open HRMP channel accepted. `[sender, recipient]`"] pub struct OpenChannelAccepted( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::Id, ); - impl ::subxt::Event for OpenChannelAccepted { + impl ::subxt::events::StaticEvent for OpenChannelAccepted { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "OpenChannelAccepted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "HRMP channel closed. `[by_parachain, channel_id]`"] pub struct ChannelClosed( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, ); - impl ::subxt::Event for ChannelClosed { + impl ::subxt::events::StaticEvent for ChannelClosed { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "ChannelClosed"; } } pub mod storage { use super::runtime_types; - pub struct HrmpOpenChannelRequests<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - impl ::subxt::StorageEntry for HrmpOpenChannelRequests<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpOpenChannelRequests"; - type Value = runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpOpenChannelRequestsList; - impl ::subxt::StorageEntry for HrmpOpenChannelRequestsList { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpOpenChannelRequestsList"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct HrmpOpenChannelRequestCount<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for HrmpOpenChannelRequestCount<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpOpenChannelRequestCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpAcceptedChannelRequestCount<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for HrmpAcceptedChannelRequestCount<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpAcceptedChannelRequestCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpCloseChannelRequests<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - impl ::subxt::StorageEntry for HrmpCloseChannelRequests<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpCloseChannelRequests"; - type Value = (); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpCloseChannelRequestsList; - impl ::subxt::StorageEntry for HrmpCloseChannelRequestsList { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpCloseChannelRequestsList"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct HrmpWatermarks<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for HrmpWatermarks<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpWatermarks"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpChannels<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - impl ::subxt::StorageEntry for HrmpChannels<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpChannels"; - type Value = - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpIngressChannelsIndex<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for HrmpIngressChannelsIndex<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpIngressChannelsIndex"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpEgressChannelsIndex<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for HrmpEgressChannelsIndex<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpEgressChannelsIndex"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpChannelContents<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - impl ::subxt::StorageEntry for HrmpChannelContents<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpChannelContents"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct HrmpChannelDigests<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for HrmpChannelDigests<'_> { - const PALLET: &'static str = "Hrmp"; - const STORAGE: &'static str = "HrmpChannelDigests"; - type Value = ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The set of pending HRMP open channel requests."] #[doc = ""] #[doc = " The set is accompanied by a list for iteration."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 58u8, 216u8, 106u8, 4u8, 117u8, 77u8, 168u8, 230u8, 50u8, - 6u8, 175u8, 26u8, 110u8, 45u8, 143u8, 207u8, 174u8, 77u8, - 5u8, 245u8, 172u8, 114u8, 20u8, 229u8, 153u8, 137u8, - 220u8, 189u8, 155u8, 5u8, 116u8, 236u8, - ] - { - let entry = HrmpOpenChannelRequests(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : & runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpOpenChannelRequests", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 226u8, 115u8, 207u8, 13u8, 5u8, 81u8, 64u8, 161u8, 246u8, + 4u8, 17u8, 207u8, 210u8, 109u8, 91u8, 54u8, 28u8, 53u8, 35u8, + 74u8, 62u8, 91u8, 196u8, 236u8, 18u8, 70u8, 13u8, 86u8, + 235u8, 74u8, 181u8, 169u8, + ], + ) } #[doc = " The set of pending HRMP open channel requests."] #[doc = ""] #[doc = " The set is accompanied by a list for iteration."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] - pub fn hrmp_open_channel_requests_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpOpenChannelRequests<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 58u8, 216u8, 106u8, 4u8, 117u8, 77u8, 168u8, 230u8, 50u8, - 6u8, 175u8, 26u8, 110u8, 45u8, 143u8, 207u8, 174u8, 77u8, - 5u8, 245u8, 172u8, 114u8, 20u8, 229u8, 153u8, 137u8, - 220u8, 189u8, 155u8, 5u8, 116u8, 236u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: AddressIsIterable , () >{ + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpOpenChannelRequests", + Vec::new(), + [ + 226u8, 115u8, 207u8, 13u8, 5u8, 81u8, 64u8, 161u8, 246u8, + 4u8, 17u8, 207u8, 210u8, 109u8, 91u8, 54u8, 28u8, 53u8, 35u8, + 74u8, 62u8, 91u8, 196u8, 236u8, 18u8, 70u8, 13u8, 86u8, + 235u8, 74u8, 181u8, 169u8, + ], + ) } pub fn hrmp_open_channel_requests_list( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 176u8, 22u8, 136u8, 206u8, 243u8, 208u8, 67u8, 150u8, - 187u8, 163u8, 141u8, 37u8, 235u8, 84u8, 176u8, 63u8, - 55u8, 38u8, 215u8, 185u8, 206u8, 127u8, 37u8, 108u8, - 245u8, 237u8, 154u8, 151u8, 111u8, 33u8, 39u8, 102u8, - ] - { - let entry = HrmpOpenChannelRequestsList; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpOpenChannelRequestsList", + vec![], + [ + 187u8, 157u8, 7u8, 183u8, 88u8, 215u8, 128u8, 174u8, 244u8, + 130u8, 137u8, 13u8, 110u8, 126u8, 181u8, 165u8, 142u8, 69u8, + 75u8, 37u8, 37u8, 149u8, 46u8, 100u8, 140u8, 69u8, 234u8, + 171u8, 103u8, 136u8, 223u8, 193u8, + ], + ) } #[doc = " This mapping tracks how many open channel requests are initiated by a given sender para."] #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has"] #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] pub fn hrmp_open_channel_request_count( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 47u8, 152u8, 1u8, 119u8, 244u8, 62u8, 249u8, - 141u8, 194u8, 157u8, 149u8, 58u8, 208u8, 113u8, 77u8, - 4u8, 248u8, 114u8, 94u8, 153u8, 20u8, 179u8, 4u8, 43u8, - 32u8, 248u8, 118u8, 115u8, 206u8, 228u8, 28u8, - ] - { - let entry = HrmpOpenChannelRequestCount(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpOpenChannelRequestCount", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 156u8, 87u8, 232u8, 34u8, 30u8, 237u8, 159u8, 78u8, 212u8, + 138u8, 140u8, 206u8, 191u8, 117u8, 209u8, 218u8, 251u8, + 146u8, 217u8, 56u8, 93u8, 15u8, 131u8, 64u8, 126u8, 253u8, + 126u8, 1u8, 12u8, 242u8, 176u8, 217u8, + ], + ) } #[doc = " This mapping tracks how many open channel requests are initiated by a given sender para."] #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has"] #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] - pub fn hrmp_open_channel_request_count_iter( + pub fn hrmp_open_channel_request_count_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpOpenChannelRequestCount<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 103u8, 47u8, 152u8, 1u8, 119u8, 244u8, 62u8, 249u8, - 141u8, 194u8, 157u8, 149u8, 58u8, 208u8, 113u8, 77u8, - 4u8, 248u8, 114u8, 94u8, 153u8, 20u8, 179u8, 4u8, 43u8, - 32u8, 248u8, 118u8, 115u8, 206u8, 228u8, 28u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpOpenChannelRequestCount", + Vec::new(), + [ + 156u8, 87u8, 232u8, 34u8, 30u8, 237u8, 159u8, 78u8, 212u8, + 138u8, 140u8, 206u8, 191u8, 117u8, 209u8, 218u8, 251u8, + 146u8, 217u8, 56u8, 93u8, 15u8, 131u8, 64u8, 126u8, 253u8, + 126u8, 1u8, 12u8, 242u8, 176u8, 217u8, + ], + ) } #[doc = " This mapping tracks how many open channel requests were accepted by a given recipient para."] #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with"] #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] pub fn hrmp_accepted_channel_request_count( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata - .storage_hash::() - { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 166u8, 207u8, 97u8, 222u8, 30u8, 204u8, 203u8, 122u8, - 72u8, 66u8, 247u8, 169u8, 128u8, 122u8, 145u8, 124u8, - 214u8, 183u8, 251u8, 85u8, 93u8, 37u8, 143u8, 71u8, 45u8, - 61u8, 168u8, 211u8, 222u8, 58u8, 91u8, 202u8, - ] - { - let entry = HrmpAcceptedChannelRequestCount(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpAcceptedChannelRequestCount", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 93u8, 183u8, 17u8, 253u8, 119u8, 213u8, 106u8, 205u8, 17u8, + 10u8, 230u8, 242u8, 5u8, 223u8, 49u8, 235u8, 41u8, 221u8, + 80u8, 51u8, 153u8, 62u8, 191u8, 3u8, 120u8, 224u8, 46u8, + 164u8, 161u8, 6u8, 15u8, 15u8, + ], + ) } #[doc = " This mapping tracks how many open channel requests were accepted by a given recipient para."] #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with"] #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] - pub fn hrmp_accepted_channel_request_count_iter( + pub fn hrmp_accepted_channel_request_count_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpAcceptedChannelRequestCount<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata - .storage_hash::() - { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 166u8, 207u8, 97u8, 222u8, 30u8, 204u8, 203u8, 122u8, - 72u8, 66u8, 247u8, 169u8, 128u8, 122u8, 145u8, 124u8, - 214u8, 183u8, 251u8, 85u8, 93u8, 37u8, 143u8, 71u8, 45u8, - 61u8, 168u8, 211u8, 222u8, 58u8, 91u8, 202u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpAcceptedChannelRequestCount", + Vec::new(), + [ + 93u8, 183u8, 17u8, 253u8, 119u8, 213u8, 106u8, 205u8, 17u8, + 10u8, 230u8, 242u8, 5u8, 223u8, 49u8, 235u8, 41u8, 221u8, + 80u8, 51u8, 153u8, 62u8, 191u8, 3u8, 120u8, 224u8, 46u8, + 164u8, 161u8, 6u8, 15u8, 15u8, + ], + ) } #[doc = " A set of pending HRMP close channel requests that are going to be closed during the session"] #[doc = " change. Used for checking if a given channel is registered for closure."] @@ -36473,38 +25257,27 @@ pub mod api { #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_close_channel_requests( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<()>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 118u8, 8u8, 142u8, 158u8, 184u8, 200u8, 38u8, 112u8, - 217u8, 69u8, 161u8, 255u8, 116u8, 143u8, 94u8, 185u8, - 95u8, 247u8, 227u8, 101u8, 107u8, 55u8, 172u8, 164u8, - 58u8, 182u8, 193u8, 140u8, 142u8, 118u8, 223u8, 240u8, - ] - { - let entry = HrmpCloseChannelRequests(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpCloseChannelRequests", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 125u8, 131u8, 1u8, 231u8, 19u8, 207u8, 229u8, 72u8, 150u8, + 100u8, 165u8, 215u8, 241u8, 165u8, 91u8, 35u8, 230u8, 148u8, + 127u8, 249u8, 128u8, 221u8, 167u8, 172u8, 67u8, 30u8, 177u8, + 176u8, 134u8, 223u8, 39u8, 87u8, + ], + ) } #[doc = " A set of pending HRMP close channel requests that are going to be closed during the session"] #[doc = " change. Used for checking if a given channel is registered for closure."] @@ -36513,225 +25286,147 @@ pub mod api { #[doc = ""] #[doc = " Invariant:"] #[doc = " - There are no channels that exists in list but not in the set and vice versa."] - pub fn hrmp_close_channel_requests_iter( + pub fn hrmp_close_channel_requests_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpCloseChannelRequests<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 118u8, 8u8, 142u8, 158u8, 184u8, 200u8, 38u8, 112u8, - 217u8, 69u8, 161u8, 255u8, 116u8, 143u8, 94u8, 185u8, - 95u8, 247u8, 227u8, 101u8, 107u8, 55u8, 172u8, 164u8, - 58u8, 182u8, 193u8, 140u8, 142u8, 118u8, 223u8, 240u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpCloseChannelRequests", + Vec::new(), + [ + 125u8, 131u8, 1u8, 231u8, 19u8, 207u8, 229u8, 72u8, 150u8, + 100u8, 165u8, 215u8, 241u8, 165u8, 91u8, 35u8, 230u8, 148u8, + 127u8, 249u8, 128u8, 221u8, 167u8, 172u8, 67u8, 30u8, 177u8, + 176u8, 134u8, 223u8, 39u8, 87u8, + ], + ) } pub fn hrmp_close_channel_requests_list( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() - { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 203u8, 46u8, 200u8, 63u8, 120u8, 238u8, 88u8, 170u8, - 239u8, 27u8, 99u8, 104u8, 254u8, 194u8, 152u8, 221u8, - 126u8, 188u8, 2u8, 153u8, 79u8, 183u8, 236u8, 145u8, - 120u8, 151u8, 235u8, 56u8, 130u8, 240u8, 74u8, 211u8, - ] - { - let entry = HrmpCloseChannelRequestsList; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpCloseChannelRequestsList", + vec![], + [ + 192u8, 165u8, 71u8, 70u8, 211u8, 233u8, 155u8, 146u8, 160u8, + 58u8, 103u8, 64u8, 123u8, 232u8, 157u8, 71u8, 199u8, 223u8, + 158u8, 5u8, 164u8, 93u8, 231u8, 153u8, 1u8, 63u8, 155u8, 4u8, + 138u8, 89u8, 178u8, 116u8, + ], + ) } #[doc = " The HRMP watermark associated with each para."] #[doc = " Invariant:"] #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] pub fn hrmp_watermarks( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 28u8, 187u8, 5u8, 0u8, 130u8, 11u8, 241u8, 171u8, 141u8, - 109u8, 236u8, 151u8, 194u8, 124u8, 172u8, 180u8, 36u8, - 144u8, 134u8, 53u8, 162u8, 247u8, 138u8, 209u8, 99u8, - 194u8, 213u8, 100u8, 254u8, 15u8, 51u8, 94u8, - ] - { - let entry = HrmpWatermarks(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpWatermarks", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 231u8, 195u8, 117u8, 35u8, 235u8, 18u8, 80u8, 28u8, 212u8, + 37u8, 253u8, 204u8, 71u8, 217u8, 12u8, 35u8, 219u8, 250u8, + 45u8, 83u8, 102u8, 236u8, 186u8, 149u8, 54u8, 31u8, 83u8, + 19u8, 129u8, 51u8, 103u8, 155u8, + ], + ) } #[doc = " The HRMP watermark associated with each para."] #[doc = " Invariant:"] #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] - pub fn hrmp_watermarks_iter( + pub fn hrmp_watermarks_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpWatermarks<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 28u8, 187u8, 5u8, 0u8, 130u8, 11u8, 241u8, 171u8, 141u8, - 109u8, 236u8, 151u8, 194u8, 124u8, 172u8, 180u8, 36u8, - 144u8, 134u8, 53u8, 162u8, 247u8, 138u8, 209u8, 99u8, - 194u8, 213u8, 100u8, 254u8, 15u8, 51u8, 94u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpWatermarks", + Vec::new(), + [ + 231u8, 195u8, 117u8, 35u8, 235u8, 18u8, 80u8, 28u8, 212u8, + 37u8, 253u8, 204u8, 71u8, 217u8, 12u8, 35u8, 219u8, 250u8, + 45u8, 83u8, 102u8, 236u8, 186u8, 149u8, 54u8, 31u8, 83u8, + 19u8, 129u8, 51u8, 103u8, 155u8, + ], + ) } #[doc = " HRMP channel data associated with each para."] #[doc = " Invariant:"] #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] pub fn hrmp_channels( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 241u8, 160u8, 242u8, 167u8, 251u8, 8u8, 131u8, 194u8, - 179u8, 216u8, 231u8, 125u8, 58u8, 118u8, 61u8, 113u8, - 46u8, 47u8, 6u8, 71u8, 46u8, 113u8, 192u8, 1u8, 199u8, - 207u8, 179u8, 253u8, 144u8, 146u8, 19u8, 1u8, - ] - { - let entry = HrmpChannels(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpChannels", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 224u8, 252u8, 187u8, 122u8, 179u8, 193u8, 227u8, 250u8, + 255u8, 216u8, 107u8, 26u8, 224u8, 16u8, 178u8, 111u8, 77u8, + 237u8, 177u8, 148u8, 22u8, 17u8, 213u8, 99u8, 194u8, 140u8, + 217u8, 211u8, 151u8, 51u8, 66u8, 169u8, + ], + ) } #[doc = " HRMP channel data associated with each para."] #[doc = " Invariant:"] #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] - pub fn hrmp_channels_iter( + pub fn hrmp_channels_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannels<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 241u8, 160u8, 242u8, 167u8, 251u8, 8u8, 131u8, 194u8, - 179u8, 216u8, 231u8, 125u8, 58u8, 118u8, 61u8, 113u8, - 46u8, 47u8, 6u8, 71u8, 46u8, 113u8, 192u8, 1u8, 199u8, - 207u8, 179u8, 253u8, 144u8, 146u8, 19u8, 1u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpChannels", + Vec::new(), + [ + 224u8, 252u8, 187u8, 122u8, 179u8, 193u8, 227u8, 250u8, + 255u8, 216u8, 107u8, 26u8, 224u8, 16u8, 178u8, 111u8, 77u8, + 237u8, 177u8, 148u8, 22u8, 17u8, 213u8, 99u8, 194u8, 140u8, + 217u8, 211u8, 151u8, 51u8, 66u8, 169u8, + ], + ) } #[doc = " Ingress/egress indexes allow to find all the senders and receivers given the opposite side."] #[doc = " I.e."] @@ -36745,43 +25440,30 @@ pub mod api { #[doc = " - for each egress index entry for `P` each item `E` in the index should present in"] #[doc = " `HrmpChannels` as `(P, E)`."] #[doc = " - there should be no other dangling channels in `HrmpChannels`."] - #[doc = " - the vectors are sorted."] - pub fn hrmp_ingress_channels_index( - &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 193u8, 185u8, 164u8, 194u8, 89u8, 218u8, 214u8, 184u8, - 100u8, 238u8, 232u8, 90u8, 243u8, 230u8, 93u8, 191u8, - 197u8, 182u8, 215u8, 254u8, 192u8, 11u8, 171u8, 211u8, - 150u8, 210u8, 75u8, 216u8, 149u8, 60u8, 49u8, 166u8, - ] - { - let entry = HrmpIngressChannelsIndex(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " - the vectors are sorted."] + pub fn hrmp_ingress_channels_index( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpIngressChannelsIndex", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 58u8, 193u8, 212u8, 225u8, 48u8, 195u8, 119u8, 15u8, 61u8, + 166u8, 249u8, 1u8, 118u8, 67u8, 253u8, 40u8, 58u8, 220u8, + 124u8, 152u8, 4u8, 16u8, 155u8, 151u8, 195u8, 15u8, 205u8, + 175u8, 234u8, 0u8, 101u8, 99u8, + ], + ) } #[doc = " Ingress/egress indexes allow to find all the senders and receivers given the opposite side."] #[doc = " I.e."] @@ -36796,184 +25478,125 @@ pub mod api { #[doc = " `HrmpChannels` as `(P, E)`."] #[doc = " - there should be no other dangling channels in `HrmpChannels`."] #[doc = " - the vectors are sorted."] - pub fn hrmp_ingress_channels_index_iter( + pub fn hrmp_ingress_channels_index_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpIngressChannelsIndex<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 193u8, 185u8, 164u8, 194u8, 89u8, 218u8, 214u8, 184u8, - 100u8, 238u8, 232u8, 90u8, 243u8, 230u8, 93u8, 191u8, - 197u8, 182u8, 215u8, 254u8, 192u8, 11u8, 171u8, 211u8, - 150u8, 210u8, 75u8, 216u8, 149u8, 60u8, 49u8, 166u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpIngressChannelsIndex", + Vec::new(), + [ + 58u8, 193u8, 212u8, 225u8, 48u8, 195u8, 119u8, 15u8, 61u8, + 166u8, 249u8, 1u8, 118u8, 67u8, 253u8, 40u8, 58u8, 220u8, + 124u8, 152u8, 4u8, 16u8, 155u8, 151u8, 195u8, 15u8, 205u8, + 175u8, 234u8, 0u8, 101u8, 99u8, + ], + ) } pub fn hrmp_egress_channels_index( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 242u8, 138u8, 89u8, 201u8, 60u8, 216u8, 73u8, 66u8, - 167u8, 82u8, 225u8, 42u8, 61u8, 50u8, 54u8, 187u8, 212u8, - 8u8, 255u8, 183u8, 85u8, 180u8, 176u8, 0u8, 226u8, 173u8, - 45u8, 155u8, 172u8, 28u8, 229u8, 157u8, - ] - { - let entry = HrmpEgressChannelsIndex(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } - } - pub fn hrmp_egress_channels_index_iter( - &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpEgressChannelsIndex<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 242u8, 138u8, 89u8, 201u8, 60u8, 216u8, 73u8, 66u8, - 167u8, 82u8, 225u8, 42u8, 61u8, 50u8, 54u8, 187u8, 212u8, - 8u8, 255u8, 183u8, 85u8, 180u8, 176u8, 0u8, 226u8, 173u8, - 45u8, 155u8, 172u8, 28u8, 229u8, 157u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpEgressChannelsIndex", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 9u8, 242u8, 41u8, 234u8, 85u8, 193u8, 232u8, 245u8, 254u8, + 26u8, 240u8, 113u8, 184u8, 151u8, 150u8, 44u8, 43u8, 98u8, + 84u8, 209u8, 145u8, 175u8, 128u8, 68u8, 183u8, 112u8, 171u8, + 236u8, 211u8, 32u8, 177u8, 88u8, + ], + ) + } + pub fn hrmp_egress_channels_index_root( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpEgressChannelsIndex", + Vec::new(), + [ + 9u8, 242u8, 41u8, 234u8, 85u8, 193u8, 232u8, 245u8, 254u8, + 26u8, 240u8, 113u8, 184u8, 151u8, 150u8, 44u8, 43u8, 98u8, + 84u8, 209u8, 145u8, 175u8, 128u8, 68u8, 183u8, 112u8, 171u8, + 236u8, 211u8, 32u8, 177u8, 88u8, + ], + ) } #[doc = " Storage for the messages for each channel."] #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] pub fn hrmp_channel_contents( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::HrmpChannelId, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, + _0: &runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, >, - ::subxt::BasicError, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 71u8, 246u8, 41u8, 12u8, 125u8, 10u8, 60u8, 209u8, 14u8, - 254u8, 125u8, 217u8, 251u8, 172u8, 243u8, 73u8, 33u8, - 230u8, 242u8, 16u8, 207u8, 165u8, 33u8, 136u8, 78u8, - 83u8, 206u8, 134u8, 65u8, 115u8, 166u8, 192u8, - ] - { - let entry = HrmpChannelContents(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpChannelContents", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 114u8, 86u8, 172u8, 88u8, 118u8, 243u8, 133u8, 147u8, 108u8, + 60u8, 128u8, 235u8, 45u8, 80u8, 225u8, 130u8, 89u8, 50u8, + 40u8, 118u8, 63u8, 3u8, 83u8, 222u8, 75u8, 167u8, 148u8, + 150u8, 193u8, 90u8, 196u8, 225u8, + ], + ) } #[doc = " Storage for the messages for each channel."] #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] - pub fn hrmp_channel_contents_iter( + pub fn hrmp_channel_contents_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannelContents<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 71u8, 246u8, 41u8, 12u8, 125u8, 10u8, 60u8, 209u8, 14u8, - 254u8, 125u8, 217u8, 251u8, 172u8, 243u8, 73u8, 33u8, - 230u8, 242u8, 16u8, 207u8, 165u8, 33u8, 136u8, 78u8, - 83u8, 206u8, 134u8, 65u8, 115u8, 166u8, 192u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpChannelContents", + Vec::new(), + [ + 114u8, 86u8, 172u8, 88u8, 118u8, 243u8, 133u8, 147u8, 108u8, + 60u8, 128u8, 235u8, 45u8, 80u8, 225u8, 130u8, 89u8, 50u8, + 40u8, 118u8, 63u8, 3u8, 83u8, 222u8, 75u8, 167u8, 148u8, + 150u8, 193u8, 90u8, 196u8, 225u8, + ], + ) } #[doc = " Maintains a mapping that can be used to answer the question: What paras sent a message at"] #[doc = " the given block number for a given receiver. Invariants:"] @@ -36983,43 +25606,32 @@ pub mod api { #[doc = " same block number."] pub fn hrmp_channel_digests( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 54u8, 106u8, 76u8, 21u8, 18u8, 49u8, 1u8, 34u8, 247u8, - 101u8, 150u8, 142u8, 214u8, 137u8, 193u8, 100u8, 208u8, - 162u8, 55u8, 229u8, 203u8, 36u8, 154u8, 138u8, 48u8, - 204u8, 114u8, 243u8, 54u8, 185u8, 27u8, 173u8, - ] - { - let entry = HrmpChannelDigests(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + ::core::primitive::u32, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + )>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpChannelDigests", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 205u8, 18u8, 60u8, 54u8, 123u8, 40u8, 160u8, 149u8, 174u8, + 45u8, 135u8, 213u8, 83u8, 44u8, 97u8, 243u8, 47u8, 200u8, + 156u8, 131u8, 15u8, 63u8, 170u8, 206u8, 101u8, 17u8, 244u8, + 132u8, 73u8, 133u8, 79u8, 104u8, + ], + ) } #[doc = " Maintains a mapping that can be used to answer the question: What paras sent a message at"] #[doc = " the given block number for a given receiver. Invariants:"] @@ -37027,378 +25639,221 @@ pub mod api { #[doc = " - The inner `Vec` cannot store two same `ParaId`."] #[doc = " - The outer vector is sorted ascending by block number and cannot store two items with the"] #[doc = " same block number."] - pub fn hrmp_channel_digests_iter( + pub fn hrmp_channel_digests_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannelDigests<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 54u8, 106u8, 76u8, 21u8, 18u8, 49u8, 1u8, 34u8, 247u8, - 101u8, 150u8, 142u8, 214u8, 137u8, 193u8, 100u8, 208u8, - 162u8, 55u8, 229u8, 203u8, 36u8, 154u8, 138u8, 48u8, - 204u8, 114u8, 243u8, 54u8, 185u8, 27u8, 173u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<( + ::core::primitive::u32, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + )>, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Hrmp", + "HrmpChannelDigests", + Vec::new(), + [ + 205u8, 18u8, 60u8, 54u8, 123u8, 40u8, 160u8, 149u8, 174u8, + 45u8, 135u8, 213u8, 83u8, 44u8, 97u8, 243u8, 47u8, 200u8, + 156u8, 131u8, 15u8, 63u8, 170u8, 206u8, 101u8, 17u8, 244u8, + 132u8, 73u8, 133u8, 79u8, 104u8, + ], + ) } } } } pub mod para_session_info { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod storage { use super::runtime_types; - pub struct AssignmentKeysUnsafe; - impl ::subxt::StorageEntry for AssignmentKeysUnsafe { - const PALLET: &'static str = "ParaSessionInfo"; - const STORAGE: &'static str = "AssignmentKeysUnsafe"; - type Value = ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::assignment_app::Public, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct EarliestStoredSession; - impl ::subxt::StorageEntry for EarliestStoredSession { - const PALLET: &'static str = "ParaSessionInfo"; - const STORAGE: &'static str = "EarliestStoredSession"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Sessions<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Sessions<'_> { - const PALLET: &'static str = "ParaSessionInfo"; - const STORAGE: &'static str = "Sessions"; - type Value = runtime_types::polkadot_primitives::v2::SessionInfo; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct AccountKeys<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for AccountKeys<'_> { - const PALLET: &'static str = "ParaSessionInfo"; - const STORAGE: &'static str = "AccountKeys"; - type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Assignment keys for the current session."] #[doc = " Note that this API is private due to it being prone to 'off-by-one' at session boundaries."] - #[doc = " When in doubt, use `Sessions` API instead."] pub fn assignment_keys_unsafe (& self , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_primitives :: v2 :: assignment_app :: Public > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 243u8, 5u8, 37u8, 167u8, 29u8, 59u8, 87u8, 66u8, 53u8, - 91u8, 181u8, 9u8, 144u8, 248u8, 225u8, 121u8, 130u8, - 111u8, 140u8, 35u8, 79u8, 187u8, 159u8, 22u8, 192u8, - 166u8, 144u8, 161u8, 239u8, 98u8, 255u8, 108u8, - ] - { - let entry = AssignmentKeysUnsafe; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " When in doubt, use `Sessions` API instead."] + pub fn assignment_keys_unsafe( + &self, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::assignment_app::Public, + >, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaSessionInfo", + "AssignmentKeysUnsafe", + vec![], + [ + 80u8, 24u8, 61u8, 132u8, 118u8, 225u8, 207u8, 75u8, 35u8, + 240u8, 209u8, 255u8, 19u8, 240u8, 114u8, 174u8, 86u8, 65u8, + 65u8, 52u8, 135u8, 232u8, 59u8, 208u8, 3u8, 107u8, 114u8, + 241u8, 14u8, 98u8, 40u8, 226u8, + ], + ) } #[doc = " The earliest session for which previous session info is stored."] pub fn earliest_stored_session( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 25u8, 143u8, 246u8, 184u8, 35u8, 166u8, 140u8, 147u8, - 171u8, 5u8, 164u8, 159u8, 228u8, 21u8, 248u8, 236u8, - 48u8, 210u8, 133u8, 140u8, 171u8, 3u8, 85u8, 250u8, - 160u8, 102u8, 95u8, 46u8, 33u8, 81u8, 102u8, 241u8, - ] - { - let entry = EarliestStoredSession; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaSessionInfo", + "EarliestStoredSession", + vec![], + [ + 25u8, 143u8, 246u8, 184u8, 35u8, 166u8, 140u8, 147u8, 171u8, + 5u8, 164u8, 159u8, 228u8, 21u8, 248u8, 236u8, 48u8, 210u8, + 133u8, 140u8, 171u8, 3u8, 85u8, 250u8, 160u8, 102u8, 95u8, + 46u8, 33u8, 81u8, 102u8, 241u8, + ], + ) } #[doc = " Session information in a rolling window."] #[doc = " Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`."] #[doc = " Does not have any entries before the session index in the first session change notification."] pub fn sessions( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::SessionInfo, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 95u8, 222u8, 240u8, 96u8, 203u8, 233u8, 100u8, 160u8, - 180u8, 161u8, 180u8, 123u8, 168u8, 102u8, 93u8, 172u8, - 93u8, 174u8, 103u8, 211u8, 254u8, 30u8, 207u8, 199u8, - 148u8, 200u8, 100u8, 155u8, 149u8, 48u8, 238u8, 51u8, - ] - { - let entry = Sessions(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::SessionInfo, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaSessionInfo", + "Sessions", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 33u8, 46u8, 71u8, 15u8, 195u8, 14u8, 107u8, 223u8, 112u8, + 69u8, 249u8, 233u8, 86u8, 249u8, 79u8, 164u8, 20u8, 71u8, + 191u8, 32u8, 67u8, 195u8, 128u8, 61u8, 67u8, 84u8, 79u8, + 137u8, 248u8, 85u8, 253u8, 21u8, + ], + ) } #[doc = " Session information in a rolling window."] #[doc = " Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`."] #[doc = " Does not have any entries before the session index in the first session change notification."] - pub fn sessions_iter( + pub fn sessions_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Sessions<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 95u8, 222u8, 240u8, 96u8, 203u8, 233u8, 100u8, 160u8, - 180u8, 161u8, 180u8, 123u8, 168u8, 102u8, 93u8, 172u8, - 93u8, 174u8, 103u8, 211u8, 254u8, 30u8, 207u8, 199u8, - 148u8, 200u8, 100u8, 155u8, 149u8, 48u8, 238u8, 51u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::SessionInfo, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaSessionInfo", + "Sessions", + Vec::new(), + [ + 33u8, 46u8, 71u8, 15u8, 195u8, 14u8, 107u8, 223u8, 112u8, + 69u8, 249u8, 233u8, 86u8, 249u8, 79u8, 164u8, 20u8, 71u8, + 191u8, 32u8, 67u8, 195u8, 128u8, 61u8, 67u8, 84u8, 79u8, + 137u8, 248u8, 85u8, 253u8, 21u8, + ], + ) } #[doc = " The validator account keys of the validators actively participating in parachain consensus."] pub fn account_keys( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 26u8, 160u8, 169u8, 110u8, 242u8, 243u8, 149u8, 148u8, - 213u8, 251u8, 111u8, 52u8, 105u8, 157u8, 144u8, 245u8, - 114u8, 150u8, 192u8, 204u8, 123u8, 91u8, 123u8, 244u8, - 165u8, 82u8, 238u8, 155u8, 224u8, 182u8, 190u8, 27u8, - ] - { - let entry = AccountKeys(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaSessionInfo", + "AccountKeys", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 48u8, 179u8, 139u8, 15u8, 144u8, 71u8, 92u8, 160u8, 254u8, + 237u8, 98u8, 60u8, 254u8, 208u8, 201u8, 32u8, 79u8, 55u8, + 3u8, 33u8, 188u8, 134u8, 18u8, 151u8, 132u8, 40u8, 192u8, + 215u8, 94u8, 124u8, 148u8, 142u8, + ], + ) } #[doc = " The validator account keys of the validators actively participating in parachain consensus."] - pub fn account_keys_iter( + pub fn account_keys_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, AccountKeys<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 26u8, 160u8, 169u8, 110u8, 242u8, 243u8, 149u8, 148u8, - 213u8, 251u8, 111u8, 52u8, 105u8, 157u8, 144u8, 245u8, - 114u8, 150u8, 192u8, 204u8, 123u8, 91u8, 123u8, 244u8, - 165u8, 82u8, 238u8, 155u8, 224u8, 182u8, 190u8, 27u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParaSessionInfo", + "AccountKeys", + Vec::new(), + [ + 48u8, 179u8, 139u8, 15u8, 144u8, 71u8, 92u8, 160u8, 254u8, + 237u8, 98u8, 60u8, 254u8, 208u8, 201u8, 32u8, 79u8, 55u8, + 3u8, 33u8, 188u8, 134u8, 18u8, 151u8, 132u8, 40u8, 192u8, + 215u8, 94u8, 124u8, 148u8, 142u8, + ], + ) } } } } pub mod paras_disputes { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceUnfreeze; - impl ::subxt::Call for ForceUnfreeze { - const PALLET: &'static str = "ParasDisputes"; - const FUNCTION: &'static str = "force_unfreeze"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { pub fn force_unfreeze( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceUnfreeze, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "ParasDisputes", + call: "force_unfreeze", + data: ForceUnfreeze {}, + }, + [ 212u8, 211u8, 58u8, 159u8, 23u8, 220u8, 64u8, 175u8, 65u8, 50u8, 192u8, 122u8, 113u8, 189u8, 74u8, 191u8, 48u8, 93u8, 251u8, 50u8, 237u8, 240u8, 91u8, 139u8, 193u8, 114u8, 131u8, 125u8, 124u8, 236u8, 191u8, 190u8, - ] - { - let call = ForceUnfreeze {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } } } @@ -37407,41 +25862,53 @@ pub mod api { runtime_types::polkadot_runtime_parachains::disputes::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A dispute has been initiated. \\[candidate hash, dispute location\\]"] pub struct DisputeInitiated( pub runtime_types::polkadot_core_primitives::CandidateHash, pub runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, ); - impl ::subxt::Event for DisputeInitiated { + impl ::subxt::events::StaticEvent for DisputeInitiated { const PALLET: &'static str = "ParasDisputes"; const EVENT: &'static str = "DisputeInitiated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A dispute has concluded for or against a candidate."] #[doc = "`\\[para id, candidate hash, dispute result\\]`"] pub struct DisputeConcluded( pub runtime_types::polkadot_core_primitives::CandidateHash, pub runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, ); - impl ::subxt::Event for DisputeConcluded { + impl ::subxt::events::StaticEvent for DisputeConcluded { const PALLET: &'static str = "ParasDisputes"; const EVENT: &'static str = "DisputeConcluded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A dispute has timed out due to insufficient participation."] #[doc = "`\\[para id, candidate hash\\]`"] pub struct DisputeTimedOut( pub runtime_types::polkadot_core_primitives::CandidateHash, ); - impl ::subxt::Event for DisputeTimedOut { + impl ::subxt::events::StaticEvent for DisputeTimedOut { const PALLET: &'static str = "ParasDisputes"; const EVENT: &'static str = "DisputeTimedOut"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A dispute has concluded with supermajority against a candidate."] @@ -37449,277 +25916,110 @@ pub mod api { #[doc = "instead revert the block at the given height. This should be the"] #[doc = "number of the child of the last known valid block in the chain."] pub struct Revert(pub ::core::primitive::u32); - impl ::subxt::Event for Revert { + impl ::subxt::events::StaticEvent for Revert { const PALLET: &'static str = "ParasDisputes"; const EVENT: &'static str = "Revert"; } } pub mod storage { use super::runtime_types; - pub struct LastPrunedSession; - impl ::subxt::StorageEntry for LastPrunedSession { - const PALLET: &'static str = "ParasDisputes"; - const STORAGE: &'static str = "LastPrunedSession"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Disputes<'a>( - pub &'a ::core::primitive::u32, - pub &'a runtime_types::polkadot_core_primitives::CandidateHash, - ); - impl ::subxt::StorageEntry for Disputes<'_> { - const PALLET: &'static str = "ParasDisputes"; - const STORAGE: &'static str = "Disputes"; - type Value = runtime_types::polkadot_primitives::v2::DisputeState< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Blake2_128Concat, - ), - ]) - } - } - pub struct Included<'a>( - pub &'a ::core::primitive::u32, - pub &'a runtime_types::polkadot_core_primitives::CandidateHash, - ); - impl ::subxt::StorageEntry for Included<'_> { - const PALLET: &'static str = "ParasDisputes"; - const STORAGE: &'static str = "Included"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Blake2_128Concat, - ), - ]) - } - } - pub struct SpamSlots<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for SpamSlots<'_> { - const PALLET: &'static str = "ParasDisputes"; - const STORAGE: &'static str = "SpamSlots"; - type Value = ::std::vec::Vec<::core::primitive::u32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Frozen; - impl ::subxt::StorageEntry for Frozen { - const PALLET: &'static str = "ParasDisputes"; - const STORAGE: &'static str = "Frozen"; - type Value = ::core::option::Option<::core::primitive::u32>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The last pruned session, if any. All data stored by this module"] #[doc = " references sessions."] pub fn last_pruned_session( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 125u8, 138u8, 99u8, 242u8, 9u8, 246u8, 215u8, 246u8, - 141u8, 6u8, 129u8, 87u8, 27u8, 58u8, 53u8, 121u8, 61u8, - 119u8, 35u8, 104u8, 33u8, 43u8, 179u8, 82u8, 244u8, - 121u8, 174u8, 135u8, 87u8, 119u8, 236u8, 105u8, - ] - { - let entry = LastPrunedSession; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasDisputes", + "LastPrunedSession", + vec![], + [ + 125u8, 138u8, 99u8, 242u8, 9u8, 246u8, 215u8, 246u8, 141u8, + 6u8, 129u8, 87u8, 27u8, 58u8, 53u8, 121u8, 61u8, 119u8, 35u8, + 104u8, 33u8, 43u8, 179u8, 82u8, 244u8, 121u8, 174u8, 135u8, + 87u8, 119u8, 236u8, 105u8, + ], + ) } #[doc = " All ongoing or concluded disputes for the last several sessions."] pub fn disputes( &self, - _0: &'a ::core::primitive::u32, - _1: &'a runtime_types::polkadot_core_primitives::CandidateHash, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::DisputeState< - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u32, + _1: &runtime_types::polkadot_core_primitives::CandidateHash, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::DisputeState< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 37u8, 50u8, 243u8, 127u8, 8u8, 137u8, 232u8, 140u8, - 200u8, 76u8, 211u8, 245u8, 26u8, 63u8, 113u8, 31u8, - 169u8, 92u8, 165u8, 143u8, 11u8, 29u8, 2u8, 25u8, 55u8, - 250u8, 173u8, 237u8, 153u8, 4u8, 235u8, 10u8, - ] - { - let entry = Disputes(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Disputes" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [192u8 , 238u8 , 255u8 , 67u8 , 169u8 , 86u8 , 99u8 , 243u8 , 228u8 , 88u8 , 142u8 , 138u8 , 183u8 , 117u8 , 82u8 , 22u8 , 163u8 , 30u8 , 175u8 , 247u8 , 50u8 , 204u8 , 12u8 , 171u8 , 57u8 , 189u8 , 151u8 , 191u8 , 196u8 , 89u8 , 94u8 , 165u8 ,]) } #[doc = " All ongoing or concluded disputes for the last several sessions."] - pub fn disputes_iter( + pub fn disputes_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Disputes<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_primitives::v2::DisputeState< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 37u8, 50u8, 243u8, 127u8, 8u8, 137u8, 232u8, 140u8, - 200u8, 76u8, 211u8, 245u8, 26u8, 63u8, 113u8, 31u8, - 169u8, 92u8, 165u8, 143u8, 11u8, 29u8, 2u8, 25u8, 55u8, - 250u8, 173u8, 237u8, 153u8, 4u8, 235u8, 10u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasDisputes", + "Disputes", + Vec::new(), + [ + 192u8, 238u8, 255u8, 67u8, 169u8, 86u8, 99u8, 243u8, 228u8, + 88u8, 142u8, 138u8, 183u8, 117u8, 82u8, 22u8, 163u8, 30u8, + 175u8, 247u8, 50u8, 204u8, 12u8, 171u8, 57u8, 189u8, 151u8, + 191u8, 196u8, 89u8, 94u8, 165u8, + ], + ) } #[doc = " All included blocks on the chain, as well as the block number in this chain that"] #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] pub fn included( &self, - _0: &'a ::core::primitive::u32, - _1: &'a runtime_types::polkadot_core_primitives::CandidateHash, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 32u8, 107u8, 8u8, 112u8, 201u8, 81u8, 66u8, 223u8, 120u8, - 51u8, 166u8, 240u8, 229u8, 141u8, 231u8, 132u8, 114u8, - 36u8, 213u8, 48u8, 249u8, 153u8, 143u8, 157u8, 93u8, - 204u8, 207u8, 144u8, 52u8, 36u8, 46u8, 12u8, - ] - { - let entry = Included(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &runtime_types::polkadot_core_primitives::CandidateHash, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Included" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [129u8 , 50u8 , 76u8 , 60u8 , 82u8 , 106u8 , 248u8 , 164u8 , 152u8 , 80u8 , 58u8 , 185u8 , 211u8 , 225u8 , 122u8 , 100u8 , 234u8 , 241u8 , 123u8 , 205u8 , 4u8 , 8u8 , 193u8 , 116u8 , 167u8 , 158u8 , 252u8 , 223u8 , 204u8 , 226u8 , 74u8 , 195u8 ,]) } #[doc = " All included blocks on the chain, as well as the block number in this chain that"] #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] - pub fn included_iter( + pub fn included_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Included<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 32u8, 107u8, 8u8, 112u8, 201u8, 81u8, 66u8, 223u8, 120u8, - 51u8, 166u8, 240u8, 229u8, 141u8, 231u8, 132u8, 114u8, - 36u8, 213u8, 48u8, 249u8, 153u8, 143u8, 157u8, 93u8, - 204u8, 207u8, 144u8, 52u8, 36u8, 46u8, 12u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasDisputes", + "Included", + Vec::new(), + [ + 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, + 80u8, 58u8, 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, + 123u8, 205u8, 4u8, 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, + 223u8, 204u8, 226u8, 74u8, 195u8, + ], + ) } #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] @@ -37728,76 +26028,52 @@ pub mod api { #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] pub fn spam_slots( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::std::vec::Vec<::core::primitive::u32>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, - 132u8, 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, - 90u8, 123u8, 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, - 198u8, 216u8, 50u8, 74u8, 138u8, 122u8, 251u8, 238u8, - ] - { - let entry = SpamSlots(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u32>, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasDisputes", + "SpamSlots", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, + 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, + 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, + 74u8, 138u8, 122u8, 251u8, 238u8, + ], + ) } #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] #[doc = " fewer than `byzantine_threshold + 1` validators."] #[doc = ""] #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] - pub fn spam_slots_iter( + pub fn spam_slots_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SpamSlots<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, - 132u8, 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, - 90u8, 123u8, 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, - 198u8, 216u8, 50u8, 74u8, 138u8, 122u8, 251u8, 238u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec<::core::primitive::u32>, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasDisputes", + "SpamSlots", + Vec::new(), + [ + 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, + 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, + 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, + 74u8, 138u8, 122u8, 251u8, 238u8, + ], + ) } #[doc = " Whether the chain is frozen. Starts as `None`. When this is `Some`,"] #[doc = " the chain will not accept any new parachain blocks for backing or inclusion,"] @@ -37805,123 +26081,92 @@ pub mod api { #[doc = " It can only be set back to `None` by governance intervention."] pub fn frozen( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 133u8, 100u8, 86u8, 220u8, 180u8, 189u8, 65u8, 131u8, - 64u8, 56u8, 219u8, 47u8, 130u8, 167u8, 210u8, 125u8, - 49u8, 7u8, 153u8, 254u8, 20u8, 53u8, 218u8, 177u8, 122u8, - 148u8, 16u8, 198u8, 251u8, 50u8, 194u8, 128u8, - ] - { - let entry = Frozen; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::option::Option<::core::primitive::u32>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "ParasDisputes", + "Frozen", + vec![], + [ + 133u8, 100u8, 86u8, 220u8, 180u8, 189u8, 65u8, 131u8, 64u8, + 56u8, 219u8, 47u8, 130u8, 167u8, 210u8, 125u8, 49u8, 7u8, + 153u8, 254u8, 20u8, 53u8, 218u8, 177u8, 122u8, 148u8, 16u8, + 198u8, 251u8, 50u8, 194u8, 128u8, + ], + ) } } } } pub mod registrar { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Register { pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for Register { - const PALLET: &'static str = "Registrar"; - const FUNCTION: &'static str = "register"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceRegister { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for ForceRegister { - const PALLET: &'static str = "Registrar"; - const FUNCTION: &'static str = "force_register"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Deregister { pub id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Deregister { - const PALLET: &'static str = "Registrar"; - const FUNCTION: &'static str = "deregister"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Swap { pub id: runtime_types::polkadot_parachain::primitives::Id, pub other: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Swap { - const PALLET: &'static str = "Registrar"; - const FUNCTION: &'static str = "swap"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceRemoveLock { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ForceRemoveLock { - const PALLET: &'static str = "Registrar"; - const FUNCTION: &'static str = "force_remove_lock"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Reserve; - impl ::subxt::Call for Reserve { - const PALLET: &'static str = "Registrar"; - const FUNCTION: &'static str = "reserve"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Register head data and validation code for a reserved Para Id."] #[doc = ""] #[doc = "## Arguments"] @@ -37941,39 +26186,27 @@ pub mod api { id: runtime_types::polkadot_parachain::primitives::Id, genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Register, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 180u8, 21u8, 142u8, 73u8, 21u8, 31u8, 64u8, 210u8, 196u8, - 4u8, 142u8, 153u8, 172u8, 207u8, 95u8, 209u8, 177u8, 75u8, - 202u8, 85u8, 95u8, 208u8, 123u8, 237u8, 190u8, 148u8, 5u8, - 64u8, 65u8, 191u8, 221u8, 203u8, - ] - { - let call = Register { - id, - genesis_head, - validation_code, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Registrar", + call: "register", + data: Register { + id, + genesis_head, + validation_code, + }, + }, + [ + 154u8, 84u8, 201u8, 125u8, 72u8, 69u8, 188u8, 42u8, 225u8, + 14u8, 136u8, 48u8, 78u8, 86u8, 99u8, 238u8, 252u8, 255u8, + 226u8, 219u8, 214u8, 17u8, 19u8, 9u8, 12u8, 13u8, 174u8, + 243u8, 37u8, 134u8, 76u8, 23u8, + ], + ) } #[doc = "Force the registration of a Para Id on the relay chain."] #[doc = ""] @@ -37983,46 +26216,34 @@ pub mod api { #[doc = "can be registered, including sub-1000 IDs which are System Parachains."] pub fn force_register( &self, - who: ::subxt::sp_core::crypto::AccountId32, + 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, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceRegister, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 191u8, 198u8, 172u8, 68u8, 118u8, 126u8, 110u8, 47u8, 193u8, - 147u8, 61u8, 27u8, 122u8, 107u8, 49u8, 222u8, 87u8, 199u8, - 184u8, 247u8, 153u8, 137u8, 205u8, 153u8, 6u8, 15u8, 246u8, - 8u8, 36u8, 76u8, 54u8, 63u8, - ] - { - let call = ForceRegister { - who, - deposit, - id, - genesis_head, - validation_code, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Registrar", + call: "force_register", + data: ForceRegister { + who, + deposit, + id, + genesis_head, + validation_code, + }, + }, + [ + 59u8, 24u8, 236u8, 163u8, 53u8, 49u8, 92u8, 199u8, 38u8, + 76u8, 101u8, 73u8, 166u8, 105u8, 145u8, 55u8, 89u8, 30u8, + 30u8, 137u8, 151u8, 219u8, 116u8, 226u8, 168u8, 220u8, 222u8, + 6u8, 105u8, 91u8, 254u8, 216u8, + ], + ) } #[doc = "Deregister a Para Id, freeing all data and returning any deposit."] #[doc = ""] @@ -38030,35 +26251,23 @@ pub mod api { pub fn deregister( &self, id: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Deregister, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 147u8, 4u8, 172u8, 215u8, 67u8, 142u8, 93u8, 245u8, 108u8, - 83u8, 5u8, 250u8, 87u8, 138u8, 231u8, 10u8, 159u8, 216u8, - 85u8, 233u8, 244u8, 200u8, 37u8, 33u8, 160u8, 143u8, 119u8, - 11u8, 70u8, 177u8, 8u8, 123u8, - ] - { - let call = Deregister { id }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Registrar", + call: "deregister", + data: Deregister { id }, + }, + [ + 137u8, 9u8, 146u8, 11u8, 126u8, 125u8, 186u8, 222u8, 246u8, + 199u8, 94u8, 229u8, 147u8, 245u8, 213u8, 51u8, 203u8, 181u8, + 78u8, 87u8, 18u8, 255u8, 79u8, 107u8, 234u8, 2u8, 21u8, + 212u8, 1u8, 73u8, 173u8, 253u8, + ], + ) } #[doc = "Swap a parachain with another parachain or parathread."] #[doc = ""] @@ -38075,35 +26284,23 @@ pub mod api { &self, id: runtime_types::polkadot_parachain::primitives::Id, other: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Swap, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 145u8, 163u8, 246u8, 239u8, 241u8, 209u8, 58u8, 241u8, 63u8, - 134u8, 102u8, 55u8, 217u8, 125u8, 176u8, 91u8, 27u8, 32u8, - 220u8, 236u8, 18u8, 20u8, 7u8, 187u8, 100u8, 116u8, 161u8, - 133u8, 127u8, 187u8, 86u8, 109u8, - ] - { - let call = Swap { id, other }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Registrar", + call: "swap", + data: Swap { id, other }, + }, + [ + 238u8, 154u8, 249u8, 250u8, 57u8, 242u8, 47u8, 17u8, 50u8, + 70u8, 124u8, 189u8, 193u8, 137u8, 107u8, 138u8, 216u8, 137u8, + 160u8, 103u8, 192u8, 133u8, 7u8, 130u8, 41u8, 39u8, 47u8, + 139u8, 202u8, 7u8, 84u8, 214u8, + ], + ) } #[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."] @@ -38112,35 +26309,23 @@ pub mod api { pub fn force_remove_lock( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceRemoveLock, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 205u8, 174u8, 132u8, 188u8, 1u8, 59u8, 82u8, 135u8, 123u8, - 55u8, 144u8, 39u8, 205u8, 171u8, 13u8, 252u8, 65u8, 56u8, - 98u8, 216u8, 23u8, 175u8, 16u8, 200u8, 198u8, 252u8, 133u8, - 238u8, 81u8, 142u8, 254u8, 124u8, - ] - { - let call = ForceRemoveLock { para }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Registrar", + call: "force_remove_lock", + data: ForceRemoveLock { para }, + }, + [ + 161u8, 77u8, 236u8, 143u8, 243u8, 159u8, 88u8, 61u8, 217u8, + 140u8, 161u8, 61u8, 20u8, 76u8, 130u8, 59u8, 85u8, 219u8, + 105u8, 234u8, 146u8, 142u8, 121u8, 154u8, 170u8, 210u8, + 204u8, 175u8, 160u8, 86u8, 249u8, 150u8, + ], + ) } #[doc = "Reserve a Para Id on the relay chain."] #[doc = ""] @@ -38158,35 +26343,23 @@ pub mod api { #[doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] pub fn reserve( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Reserve, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Registrar", + call: "reserve", + data: Reserve {}, + }, + [ 22u8, 210u8, 13u8, 54u8, 253u8, 13u8, 89u8, 174u8, 232u8, 119u8, 148u8, 206u8, 130u8, 133u8, 199u8, 127u8, 201u8, 205u8, 8u8, 213u8, 108u8, 93u8, 135u8, 88u8, 238u8, 171u8, 31u8, 193u8, 23u8, 113u8, 106u8, 135u8, - ] - { - let call = Reserve {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } } } @@ -38195,374 +26368,258 @@ pub mod api { runtime_types::polkadot_runtime_common::paras_registrar::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Registered { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub manager: ::subxt::sp_core::crypto::AccountId32, + pub manager: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Registered { + impl ::subxt::events::StaticEvent for Registered { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Registered"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Deregistered { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for Deregistered { + impl ::subxt::events::StaticEvent for Deregistered { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Deregistered"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Reserved { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, } - impl ::subxt::Event for Reserved { + impl ::subxt::events::StaticEvent for Reserved { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Reserved"; } } pub mod storage { use super::runtime_types; - pub struct PendingSwap<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for PendingSwap<'_> { - const PALLET: &'static str = "Registrar"; - const STORAGE: &'static str = "PendingSwap"; - type Value = runtime_types::polkadot_parachain::primitives::Id; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Paras<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for Paras<'_> { - const PALLET: &'static str = "Registrar"; - const STORAGE: &'static str = "Paras"; - type Value = - runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct NextFreeParaId; - impl ::subxt::StorageEntry for NextFreeParaId { - const PALLET: &'static str = "Registrar"; - const STORAGE: &'static str = "NextFreeParaId"; - type Value = runtime_types::polkadot_parachain::primitives::Id; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Pending swap operations."] pub fn pending_swap( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 130u8, 4u8, 116u8, 91u8, 196u8, 41u8, 66u8, 48u8, 17u8, - 2u8, 255u8, 189u8, 132u8, 10u8, 129u8, 102u8, 117u8, - 56u8, 114u8, 231u8, 78u8, 112u8, 11u8, 76u8, 152u8, 41u8, - 70u8, 232u8, 212u8, 71u8, 193u8, 107u8, - ] - { - let entry = PendingSwap(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::Id, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Registrar", + "PendingSwap", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 121u8, 124u8, 4u8, 120u8, 173u8, 48u8, 227u8, 135u8, 72u8, + 74u8, 238u8, 230u8, 1u8, 175u8, 33u8, 241u8, 138u8, 82u8, + 217u8, 129u8, 138u8, 107u8, 59u8, 8u8, 205u8, 244u8, 192u8, + 159u8, 171u8, 123u8, 149u8, 174u8, + ], + ) } #[doc = " Pending swap operations."] - pub fn pending_swap_iter( + pub fn pending_swap_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingSwap<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 130u8, 4u8, 116u8, 91u8, 196u8, 41u8, 66u8, 48u8, 17u8, - 2u8, 255u8, 189u8, 132u8, 10u8, 129u8, 102u8, 117u8, - 56u8, 114u8, 231u8, 78u8, 112u8, 11u8, 76u8, 152u8, 41u8, - 70u8, 232u8, 212u8, 71u8, 193u8, 107u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::Id, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Registrar", + "PendingSwap", + Vec::new(), + [ + 121u8, 124u8, 4u8, 120u8, 173u8, 48u8, 227u8, 135u8, 72u8, + 74u8, 238u8, 230u8, 1u8, 175u8, 33u8, 241u8, 138u8, 82u8, + 217u8, 129u8, 138u8, 107u8, 59u8, 8u8, 205u8, 244u8, 192u8, + 159u8, 171u8, 123u8, 149u8, 174u8, + ], + ) } #[doc = " Amount held on deposit for each para and the original depositor."] #[doc = ""] #[doc = " The given account ID is responsible for registering the code and initial head data, but may only do"] - #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] pub fn paras (& self , _0 : & 'a runtime_types :: polkadot_parachain :: primitives :: Id , block_hash : :: core :: option :: Option < T :: Hash > ,) -> impl :: core :: future :: Future < Output = :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: paras_registrar :: ParaInfo < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 > > , :: subxt :: BasicError > > + 'a{ - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 180u8, 146u8, 122u8, 242u8, 222u8, 203u8, 19u8, 110u8, - 22u8, 53u8, 147u8, 127u8, 165u8, 158u8, 113u8, 196u8, - 105u8, 209u8, 45u8, 250u8, 163u8, 78u8, 120u8, 129u8, - 180u8, 128u8, 63u8, 195u8, 71u8, 176u8, 247u8, 206u8, - ] - { - let entry = Paras(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] + pub fn paras( + &self, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Registrar", + "Paras", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 149u8, 3u8, 25u8, 145u8, 60u8, 126u8, 219u8, 71u8, 88u8, + 241u8, 122u8, 99u8, 134u8, 191u8, 60u8, 172u8, 230u8, 230u8, + 110u8, 31u8, 43u8, 6u8, 146u8, 161u8, 51u8, 21u8, 169u8, + 220u8, 240u8, 218u8, 124u8, 56u8, + ], + ) } #[doc = " Amount held on deposit for each para and the original depositor."] #[doc = ""] #[doc = " The given account ID is responsible for registering the code and initial head data, but may only do"] #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] - pub fn paras_iter( + pub fn paras_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Paras<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 180u8, 146u8, 122u8, 242u8, 222u8, 203u8, 19u8, 110u8, - 22u8, 53u8, 147u8, 127u8, 165u8, 158u8, 113u8, 196u8, - 105u8, 209u8, 45u8, 250u8, 163u8, 78u8, 120u8, 129u8, - 180u8, 128u8, 63u8, 195u8, 71u8, 176u8, 247u8, 206u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Registrar", + "Paras", + Vec::new(), + [ + 149u8, 3u8, 25u8, 145u8, 60u8, 126u8, 219u8, 71u8, 88u8, + 241u8, 122u8, 99u8, 134u8, 191u8, 60u8, 172u8, 230u8, 230u8, + 110u8, 31u8, 43u8, 6u8, 146u8, 161u8, 51u8, 21u8, 169u8, + 220u8, 240u8, 218u8, 124u8, 56u8, + ], + ) } #[doc = " The next free `ParaId`."] pub fn next_free_para_id( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 112u8, 52u8, 84u8, 181u8, 132u8, 61u8, 46u8, 69u8, 165u8, - 85u8, 253u8, 243u8, 228u8, 151u8, 15u8, 239u8, 172u8, - 28u8, 102u8, 38u8, 155u8, 90u8, 55u8, 162u8, 254u8, - 139u8, 59u8, 186u8, 152u8, 239u8, 53u8, 216u8, - ] - { - let entry = NextFreeParaId; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_parachain::primitives::Id, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Registrar", + "NextFreeParaId", + vec![], + [ + 139u8, 76u8, 36u8, 150u8, 237u8, 36u8, 143u8, 242u8, 252u8, + 29u8, 236u8, 168u8, 97u8, 50u8, 175u8, 120u8, 83u8, 118u8, + 205u8, 64u8, 95u8, 65u8, 7u8, 230u8, 171u8, 86u8, 189u8, + 205u8, 231u8, 211u8, 97u8, 29u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The deposit to be paid to run a parathread."] #[doc = " This should include the cost for storing the genesis head and validation code."] pub fn para_deposit( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Registrar", "ParaDeposit")? - == [ - 18u8, 109u8, 161u8, 161u8, 151u8, 174u8, 243u8, 90u8, 220u8, - 82u8, 192u8, 60u8, 26u8, 123u8, 90u8, 99u8, 36u8, 86u8, - 106u8, 101u8, 215u8, 154u8, 136u8, 220u8, 246u8, 185u8, - 126u8, 229u8, 205u8, 246u8, 61u8, 50u8, - ] - { - let pallet = metadata.pallet("Registrar")?; - let constant = pallet.constant("ParaDeposit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Registrar", + "ParaDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " The deposit to be paid per byte stored on chain."] pub fn data_deposit_per_byte( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Registrar", "DataDepositPerByte")? - == [ - 112u8, 186u8, 158u8, 252u8, 99u8, 4u8, 201u8, 234u8, 99u8, - 14u8, 248u8, 198u8, 79u8, 107u8, 41u8, 32u8, 63u8, 205u8, - 85u8, 30u8, 30u8, 105u8, 250u8, 248u8, 106u8, 75u8, 74u8, - 175u8, 224u8, 115u8, 236u8, 99u8, - ] - { - let pallet = metadata.pallet("Registrar")?; - let constant = pallet.constant("DataDepositPerByte")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Registrar", + "DataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } } } } pub mod slots { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceLease { pub para: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub leaser: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, } - impl ::subxt::Call for ForceLease { - const PALLET: &'static str = "Slots"; - const FUNCTION: &'static str = "force_lease"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ClearAllLeases { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ClearAllLeases { - const PALLET: &'static str = "Slots"; - const FUNCTION: &'static str = "clear_all_leases"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct TriggerOnboard { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for TriggerOnboard { - const PALLET: &'static str = "Slots"; - const FUNCTION: &'static str = "trigger_onboard"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Just a connect into the `lease_out` call, in case Root wants to force some lease to happen"] #[doc = "independently of any other on-chain mechanism to use it."] #[doc = ""] @@ -38570,45 +26627,33 @@ pub mod api { pub fn force_lease( &self, para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::sp_core::crypto::AccountId32, + leaser: ::subxt::ext::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceLease, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 110u8, 205u8, 106u8, 226u8, 3u8, 177u8, 198u8, 116u8, 52u8, - 161u8, 90u8, 240u8, 43u8, 160u8, 144u8, 63u8, 97u8, 231u8, - 232u8, 176u8, 92u8, 253u8, 16u8, 243u8, 187u8, 94u8, 20u8, - 114u8, 23u8, 46u8, 231u8, 249u8, - ] - { - let call = ForceLease { - para, - leaser, - amount, - period_begin, - period_count, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Slots", + call: "force_lease", + data: ForceLease { + para, + leaser, + amount, + period_begin, + period_count, + }, + }, + [ + 196u8, 2u8, 63u8, 229u8, 18u8, 134u8, 48u8, 4u8, 165u8, 46u8, + 173u8, 0u8, 189u8, 35u8, 99u8, 84u8, 103u8, 124u8, 233u8, + 246u8, 60u8, 172u8, 181u8, 205u8, 154u8, 164u8, 36u8, 178u8, + 60u8, 164u8, 166u8, 21u8, + ], + ) } #[doc = "Clear all leases for a Para Id, refunding any deposits back to the original owners."] #[doc = ""] @@ -38616,35 +26661,23 @@ pub mod api { pub fn clear_all_leases( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ClearAllLeases, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 101u8, 225u8, 10u8, 139u8, 34u8, 12u8, 48u8, 76u8, 97u8, - 178u8, 5u8, 110u8, 19u8, 3u8, 237u8, 183u8, 54u8, 113u8, 7u8, - 138u8, 180u8, 201u8, 245u8, 151u8, 61u8, 40u8, 69u8, 31u8, - 28u8, 172u8, 253u8, 227u8, - ] - { - let call = ClearAllLeases { para }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Slots", + call: "clear_all_leases", + data: ClearAllLeases { para }, + }, + [ + 16u8, 14u8, 185u8, 45u8, 149u8, 70u8, 177u8, 133u8, 130u8, + 173u8, 196u8, 244u8, 77u8, 63u8, 218u8, 64u8, 108u8, 83u8, + 84u8, 184u8, 175u8, 122u8, 36u8, 115u8, 146u8, 117u8, 132u8, + 82u8, 2u8, 144u8, 62u8, 179u8, + ], + ) } #[doc = "Try to onboard a parachain that has a lease for the current lease period."] #[doc = ""] @@ -38656,35 +26689,23 @@ pub mod api { pub fn trigger_onboard( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - TriggerOnboard, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 85u8, 246u8, 247u8, 252u8, 46u8, 143u8, 200u8, 102u8, 105u8, - 51u8, 148u8, 164u8, 27u8, 25u8, 139u8, 167u8, 150u8, 129u8, - 131u8, 187u8, 153u8, 6u8, 169u8, 153u8, 192u8, 116u8, 130u8, - 12u8, 22u8, 199u8, 52u8, 8u8, - ] - { - let call = TriggerOnboard { para }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Slots", + call: "trigger_onboard", + data: TriggerOnboard { para }, + }, + [ + 74u8, 158u8, 122u8, 37u8, 34u8, 62u8, 61u8, 218u8, 94u8, + 222u8, 1u8, 153u8, 131u8, 215u8, 157u8, 180u8, 98u8, 130u8, + 151u8, 179u8, 22u8, 120u8, 32u8, 207u8, 208u8, 46u8, 248u8, + 43u8, 154u8, 118u8, 106u8, 2u8, + ], + ) } } } @@ -38693,64 +26714,44 @@ pub mod api { pub mod events { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "A new `[lease_period]` is beginning."] pub struct NewLeasePeriod { pub lease_period: ::core::primitive::u32, } - impl ::subxt::Event for NewLeasePeriod { + impl ::subxt::events::StaticEvent for NewLeasePeriod { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "NewLeasePeriod"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A para has won the right to a continuous set of lease periods as a parachain."] #[doc = "First balance is any extra amount reserved on top of the para's existing deposit."] #[doc = "Second balance is the total amount reserved."] pub struct Leased { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub leaser: ::subxt::ext::sp_core::crypto::AccountId32, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, pub extra_reserved: ::core::primitive::u128, pub total_amount: ::core::primitive::u128, } - impl ::subxt::Event for Leased { + impl ::subxt::events::StaticEvent for Leased { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "Leased"; } } pub mod storage { use super::runtime_types; - pub struct Leases<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for Leases<'_> { - const PALLET: &'static str = "Slots"; - const STORAGE: &'static str = "Leases"; - type Value = ::std::vec::Vec< - ::core::option::Option<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Amounts held on deposit for each (possibly future) leased parachain."] #[doc = ""] #[doc = " The actual amount locked on its behalf by any account at any time is the maximum of the second values"] @@ -38769,43 +26770,32 @@ pub mod api { #[doc = " It is illegal for a `None` value to trail in the list."] pub fn leases( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - ::core::option::Option<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - >, - ::subxt::BasicError, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + ::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 83u8, 145u8, 119u8, 74u8, 166u8, 90u8, 141u8, 47u8, - 125u8, 250u8, 173u8, 63u8, 193u8, 78u8, 96u8, 119u8, - 111u8, 126u8, 83u8, 83u8, 80u8, 32u8, 43u8, 173u8, 123u8, - 126u8, 132u8, 166u8, 252u8, 39u8, 18u8, 39u8, - ] - { - let entry = Leases(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Slots", + "Leases", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 7u8, 104u8, 17u8, 66u8, 157u8, 89u8, 238u8, 38u8, 233u8, + 241u8, 110u8, 67u8, 132u8, 101u8, 243u8, 62u8, 73u8, 7u8, + 9u8, 172u8, 22u8, 51u8, 118u8, 87u8, 3u8, 224u8, 120u8, 88u8, + 139u8, 11u8, 96u8, 147u8, + ], + ) } #[doc = " Amounts held on deposit for each (possibly future) leased parachain."] #[doc = ""] @@ -38823,125 +26813,100 @@ pub mod api { #[doc = " deposit for the non-existent chain currently, but is held at some point in the future."] #[doc = ""] #[doc = " It is illegal for a `None` value to trail in the list."] - pub fn leases_iter( + pub fn leases_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Leases<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec< + ::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 83u8, 145u8, 119u8, 74u8, 166u8, 90u8, 141u8, 47u8, - 125u8, 250u8, 173u8, 63u8, 193u8, 78u8, 96u8, 119u8, - 111u8, 126u8, 83u8, 83u8, 80u8, 32u8, 43u8, 173u8, 123u8, - 126u8, 132u8, 166u8, 252u8, 39u8, 18u8, 39u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Slots", + "Leases", + Vec::new(), + [ + 7u8, 104u8, 17u8, 66u8, 157u8, 89u8, 238u8, 38u8, 233u8, + 241u8, 110u8, 67u8, 132u8, 101u8, 243u8, 62u8, 73u8, 7u8, + 9u8, 172u8, 22u8, 51u8, 118u8, 87u8, 3u8, 224u8, 120u8, 88u8, + 139u8, 11u8, 96u8, 147u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The number of blocks over which a single period lasts."] pub fn lease_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Slots", "LeasePeriod")? - == [ - 203u8, 21u8, 3u8, 22u8, 25u8, 46u8, 2u8, 223u8, 51u8, 234u8, - 160u8, 236u8, 54u8, 225u8, 52u8, 36u8, 60u8, 150u8, 37u8, - 13u8, 215u8, 134u8, 181u8, 100u8, 254u8, 3u8, 173u8, 154u8, - 74u8, 103u8, 124u8, 100u8, - ] - { - let pallet = metadata.pallet("Slots")?; - let constant = pallet.constant("LeasePeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Slots", + "LeasePeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The number of blocks to offset each lease period by."] pub fn lease_offset( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Slots", "LeaseOffset")? - == [ - 7u8, 48u8, 194u8, 175u8, 129u8, 96u8, 39u8, 178u8, 104u8, - 157u8, 176u8, 78u8, 10u8, 5u8, 196u8, 122u8, 210u8, 168u8, - 167u8, 128u8, 21u8, 134u8, 90u8, 3u8, 108u8, 207u8, 62u8, - 81u8, 246u8, 70u8, 49u8, 68u8, - ] - { - let pallet = metadata.pallet("Slots")?; - let constant = pallet.constant("LeaseOffset")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Slots", + "LeaseOffset", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod auctions { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NewAuction { #[codec(compact)] pub duration: ::core::primitive::u32, #[codec(compact)] pub lease_period_index: ::core::primitive::u32, } - impl ::subxt::Call for NewAuction { - const PALLET: &'static str = "Auctions"; - const FUNCTION: &'static str = "new_auction"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Bid { #[codec(compact)] pub para: runtime_types::polkadot_parachain::primitives::Id, @@ -38954,31 +26919,14 @@ pub mod api { #[codec(compact)] pub amount: ::core::primitive::u128, } - impl ::subxt::Call for Bid { - const PALLET: &'static str = "Auctions"; - const FUNCTION: &'static str = "bid"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct CancelAuction; - impl ::subxt::Call for CancelAuction { - const PALLET: &'static str = "Auctions"; - const FUNCTION: &'static str = "cancel_auction"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Create a new auction."] #[doc = ""] #[doc = "This can only happen when there isn't already an auction in progress and may only be"] @@ -38988,38 +26936,26 @@ pub mod api { &self, duration: ::core::primitive::u32, lease_period_index: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - NewAuction, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 12u8, 43u8, 152u8, 0u8, 229u8, 15u8, 32u8, 205u8, 208u8, - 71u8, 57u8, 169u8, 201u8, 177u8, 52u8, 10u8, 93u8, 183u8, - 5u8, 156u8, 231u8, 188u8, 77u8, 238u8, 119u8, 238u8, 87u8, - 251u8, 121u8, 199u8, 18u8, 129u8, - ] - { - let call = NewAuction { - duration, - lease_period_index, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Auctions", + call: "new_auction", + data: NewAuction { + duration, + lease_period_index, + }, + }, + [ + 171u8, 40u8, 200u8, 164u8, 213u8, 10u8, 145u8, 164u8, 212u8, + 14u8, 117u8, 215u8, 248u8, 59u8, 34u8, 79u8, 50u8, 176u8, + 164u8, 143u8, 92u8, 82u8, 207u8, 37u8, 103u8, 252u8, 255u8, + 142u8, 239u8, 134u8, 114u8, 151u8, + ], + ) } #[doc = "Make a new bid from an account (including a parachain account) for deploying a new"] #[doc = "parachain."] @@ -39044,76 +26980,52 @@ pub mod api { first_slot: ::core::primitive::u32, last_slot: ::core::primitive::u32, amount: ::core::primitive::u128, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Bid, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 206u8, 22u8, 15u8, 251u8, 222u8, 193u8, 192u8, 125u8, 160u8, - 131u8, 209u8, 129u8, 105u8, 46u8, 77u8, 204u8, 107u8, 112u8, - 13u8, 188u8, 193u8, 73u8, 225u8, 232u8, 179u8, 205u8, 39u8, - 69u8, 242u8, 79u8, 36u8, 121u8, - ] - { - let call = Bid { - para, - auction_index, - first_slot, - last_slot, - amount, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Auctions", + call: "bid", + data: Bid { + para, + auction_index, + first_slot, + last_slot, + amount, + }, + }, + [ + 243u8, 233u8, 248u8, 221u8, 239u8, 59u8, 65u8, 63u8, 125u8, + 129u8, 202u8, 165u8, 30u8, 228u8, 32u8, 73u8, 225u8, 38u8, + 128u8, 98u8, 102u8, 46u8, 203u8, 32u8, 70u8, 74u8, 136u8, + 163u8, 83u8, 211u8, 227u8, 139u8, + ], + ) } #[doc = "Cancel an in-progress auction."] #[doc = ""] #[doc = "Can only be called by Root origin."] pub fn cancel_auction( &self, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - CancelAuction, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Auctions", + call: "cancel_auction", + data: CancelAuction {}, + }, + [ 182u8, 223u8, 178u8, 136u8, 1u8, 115u8, 229u8, 78u8, 166u8, 128u8, 28u8, 106u8, 6u8, 248u8, 46u8, 55u8, 110u8, 120u8, 213u8, 11u8, 90u8, 217u8, 42u8, 120u8, 47u8, 83u8, 126u8, 216u8, 236u8, 251u8, 255u8, 50u8, - ] - { - let call = CancelAuction {}; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ], + ) } } } @@ -39121,7 +27033,11 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_common::auctions::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An auction started. Provides its index and the block number where it will begin to"] #[doc = "close and the first lease period of the quadruplet that is auctioned."] pub struct AuctionStarted { @@ -39129,174 +27045,126 @@ pub mod api { pub lease_period: ::core::primitive::u32, pub ending: ::core::primitive::u32, } - impl ::subxt::Event for AuctionStarted { + impl ::subxt::events::StaticEvent for AuctionStarted { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionStarted"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "An auction ended. All funds become unreserved."] pub struct AuctionClosed { pub auction_index: ::core::primitive::u32, } - impl ::subxt::Event for AuctionClosed { + impl ::subxt::events::StaticEvent for AuctionClosed { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionClosed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[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::sp_core::crypto::AccountId32, + pub bidder: ::subxt::ext::sp_core::crypto::AccountId32, pub extra_reserved: ::core::primitive::u128, pub total_amount: ::core::primitive::u128, } - impl ::subxt::Event for Reserved { + impl ::subxt::events::StaticEvent for Reserved { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Reserved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] pub struct Unreserved { - pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub bidder: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Unreserved { + impl ::subxt::events::StaticEvent for Unreserved { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Unreserved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] #[doc = "but no parachain slot has been leased."] pub struct ReserveConfiscated { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub leaser: ::subxt::ext::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for ReserveConfiscated { + impl ::subxt::events::StaticEvent for ReserveConfiscated { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "ReserveConfiscated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A new bid has been accepted as the current winner."] pub struct BidAccepted { - pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub bidder: ::subxt::ext::sp_core::crypto::AccountId32, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, pub first_slot: ::core::primitive::u32, pub last_slot: ::core::primitive::u32, } - impl ::subxt::Event for BidAccepted { + impl ::subxt::events::StaticEvent for BidAccepted { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "BidAccepted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The winning offset was chosen for an auction. This will map into the `Winning` storage map."] pub struct WinningOffset { pub auction_index: ::core::primitive::u32, pub block_number: ::core::primitive::u32, } - impl ::subxt::Event for WinningOffset { + impl ::subxt::events::StaticEvent for WinningOffset { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "WinningOffset"; } } pub mod storage { use super::runtime_types; - pub struct AuctionCounter; - impl ::subxt::StorageEntry for AuctionCounter { - const PALLET: &'static str = "Auctions"; - const STORAGE: &'static str = "AuctionCounter"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct AuctionInfo; - impl ::subxt::StorageEntry for AuctionInfo { - const PALLET: &'static str = "Auctions"; - const STORAGE: &'static str = "AuctionInfo"; - type Value = (::core::primitive::u32, ::core::primitive::u32); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ReservedAmounts<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for ReservedAmounts<'_> { - const PALLET: &'static str = "Auctions"; - const STORAGE: &'static str = "ReservedAmounts"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct Winning<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Winning<'_> { - const PALLET: &'static str = "Auctions"; - const STORAGE: &'static str = "Winning"; - type Value = [::core::option::Option<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - )>; 36usize]; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Number of auctions started so far."] pub fn auction_counter( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 67u8, 247u8, 96u8, 152u8, 0u8, 224u8, 230u8, 98u8, 194u8, - 107u8, 3u8, 203u8, 51u8, 201u8, 149u8, 22u8, 184u8, 80u8, - 251u8, 239u8, 253u8, 19u8, 58u8, 192u8, 65u8, 96u8, - 189u8, 54u8, 175u8, 130u8, 143u8, 181u8, - ] - { - let entry = AuctionCounter; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Auctions", + "AuctionCounter", + vec![], + [ + 67u8, 247u8, 96u8, 152u8, 0u8, 224u8, 230u8, 98u8, 194u8, + 107u8, 3u8, 203u8, 51u8, 201u8, 149u8, 22u8, 184u8, 80u8, + 251u8, 239u8, 253u8, 19u8, 58u8, 192u8, 65u8, 96u8, 189u8, + 54u8, 175u8, 130u8, 143u8, 181u8, + ], + ) } #[doc = " Information relating to the current auction, if there is one."] #[doc = ""] @@ -39305,317 +27173,225 @@ pub mod api { #[doc = " auction will \"begin to end\", i.e. the first block of the Ending Period of the auction."] pub fn auction_info( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 73u8, 216u8, 173u8, 230u8, 132u8, 78u8, 83u8, 62u8, - 200u8, 69u8, 17u8, 73u8, 57u8, 107u8, 160u8, 90u8, 147u8, - 84u8, 29u8, 110u8, 144u8, 215u8, 169u8, 110u8, 217u8, - 77u8, 109u8, 204u8, 1u8, 164u8, 95u8, 83u8, - ] - { - let entry = AuctionInfo; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + (::core::primitive::u32, ::core::primitive::u32), + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Auctions", + "AuctionInfo", + vec![], + [ + 73u8, 216u8, 173u8, 230u8, 132u8, 78u8, 83u8, 62u8, 200u8, + 69u8, 17u8, 73u8, 57u8, 107u8, 160u8, 90u8, 147u8, 84u8, + 29u8, 110u8, 144u8, 215u8, 169u8, 110u8, 217u8, 77u8, 109u8, + 204u8, 1u8, 164u8, 95u8, 83u8, + ], + ) } #[doc = " Amounts currently reserved in the accounts of the bidders currently winning"] #[doc = " (sub-)ranges."] pub fn reserved_amounts( &self, - _0: &'a ::subxt::sp_core::crypto::AccountId32, - _1: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 195u8, 56u8, 142u8, 154u8, 193u8, 115u8, 13u8, 64u8, - 101u8, 179u8, 69u8, 175u8, 185u8, 12u8, 31u8, 65u8, - 147u8, 211u8, 74u8, 40u8, 190u8, 254u8, 190u8, 176u8, - 117u8, 159u8, 234u8, 214u8, 157u8, 83u8, 56u8, 192u8, - ] - { - let entry = ReservedAmounts(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::crypto::AccountId32, + _1: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Auctions", + "ReservedAmounts", + vec![::subxt::storage::address::StorageMapKey::new( + &(_0, _1), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, + 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, + 66u8, 188u8, 137u8, 111u8, 110u8, 152u8, 18u8, 233u8, 76u8, + 166u8, 55u8, 233u8, 93u8, 62u8, + ], + ) } #[doc = " Amounts currently reserved in the accounts of the bidders currently winning"] #[doc = " (sub-)ranges."] - pub fn reserved_amounts_iter( + pub fn reserved_amounts_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, ReservedAmounts<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 195u8, 56u8, 142u8, 154u8, 193u8, 115u8, 13u8, 64u8, - 101u8, 179u8, 69u8, 175u8, 185u8, 12u8, 31u8, 65u8, - 147u8, 211u8, 74u8, 40u8, 190u8, 254u8, 190u8, 176u8, - 117u8, 159u8, 234u8, 214u8, 157u8, 83u8, 56u8, 192u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u128, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Auctions", + "ReservedAmounts", + Vec::new(), + [ + 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, + 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, + 66u8, 188u8, 137u8, 111u8, 110u8, 152u8, 18u8, 233u8, 76u8, + 166u8, 55u8, 233u8, 93u8, 62u8, + ], + ) } #[doc = " The winning bids for each of the 10 ranges at each sample in the final Ending Period of"] #[doc = " the current auction. The map's key is the 0-based index into the Sample Size. The"] #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] pub fn winning( &self, - _0: &'a ::core::primitive::u32, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - [::core::option::Option<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - )>; 36usize], - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 152u8, 246u8, 158u8, 193u8, 21u8, 56u8, 204u8, 29u8, - 146u8, 90u8, 133u8, 246u8, 75u8, 111u8, 157u8, 150u8, - 175u8, 33u8, 127u8, 215u8, 158u8, 55u8, 231u8, 78u8, - 143u8, 128u8, 92u8, 70u8, 61u8, 23u8, 43u8, 68u8, - ] - { - let entry = Winning(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + [::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u128, + )>; 36usize], + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Auctions", + "Winning", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 63u8, 56u8, 143u8, 200u8, 12u8, 71u8, 187u8, 73u8, 215u8, + 93u8, 222u8, 102u8, 5u8, 113u8, 6u8, 170u8, 95u8, 228u8, + 28u8, 58u8, 109u8, 62u8, 3u8, 125u8, 211u8, 139u8, 194u8, + 30u8, 151u8, 147u8, 47u8, 205u8, + ], + ) } #[doc = " The winning bids for each of the 10 ranges at each sample in the final Ending Period of"] #[doc = " the current auction. The map's key is the 0-based index into the Sample Size. The"] #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] - pub fn winning_iter( + pub fn winning_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Winning<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 152u8, 246u8, 158u8, 193u8, 21u8, 56u8, 204u8, 29u8, - 146u8, 90u8, 133u8, 246u8, 75u8, 111u8, 157u8, 150u8, - 175u8, 33u8, 127u8, 215u8, 158u8, 55u8, 231u8, 78u8, - 143u8, 128u8, 92u8, 70u8, 61u8, 23u8, 43u8, 68u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + [::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u128, + )>; 36usize], + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Auctions", + "Winning", + Vec::new(), + [ + 63u8, 56u8, 143u8, 200u8, 12u8, 71u8, 187u8, 73u8, 215u8, + 93u8, 222u8, 102u8, 5u8, 113u8, 6u8, 170u8, 95u8, 228u8, + 28u8, 58u8, 109u8, 62u8, 3u8, 125u8, 211u8, 139u8, 194u8, + 30u8, 151u8, 147u8, 47u8, 205u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " The number of blocks over which an auction may be retroactively ended."] pub fn ending_period( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Auctions", "EndingPeriod")? - == [ - 36u8, 136u8, 230u8, 163u8, 145u8, 185u8, 224u8, 85u8, 228u8, - 249u8, 226u8, 140u8, 117u8, 32u8, 173u8, 235u8, 99u8, 200u8, - 48u8, 233u8, 15u8, 68u8, 24u8, 246u8, 90u8, 108u8, 91u8, - 242u8, 48u8, 102u8, 65u8, 252u8, - ] - { - let pallet = metadata.pallet("Auctions")?; - let constant = pallet.constant("EndingPeriod")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Auctions", + "EndingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } #[doc = " The length of each sample to take during the ending period."] #[doc = ""] #[doc = " `EndingPeriod` / `SampleLength` = Total # of Samples"] pub fn sample_length( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Auctions", "SampleLength")? - == [ - 54u8, 145u8, 242u8, 8u8, 50u8, 152u8, 192u8, 64u8, 134u8, - 155u8, 104u8, 48u8, 117u8, 6u8, 58u8, 223u8, 15u8, 161u8, - 54u8, 22u8, 193u8, 71u8, 47u8, 70u8, 119u8, 122u8, 98u8, - 138u8, 117u8, 164u8, 144u8, 16u8, - ] - { - let pallet = metadata.pallet("Auctions")?; - let constant = pallet.constant("SampleLength")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Auctions", + "SampleLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } pub fn slot_range_count( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Auctions", "SlotRangeCount")? - == [ - 32u8, 147u8, 38u8, 54u8, 172u8, 189u8, 240u8, 136u8, 216u8, - 182u8, 191u8, 129u8, 122u8, 1u8, 129u8, 244u8, 180u8, 210u8, - 219u8, 142u8, 224u8, 151u8, 237u8, 192u8, 103u8, 206u8, - 101u8, 131u8, 78u8, 181u8, 163u8, 44u8, - ] - { - let pallet = metadata.pallet("Auctions")?; - let constant = pallet.constant("SlotRangeCount")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Auctions", + "SlotRangeCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } pub fn lease_periods_per_slot( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Auctions", "LeasePeriodsPerSlot")? - == [ - 174u8, 18u8, 150u8, 44u8, 219u8, 36u8, 218u8, 28u8, 34u8, - 132u8, 235u8, 161u8, 23u8, 173u8, 80u8, 175u8, 93u8, 163u8, - 6u8, 226u8, 11u8, 212u8, 186u8, 119u8, 185u8, 85u8, 111u8, - 216u8, 214u8, 111u8, 148u8, 28u8, - ] - { - let pallet = metadata.pallet("Auctions")?; - let constant = pallet.constant("LeasePeriodsPerSlot")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Auctions", + "LeasePeriodsPerSlot", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod crowdloan { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Create { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -39628,13 +27404,13 @@ pub mod api { #[codec(compact)] pub end: ::core::primitive::u32, pub verifier: - ::core::option::Option, - } - impl ::subxt::Call for Create { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "create"; + ::core::option::Option, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Contribute { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -39643,39 +27419,39 @@ pub mod api { pub signature: ::core::option::Option, } - impl ::subxt::Call for Contribute { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "contribute"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Withdraw { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Withdraw { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "withdraw"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Refund { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Refund { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "refund"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Dissolve { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Dissolve { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "dissolve"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Edit { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -39690,53 +27466,36 @@ pub mod api { pub verifier: ::core::option::Option, } - impl ::subxt::Call for Edit { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "edit"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AddMemo { pub index: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for AddMemo { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "add_memo"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Poke { pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Poke { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "poke"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ContributeAll { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, pub signature: ::core::option::Option, } - impl ::subxt::Call for ContributeAll { - const PALLET: &'static str = "Crowdloan"; - const FUNCTION: &'static str = "contribute_all"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { #[doc = "Create a new crowdloaning campaign for a parachain slot with the given lease period range."] #[doc = ""] #[doc = "This applies a lock to your parachain configuration, ensuring that it cannot be changed"] @@ -39751,42 +27510,30 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Create, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 94u8, 115u8, 154u8, 239u8, 215u8, 180u8, 175u8, 240u8, 137u8, - 240u8, 74u8, 159u8, 67u8, 54u8, 69u8, 199u8, 161u8, 155u8, - 243u8, 222u8, 205u8, 163u8, 142u8, 251u8, 156u8, 94u8, 65u8, - 153u8, 39u8, 226u8, 79u8, 195u8, - ] - { - let call = Create { - index, - cap, - first_period, - last_period, - end, - verifier, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "create", + data: Create { + index, + cap, + first_period, + last_period, + end, + verifier, + }, + }, + [ + 78u8, 52u8, 156u8, 23u8, 104u8, 251u8, 20u8, 233u8, 42u8, + 231u8, 16u8, 192u8, 164u8, 68u8, 98u8, 129u8, 88u8, 126u8, + 123u8, 4u8, 210u8, 161u8, 190u8, 90u8, 67u8, 235u8, 74u8, + 184u8, 180u8, 197u8, 248u8, 238u8, + ], + ) } #[doc = "Contribute to a crowd sale. This will transfer some balance over to fund a parachain"] #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] @@ -39797,39 +27544,27 @@ pub mod api { signature: ::core::option::Option< runtime_types::sp_runtime::MultiSignature, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Contribute, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 95u8, 255u8, 35u8, 30u8, 44u8, 150u8, 10u8, 166u8, 0u8, - 204u8, 106u8, 59u8, 150u8, 254u8, 216u8, 128u8, 232u8, 129u8, - 30u8, 101u8, 196u8, 198u8, 180u8, 156u8, 122u8, 252u8, 139u8, - 28u8, 164u8, 115u8, 153u8, 109u8, - ] - { - let call = Contribute { - index, - value, - signature, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "contribute", + data: Contribute { + index, + value, + signature, + }, + }, + [ + 159u8, 180u8, 248u8, 203u8, 128u8, 231u8, 28u8, 84u8, 14u8, + 214u8, 69u8, 217u8, 62u8, 201u8, 169u8, 160u8, 45u8, 160u8, + 125u8, 255u8, 95u8, 140u8, 58u8, 3u8, 224u8, 157u8, 199u8, + 229u8, 72u8, 40u8, 218u8, 55u8, + ], + ) } #[doc = "Withdraw full balance of a specific contributor."] #[doc = ""] @@ -39850,37 +27585,25 @@ pub mod api { #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] pub fn withdraw( &self, - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Withdraw, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 67u8, 65u8, 89u8, 108u8, 193u8, 99u8, 74u8, 32u8, 163u8, - 13u8, 81u8, 131u8, 64u8, 107u8, 72u8, 23u8, 35u8, 177u8, - 130u8, 171u8, 70u8, 232u8, 246u8, 254u8, 67u8, 219u8, 84u8, - 96u8, 165u8, 20u8, 183u8, 209u8, - ] - { - let call = Withdraw { who, index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "withdraw", + data: Withdraw { who, index }, + }, + [ + 147u8, 177u8, 116u8, 152u8, 9u8, 102u8, 4u8, 201u8, 204u8, + 145u8, 104u8, 226u8, 86u8, 211u8, 66u8, 109u8, 109u8, 139u8, + 229u8, 97u8, 215u8, 101u8, 255u8, 181u8, 121u8, 139u8, 165u8, + 169u8, 112u8, 173u8, 213u8, 121u8, + ], + ) } #[doc = "Automatically refund contributors of an ended crowdloan."] #[doc = "Due to weight restrictions, this function may need to be called multiple"] @@ -39890,69 +27613,45 @@ pub mod api { pub fn refund( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Refund, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 202u8, 206u8, 79u8, 226u8, 114u8, 228u8, 110u8, 18u8, 178u8, - 173u8, 23u8, 83u8, 64u8, 11u8, 201u8, 19u8, 57u8, 75u8, - 181u8, 241u8, 231u8, 189u8, 211u8, 48u8, 82u8, 64u8, 220u8, - 22u8, 247u8, 7u8, 68u8, 211u8, - ] - { - let call = Refund { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "refund", + data: Refund { index }, + }, + [ + 223u8, 64u8, 5u8, 135u8, 15u8, 234u8, 60u8, 114u8, 199u8, + 216u8, 73u8, 165u8, 198u8, 34u8, 140u8, 142u8, 214u8, 254u8, + 203u8, 163u8, 224u8, 120u8, 104u8, 54u8, 12u8, 126u8, 72u8, + 147u8, 20u8, 180u8, 251u8, 208u8, + ], + ) } #[doc = "Remove a fund after the retirement period has ended and all funds have been returned."] pub fn dissolve( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Dissolve, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 210u8, 3u8, 221u8, 185u8, 64u8, 178u8, 56u8, 132u8, 72u8, - 127u8, 105u8, 31u8, 167u8, 107u8, 127u8, 224u8, 174u8, 221u8, - 111u8, 105u8, 47u8, 247u8, 10u8, 5u8, 37u8, 180u8, 61u8, - 180u8, 3u8, 164u8, 196u8, 194u8, - ] - { - let call = Dissolve { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "dissolve", + data: Dissolve { index }, + }, + [ + 100u8, 67u8, 105u8, 3u8, 213u8, 149u8, 201u8, 146u8, 241u8, + 62u8, 31u8, 108u8, 58u8, 30u8, 241u8, 141u8, 134u8, 115u8, + 56u8, 131u8, 60u8, 75u8, 143u8, 227u8, 11u8, 32u8, 31u8, + 230u8, 165u8, 227u8, 170u8, 126u8, + ], + ) } #[doc = "Edit the configuration for an in-progress crowdloan."] #[doc = ""] @@ -39967,42 +27666,30 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Edit, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 34u8, 43u8, 47u8, 39u8, 106u8, 245u8, 49u8, 40u8, 191u8, - 195u8, 202u8, 113u8, 137u8, 98u8, 143u8, 172u8, 191u8, 55u8, - 240u8, 75u8, 234u8, 180u8, 90u8, 206u8, 93u8, 214u8, 115u8, - 215u8, 140u8, 144u8, 105u8, 89u8, - ] - { - let call = Edit { - index, - cap, - first_period, - last_period, - end, - verifier, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "edit", + data: Edit { + index, + cap, + first_period, + last_period, + end, + verifier, + }, + }, + [ + 222u8, 124u8, 94u8, 221u8, 36u8, 183u8, 67u8, 114u8, 198u8, + 107u8, 154u8, 174u8, 142u8, 47u8, 3u8, 181u8, 72u8, 29u8, + 2u8, 83u8, 81u8, 47u8, 168u8, 142u8, 139u8, 63u8, 136u8, + 191u8, 41u8, 252u8, 221u8, 56u8, + ], + ) } #[doc = "Add an optional memo to an existing crowdloan contribution."] #[doc = ""] @@ -40011,35 +27698,23 @@ pub mod api { &self, index: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - AddMemo, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 97u8, 218u8, 115u8, 187u8, 167u8, 70u8, 229u8, 231u8, 148u8, - 77u8, 169u8, 139u8, 16u8, 15u8, 116u8, 128u8, 32u8, 59u8, - 154u8, 146u8, 12u8, 65u8, 36u8, 36u8, 69u8, 19u8, 74u8, 79u8, - 66u8, 25u8, 215u8, 57u8, - ] - { - let call = AddMemo { index, memo }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "add_memo", + data: AddMemo { index, memo }, + }, + [ + 104u8, 199u8, 143u8, 251u8, 28u8, 49u8, 144u8, 186u8, 83u8, + 108u8, 26u8, 127u8, 22u8, 141u8, 48u8, 62u8, 194u8, 193u8, + 97u8, 10u8, 84u8, 89u8, 236u8, 191u8, 40u8, 8u8, 1u8, 250u8, + 112u8, 165u8, 221u8, 112u8, + ], + ) } #[doc = "Poke the fund into `NewRaise`"] #[doc = ""] @@ -40047,35 +27722,23 @@ pub mod api { pub fn poke( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Poke, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 99u8, 158u8, 48u8, 3u8, 228u8, 210u8, 249u8, 42u8, 44u8, - 49u8, 24u8, 212u8, 69u8, 69u8, 189u8, 194u8, 124u8, 251u8, - 25u8, 123u8, 234u8, 3u8, 184u8, 227u8, 1u8, 195u8, 219u8, - 118u8, 235u8, 237u8, 11u8, 159u8, - ] - { - let call = Poke { index }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "poke", + data: Poke { index }, + }, + [ + 118u8, 60u8, 131u8, 17u8, 27u8, 153u8, 57u8, 24u8, 191u8, + 211u8, 101u8, 123u8, 34u8, 145u8, 193u8, 113u8, 244u8, 162u8, + 148u8, 143u8, 81u8, 86u8, 136u8, 23u8, 48u8, 185u8, 52u8, + 60u8, 216u8, 243u8, 63u8, 102u8, + ], + ) } #[doc = "Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain"] #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] @@ -40085,35 +27748,23 @@ pub mod api { signature: ::core::option::Option< runtime_types::sp_runtime::MultiSignature, >, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ContributeAll, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 64u8, 224u8, 233u8, 196u8, 182u8, 109u8, 69u8, 220u8, 46u8, - 60u8, 189u8, 125u8, 17u8, 28u8, 207u8, 63u8, 129u8, 56u8, - 32u8, 239u8, 182u8, 214u8, 237u8, 95u8, 228u8, 171u8, 209u8, - 233u8, 205u8, 212u8, 147u8, 176u8, - ] - { - let call = ContributeAll { index, signature }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "Crowdloan", + call: "contribute_all", + data: ContributeAll { index, signature }, + }, + [ + 94u8, 61u8, 105u8, 107u8, 204u8, 18u8, 223u8, 242u8, 19u8, + 162u8, 205u8, 130u8, 203u8, 73u8, 42u8, 85u8, 208u8, 157u8, + 115u8, 112u8, 168u8, 10u8, 163u8, 80u8, 222u8, 71u8, 23u8, + 194u8, 142u8, 4u8, 82u8, 253u8, + ], + ) } } } @@ -40121,458 +27772,358 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_common::crowdloan::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Create a new crowdloaning campaign."] pub struct Created { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for Created { + impl ::subxt::events::StaticEvent for Created { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Created"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Contributed to a crowd sale."] pub struct Contributed { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub fund_index: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Contributed { + impl ::subxt::events::StaticEvent for Contributed { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Contributed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Withdrew full balance of a contributor."] pub struct Withdrew { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub fund_index: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, } - impl ::subxt::Event for Withdrew { + impl ::subxt::events::StaticEvent for Withdrew { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Withdrew"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The loans in a fund have been partially dissolved, i.e. there are some left"] #[doc = "over child keys that still need to be killed."] pub struct PartiallyRefunded { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for PartiallyRefunded { + impl ::subxt::events::StaticEvent for PartiallyRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "PartiallyRefunded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "All loans in a fund have been refunded."] pub struct AllRefunded { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for AllRefunded { + impl ::subxt::events::StaticEvent for AllRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AllRefunded"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Fund is dissolved."] pub struct Dissolved { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for Dissolved { + impl ::subxt::events::StaticEvent for Dissolved { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Dissolved"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The result of trying to submit a new bid to the Slots pallet."] pub struct HandleBidResult { pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::Event for HandleBidResult { + impl ::subxt::events::StaticEvent for HandleBidResult { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "HandleBidResult"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The configuration to a crowdloan has been edited."] pub struct Edited { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for Edited { + impl ::subxt::events::StaticEvent for Edited { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Edited"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A memo has been updated."] pub struct MemoUpdated { - pub who: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::ext::sp_core::crypto::AccountId32, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Event for MemoUpdated { + impl ::subxt::events::StaticEvent for MemoUpdated { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "MemoUpdated"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A parachain has been moved to `NewRaise`"] pub struct AddedToNewRaise { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Event for AddedToNewRaise { + impl ::subxt::events::StaticEvent for AddedToNewRaise { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AddedToNewRaise"; } } pub mod storage { use super::runtime_types; - pub struct Funds<'a>( - pub &'a runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::StorageEntry for Funds<'_> { - const PALLET: &'static str = "Crowdloan"; - const STORAGE: &'static str = "Funds"; - type Value = runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct NewRaise; - impl ::subxt::StorageEntry for NewRaise { - const PALLET: &'static str = "Crowdloan"; - const STORAGE: &'static str = "NewRaise"; - type Value = - ::std::vec::Vec; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct EndingsCount; - impl ::subxt::StorageEntry for EndingsCount { - const PALLET: &'static str = "Crowdloan"; - const STORAGE: &'static str = "EndingsCount"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NextFundIndex; - impl ::subxt::StorageEntry for NextFundIndex { - const PALLET: &'static str = "Crowdloan"; - const STORAGE: &'static str = "NextFundIndex"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " Info on all of the funds."] pub fn funds( &self, - _0: &'a runtime_types::polkadot_parachain::primitives::Id, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::crowdloan::FundInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 13u8, 211u8, 240u8, 138u8, 231u8, 78u8, 123u8, 252u8, - 210u8, 27u8, 202u8, 82u8, 157u8, 118u8, 209u8, 218u8, - 160u8, 183u8, 225u8, 77u8, 230u8, 131u8, 180u8, 238u8, - 83u8, 202u8, 29u8, 106u8, 114u8, 223u8, 250u8, 3u8, - ] - { - let entry = Funds(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Crowdloan", + "Funds", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 231u8, 126u8, 89u8, 84u8, 167u8, 23u8, 211u8, 70u8, 203u8, + 124u8, 20u8, 162u8, 112u8, 38u8, 201u8, 207u8, 82u8, 202u8, + 80u8, 228u8, 4u8, 41u8, 95u8, 190u8, 193u8, 185u8, 178u8, + 85u8, 179u8, 102u8, 53u8, 63u8, + ], + ) } #[doc = " Info on all of the funds."] - pub fn funds_iter( + pub fn funds_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Funds<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::polkadot_runtime_common::crowdloan::FundInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 13u8, 211u8, 240u8, 138u8, 231u8, 78u8, 123u8, 252u8, - 210u8, 27u8, 202u8, 82u8, 157u8, 118u8, 209u8, 218u8, - 160u8, 183u8, 225u8, 77u8, 230u8, 131u8, 180u8, 238u8, - 83u8, 202u8, 29u8, 106u8, 114u8, 223u8, 250u8, 3u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Crowdloan", + "Funds", + Vec::new(), + [ + 231u8, 126u8, 89u8, 84u8, 167u8, 23u8, 211u8, 70u8, 203u8, + 124u8, 20u8, 162u8, 112u8, 38u8, 201u8, 207u8, 82u8, 202u8, + 80u8, 228u8, 4u8, 41u8, 95u8, 190u8, 193u8, 185u8, 178u8, + 85u8, 179u8, 102u8, 53u8, 63u8, + ], + ) } #[doc = " The funds that have had additional contributions during the last block. This is used"] #[doc = " in order to determine which funds should submit new or updated bids."] pub fn new_raise( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 243u8, 204u8, 121u8, 230u8, 151u8, 223u8, 248u8, 199u8, - 68u8, 209u8, 226u8, 159u8, 217u8, 105u8, 39u8, 127u8, - 162u8, 133u8, 56u8, 1u8, 70u8, 7u8, 176u8, 56u8, 81u8, - 49u8, 155u8, 143u8, 100u8, 153u8, 59u8, 86u8, - ] - { - let entry = NewRaise; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::std::vec::Vec, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Crowdloan", + "NewRaise", + vec![], + [ + 8u8, 180u8, 9u8, 197u8, 254u8, 198u8, 89u8, 112u8, 29u8, + 153u8, 243u8, 196u8, 92u8, 204u8, 135u8, 232u8, 93u8, 239u8, + 147u8, 103u8, 130u8, 28u8, 128u8, 124u8, 4u8, 236u8, 29u8, + 248u8, 27u8, 165u8, 111u8, 147u8, + ], + ) } #[doc = " The number of auctions that have entered into their ending period so far."] pub fn endings_count( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 12u8, 159u8, 166u8, 75u8, 192u8, 33u8, 21u8, 244u8, - 149u8, 200u8, 49u8, 54u8, 191u8, 174u8, 202u8, 86u8, - 76u8, 115u8, 189u8, 35u8, 192u8, 175u8, 156u8, 188u8, - 41u8, 23u8, 92u8, 36u8, 141u8, 235u8, 248u8, 143u8, - ] - { - let entry = EndingsCount; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Crowdloan", + "EndingsCount", + vec![], + [ + 12u8, 159u8, 166u8, 75u8, 192u8, 33u8, 21u8, 244u8, 149u8, + 200u8, 49u8, 54u8, 191u8, 174u8, 202u8, 86u8, 76u8, 115u8, + 189u8, 35u8, 192u8, 175u8, 156u8, 188u8, 41u8, 23u8, 92u8, + 36u8, 141u8, 235u8, 248u8, 143u8, + ], + ) } #[doc = " Tracker for the next available fund index"] pub fn next_fund_index( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 1u8, 215u8, 164u8, 194u8, 231u8, 34u8, 207u8, 19u8, - 149u8, 187u8, 3u8, 176u8, 194u8, 240u8, 180u8, 169u8, - 214u8, 194u8, 202u8, 240u8, 209u8, 6u8, 244u8, 46u8, - 54u8, 142u8, 61u8, 220u8, 240u8, 96u8, 10u8, 168u8, - ] - { - let entry = NextFundIndex; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "Crowdloan", + "NextFundIndex", + vec![], + [ + 1u8, 215u8, 164u8, 194u8, 231u8, 34u8, 207u8, 19u8, 149u8, + 187u8, 3u8, 176u8, 194u8, 240u8, 180u8, 169u8, 214u8, 194u8, + 202u8, 240u8, 209u8, 6u8, 244u8, 46u8, 54u8, 142u8, 61u8, + 220u8, 240u8, 96u8, 10u8, 168u8, + ], + ) } } } pub mod constants { use super::runtime_types; - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct ConstantsApi; + impl ConstantsApi { #[doc = " `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b\"py/cfund\")`"] pub fn pallet_id( &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Crowdloan", "PalletId")? - == [ - 190u8, 62u8, 112u8, 88u8, 48u8, 222u8, 234u8, 76u8, 230u8, - 81u8, 205u8, 113u8, 202u8, 11u8, 184u8, 229u8, 189u8, 124u8, - 132u8, 255u8, 46u8, 202u8, 80u8, 86u8, 182u8, 212u8, 149u8, - 200u8, 57u8, 215u8, 195u8, 132u8, - ] - { - let pallet = metadata.pallet("Crowdloan")?; - let constant = pallet.constant("PalletId")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_support::PalletId, + >, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Crowdloan", + "PalletId", + [ + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, + 154u8, 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, + 186u8, 24u8, 243u8, 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, + 189u8, 30u8, 94u8, 22u8, 39u8, + ], + ) } #[doc = " The minimum amount that may be contributed into a crowdloan. Should almost certainly be at"] #[doc = " least `ExistentialDeposit`."] pub fn min_contribution( &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Crowdloan", "MinContribution")? - == [ - 7u8, 98u8, 163u8, 178u8, 130u8, 130u8, 228u8, 145u8, 98u8, - 96u8, 213u8, 70u8, 87u8, 202u8, 203u8, 65u8, 162u8, 93u8, - 70u8, 3u8, 109u8, 155u8, 86u8, 11u8, 164u8, 164u8, 232u8, - 201u8, 25u8, 0u8, 129u8, 24u8, - ] - { - let pallet = metadata.pallet("Crowdloan")?; - let constant = pallet.constant("MinContribution")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Crowdloan", + "MinContribution", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) } #[doc = " Max number of storage keys to remove per extrinsic call."] pub fn remove_keys_limit( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - if metadata.constant_hash("Crowdloan", "RemoveKeysLimit")? - == [ - 112u8, 103u8, 77u8, 231u8, 192u8, 202u8, 113u8, 241u8, 178u8, - 158u8, 219u8, 21u8, 177u8, 140u8, 48u8, 133u8, 143u8, 170u8, - 91u8, 126u8, 180u8, 6u8, 222u8, 68u8, 236u8, 92u8, 215u8, - 100u8, 85u8, 155u8, 212u8, 224u8, - ] - { - let pallet = metadata.pallet("Crowdloan")?; - let constant = pallet.constant("RemoveKeysLimit")?; - let value = - ::subxt::codec::Decode::decode(&mut &constant.value[..])?; - Ok(value) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::constants::ConstantAddress< + 'static, + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + > { + ::subxt::constants::ConstantAddress::new_with_validation( + "Crowdloan", + "RemoveKeysLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) } } } } pub mod xcm_pallet { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Send { pub dest: ::std::boxed::Box, pub message: ::std::boxed::Box, } - impl ::subxt::Call for Send { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "send"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct TeleportAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -40580,11 +28131,11 @@ pub mod api { pub assets: ::std::boxed::Box, pub fee_asset_item: ::core::primitive::u32, } - impl ::subxt::Call for TeleportAssets { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "teleport_assets"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReserveTransferAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -40592,57 +28143,57 @@ pub mod api { pub assets: ::std::boxed::Box, pub fee_asset_item: ::core::primitive::u32, } - impl ::subxt::Call for ReserveTransferAssets { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "reserve_transfer_assets"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Execute { pub message: ::std::boxed::Box, pub max_weight: ::core::primitive::u64, } - impl ::subxt::Call for Execute { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "execute"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceXcmVersion { pub location: ::std::boxed::Box< runtime_types::xcm::v1::multilocation::MultiLocation, >, pub xcm_version: ::core::primitive::u32, } - impl ::subxt::Call for ForceXcmVersion { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "force_xcm_version"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceDefaultXcmVersion { pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for ForceDefaultXcmVersion { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "force_default_xcm_version"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceSubscribeVersionNotify { pub location: ::std::boxed::Box, } - impl ::subxt::Call for ForceSubscribeVersionNotify { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "force_subscribe_version_notify"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ForceUnsubscribeVersionNotify { pub location: ::std::boxed::Box, } - impl ::subxt::Call for ForceUnsubscribeVersionNotify { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "force_unsubscribe_version_notify"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct LimitedReserveTransferAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -40651,11 +28202,11 @@ pub mod api { pub fee_asset_item: ::core::primitive::u32, pub weight_limit: runtime_types::xcm::v2::WeightLimit, } - impl ::subxt::Call for LimitedReserveTransferAssets { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "limited_reserve_transfer_assets"; - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct LimitedTeleportAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -40664,61 +28215,32 @@ pub mod api { pub fee_asset_item: ::core::primitive::u32, pub weight_limit: runtime_types::xcm::v2::WeightLimit, } - impl ::subxt::Call for LimitedTeleportAssets { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "limited_teleport_assets"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } + pub struct TransactionApi; + impl TransactionApi { pub fn send( &self, dest: runtime_types::xcm::VersionedMultiLocation, message: runtime_types::xcm::VersionedXcm, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Send, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 54u8, 36u8, 195u8, 69u8, 232u8, 104u8, 16u8, 255u8, 209u8, - 151u8, 189u8, 229u8, 222u8, 59u8, 61u8, 23u8, 59u8, 75u8, - 110u8, 215u8, 20u8, 147u8, 2u8, 154u8, 64u8, 12u8, 22u8, - 30u8, 81u8, 3u8, 116u8, 21u8, - ] - { - let call = Send { - dest: ::std::boxed::Box::new(dest), - message: ::std::boxed::Box::new(message), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "send", + data: Send { + dest: ::std::boxed::Box::new(dest), + message: ::std::boxed::Box::new(message), + }, + }, + [ + 62u8, 5u8, 58u8, 216u8, 236u8, 6u8, 23u8, 64u8, 52u8, 141u8, + 132u8, 102u8, 79u8, 80u8, 126u8, 78u8, 222u8, 197u8, 94u8, + 119u8, 26u8, 93u8, 153u8, 155u8, 204u8, 164u8, 167u8, 242u8, + 7u8, 131u8, 125u8, 181u8, + ], + ) } #[doc = "Teleport some assets from the local chain to some destination chain."] #[doc = ""] @@ -40741,40 +28263,28 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - TeleportAssets, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 137u8, 5u8, 131u8, 103u8, 172u8, 184u8, 160u8, 75u8, 59u8, - 219u8, 132u8, 196u8, 182u8, 130u8, 131u8, 6u8, 60u8, 89u8, - 168u8, 251u8, 2u8, 105u8, 128u8, 182u8, 99u8, 214u8, 245u8, - 130u8, 135u8, 115u8, 67u8, 42u8, - ] - { - let call = TeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "teleport_assets", + data: TeleportAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + }, + }, + [ + 10u8, 218u8, 192u8, 242u8, 222u8, 140u8, 137u8, 249u8, 15u8, + 210u8, 143u8, 134u8, 134u8, 9u8, 128u8, 185u8, 12u8, 188u8, + 6u8, 19u8, 123u8, 102u8, 49u8, 38u8, 220u8, 149u8, 33u8, + 149u8, 243u8, 85u8, 195u8, 194u8, + ], + ) } #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] #[doc = "chain and forward a notification XCM."] @@ -40798,40 +28308,28 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ReserveTransferAssets, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 253u8, 39u8, 212u8, 206u8, 89u8, 22u8, 69u8, 211u8, 159u8, - 124u8, 160u8, 233u8, 242u8, 106u8, 68u8, 163u8, 152u8, 3u8, - 142u8, 112u8, 68u8, 70u8, 99u8, 37u8, 209u8, 79u8, 85u8, - 161u8, 112u8, 216u8, 191u8, 42u8, - ] - { - let call = ReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "reserve_transfer_assets", + data: ReserveTransferAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + }, + }, + [ + 99u8, 57u8, 160u8, 112u8, 160u8, 82u8, 240u8, 74u8, 105u8, + 221u8, 29u8, 196u8, 187u8, 190u8, 165u8, 44u8, 198u8, 92u8, + 12u8, 116u8, 106u8, 211u8, 104u8, 14u8, 120u8, 194u8, 216u8, + 202u8, 221u8, 174u8, 77u8, 167u8, + ], + ) } #[doc = "Execute an XCM message from a local, signed, origin."] #[doc = ""] @@ -40848,38 +28346,26 @@ pub mod api { &self, message: runtime_types::xcm::VersionedXcm, max_weight: ::core::primitive::u64, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - Execute, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 81u8, 205u8, 245u8, 196u8, 78u8, 82u8, 247u8, 53u8, 52u8, - 16u8, 28u8, 226u8, 213u8, 143u8, 94u8, 174u8, 25u8, 120u8, - 170u8, 194u8, 249u8, 96u8, 38u8, 169u8, 74u8, 142u8, 175u8, - 3u8, 118u8, 55u8, 251u8, 109u8, - ] - { - let call = Execute { - message: ::std::boxed::Box::new(message), - max_weight, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "execute", + data: Execute { + message: ::std::boxed::Box::new(message), + max_weight, + }, + }, + [ + 234u8, 145u8, 40u8, 18u8, 224u8, 25u8, 249u8, 87u8, 214u8, + 25u8, 227u8, 148u8, 222u8, 226u8, 104u8, 79u8, 221u8, 123u8, + 212u8, 78u8, 42u8, 249u8, 150u8, 86u8, 60u8, 63u8, 22u8, + 155u8, 219u8, 216u8, 241u8, 189u8, + ], + ) } #[doc = "Extoll that a particular destination can be communicated with through a particular"] #[doc = "version of XCM."] @@ -40891,38 +28377,26 @@ pub mod api { &self, location: runtime_types::xcm::v1::multilocation::MultiLocation, xcm_version: ::core::primitive::u32, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceXcmVersion, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 201u8, 56u8, 53u8, 67u8, 99u8, 195u8, 192u8, 69u8, 123u8, - 66u8, 102u8, 94u8, 122u8, 160u8, 219u8, 128u8, 21u8, 105u8, - 71u8, 254u8, 10u8, 66u8, 60u8, 186u8, 104u8, 46u8, 96u8, - 168u8, 3u8, 141u8, 124u8, 51u8, - ] - { - let call = ForceXcmVersion { - location: ::std::boxed::Box::new(location), - xcm_version, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "force_xcm_version", + data: ForceXcmVersion { + location: ::std::boxed::Box::new(location), + xcm_version, + }, + }, + [ + 222u8, 53u8, 133u8, 159u8, 195u8, 147u8, 113u8, 8u8, 157u8, + 2u8, 18u8, 232u8, 235u8, 55u8, 169u8, 13u8, 254u8, 133u8, + 50u8, 52u8, 117u8, 182u8, 176u8, 60u8, 74u8, 53u8, 191u8, + 130u8, 149u8, 74u8, 77u8, 129u8, + ], + ) } #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] #[doc = "version a destination can accept is unknown)."] @@ -40932,35 +28406,23 @@ pub mod api { pub fn force_default_xcm_version( &self, maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceDefaultXcmVersion, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 44u8, 161u8, 28u8, 189u8, 162u8, 221u8, 14u8, 31u8, 8u8, - 211u8, 181u8, 51u8, 197u8, 14u8, 87u8, 198u8, 3u8, 240u8, - 90u8, 78u8, 141u8, 131u8, 205u8, 250u8, 211u8, 150u8, 237u8, - 160u8, 239u8, 226u8, 233u8, 29u8, - ] - { - let call = ForceDefaultXcmVersion { maybe_xcm_version }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "force_default_xcm_version", + data: ForceDefaultXcmVersion { maybe_xcm_version }, + }, + [ + 38u8, 36u8, 59u8, 231u8, 18u8, 79u8, 76u8, 9u8, 200u8, 125u8, + 214u8, 166u8, 37u8, 99u8, 111u8, 161u8, 135u8, 2u8, 133u8, + 157u8, 165u8, 18u8, 152u8, 81u8, 209u8, 255u8, 137u8, 237u8, + 28u8, 126u8, 224u8, 141u8, + ], + ) } #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] #[doc = ""] @@ -40969,37 +28431,25 @@ pub mod api { pub fn force_subscribe_version_notify( &self, location: runtime_types::xcm::VersionedMultiLocation, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceSubscribeVersionNotify, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 10u8, 43u8, 242u8, 36u8, 241u8, 223u8, 208u8, 103u8, 190u8, - 204u8, 185u8, 151u8, 153u8, 191u8, 174u8, 57u8, 49u8, 90u8, - 1u8, 113u8, 219u8, 243u8, 210u8, 152u8, 184u8, 42u8, 219u8, - 237u8, 175u8, 58u8, 136u8, 167u8, - ] - { - let call = ForceSubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "force_subscribe_version_notify", + data: ForceSubscribeVersionNotify { + location: ::std::boxed::Box::new(location), + }, + }, + [ + 248u8, 225u8, 152u8, 123u8, 25u8, 248u8, 170u8, 97u8, 88u8, + 14u8, 39u8, 181u8, 95u8, 210u8, 27u8, 229u8, 11u8, 158u8, + 138u8, 63u8, 29u8, 166u8, 64u8, 171u8, 98u8, 219u8, 83u8, + 110u8, 123u8, 15u8, 148u8, 130u8, + ], + ) } #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] #[doc = "version changes."] @@ -41010,37 +28460,25 @@ pub mod api { pub fn force_unsubscribe_version_notify( &self, location: runtime_types::xcm::VersionedMultiLocation, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - ForceUnsubscribeVersionNotify, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 214u8, 24u8, 33u8, 141u8, 239u8, 87u8, 177u8, 28u8, 187u8, - 103u8, 149u8, 206u8, 20u8, 68u8, 62u8, 87u8, 166u8, 68u8, - 70u8, 110u8, 76u8, 113u8, 145u8, 197u8, 168u8, 193u8, 107u8, - 118u8, 30u8, 81u8, 45u8, 177u8, - ] - { - let call = ForceUnsubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "force_unsubscribe_version_notify", + data: ForceUnsubscribeVersionNotify { + location: ::std::boxed::Box::new(location), + }, + }, + [ + 136u8, 187u8, 225u8, 130u8, 146u8, 74u8, 93u8, 240u8, 184u8, + 43u8, 140u8, 183u8, 155u8, 61u8, 240u8, 203u8, 255u8, 134u8, + 227u8, 1u8, 132u8, 48u8, 115u8, 30u8, 214u8, 178u8, 161u8, + 139u8, 56u8, 237u8, 234u8, 225u8, + ], + ) } #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] #[doc = "chain and forward a notification XCM."] @@ -41067,41 +28505,29 @@ pub mod api { assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - LimitedReserveTransferAssets, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 243u8, 50u8, 32u8, 26u8, 100u8, 20u8, 223u8, 168u8, 200u8, - 123u8, 188u8, 218u8, 29u8, 244u8, 163u8, 167u8, 207u8, 99u8, - 137u8, 93u8, 117u8, 43u8, 15u8, 210u8, 242u8, 70u8, 178u8, - 220u8, 33u8, 81u8, 113u8, 3u8, - ] - { - let call = LimitedReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "limited_reserve_transfer_assets", + data: LimitedReserveTransferAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, + }, + }, + [ + 221u8, 220u8, 116u8, 79u8, 10u8, 95u8, 250u8, 251u8, 252u8, + 110u8, 190u8, 72u8, 123u8, 235u8, 191u8, 39u8, 36u8, 123u8, + 175u8, 155u8, 232u8, 209u8, 216u8, 102u8, 169u8, 2u8, 167u8, + 68u8, 135u8, 20u8, 124u8, 251u8, + ], + ) } #[doc = "Teleport some assets from the local chain to some destination chain."] #[doc = ""] @@ -41127,41 +28553,29 @@ pub mod api { assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> Result< - ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - LimitedTeleportAssets, - DispatchError, - root_mod::Event, - >, - ::subxt::BasicError, - > { - let runtime_call_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.call_hash::()? - }; - if runtime_call_hash - == [ - 36u8, 151u8, 127u8, 249u8, 71u8, 203u8, 161u8, 159u8, 186u8, - 144u8, 116u8, 118u8, 216u8, 42u8, 69u8, 255u8, 208u8, 231u8, - 58u8, 26u8, 37u8, 87u8, 184u8, 244u8, 114u8, 7u8, 200u8, - 29u8, 42u8, 20u8, 93u8, 125u8, - ] - { - let call = LimitedTeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }; - Ok(::subxt::SubmittableExtrinsic::new(self.client, call)) - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } + ) -> ::subxt::extrinsic::SubmittableExtrinsic< + ::subxt::metadata::EncodeStaticCall, + DispatchError, + > { + ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( + ::subxt::metadata::EncodeStaticCall { + pallet: "XcmPallet", + call: "limited_teleport_assets", + data: LimitedTeleportAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, + }, + }, + [ + 82u8, 234u8, 41u8, 231u8, 90u8, 49u8, 150u8, 217u8, 51u8, + 185u8, 83u8, 29u8, 184u8, 201u8, 135u8, 232u8, 227u8, 239u8, + 226u8, 224u8, 24u8, 123u8, 251u8, 193u8, 177u8, 170u8, 173u8, + 114u8, 40u8, 150u8, 140u8, 142u8, + ], + ) } } } @@ -41169,16 +28583,24 @@ pub mod api { pub type Event = runtime_types::pallet_xcm::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Execution of an XCM message was attempted."] #[doc = ""] #[doc = "\\[ outcome \\]"] pub struct Attempted(pub runtime_types::xcm::v2::traits::Outcome); - impl ::subxt::Event for Attempted { + impl ::subxt::events::StaticEvent for Attempted { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "Attempted"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A XCM message was sent."] #[doc = ""] #[doc = "\\[ origin, destination, message \\]"] @@ -41187,11 +28609,15 @@ pub mod api { pub runtime_types::xcm::v1::multilocation::MultiLocation, pub runtime_types::xcm::v2::Xcm, ); - impl ::subxt::Event for Sent { + impl ::subxt::events::StaticEvent for Sent { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "Sent"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Query response received which does not match a registered query. This may be because a"] #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] #[doc = "because the query timed out."] @@ -41201,11 +28627,15 @@ pub mod api { pub runtime_types::xcm::v1::multilocation::MultiLocation, pub ::core::primitive::u64, ); - impl ::subxt::Event for UnexpectedResponse { + impl ::subxt::events::StaticEvent for UnexpectedResponse { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "UnexpectedResponse"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] #[doc = "no registered notification call."] #[doc = ""] @@ -41214,11 +28644,15 @@ pub mod api { pub ::core::primitive::u64, pub runtime_types::xcm::v2::Response, ); - impl ::subxt::Event for ResponseReady { + impl ::subxt::events::StaticEvent for ResponseReady { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "ResponseReady"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Query response has been received and query is removed. The registered notification has"] #[doc = "been dispatched and executed successfully."] #[doc = ""] @@ -41228,11 +28662,15 @@ pub mod api { pub ::core::primitive::u8, pub ::core::primitive::u8, ); - impl ::subxt::Event for Notified { + impl ::subxt::events::StaticEvent for Notified { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "Notified"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Query response has been received and query is removed. The registered notification could"] #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] #[doc = "originally budgeted by this runtime for the query result."] @@ -41245,11 +28683,15 @@ pub mod api { pub ::core::primitive::u64, pub ::core::primitive::u64, ); - impl ::subxt::Event for NotifyOverweight { + impl ::subxt::events::StaticEvent for NotifyOverweight { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "NotifyOverweight"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Query response has been received and query is removed. There was a general error with"] #[doc = "dispatching the notification call."] #[doc = ""] @@ -41259,11 +28701,15 @@ pub mod api { pub ::core::primitive::u8, pub ::core::primitive::u8, ); - impl ::subxt::Event for NotifyDispatchError { + impl ::subxt::events::StaticEvent for NotifyDispatchError { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "NotifyDispatchError"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] #[doc = "is not `(origin, QueryId, Response)`."] @@ -41274,11 +28720,15 @@ pub mod api { pub ::core::primitive::u8, pub ::core::primitive::u8, ); - impl ::subxt::Event for NotifyDecodeFailed { + impl ::subxt::events::StaticEvent for NotifyDecodeFailed { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "NotifyDecodeFailed"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Expected query response has been received but the origin location of the response does"] #[doc = "not match that expected. The query remains registered for a later, valid, response to"] #[doc = "be received and acted upon."] @@ -41291,11 +28741,15 @@ pub mod api { runtime_types::xcm::v1::multilocation::MultiLocation, >, ); - impl ::subxt::Event for InvalidResponder { + impl ::subxt::events::StaticEvent for InvalidResponder { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "InvalidResponder"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Expected query response has been received but the expected origin location placed in"] #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] #[doc = ""] @@ -41309,38 +28763,46 @@ pub mod api { pub runtime_types::xcm::v1::multilocation::MultiLocation, pub ::core::primitive::u64, ); - impl ::subxt::Event for InvalidResponderVersion { + impl ::subxt::events::StaticEvent for InvalidResponderVersion { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "InvalidResponderVersion"; } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] #[doc = "Received query response has been read and removed."] #[doc = ""] #[doc = "\\[ id \\]"] pub struct ResponseTaken(pub ::core::primitive::u64); - impl ::subxt::Event for ResponseTaken { + impl ::subxt::events::StaticEvent for ResponseTaken { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "ResponseTaken"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "Some assets have been placed in an asset trap."] #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] pub struct AssetsTrapped( - pub ::subxt::sp_core::H256, + pub ::subxt::ext::sp_core::H256, pub runtime_types::xcm::v1::multilocation::MultiLocation, pub runtime_types::xcm::VersionedMultiAssets, ); - impl ::subxt::Event for AssetsTrapped { + impl ::subxt::events::StaticEvent for AssetsTrapped { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "AssetsTrapped"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "An XCM version change notification message has been attempted to be sent."] #[doc = ""] #[doc = "\\[ destination, result \\]"] @@ -41348,11 +28810,15 @@ pub mod api { pub runtime_types::xcm::v1::multilocation::MultiLocation, pub ::core::primitive::u32, ); - impl ::subxt::Event for VersionChangeNotified { + impl ::subxt::events::StaticEvent for VersionChangeNotified { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "VersionChangeNotified"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "The supported version of a location has been changed. This might be through an"] #[doc = "automatic notification or a manual intervention."] #[doc = ""] @@ -41361,11 +28827,15 @@ pub mod api { pub runtime_types::xcm::v1::multilocation::MultiLocation, pub ::core::primitive::u32, ); - impl ::subxt::Event for SupportedVersionChanged { + impl ::subxt::events::StaticEvent for SupportedVersionChanged { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "SupportedVersionChanged"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A given location which had a version change subscription was dropped owing to an error"] #[doc = "sending the notification to it."] #[doc = ""] @@ -41375,11 +28845,15 @@ pub mod api { pub ::core::primitive::u64, pub runtime_types::xcm::v2::traits::Error, ); - impl ::subxt::Event for NotifyTargetSendFail { + impl ::subxt::events::StaticEvent for NotifyTargetSendFail { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "NotifyTargetSendFail"; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] #[doc = "A given location which had a version change subscription was dropped owing to an error"] #[doc = "migrating the location to our new XCM format."] #[doc = ""] @@ -41388,261 +28862,85 @@ pub mod api { pub runtime_types::xcm::VersionedMultiLocation, pub ::core::primitive::u64, ); - impl ::subxt::Event for NotifyTargetMigrationFail { + impl ::subxt::events::StaticEvent for NotifyTargetMigrationFail { const PALLET: &'static str = "XcmPallet"; const EVENT: &'static str = "NotifyTargetMigrationFail"; } } pub mod storage { use super::runtime_types; - pub struct QueryCounter; - impl ::subxt::StorageEntry for QueryCounter { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "QueryCounter"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Queries<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for Queries<'_> { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "Queries"; - type Value = runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct AssetTraps<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for AssetTraps<'_> { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "AssetTraps"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct SafeXcmVersion; - impl ::subxt::StorageEntry for SafeXcmVersion { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "SafeXcmVersion"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct SupportedVersion<'a>( - pub &'a ::core::primitive::u32, - pub &'a runtime_types::xcm::VersionedMultiLocation, - ); - impl ::subxt::StorageEntry for SupportedVersion<'_> { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "SupportedVersion"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Blake2_128Concat, - ), - ]) - } - } - pub struct VersionNotifiers<'a>( - pub &'a ::core::primitive::u32, - pub &'a runtime_types::xcm::VersionedMultiLocation, - ); - impl ::subxt::StorageEntry for VersionNotifiers<'_> { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "VersionNotifiers"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Blake2_128Concat, - ), - ]) - } - } - pub struct VersionNotifyTargets<'a>( - pub &'a ::core::primitive::u32, - pub &'a runtime_types::xcm::VersionedMultiLocation, - ); - impl ::subxt::StorageEntry for VersionNotifyTargets<'_> { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "VersionNotifyTargets"; - type Value = ( - ::core::primitive::u64, - ::core::primitive::u64, - ::core::primitive::u32, - ); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![ - ::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - ), - ::subxt::StorageMapKey::new( - &self.1, - ::subxt::StorageHasher::Blake2_128Concat, - ), - ]) - } - } - pub struct VersionDiscoveryQueue; - impl ::subxt::StorageEntry for VersionDiscoveryQueue { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "VersionDiscoveryQueue"; - type Value = - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec<( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct CurrentMigration; - impl ::subxt::StorageEntry for CurrentMigration { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "CurrentMigration"; - type Value = runtime_types::pallet_xcm::pallet::VersionMigrationStage; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } + pub struct StorageApi; + impl StorageApi { #[doc = " The latest available query index."] pub fn query_counter( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u64, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 137u8, 58u8, 184u8, 88u8, 247u8, 22u8, 151u8, 64u8, 50u8, - 77u8, 49u8, 10u8, 234u8, 84u8, 213u8, 156u8, 26u8, 200u8, - 214u8, 225u8, 125u8, 231u8, 42u8, 93u8, 159u8, 168u8, - 86u8, 201u8, 116u8, 153u8, 41u8, 127u8, - ] - { - let entry = QueryCounter; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "QueryCounter", + vec![], + [ + 137u8, 58u8, 184u8, 88u8, 247u8, 22u8, 151u8, 64u8, 50u8, + 77u8, 49u8, 10u8, 234u8, 84u8, 213u8, 156u8, 26u8, 200u8, + 214u8, 225u8, 125u8, 231u8, 42u8, 93u8, 159u8, 168u8, 86u8, + 201u8, 116u8, 153u8, 41u8, 127u8, + ], + ) } #[doc = " The ongoing queries."] pub fn queries( &self, - _0: &'a ::core::primitive::u64, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, - >, - >, - ::subxt::BasicError, + _0: &::core::primitive::u64, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 157u8, 143u8, 122u8, 154u8, 219u8, 84u8, 81u8, 28u8, - 55u8, 250u8, 47u8, 198u8, 98u8, 80u8, 195u8, 4u8, 242u8, - 170u8, 58u8, 51u8, 55u8, 134u8, 206u8, 79u8, 200u8, - 204u8, 188u8, 213u8, 155u8, 252u8, 64u8, 147u8, - ] - { - let entry = Queries(_0); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "Queries", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 148u8, 119u8, 44u8, 186u8, 73u8, 248u8, 67u8, 20u8, 165u8, + 97u8, 238u8, 150u8, 176u8, 66u8, 220u8, 145u8, 198u8, 244u8, + 52u8, 181u8, 205u8, 186u8, 173u8, 197u8, 220u8, 36u8, 15u8, + 19u8, 115u8, 1u8, 45u8, 3u8, + ], + ) } #[doc = " The ongoing queries."] - pub fn queries_iter( + pub fn queries_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, Queries<'a>>, - ::subxt::BasicError, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 157u8, 143u8, 122u8, 154u8, 219u8, 84u8, 81u8, 28u8, - 55u8, 250u8, 47u8, 198u8, 98u8, 80u8, 195u8, 4u8, 242u8, - 170u8, 58u8, 51u8, 55u8, 134u8, 206u8, 79u8, 200u8, - 204u8, 188u8, 213u8, 155u8, 252u8, 64u8, 147u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "Queries", + Vec::new(), + [ + 148u8, 119u8, 44u8, 186u8, 73u8, 248u8, 67u8, 20u8, 165u8, + 97u8, 238u8, 150u8, 176u8, 66u8, 220u8, 145u8, 198u8, 244u8, + 52u8, 181u8, 205u8, 186u8, 173u8, 197u8, 220u8, 36u8, 15u8, + 19u8, 115u8, 1u8, 45u8, 3u8, + ], + ) } #[doc = " The existing asset traps."] #[doc = ""] @@ -41650,407 +28948,232 @@ pub mod api { #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] pub fn asset_traps( &self, - _0: &'a ::subxt::sp_core::H256, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::primitive::u32, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 170u8, 126u8, 101u8, 101u8, 243u8, 31u8, 53u8, - 166u8, 45u8, 90u8, 63u8, 2u8, 87u8, 36u8, 221u8, 101u8, - 190u8, 51u8, 103u8, 66u8, 193u8, 76u8, 224u8, 74u8, - 160u8, 120u8, 212u8, 45u8, 230u8, 57u8, 122u8, - ] - { - let entry = AssetTraps(_0); - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "AssetTraps", + vec![::subxt::storage::address::StorageMapKey::new( + _0, + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 4u8, 185u8, 92u8, 4u8, 7u8, 71u8, 214u8, 1u8, 141u8, 59u8, + 87u8, 55u8, 149u8, 26u8, 125u8, 8u8, 88u8, 31u8, 240u8, + 138u8, 133u8, 28u8, 37u8, 131u8, 107u8, 218u8, 86u8, 152u8, + 147u8, 44u8, 19u8, 239u8, + ], + ) } #[doc = " The existing asset traps."] #[doc = ""] #[doc = " Key is the blake2 256 hash of (origin, versioned `MultiAssets`) pair. Value is the number of"] #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] - pub fn asset_traps_iter( + pub fn asset_traps_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, AssetTraps<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 170u8, 126u8, 101u8, 101u8, 243u8, 31u8, 53u8, - 166u8, 45u8, 90u8, 63u8, 2u8, 87u8, 36u8, 221u8, 101u8, - 190u8, 51u8, 103u8, 66u8, 193u8, 76u8, 224u8, 74u8, - 160u8, 120u8, 212u8, 45u8, 230u8, 57u8, 122u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "AssetTraps", + Vec::new(), + [ + 4u8, 185u8, 92u8, 4u8, 7u8, 71u8, 214u8, 1u8, 141u8, 59u8, + 87u8, 55u8, 149u8, 26u8, 125u8, 8u8, 88u8, 31u8, 240u8, + 138u8, 133u8, 28u8, 37u8, 131u8, 107u8, 218u8, 86u8, 152u8, + 147u8, 44u8, 19u8, 239u8, + ], + ) } #[doc = " Default version to encode XCM when latest version of destination is unknown. If `None`,"] #[doc = " then the destinations whose XCM version is unknown are considered unreachable."] pub fn safe_xcm_version( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 1u8, 223u8, 218u8, 204u8, 222u8, 129u8, 137u8, 237u8, - 197u8, 142u8, 233u8, 66u8, 229u8, 153u8, 138u8, 222u8, - 113u8, 164u8, 135u8, 213u8, 233u8, 34u8, 24u8, 23u8, - 215u8, 59u8, 40u8, 188u8, 45u8, 244u8, 205u8, 199u8, - ] - { - let entry = SafeXcmVersion; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "SafeXcmVersion", + vec![], + [ + 1u8, 223u8, 218u8, 204u8, 222u8, 129u8, 137u8, 237u8, 197u8, + 142u8, 233u8, 66u8, 229u8, 153u8, 138u8, 222u8, 113u8, 164u8, + 135u8, 213u8, 233u8, 34u8, 24u8, 23u8, 215u8, 59u8, 40u8, + 188u8, 45u8, 244u8, 205u8, 199u8, + ], + ) } #[doc = " The Latest versions that we know various locations support."] pub fn supported_version( &self, - _0: &'a ::core::primitive::u32, - _1: &'a runtime_types::xcm::VersionedMultiLocation, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 183u8, 179u8, 209u8, 179u8, 132u8, 48u8, 235u8, 28u8, - 229u8, 231u8, 14u8, 144u8, 233u8, 9u8, 65u8, 225u8, - 218u8, 173u8, 164u8, 47u8, 196u8, 253u8, 228u8, 218u8, - 104u8, 59u8, 176u8, 206u8, 76u8, 168u8, 195u8, 43u8, - ] - { - let entry = SupportedVersion(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "SupportedVersion" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [227u8 , 149u8 , 251u8 , 204u8 , 40u8 , 150u8 , 151u8 , 177u8 , 154u8 , 187u8 , 9u8 , 205u8 , 174u8 , 137u8 , 228u8 , 128u8 , 18u8 , 244u8 , 151u8 , 120u8 , 6u8 , 44u8 , 5u8 , 167u8 , 56u8 , 35u8 , 192u8 , 141u8 , 108u8 , 169u8 , 91u8 , 7u8 ,]) } #[doc = " The Latest versions that we know various locations support."] - pub fn supported_version_iter( + pub fn supported_version_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, SupportedVersion<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 183u8, 179u8, 209u8, 179u8, 132u8, 48u8, 235u8, 28u8, - 229u8, 231u8, 14u8, 144u8, 233u8, 9u8, 65u8, 225u8, - 218u8, 173u8, 164u8, 47u8, 196u8, 253u8, 228u8, 218u8, - 104u8, 59u8, 176u8, 206u8, 76u8, 168u8, 195u8, 43u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u32, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "SupportedVersion", + Vec::new(), + [ + 227u8, 149u8, 251u8, 204u8, 40u8, 150u8, 151u8, 177u8, 154u8, + 187u8, 9u8, 205u8, 174u8, 137u8, 228u8, 128u8, 18u8, 244u8, + 151u8, 120u8, 6u8, 44u8, 5u8, 167u8, 56u8, 35u8, 192u8, + 141u8, 108u8, 169u8, 91u8, 7u8, + ], + ) } #[doc = " All locations that we have requested version notifications from."] pub fn version_notifiers( &self, - _0: &'a ::core::primitive::u32, - _1: &'a runtime_types::xcm::VersionedMultiLocation, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<::core::primitive::u64>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 72u8, 93u8, 102u8, 116u8, 75u8, 80u8, 246u8, 250u8, - 249u8, 74u8, 11u8, 175u8, 197u8, 203u8, 24u8, 34u8, - 233u8, 227u8, 105u8, 237u8, 21u8, 118u8, 188u8, 149u8, - 49u8, 187u8, 103u8, 179u8, 219u8, 135u8, 235u8, - ] - { - let entry = VersionNotifiers(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + ::subxt::storage::address::AddressIsIterable, + (), + > { + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifiers" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [122u8 , 110u8 , 119u8 , 25u8 , 216u8 , 237u8 , 44u8 , 91u8 , 133u8 , 165u8 , 77u8 , 86u8 , 232u8 , 69u8 , 110u8 , 121u8 , 234u8 , 176u8 , 208u8 , 62u8 , 47u8 , 196u8 , 151u8 , 193u8 , 197u8 , 41u8 , 203u8 , 36u8 , 147u8 , 218u8 , 31u8 , 199u8 ,]) } #[doc = " All locations that we have requested version notifications from."] - pub fn version_notifiers_iter( + pub fn version_notifiers_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, VersionNotifiers<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 46u8, 72u8, 93u8, 102u8, 116u8, 75u8, 80u8, 246u8, 250u8, - 249u8, 74u8, 11u8, 175u8, 197u8, 203u8, 24u8, 34u8, - 233u8, 227u8, 105u8, 237u8, 21u8, 118u8, 188u8, 149u8, - 49u8, 187u8, 103u8, 179u8, 219u8, 135u8, 235u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ::core::primitive::u64, + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "VersionNotifiers", + Vec::new(), + [ + 122u8, 110u8, 119u8, 25u8, 216u8, 237u8, 44u8, 91u8, 133u8, + 165u8, 77u8, 86u8, 232u8, 69u8, 110u8, 121u8, 234u8, 176u8, + 208u8, 62u8, 47u8, 196u8, 151u8, 193u8, 197u8, 41u8, 203u8, + 36u8, 147u8, 218u8, 31u8, 199u8, + ], + ) } #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] #[doc = " of our versions we informed them of."] pub fn version_notify_targets( &self, - _0: &'a ::core::primitive::u32, - _1: &'a runtime_types::xcm::VersionedMultiLocation, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u64, - ::core::primitive::u64, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 171u8, 249u8, 163u8, 191u8, 95u8, 4u8, 102u8, 64u8, - 123u8, 65u8, 180u8, 22u8, 66u8, 17u8, 174u8, 244u8, - 108u8, 147u8, 61u8, 69u8, 54u8, 245u8, 48u8, 124u8, 69u8, - 24u8, 207u8, 12u8, 94u8, 161u8, 13u8, 22u8, - ] - { - let entry = VersionNotifyTargets(_0, _1); - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + _0: &::core::primitive::u32, + _1: &runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u64, + ::core::primitive::u64, + ::core::primitive::u32, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifyTargets" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [255u8 , 223u8 , 137u8 , 192u8 , 243u8 , 162u8 , 26u8 , 237u8 , 4u8 , 29u8 , 179u8 , 75u8 , 5u8 , 145u8 , 11u8 , 149u8 , 164u8 , 202u8 , 14u8 , 18u8 , 244u8 , 36u8 , 209u8 , 1u8 , 21u8 , 0u8 , 191u8 , 79u8 , 126u8 , 160u8 , 149u8 , 58u8 ,]) } #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] #[doc = " of our versions we informed them of."] - pub fn version_notify_targets_iter( + pub fn version_notify_targets_root( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::subxt::KeyIter<'a, T, VersionNotifyTargets<'a>>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 171u8, 249u8, 163u8, 191u8, 95u8, 4u8, 102u8, 64u8, - 123u8, 65u8, 180u8, 22u8, 66u8, 17u8, 174u8, 244u8, - 108u8, 147u8, 61u8, 69u8, 54u8, 245u8, 48u8, 124u8, 69u8, - 24u8, 207u8, 12u8, 94u8, 161u8, 13u8, 22u8, - ] - { - client.storage().iter(block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + ( + ::core::primitive::u64, + ::core::primitive::u64, + ::core::primitive::u32, + ), + ::subxt::storage::address::AddressIsIterable, + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "VersionNotifyTargets", + Vec::new(), + [ + 255u8, 223u8, 137u8, 192u8, 243u8, 162u8, 26u8, 237u8, 4u8, + 29u8, 179u8, 75u8, 5u8, 145u8, 11u8, 149u8, 164u8, 202u8, + 14u8, 18u8, 244u8, 36u8, 209u8, 1u8, 21u8, 0u8, 191u8, 79u8, + 126u8, 160u8, 149u8, 58u8, + ], + ) } #[doc = " Destinations whose latest XCM version we would like to know. Duplicates not allowed, and"] #[doc = " the `u32` counter is the number of times that a send to the destination has been attempted,"] #[doc = " which is used as a prioritization."] pub fn version_discovery_queue( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec<( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - )>, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 225u8, 172u8, 89u8, 78u8, 70u8, 88u8, 171u8, 197u8, 81u8, - 64u8, 6u8, 59u8, 62u8, 41u8, 174u8, 180u8, 172u8, 129u8, - 120u8, 253u8, 71u8, 149u8, 124u8, 252u8, 6u8, 136u8, - 25u8, 24u8, 57u8, 15u8, 123u8, 66u8, - ] - { - let entry = VersionDiscoveryQueue; - client.storage().fetch_or_default(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec<( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u32, + )>, + (), + ::subxt::storage::address::AddressHasDefaultValue, + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "VersionDiscoveryQueue", + vec![], + [ + 129u8, 154u8, 130u8, 118u8, 66u8, 165u8, 29u8, 41u8, 197u8, + 122u8, 110u8, 198u8, 149u8, 157u8, 99u8, 30u8, 253u8, 99u8, + 180u8, 18u8, 182u8, 187u8, 14u8, 116u8, 12u8, 172u8, 225u8, + 198u8, 5u8, 103u8, 167u8, 159u8, + ], + ) } #[doc = " The current migration's stage, if any."] pub fn current_migration( &self, - block_hash: ::core::option::Option, - ) -> impl ::core::future::Future< - Output = ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_xcm::pallet::VersionMigrationStage, - >, - ::subxt::BasicError, - >, - > + 'a { - let client = self.client; - async move { - let runtime_storage_hash = { - let locked_metadata = client.metadata(); - let metadata = locked_metadata.read(); - match metadata.storage_hash::() { - Ok(hash) => hash, - Err(e) => return Err(e.into()), - } - }; - if runtime_storage_hash - == [ - 228u8, 254u8, 240u8, 20u8, 92u8, 79u8, 40u8, 65u8, 176u8, - 111u8, 243u8, 168u8, 238u8, 147u8, 247u8, 170u8, 185u8, - 107u8, 58u8, 54u8, 224u8, 222u8, 141u8, 113u8, 95u8, - 92u8, 17u8, 69u8, 162u8, 242u8, 245u8, 95u8, - ] - { - let entry = CurrentMigration; - client.storage().fetch(&entry, block_hash).await - } else { - Err(::subxt::MetadataError::IncompatibleMetadata.into()) - } - } + ) -> ::subxt::storage::address::StorageAddress< + 'static, + runtime_types::pallet_xcm::pallet::VersionMigrationStage, + (), + (), + > { + ::subxt::storage::address::StorageAddress::new_with_validation( + "XcmPallet", + "CurrentMigration", + vec![], + [ + 137u8, 144u8, 168u8, 185u8, 158u8, 90u8, 127u8, 243u8, 227u8, + 134u8, 150u8, 73u8, 15u8, 99u8, 23u8, 47u8, 68u8, 18u8, 39u8, + 16u8, 24u8, 43u8, 161u8, 56u8, 66u8, 111u8, 16u8, 7u8, 252u8, + 125u8, 100u8, 225u8, + ], + ) } } } @@ -42062,26 +29185,40 @@ pub mod api { pub mod order { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Lsb0; } } pub mod finality_grandpa { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Equivocation<_0, _1, _2> { pub round_number: ::core::primitive::u64, pub identity: _0, pub first: (_1, _2), pub second: (_1, _2), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Precommit<_0, _1> { pub target_hash: _0, pub target_number: _1, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Prevote<_0, _1> { pub target_hash: _0, pub target_number: _1, @@ -42092,7 +29229,9 @@ pub mod api { pub mod dispatch { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum RawOrigin<_0> { #[codec(index = 0)] @@ -42108,14 +29247,18 @@ pub mod api { pub mod misc { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct WrapperKeepOpaque<_0>( #[codec(compact)] pub ::core::primitive::u32, pub _0, ); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct WrapperOpaque<_0>( #[codec(compact)] pub ::core::primitive::u32, @@ -42125,7 +29268,9 @@ pub mod api { pub mod schedule { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum LookupError { #[codec(index = 0)] @@ -42134,7 +29279,9 @@ pub mod api { BadFormat, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum MaybeHashed<_0, _1> { #[codec(index = 0)] @@ -42148,8 +29295,8 @@ pub mod api { pub mod misc { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub enum BalanceStatus { @@ -42164,7 +29311,9 @@ pub mod api { pub mod weights { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum DispatchClass { #[codec(index = 0)] @@ -42175,7 +29324,9 @@ pub mod api { Mandatory, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct DispatchInfo { pub weight: ::core::primitive::u64, @@ -42183,7 +29334,9 @@ pub mod api { pub pays_fee: runtime_types::frame_support::weights::Pays, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Pays { #[codec(index = 0)] @@ -42192,7 +29345,9 @@ pub mod api { No, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct PerDispatchClass<_0> { pub normal: _0, @@ -42200,14 +29355,20 @@ pub mod api { pub mandatory: _0, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct RuntimeDbWeight { pub read: ::core::primitive::u64, pub write: ::core::primitive::u64, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct PalletId(pub [::core::primitive::u8; 8usize]); } pub mod frame_system { @@ -42217,14 +29378,18 @@ pub mod api { pub mod check_genesis { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckGenesis; } pub mod check_mortality { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckMortality( pub runtime_types::sp_runtime::generic::era::Era, @@ -42233,35 +29398,45 @@ pub mod api { pub mod check_non_zero_sender { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckNonZeroSender; } pub mod check_nonce { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); } pub mod check_spec_version { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckSpecVersion; } pub mod check_tx_version { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckTxVersion; } pub mod check_weight { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CheckWeight; } @@ -42269,7 +29444,9 @@ pub mod api { pub mod limits { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct BlockLength { pub max: runtime_types::frame_support::weights::PerDispatchClass< @@ -42277,7 +29454,9 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct BlockWeights { pub base_block: ::core::primitive::u64, @@ -42288,7 +29467,9 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct WeightsPerClass { pub base_extrinsic: ::core::primitive::u64, @@ -42300,7 +29481,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -42379,7 +29562,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Error for the System pallet"] pub enum Error { @@ -42407,7 +29592,9 @@ pub mod api { CallFiltered, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Event for the System pallet."] pub enum Event { @@ -42430,22 +29617,26 @@ pub mod api { #[codec(index = 3)] #[doc = "A new account was created."] NewAccount { - account: ::subxt::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 4)] #[doc = "An account was reaped."] KilledAccount { - account: ::subxt::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 5)] #[doc = "On on-chain remark happened."] Remarked { - sender: ::subxt::sp_core::crypto::AccountId32, - hash: ::subxt::sp_core::H256, + sender: ::subxt::ext::sp_core::crypto::AccountId32, + hash: ::subxt::ext::sp_core::H256, }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AccountInfo<_0, _1> { pub nonce: _0, pub consumers: _0, @@ -42453,19 +29644,31 @@ pub mod api { pub sufficients: _0, pub data: _1, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct EventRecord<_0, _1> { pub phase: runtime_types::frame_system::Phase, pub event: _0, pub topics: ::std::vec::Vec<_1>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct LastRuntimeUpgradeInfo { #[codec(compact)] pub spec_version: ::core::primitive::u32, pub spec_name: ::std::string::String, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Phase { #[codec(index = 0)] ApplyExtrinsic(::core::primitive::u32), @@ -42480,7 +29683,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -42496,7 +29701,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -42523,7 +29730,11 @@ pub mod api { OldUncle, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum UncleEntryItem<_0, _1, _2> { #[codec(index = 0)] InclusionHeight(_0), @@ -42536,13 +29747,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "Report authority equivocation/misbehavior. This method will verify"] # [doc = "the equivocation proof and validate the given key ownership proof"] # [doc = "against the extracted offender. If both are valid, the offence will"] # [doc = "be reported."] report_equivocation { equivocation_proof : :: std :: boxed :: Box < runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [codec (index = 1)] # [doc = "Report authority equivocation/misbehavior. This method will verify"] # [doc = "the equivocation proof and validate the given key ownership proof"] # [doc = "against the extracted offender. If both are valid, the offence will"] # [doc = "be reported."] # [doc = "This extrinsic must be called unsigned and it is expected that only"] # [doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] # [doc = "if the block author is defined it will be defined as the equivocation"] # [doc = "reporter."] report_equivocation_unsigned { equivocation_proof : :: std :: boxed :: Box < runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [codec (index = 2)] # [doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] # [doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] # [doc = "Multiple calls to this method will replace any existing planned config change that had"] # [doc = "not been enacted yet."] plan_config_change { config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor , } , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -42566,16 +29781,22 @@ pub mod api { pub mod list { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Bag { - pub head: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - pub tail: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub head: ::core::option::Option< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + pub tail: ::core::option::Option< + ::subxt::ext::sp_core::crypto::AccountId32, + >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum ListError { #[codec(index = 0)] @@ -42588,14 +29809,18 @@ pub mod api { NodeNotFound, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Node { - pub id: ::subxt::sp_core::crypto::AccountId32, - pub prev: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - pub next: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + 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 bag_upper: ::core::primitive::u64, pub score: ::core::primitive::u64, } @@ -42603,7 +29828,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -42619,7 +29846,7 @@ pub mod api { #[doc = ""] #[doc = "If `dislocated` does not exists, it returns an error."] rebag { - dislocated: ::subxt::sp_core::crypto::AccountId32, + dislocated: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 1)] #[doc = "Move the caller's Id directly in front of `lighter`."] @@ -42631,11 +29858,13 @@ 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::sp_core::crypto::AccountId32, + lighter: ::subxt::ext::sp_core::crypto::AccountId32, }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -42644,21 +29873,23 @@ pub mod api { List(runtime_types::pallet_bags_list::list::ListError), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] #[doc = "Moved an account from one bag to another."] Rebagged { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, new_score: ::core::primitive::u64, }, } @@ -42669,7 +29900,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -42700,8 +29933,8 @@ pub mod api { #[doc = "- Origin account is already in memory, so no DB operations for them."] #[doc = "# "] transfer { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -42717,8 +29950,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call is `root`."] set_balance { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -42734,12 +29967,12 @@ pub mod api { #[doc = " assumed to be in the overlay."] #[doc = "# "] force_transfer { - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + source: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -42753,8 +29986,8 @@ pub mod api { #[doc = ""] #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] transfer_keep_alive { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -42779,8 +30012,8 @@ pub mod api { #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] #[doc = " #"] transfer_all { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + dest: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, keep_alive: ::core::primitive::bool, @@ -42790,15 +30023,17 @@ pub mod api { #[doc = ""] #[doc = "Can only be called by ROOT."] force_unreserve { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, amount: ::core::primitive::u128, }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -42828,26 +30063,40 @@ pub mod api { TooManyReserves, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-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 :: 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 :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "Transfer succeeded."] Transfer { from : :: subxt :: sp_core :: crypto :: AccountId32 , to : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 3)] # [doc = "A balance was set by root."] BalanceSet { who : :: subxt :: 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 :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "Some balance was unreserved (moved from reserved to free)."] Unreserved { who : :: subxt :: 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 :: sp_core :: crypto :: AccountId32 , to : :: subxt :: 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 :: 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 :: 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 :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , } + # [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 , } , } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct AccountData<_0> { pub free: _0, pub reserved: _0, pub misc_frozen: _0, pub fee_frozen: _0, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct BalanceLock<_0> { pub id: [::core::primitive::u8; 8usize], pub amount: _0, pub reasons: runtime_types::pallet_balances::Reasons, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Reasons { #[codec(index = 0)] Fee, @@ -42856,14 +30105,22 @@ pub mod api { #[codec(index = 2)] All, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Releases { #[codec(index = 0)] V1_0_0, #[codec(index = 1)] V2_0_0, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReserveData<_0, _1> { pub id: _0, pub amount: _1, @@ -42874,7 +30131,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -42920,8 +30179,8 @@ pub mod api { propose_curator { #[codec(compact)] bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + curator: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -42978,8 +30237,8 @@ pub mod api { award_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -43030,7 +30289,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -43070,7 +30331,9 @@ pub mod api { TooManyQueued, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -43090,14 +30353,14 @@ pub mod api { #[doc = "A bounty is awarded to a beneficiary."] BountyAwarded { index: ::core::primitive::u32, - beneficiary: ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 4)] #[doc = "A bounty is claimed by beneficiary."] BountyClaimed { index: ::core::primitive::u32, payout: ::core::primitive::u128, - beneficiary: ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 5)] #[doc = "A bounty is cancelled."] @@ -43107,7 +30370,11 @@ pub mod api { BountyExtended { index: ::core::primitive::u32 }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Bounty<_0, _1, _2> { pub proposer: _0, pub value: _1, @@ -43116,7 +30383,11 @@ pub mod api { pub bond: _1, pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum BountyStatus<_0, _1> { #[codec(index = 0)] Proposed, @@ -43141,7 +30412,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -43193,8 +30466,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, #[codec(compact)] child_bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + curator: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] @@ -43290,8 +30563,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, #[codec(compact)] child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -43349,7 +30622,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -43364,7 +30639,9 @@ pub mod api { TooManyChildBounties, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -43379,7 +30656,7 @@ pub mod api { Awarded { index: ::core::primitive::u32, child_index: ::core::primitive::u32, - beneficiary: ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 2)] #[doc = "A child-bounty is claimed by beneficiary."] @@ -43387,7 +30664,7 @@ pub mod api { index: ::core::primitive::u32, child_index: ::core::primitive::u32, payout: ::core::primitive::u128, - beneficiary: ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 3)] #[doc = "A child-bounty is cancelled."] @@ -43397,7 +30674,11 @@ pub mod api { }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ChildBounty<_0, _1, _2> { pub parent_bounty: _2, pub value: _1, @@ -43406,7 +30687,11 @@ pub mod api { pub status: runtime_types::pallet_child_bounties::ChildBountyStatus<_0, _2>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum ChildBountyStatus<_0, _1> { #[codec(index = 0)] Added, @@ -43427,7 +30712,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -43466,9 +30753,10 @@ pub mod api { #[doc = "# "] set_members { new_members: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - prime: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + prime: ::core::option::Option< + ::subxt::ext::sp_core::crypto::AccountId32, + >, old_count: ::core::primitive::u32, }, #[codec(index = 1)] @@ -43542,7 +30830,7 @@ pub mod api { #[doc = "- 1 event"] #[doc = "# "] vote { - proposal: ::subxt::sp_core::H256, + proposal: ::subxt::ext::sp_core::H256, #[codec(compact)] index: ::core::primitive::u32, approve: ::core::primitive::bool, @@ -43581,7 +30869,7 @@ pub mod api { #[doc = "- up to 3 events"] #[doc = "# "] close { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] index: ::core::primitive::u32, #[codec(compact)] @@ -43605,11 +30893,13 @@ pub mod api { #[doc = "* Writes: Voting, Proposals, ProposalOf"] #[doc = "# "] disapprove_proposal { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -43645,7 +30935,9 @@ pub mod api { WrongProposalLength, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -43653,17 +30945,17 @@ pub mod api { #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] Proposed { - account: ::subxt::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::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::sp_core::crypto::AccountId32, - proposal_hash: ::subxt::sp_core::H256, + account: ::subxt::ext::sp_core::crypto::AccountId32, + proposal_hash: ::subxt::ext::sp_core::H256, voted: ::core::primitive::bool, yes: ::core::primitive::u32, no: ::core::primitive::u32, @@ -43671,17 +30963,17 @@ pub mod api { #[codec(index = 2)] #[doc = "A motion was approved by the required threshold."] Approved { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 3)] #[doc = "A motion was not approved by the required threshold."] Disapproved { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 4)] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] Executed { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, @@ -43690,7 +30982,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::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, @@ -43699,13 +30991,17 @@ 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::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, yes: ::core::primitive::u32, no: ::core::primitive::u32, }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum RawOrigin<_0> { #[codec(index = 0)] Members(::core::primitive::u32, ::core::primitive::u32), @@ -43714,7 +31010,11 @@ pub mod api { #[codec(index = 2)] _Phantom, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Votes<_0, _1> { pub index: _1, pub threshold: _1, @@ -43728,7 +31028,9 @@ pub mod api { pub mod conviction { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Conviction { #[codec(index = 0)] @@ -43750,7 +31052,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -43767,7 +31071,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(p)`"] propose { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] value: ::core::primitive::u128, }, @@ -43826,7 +31130,7 @@ pub mod api { #[doc = "Weight: `O(V)` with V number of vetoers in the blacklist of proposal."] #[doc = " Decoding vec of length V. Charged as maximum"] external_propose { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 5)] #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] @@ -43841,7 +31145,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(1)`"] external_propose_majority { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 6)] #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] @@ -43856,7 +31160,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(1)`"] external_propose_default { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 7)] #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] @@ -43875,7 +31179,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(1)`"] fast_track { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, }, @@ -43890,7 +31194,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] veto_external { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 9)] #[doc = "Remove a referendum."] @@ -43935,7 +31239,7 @@ 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::sp_core::crypto::AccountId32, + to: ::subxt::ext::sp_core::crypto::AccountId32, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, @@ -44018,7 +31322,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(D)` where D is length of proposal."] reap_preimage { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] proposal_len_upper_bound: ::core::primitive::u32, }, @@ -44031,7 +31335,7 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(R)` with R number of vote of target."] unlock { - target: ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 20)] #[doc = "Remove a vote for a referendum."] @@ -44079,13 +31383,13 @@ 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::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, }, #[codec(index = 22)] #[doc = "Enact a proposal from a referendum. For now we just make the weight be the maximum."] enact_proposal { - proposal_hash: ::subxt::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, }, #[codec(index = 23)] @@ -44105,7 +31409,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::sp_core::H256, + proposal_hash: ::subxt::ext::sp_core::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, }, #[codec(index = 24)] @@ -44122,7 +31426,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -44213,23 +31519,29 @@ pub mod api { TooManyProposals, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-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 , depositors : :: std :: vec :: Vec < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [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 = "A proposal has been enacted."] Executed { ref_index : :: core :: primitive :: u32 , result : :: core :: result :: Result < () , runtime_types :: sp_runtime :: DispatchError > , } , # [codec (index = 8)] # [doc = "An account has delegated their vote to another account."] Delegated { who : :: subxt :: sp_core :: crypto :: AccountId32 , target : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 9)] # [doc = "An account has cancelled a previous delegation operation."] Undelegated { account : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 10)] # [doc = "An external proposal has been vetoed."] Vetoed { who : :: subxt :: sp_core :: crypto :: AccountId32 , proposal_hash : :: subxt :: sp_core :: H256 , until : :: core :: primitive :: u32 , } , # [codec (index = 11)] # [doc = "A proposal's preimage was noted, and the deposit taken."] PreimageNoted { proposal_hash : :: subxt :: sp_core :: H256 , who : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 12)] # [doc = "A proposal preimage was removed and used (the deposit was returned)."] PreimageUsed { proposal_hash : :: subxt :: sp_core :: H256 , provider : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 13)] # [doc = "A proposal could not be executed because its preimage was invalid."] PreimageInvalid { proposal_hash : :: subxt :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 14)] # [doc = "A proposal could not be executed because its preimage was missing."] PreimageMissing { proposal_hash : :: subxt :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 15)] # [doc = "A registered preimage was removed and the deposit collected by the reaper."] PreimageReaped { proposal_hash : :: subxt :: sp_core :: H256 , provider : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , reaper : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 16)] # [doc = "A proposal_hash has been blacklisted permanently."] Blacklisted { proposal_hash : :: subxt :: sp_core :: H256 , } , # [codec (index = 17)] # [doc = "An account has voted in a referendum"] Voted { voter : :: subxt :: sp_core :: crypto :: AccountId32 , ref_index : :: core :: primitive :: u32 , vote : runtime_types :: pallet_democracy :: vote :: AccountVote < :: core :: primitive :: u128 > , } , # [codec (index = 18)] # [doc = "An account has secconded a proposal"] Seconded { seconder : :: subxt :: sp_core :: crypto :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , # [codec (index = 19)] # [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 , depositors : :: std :: vec :: Vec < :: subxt :: ext :: sp_core :: crypto :: AccountId32 > , } , # [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 = "A proposal has been enacted."] Executed { ref_index : :: core :: primitive :: u32 , result : :: core :: result :: Result < () , runtime_types :: sp_runtime :: DispatchError > , } , # [codec (index = 8)] # [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 = 9)] # [doc = "An account has cancelled a previous delegation operation."] Undelegated { account : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 10)] # [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 = 11)] # [doc = "A proposal's preimage was noted, and the deposit taken."] PreimageNoted { proposal_hash : :: subxt :: ext :: sp_core :: H256 , who : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 12)] # [doc = "A proposal preimage was removed and used (the deposit was returned)."] PreimageUsed { proposal_hash : :: subxt :: ext :: sp_core :: H256 , provider : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 13)] # [doc = "A proposal could not be executed because its preimage was invalid."] PreimageInvalid { proposal_hash : :: subxt :: ext :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 14)] # [doc = "A proposal could not be executed because its preimage was missing."] PreimageMissing { proposal_hash : :: subxt :: ext :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 15)] # [doc = "A registered preimage was removed and the deposit collected by the reaper."] PreimageReaped { proposal_hash : :: subxt :: ext :: sp_core :: H256 , provider : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , reaper : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 16)] # [doc = "A proposal_hash has been blacklisted permanently."] Blacklisted { proposal_hash : :: subxt :: ext :: sp_core :: H256 , } , # [codec (index = 17)] # [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 = 18)] # [doc = "An account has secconded a proposal"] Seconded { seconder : :: subxt :: ext :: sp_core :: crypto :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , # [codec (index = 19)] # [doc = "A proposal got canceled."] ProposalCanceled { prop_index : :: core :: primitive :: u32 , } , } } pub mod types { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Delegations<_0> { pub votes: _0, pub capital: _0, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] @@ -44247,7 +31559,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ReferendumStatus<_0, _1, _2> { pub end: _0, @@ -44258,7 +31572,9 @@ pub mod api { pub tally: runtime_types::pallet_democracy::types::Tally<_2>, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Tally<_0> { pub ayes: _0, @@ -44269,7 +31585,9 @@ pub mod api { pub mod vote { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum AccountVote<_0> { #[codec(index = 0)] @@ -44281,18 +31599,22 @@ pub mod api { Split { aye: _0, nay: _0 }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct PriorLock<_0, _1>(pub _0, pub _1); #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Vote(pub ::core::primitive::u8); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Voting<_0, _1, _2> { #[codec(index = 0)] @@ -44320,7 +31642,9 @@ pub mod api { pub mod vote_threshold { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum VoteThreshold { #[codec(index = 0)] @@ -44331,7 +31655,11 @@ pub mod api { SimpleMajority, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum PreimageStatus<_0, _1, _2> { #[codec(index = 0)] Missing(_2), @@ -44344,7 +31672,11 @@ pub mod api { expiry: ::core::option::Option<_2>, }, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Releases { #[codec(index = 0)] V1, @@ -44355,13 +31687,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[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 :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: 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 :: 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 > , } , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Error of the pallet that can be returned in response to dispatches."] pub enum Error { @@ -44403,16 +31739,20 @@ pub mod api { FallbackFailed, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-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 { election_compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , prev_ejected : :: core :: primitive :: bool , } , # [codec (index = 1)] # [doc = "The election has been finalized, with `Some` of the given computation, or else if the"] # [doc = "election failed, `None`."] ElectionFinalized { election_compute : :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute > , } , # [codec (index = 2)] # [doc = "An account has been rewarded for their signed submission being finalized."] Rewarded { account : :: subxt :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 3)] # [doc = "An account has been slashed for submitting an invalid signed submission."] Slashed { account : :: subxt :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [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 { election_compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , prev_ejected : :: core :: primitive :: bool , } , # [codec (index = 1)] # [doc = "The election has been finalized, with `Some` of the given computation, or else if the"] # [doc = "election failed, `None`."] ElectionFinalized { election_compute : :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute > , } , # [codec (index = 2)] # [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 = 3)] # [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 = 4)] # [doc = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } } pub mod signed { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct SignedSubmission<_0, _1, _2> { pub who: _0, @@ -44424,7 +31764,11 @@ pub mod api { pub call_fee: _1, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum ElectionCompute { #[codec(index = 0)] OnChain, @@ -44437,7 +31781,11 @@ pub mod api { #[codec(index = 4)] Emergency, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Phase<_0> { #[codec(index = 0)] Off, @@ -44448,13 +31796,21 @@ pub mod api { #[codec(index = 3)] Emergency, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RawSolution<_0> { pub solution: _0, pub score: runtime_types::sp_npos_elections::ElectionScore, pub round: ::core::primitive::u32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ReadySolution<_0> { pub supports: ::std::vec::Vec<(_0, runtime_types::sp_npos_elections::Support<_0>)>, @@ -44462,18 +31818,26 @@ pub mod api { pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RoundSnapshot { pub voters: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u64, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, )>, - pub targets: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub targets: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SolutionOrSnapshotSize { #[codec(compact)] pub voters: ::core::primitive::u32, @@ -44486,7 +31850,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -44515,7 +31881,8 @@ 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::sp_core::crypto::AccountId32>, + votes: + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, #[codec(compact)] value: ::core::primitive::u128, }, @@ -44584,8 +31951,8 @@ pub mod api { #[doc = "will go into phragmen, we assume full block for now."] #[doc = "# "] remove_member { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, has_replacement: ::core::primitive::bool, @@ -44607,7 +31974,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -44664,7 +32033,9 @@ pub mod api { InvalidReplacement, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -44676,7 +32047,7 @@ pub mod api { #[doc = "begin with."] NewTerm { new_members: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, }, @@ -44691,12 +32062,12 @@ pub mod api { #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] #[doc = "`EmptyTerm`."] MemberKicked { - member: ::subxt::sp_core::crypto::AccountId32, + member: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 4)] #[doc = "Someone has renounced their candidacy."] Renounced { - candidate: ::subxt::sp_core::crypto::AccountId32, + candidate: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 5)] #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] @@ -44704,18 +32075,22 @@ pub mod api { #[doc = ""] #[doc = "Note that old members and runners-up are also candidates."] CandidateSlashed { - candidate: ::subxt::sp_core::crypto::AccountId32, + candidate: ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, + seat_holder: ::subxt::ext::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Renouncing { #[codec(index = 0)] Member, @@ -44724,13 +32099,21 @@ pub mod api { #[codec(index = 2)] Candidate(#[codec(compact)] ::core::primitive::u32), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SeatHolder<_0, _1> { pub who: _0, pub stake: _1, pub deposit: _1, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Voter<_0, _1> { pub votes: ::std::vec::Vec<_0>, pub stake: _1, @@ -44742,7 +32125,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -44754,7 +32139,7 @@ pub mod api { report_equivocation { equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, ::core::primitive::u32, >, >, @@ -44773,7 +32158,7 @@ pub mod api { report_equivocation_unsigned { equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, ::core::primitive::u32, >, >, @@ -44798,7 +32183,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -44827,7 +32214,9 @@ pub mod api { DuplicateOffenceReport, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -44847,7 +32236,11 @@ pub mod api { Resumed, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct StoredPendingChange<_0> { pub scheduled_at: _0, pub delay: _0, @@ -44860,7 +32253,11 @@ pub mod api { >, pub forced: ::core::option::Option<_0>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum StoredState<_0> { #[codec(index = 0)] Live, @@ -44877,7 +32274,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Identity pallet declaration."] pub enum Call { @@ -44896,7 +32295,7 @@ pub mod api { #[doc = "- One event."] #[doc = "# "] add_registrar { - account: ::subxt::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 1)] #[doc = "Set an account's identity information and reserve the appropriate deposit."] @@ -44947,7 +32346,7 @@ pub mod api { #[doc = "# "] set_subs { subs: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, }, @@ -45057,7 +32456,7 @@ pub mod api { set_account_id { #[codec(compact)] index: ::core::primitive::u32, - new: ::subxt::sp_core::crypto::AccountId32, + new: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 8)] #[doc = "Set the field information for a registrar."] @@ -45103,8 +32502,8 @@ pub mod api { provide_judgement { #[codec(compact)] reg_index: ::core::primitive::u32, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, judgement: runtime_types::pallet_identity::types::Judgement< @@ -45132,8 +32531,8 @@ pub mod api { #[doc = "- One event."] #[doc = "# "] kill_identity { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -45146,8 +32545,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::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, @@ -45158,8 +32557,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::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, data: runtime_types::pallet_identity::types::Data, @@ -45173,8 +32572,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::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -45192,7 +32591,9 @@ pub mod api { quit_sub, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -45246,43 +32647,45 @@ pub mod api { NotOwned, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] #[doc = "A name was set or reset (which will remove all judgements)."] IdentitySet { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 1)] #[doc = "A name was cleared, and the given balance returned."] IdentityCleared { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "A name was removed and the given balance slashed."] IdentityKilled { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "A judgement was asked from a registrar."] JudgementRequested { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 4)] #[doc = "A judgement request was retracted."] JudgementUnrequested { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 5)] #[doc = "A judgement was given by a registrar."] JudgementGiven { - target: ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_core::crypto::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 6)] @@ -45293,23 +32696,23 @@ pub mod api { #[codec(index = 7)] #[doc = "A sub-identity was added to an identity and the deposit paid."] SubIdentityAdded { - sub: ::subxt::sp_core::crypto::AccountId32, - main: ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_core::crypto::AccountId32, + main: ::subxt::ext::sp_core::crypto::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 8)] #[doc = "A sub-identity was removed from an identity and the deposit freed."] SubIdentityRemoved { - sub: ::subxt::sp_core::crypto::AccountId32, - main: ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_core::crypto::AccountId32, + main: ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, - main: ::subxt::sp_core::crypto::AccountId32, + sub: ::subxt::ext::sp_core::crypto::AccountId32, + main: ::subxt::ext::sp_core::crypto::AccountId32, deposit: ::core::primitive::u128, }, } @@ -45317,9 +32720,9 @@ pub mod api { pub mod types { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct BitFlags<_0>( @@ -45327,7 +32730,9 @@ pub mod api { #[codec(skip)] pub ::core::marker::PhantomData<_0>, ); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Data { #[codec(index = 0)] @@ -45408,7 +32813,9 @@ pub mod api { ShaThree256([::core::primitive::u8; 32usize]), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum IdentityField { #[codec(index = 1)] @@ -45429,7 +32836,9 @@ pub mod api { Twitter, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct IdentityInfo { pub additional: @@ -45448,7 +32857,9 @@ pub mod api { pub twitter: runtime_types::pallet_identity::types::Data, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Judgement<_0> { #[codec(index = 0)] @@ -45467,7 +32878,9 @@ pub mod api { Erroneous, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct RegistrarInfo<_0, _1> { pub account: _1, @@ -45477,7 +32890,9 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Registration<_0> { pub judgements: @@ -45495,13 +32910,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "# "] # [doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] # [doc = " length of `heartbeat.network_state.external_address`"] # [doc = " - `O(K)`: decoding of length `K`"] # [doc = " - `O(E)`: decoding/encoding of length `E`"] # [doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] # [doc = " `ReceivedHeartbeats`"] # [doc = "- DbWrites: `ReceivedHeartbeats`"] # [doc = "# "] heartbeat { heartbeat : runtime_types :: pallet_im_online :: Heartbeat < :: core :: primitive :: u32 > , signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature , } , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -45513,7 +32932,9 @@ pub mod api { DuplicatedHeartbeat, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -45530,9 +32951,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::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, >, )>, @@ -45544,18 +32965,30 @@ pub mod api { pub mod app_sr25519 { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct BoundedOpaqueNetworkState { pub peer_id : runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > , pub external_addresses : runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > > , } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Heartbeat<_0> { pub block_number: _0, pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, @@ -45569,7 +33002,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -45615,7 +33050,7 @@ pub mod api { #[doc = " - Writes: Indices Accounts, System Account (recipient)"] #[doc = "# "] transfer { - new: ::subxt::sp_core::crypto::AccountId32, + new: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, }, #[codec(index = 2)] @@ -45661,7 +33096,7 @@ pub mod api { #[doc = " - Writes: Indices Accounts, System Account (original owner)"] #[doc = "# "] force_transfer { - new: ::subxt::sp_core::crypto::AccountId32, + new: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, freeze: ::core::primitive::bool, }, @@ -45687,7 +33122,9 @@ pub mod api { freeze { index: ::core::primitive::u32 }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -45708,14 +33145,16 @@ pub mod api { Permanent, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] #[doc = "A account index was assigned."] IndexAssigned { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, }, #[codec(index = 1)] @@ -45725,7 +33164,7 @@ pub mod api { #[doc = "A account index has been frozen to its current account ID."] IndexFrozen { index: ::core::primitive::u32, - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, } } @@ -45735,7 +33174,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -45744,14 +33185,14 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::AddOrigin`."] add_member { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 1)] #[doc = "Remove a member `who` from the set."] #[doc = ""] #[doc = "May only be called from `T::RemoveOrigin`."] remove_member { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 2)] #[doc = "Swap out one member `remove` for another `add`."] @@ -45760,8 +33201,8 @@ pub mod api { #[doc = ""] #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] swap_member { - remove: ::subxt::sp_core::crypto::AccountId32, - add: ::subxt::sp_core::crypto::AccountId32, + remove: ::subxt::ext::sp_core::crypto::AccountId32, + add: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 3)] #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] @@ -45769,7 +33210,8 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::ResetOrigin`."] reset_members { - members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + members: + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, }, #[codec(index = 4)] #[doc = "Swap out the sending member for some other key `new`."] @@ -45778,14 +33220,14 @@ pub mod api { #[doc = ""] #[doc = "Prime membership is passed from the origin account to `new`, if extant."] change_key { - new: ::subxt::sp_core::crypto::AccountId32, + new: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 5)] #[doc = "Set the prime member. Must be a current member."] #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] set_prime { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 6)] #[doc = "Remove the prime member if it exists."] @@ -45794,7 +33236,9 @@ pub mod api { clear_prime, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -45809,7 +33253,9 @@ pub mod api { TooManyMembers, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -45839,7 +33285,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -45862,7 +33310,7 @@ pub mod api { #[doc = "# "] as_multi_threshold_1 { other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, call: ::std::boxed::Box, }, #[codec(index = 1)] @@ -45914,13 +33362,13 @@ pub mod api { as_multi { threshold: ::core::primitive::u16, other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, >, - call: ::subxt::WrapperKeepOpaque< + call: ::subxt::utils::WrapperKeepOpaque< runtime_types::polkadot_runtime::Call, >, store_call: ::core::primitive::bool, @@ -45965,7 +33413,7 @@ pub mod api { approve_as_multi { threshold: ::core::primitive::u16, other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, @@ -46004,7 +33452,7 @@ pub mod api { cancel_as_multi { threshold: ::core::primitive::u16, other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, @@ -46012,7 +33460,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -46060,35 +33510,37 @@ pub mod api { AlreadyStored, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] #[doc = "A new multisig operation has begun."] NewMultisig { - approving: ::subxt::sp_core::crypto::AccountId32, - multisig: ::subxt::sp_core::crypto::AccountId32, + approving: ::subxt::ext::sp_core::crypto::AccountId32, + multisig: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, #[codec(index = 1)] #[doc = "A multisig operation has been approved by someone."] MultisigApproval { - approving: ::subxt::sp_core::crypto::AccountId32, + approving: ::subxt::ext::sp_core::crypto::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::sp_core::crypto::AccountId32, + multisig: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, #[codec(index = 2)] #[doc = "A multisig operation has been executed."] MultisigExecuted { - approving: ::subxt::sp_core::crypto::AccountId32, + approving: ::subxt::ext::sp_core::crypto::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::sp_core::crypto::AccountId32, + multisig: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: [::core::primitive::u8; 32usize], result: ::core::result::Result< (), @@ -46098,23 +33550,31 @@ pub mod api { #[codec(index = 3)] #[doc = "A multisig operation has been cancelled."] MultisigCancelled { - cancelling: ::subxt::sp_core::crypto::AccountId32, + cancelling: ::subxt::ext::sp_core::crypto::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::sp_core::crypto::AccountId32, + multisig: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Multisig<_0, _1, _2> { pub when: runtime_types::pallet_multisig::Timepoint<_0>, pub deposit: _1, pub depositor: _2, pub approvals: ::std::vec::Vec<_2>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Timepoint<_0> { pub height: _0, pub index: _0, @@ -46125,7 +33585,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Events type."] pub enum Event { @@ -46145,7 +33607,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -46159,21 +33623,23 @@ pub mod api { }, #[codec(index = 1)] #[doc = "Clear an unrequested preimage from the runtime storage."] - unnote_preimage { hash: ::subxt::sp_core::H256 }, + unnote_preimage { hash: ::subxt::ext::sp_core::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::sp_core::H256 }, + request_preimage { hash: ::subxt::ext::sp_core::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::sp_core::H256 }, + unrequest_preimage { hash: ::subxt::ext::sp_core::H256 }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -46197,22 +33663,28 @@ pub mod api { NotRequested, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] #[doc = "A preimage has been noted."] - Noted { hash: ::subxt::sp_core::H256 }, + Noted { hash: ::subxt::ext::sp_core::H256 }, #[codec(index = 1)] #[doc = "A preimage has been requested."] - Requested { hash: ::subxt::sp_core::H256 }, + Requested { hash: ::subxt::ext::sp_core::H256 }, #[codec(index = 2)] #[doc = "A preimage has ben cleared."] - Cleared { hash: ::subxt::sp_core::H256 }, + Cleared { hash: ::subxt::ext::sp_core::H256 }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum RequestStatus<_0, _1> { #[codec(index = 0)] Unrequested(::core::option::Option<(_0, _1)>), @@ -46225,7 +33697,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -46246,7 +33720,7 @@ pub mod api { #[doc = "Weight is a function of the number of proxies the user has (P)."] #[doc = "# "] proxy { - real: ::subxt::sp_core::crypto::AccountId32, + real: ::subxt::ext::sp_core::crypto::AccountId32, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, @@ -46267,7 +33741,7 @@ pub mod api { #[doc = "Weight is a function of the number of proxies the user has (P)."] #[doc = "# "] add_proxy { - delegate: ::subxt::sp_core::crypto::AccountId32, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, @@ -46284,7 +33758,7 @@ pub mod api { #[doc = "Weight is a function of the number of proxies the user has (P)."] #[doc = "# "] remove_proxy { - delegate: ::subxt::sp_core::crypto::AccountId32, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, @@ -46351,7 +33825,7 @@ pub mod api { #[doc = "Weight is a function of the number of proxies the user has (P)."] #[doc = "# "] kill_anonymous { - spawner: ::subxt::sp_core::crypto::AccountId32, + spawner: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, index: ::core::primitive::u16, #[codec(compact)] @@ -46382,8 +33856,8 @@ pub mod api { #[doc = "- P: the number of proxies the user has."] #[doc = "# "] announce { - real: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, + real: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 7)] #[doc = "Remove a given announcement."] @@ -46403,8 +33877,8 @@ pub mod api { #[doc = "- P: the number of proxies the user has."] #[doc = "# "] remove_announcement { - real: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, + real: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 8)] #[doc = "Remove the given announcement of a delegate."] @@ -46424,8 +33898,8 @@ pub mod api { #[doc = "- P: the number of proxies the user has."] #[doc = "# "] reject_announcement { - delegate: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 9)] #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] @@ -46446,8 +33920,8 @@ pub mod api { #[doc = "- P: the number of proxies the user has."] #[doc = "# "] proxy_announced { - delegate: ::subxt::sp_core::crypto::AccountId32, - real: ::subxt::sp_core::crypto::AccountId32, + delegate: ::subxt::ext::sp_core::crypto::AccountId32, + real: ::subxt::ext::sp_core::crypto::AccountId32, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, @@ -46455,7 +33929,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -46485,7 +33961,9 @@ pub mod api { NoSelfProxy, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -46501,43 +33979,51 @@ pub mod api { #[doc = "Anonymous account has been created by new proxy with given"] #[doc = "disambiguation index and proxy type."] AnonymousCreated { - anonymous: ::subxt::sp_core::crypto::AccountId32, - who: ::subxt::sp_core::crypto::AccountId32, + anonymous: ::subxt::ext::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, - proxy: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, + real: ::subxt::ext::sp_core::crypto::AccountId32, + proxy: ::subxt::ext::sp_core::crypto::AccountId32, + call_hash: ::subxt::ext::sp_core::H256, }, #[codec(index = 3)] #[doc = "A proxy was added."] ProxyAdded { - delegator: ::subxt::sp_core::crypto::AccountId32, - delegatee: ::subxt::sp_core::crypto::AccountId32, + delegator: ::subxt::ext::sp_core::crypto::AccountId32, + delegatee: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, #[codec(index = 4)] #[doc = "A proxy was removed."] ProxyRemoved { - delegator: ::subxt::sp_core::crypto::AccountId32, - delegatee: ::subxt::sp_core::crypto::AccountId32, + delegator: ::subxt::ext::sp_core::crypto::AccountId32, + delegatee: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Announcement<_0, _1, _2> { pub real: _0, pub call_hash: _1, pub height: _2, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ProxyDefinition<_0, _1, _2> { pub delegate: _0, pub proxy_type: _1, @@ -46549,7 +34035,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -46565,7 +34053,7 @@ pub mod api { call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, }, @@ -46588,7 +34076,7 @@ pub mod api { call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, }, @@ -46613,7 +34101,7 @@ pub mod api { call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, }, @@ -46634,13 +34122,15 @@ pub mod api { call: ::std::boxed::Box< runtime_types::frame_support::traits::schedule::MaybeHashed< runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -46658,7 +34148,9 @@ pub mod api { RescheduleNoChange, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Events type."] pub enum Event { @@ -46698,7 +34190,11 @@ pub mod api { }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ScheduledV3<_0, _1, _2, _3> { pub maybe_id: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, @@ -46715,7 +34211,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -46758,7 +34256,9 @@ pub mod api { purge_keys, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Error for the session pallet."] pub enum Error { @@ -46779,7 +34279,9 @@ pub mod api { NoAccount, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -46799,7 +34301,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -46822,14 +34326,14 @@ pub mod api { #[doc = "------------------"] #[doc = "# "] bond { - controller: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + controller: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, #[codec(compact)] value: ::core::primitive::u128, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, }, #[codec(index = 1)] @@ -46918,8 +34422,8 @@ pub mod api { #[doc = "# "] nominate { targets: ::std::vec::Vec< - ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, >, @@ -46956,7 +34460,7 @@ pub mod api { #[doc = "# "] set_payee { payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, }, #[codec(index = 8)] @@ -46977,8 +34481,8 @@ pub mod api { #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] #[doc = "# "] set_controller { - controller: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + controller: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -47058,15 +34562,16 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] set_invulnerables { - invulnerables: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + invulnerables: ::std::vec::Vec< + ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, + stash: ::subxt::ext::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 16)] @@ -47113,7 +34618,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::sp_core::crypto::AccountId32, + validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, era: ::core::primitive::u32, }, #[codec(index = 19)] @@ -47173,7 +34678,7 @@ pub mod api { #[doc = ""] #[doc = "Refunds the transaction fees upon successful execution."] reap_stash { - stash: ::subxt::sp_core::crypto::AccountId32, + stash: ::subxt::ext::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 22)] @@ -47190,8 +34695,8 @@ pub mod api { #[doc = "block any further nominations."] kick { who: ::std::vec::Vec< - ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, >, @@ -47268,18 +34773,20 @@ 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::sp_core::crypto::AccountId32, + controller: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 25)] #[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::sp_core::crypto::AccountId32, + validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum ConfigOp<_0> { #[codec(index = 0)] @@ -47290,7 +34797,9 @@ pub mod api { Remove, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -47372,7 +34881,9 @@ pub mod api { CommissionTooLow, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -47388,14 +34899,14 @@ pub mod api { #[codec(index = 1)] #[doc = "The nominator has been rewarded by this amount. \\[stash, amount\\]"] Rewarded( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 2)] #[doc = "One validator (and its nominators) has been slashed by the given amount."] #[doc = "\\[validator, amount\\]"] Slashed( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 3)] @@ -47411,27 +34922,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( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 6)] #[doc = "An account has unbonded this amount. \\[stash, amount\\]"] Unbonded( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 7)] #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue. \\[stash, amount\\]"] Withdrawn( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 8)] #[doc = "A nominator has been kicked from a validator. \\[nominator, stash\\]"] Kicked( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ), #[codec(index = 9)] #[doc = "The election failed. No new era is planned."] @@ -47439,17 +34950,17 @@ pub mod api { #[codec(index = 10)] #[doc = "An account has stopped participating as either a validator or nominator."] #[doc = "\\[stash\\]"] - Chilled(::subxt::sp_core::crypto::AccountId32), + Chilled(::subxt::ext::sp_core::crypto::AccountId32), #[codec(index = 11)] #[doc = "The stakers' rewards are getting paid. \\[era_index, validator_stash\\]"] PayoutStarted( ::core::primitive::u32, - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, ), #[codec(index = 12)] #[doc = "A validator has set their preferences."] ValidatorPrefsSet( - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_staking::ValidatorPrefs, ), } @@ -47458,7 +34969,9 @@ pub mod api { pub mod slashing { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct SlashingSpans { pub span_index: ::core::primitive::u32, @@ -47467,24 +34980,38 @@ pub mod api { pub prior: ::std::vec::Vec<::core::primitive::u32>, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct SpanRecord<_0> { pub slashed: _0, pub paid_out: _0, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ActiveEraInfo { pub index: ::core::primitive::u32, pub start: ::core::option::Option<::core::primitive::u64>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct EraRewardPoints<_0> { pub total: ::core::primitive::u32, - pub individual: ::subxt::KeyedVec<_0, ::core::primitive::u32>, + pub individual: ::subxt::utils::KeyedVec<_0, ::core::primitive::u32>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Exposure<_0, _1> { #[codec(compact)] pub total: _1, @@ -47494,7 +35021,11 @@ pub mod api { runtime_types::pallet_staking::IndividualExposure<_0, _1>, >, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Forcing { #[codec(index = 0)] NotForcing, @@ -47505,21 +35036,33 @@ pub mod api { #[codec(index = 3)] ForceAlways, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct IndividualExposure<_0, _1> { pub who: _0, #[codec(compact)] pub value: _1, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Nominations { pub targets: runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, pub submitted_in: ::core::primitive::u32, pub suppressed: ::core::primitive::bool, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Releases { #[codec(index = 0)] V1_0_0Ancient, @@ -47540,7 +35083,11 @@ pub mod api { #[codec(index = 8)] V9_0_0, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum RewardDestination<_0> { #[codec(index = 0)] Staked, @@ -47553,9 +35100,13 @@ pub mod api { #[codec(index = 4)] None, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct StakingLedger { - pub stash: ::subxt::sp_core::crypto::AccountId32, + pub stash: ::subxt::ext::sp_core::crypto::AccountId32, #[codec(compact)] pub total: ::core::primitive::u128, #[codec(compact)] @@ -47568,7 +35119,11 @@ pub mod api { >, pub claimed_rewards: ::std::vec::Vec<::core::primitive::u32>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct UnappliedSlash<_0, _1> { pub validator: _0, pub own: _1, @@ -47576,14 +35131,22 @@ pub mod api { pub reporters: ::std::vec::Vec<_0>, pub payout: _1, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct UnlockChunk<_0> { #[codec(compact)] pub value: _0, #[codec(compact)] pub era: ::core::primitive::u32, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ValidatorPrefs { #[codec(compact)] pub commission: runtime_types::sp_arithmetic::per_things::Perbill, @@ -47595,7 +35158,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -47628,7 +35193,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -47654,7 +35221,7 @@ pub mod api { #[doc = "# "] report_awesome { reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 1)] #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] @@ -47676,7 +35243,7 @@ pub mod api { #[doc = "- DbReads: `Tips`, `origin account`"] #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"] #[doc = "# "] - retract_tip { hash: ::subxt::sp_core::H256 }, + retract_tip { hash: ::subxt::ext::sp_core::H256 }, #[codec(index = 2)] #[doc = "Give a tip for something new; no finder's fee will be taken."] #[doc = ""] @@ -47702,7 +35269,7 @@ pub mod api { #[doc = "# "] tip_new { reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, #[codec(compact)] tip_value: ::core::primitive::u128, }, @@ -47732,7 +35299,7 @@ pub mod api { #[doc = "- DbWrites: `Tips`"] #[doc = "# "] tip { - hash: ::subxt::sp_core::H256, + hash: ::subxt::ext::sp_core::H256, #[codec(compact)] tip_value: ::core::primitive::u128, }, @@ -47753,7 +35320,7 @@ pub mod api { #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] #[doc = "# "] - close_tip { hash: ::subxt::sp_core::H256 }, + close_tip { hash: ::subxt::ext::sp_core::H256 }, #[codec(index = 5)] #[doc = "Remove and slash an already-open tip."] #[doc = ""] @@ -47767,10 +35334,12 @@ 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::sp_core::H256 }, + slash_tip { hash: ::subxt::ext::sp_core::H256 }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -47794,36 +35363,48 @@ pub mod api { Premature, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] #[doc = "A new tip suggestion has been opened."] - NewTip { tip_hash: ::subxt::sp_core::H256 }, + NewTip { + tip_hash: ::subxt::ext::sp_core::H256, + }, #[codec(index = 1)] #[doc = "A tip suggestion has reached threshold and is closing."] - TipClosing { tip_hash: ::subxt::sp_core::H256 }, + TipClosing { + tip_hash: ::subxt::ext::sp_core::H256, + }, #[codec(index = 2)] #[doc = "A tip suggestion has been closed."] TipClosed { - tip_hash: ::subxt::sp_core::H256, - who: ::subxt::sp_core::crypto::AccountId32, + tip_hash: ::subxt::ext::sp_core::H256, + who: ::subxt::ext::sp_core::crypto::AccountId32, payout: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "A tip suggestion has been retracted."] - TipRetracted { tip_hash: ::subxt::sp_core::H256 }, + TipRetracted { + tip_hash: ::subxt::ext::sp_core::H256, + }, #[codec(index = 4)] #[doc = "A tip suggestion has been slashed."] TipSlashed { - tip_hash: ::subxt::sp_core::H256, - finder: ::subxt::sp_core::crypto::AccountId32, + tip_hash: ::subxt::ext::sp_core::H256, + finder: ::subxt::ext::sp_core::crypto::AccountId32, deposit: ::core::primitive::u128, }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct OpenTip<_0, _1, _2, _3> { pub reason: _3, pub who: _0, @@ -47836,28 +35417,19 @@ pub mod api { } pub mod pallet_transaction_payment { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, - )] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[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::sp_core::crypto::AccountId32, - actual_fee: ::core::primitive::u128, - tip: ::core::primitive::u128, - }, - } - } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ChargeTransactionPayment( #[codec(compact)] pub ::core::primitive::u128, ); - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Releases { #[codec(index = 0)] V1Ancient, @@ -47870,7 +35442,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -47887,8 +35461,8 @@ pub mod api { propose_spend { #[codec(compact)] value: ::core::primitive::u128, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -47933,8 +35507,8 @@ pub mod api { spend { #[codec(compact)] amount: ::core::primitive::u128, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -47960,7 +35534,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Error for the treasury pallet."] pub enum Error { @@ -47982,7 +35558,9 @@ pub mod api { ProposalNotApproved, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -48001,7 +35579,7 @@ pub mod api { Awarded { proposal_index: ::core::primitive::u32, award: ::core::primitive::u128, - account: ::subxt::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 3)] #[doc = "A proposal was rejected; funds were slashed."] @@ -48027,11 +35605,15 @@ pub mod api { SpendApproved { proposal_index: ::core::primitive::u32, amount: ::core::primitive::u128, - beneficiary: ::subxt::sp_core::crypto::AccountId32, + beneficiary: ::subxt::ext::sp_core::crypto::AccountId32, }, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Proposal<_0, _1> { pub proposer: _0, pub value: _1, @@ -48044,7 +35626,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -48144,7 +35728,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -48153,7 +35739,9 @@ pub mod api { TooManyCalls, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -48194,7 +35782,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -48230,8 +35820,8 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] #[doc = "# "] vest_other { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, }, @@ -48254,8 +35844,8 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] #[doc = "# "] vested_transfer { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, schedule: @@ -48284,12 +35874,12 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] #[doc = "# "] force_vested_transfer { - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + source: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, + target: ::subxt::ext::sp_runtime::MultiAddress< + ::subxt::ext::sp_core::crypto::AccountId32, (), >, schedule: @@ -48326,7 +35916,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Error for the vesting pallet."] pub enum Error { @@ -48348,7 +35940,9 @@ pub mod api { InvalidScheduleParams, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -48356,20 +35950,22 @@ 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::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, unvested: ::core::primitive::u128, }, #[codec(index = 1)] #[doc = "An \\[account\\] has become fully vested."] VestingCompleted { - account: ::subxt::sp_core::crypto::AccountId32, + account: ::subxt::ext::sp_core::crypto::AccountId32, }, } } pub mod vesting_info { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct VestingInfo<_0, _1> { pub locked: _0, @@ -48377,7 +35973,11 @@ pub mod api { pub starting_block: _1, } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Releases { #[codec(index = 0)] V0, @@ -48390,7 +35990,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -48568,7 +36170,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -48616,7 +36220,9 @@ pub mod api { AlreadySubscribed, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -48734,7 +36340,7 @@ pub mod api { #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] AssetsTrapped( - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, runtime_types::xcm::v1::multilocation::MultiLocation, runtime_types::xcm::VersionedMultiAssets, ), @@ -48776,7 +36382,9 @@ pub mod api { ), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Origin { #[codec(index = 0)] @@ -48785,7 +36393,9 @@ pub mod api { Response(runtime_types::xcm::v1::multilocation::MultiLocation), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum QueryStatus<_0> { #[codec(index = 0)] @@ -48809,7 +36419,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum VersionMigrationStage { #[codec(index = 0)] @@ -48827,19 +36439,35 @@ pub mod api { } pub mod polkadot_core_primitives { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] - pub struct CandidateHash(pub ::subxt::sp_core::H256); - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] + pub struct CandidateHash(pub ::subxt::ext::sp_core::H256); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct InboundDownwardMessage<_0> { pub sent_at: _0, pub msg: ::std::vec::Vec<::core::primitive::u8>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct InboundHrmpMessage<_0> { pub sent_at: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct OutboundHrmpMessage<_0> { pub recipient: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, @@ -48850,31 +36478,39 @@ pub mod api { pub mod primitives { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct HrmpChannelId { pub sender: runtime_types::polkadot_parachain::primitives::Id, pub recipient: runtime_types::polkadot_parachain::primitives::Id, } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Id(pub ::core::primitive::u32); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] - pub struct ValidationCodeHash(pub ::subxt::sp_core::H256); + pub struct ValidationCodeHash(pub ::subxt::ext::sp_core::H256); } } pub mod polkadot_primitives { @@ -48884,50 +36520,66 @@ pub mod api { pub mod assignment_app { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } pub mod collator_app { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } pub mod signed { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct UncheckedSigned < _0 , _1 > { pub payload : _0 , pub validator_index : runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex , pub signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _1 > } } pub mod validator_app { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct AvailabilityBitfield( - pub ::subxt::bitvec::vec::BitVec< + pub ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, ); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct BackedCandidate<_0> { pub candidate: @@ -48937,13 +36589,15 @@ pub mod api { pub validity_votes: ::std::vec::Vec< runtime_types::polkadot_primitives::v2::ValidityAttestation, >, - pub validator_indices: ::subxt::bitvec::vec::BitVec< + pub validator_indices: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CandidateCommitments<_0> { pub upward_messages: @@ -48962,7 +36616,9 @@ pub mod api { pub hrmp_watermark: _0, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CandidateDescriptor<_0> { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -48979,7 +36635,9 @@ pub mod api { runtime_types::polkadot_parachain::primitives::ValidationCodeHash, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CandidateReceipt<_0> { pub descriptor: @@ -48987,7 +36645,9 @@ pub mod api { pub commitments_hash: _0, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CommittedCandidateReceipt<_0> { pub descriptor: @@ -48998,14 +36658,16 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct CoreIndex(pub ::core::primitive::u32); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum CoreOccupied { #[codec(index = 0)] @@ -49014,27 +36676,33 @@ pub mod api { Parachain, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct DisputeState<_0> { - pub validators_for: ::subxt::bitvec::vec::BitVec< + pub validators_for: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, - pub validators_against: ::subxt::bitvec::vec::BitVec< + pub validators_against: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, pub start: _0, pub concluded_at: ::core::option::Option<_0>, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum DisputeStatement { # [codec (index = 0)] Valid (runtime_types :: polkadot_primitives :: v2 :: ValidDisputeStatementKind ,) , # [codec (index = 1)] Invalid (runtime_types :: polkadot_primitives :: v2 :: InvalidDisputeStatementKind ,) , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct DisputeStatementSet { pub candidate_hash: @@ -49047,14 +36715,16 @@ pub mod api { )>, } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct GroupIndex(pub ::core::primitive::u32); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct InherentData<_0> { pub bitfields: ::std::vec::Vec< @@ -49065,7 +36735,7 @@ pub mod api { >, pub backed_candidates: ::std::vec::Vec< runtime_types::polkadot_primitives::v2::BackedCandidate< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, >, pub disputes: ::std::vec::Vec< @@ -49074,28 +36744,36 @@ pub mod api { pub parent_header: _0, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum InvalidDisputeStatementKind { #[codec(index = 0)] Explicit, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_primitives::v2::collator_app::Public, ); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ParathreadEntry { pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, pub retries: ::core::primitive::u32, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct PvfCheckStatement { pub accept: ::core::primitive::bool, @@ -49106,7 +36784,9 @@ pub mod api { runtime_types::polkadot_primitives::v2::ValidatorIndex, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, @@ -49122,7 +36802,9 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct SessionInfo { pub active_validator_indices: ::std::vec::Vec< @@ -49152,7 +36834,9 @@ pub mod api { pub needed_approvals: ::core::primitive::u32, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum UpgradeGoAhead { #[codec(index = 0)] @@ -49161,34 +36845,40 @@ pub mod api { GoAhead, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum UpgradeRestriction { #[codec(index = 0)] Present, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum ValidDisputeStatementKind { #[codec(index = 0)] Explicit, #[codec(index = 1)] - BackingSeconded(::subxt::sp_core::H256), + BackingSeconded(::subxt::ext::sp_core::H256), #[codec(index = 2)] - BackingValid(::subxt::sp_core::H256), + BackingValid(::subxt::ext::sp_core::H256), #[codec(index = 3)] ApprovalChecking, } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct ValidatorIndex(pub ::core::primitive::u32); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum ValidityAttestation { #[codec(index = 1)] @@ -49204,13 +36894,25 @@ pub mod api { } pub mod polkadot_runtime { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Call { # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Call ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Call ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: pallet :: Call ,) , # [codec (index = 2)] Babe (runtime_types :: pallet_babe :: pallet :: Call ,) , # [codec (index = 3)] Timestamp (runtime_types :: pallet_timestamp :: pallet :: Call ,) , # [codec (index = 4)] Indices (runtime_types :: pallet_indices :: pallet :: Call ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Call ,) , # [codec (index = 6)] Authorship (runtime_types :: pallet_authorship :: pallet :: Call ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Call ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Call ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Call ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Call ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Call ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Call ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Call ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Call ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Call ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Call ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Call ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Call ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Call ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Call ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Call ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Call ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Call ,) , # [codec (index = 51)] Configuration (runtime_types :: polkadot_runtime_parachains :: configuration :: pallet :: Call ,) , # [codec (index = 52)] ParasShared (runtime_types :: polkadot_runtime_parachains :: shared :: pallet :: Call ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Call ,) , # [codec (index = 54)] ParaInherent (runtime_types :: polkadot_runtime_parachains :: paras_inherent :: pallet :: Call ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Call ,) , # [codec (index = 57)] Initializer (runtime_types :: polkadot_runtime_parachains :: initializer :: pallet :: Call ,) , # [codec (index = 58)] Dmp (runtime_types :: polkadot_runtime_parachains :: dmp :: pallet :: Call ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Call ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Call ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Call ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Call ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Call ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Call ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Call ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Call ,) , } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Event { - # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Event ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Event ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: pallet :: Event ,) , # [codec (index = 4)] Indices (runtime_types :: pallet_indices :: pallet :: Event ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Event ,) , # [codec (index = 32)] TransactionPayment (runtime_types :: pallet_transaction_payment :: pallet :: Event ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Event ,) , # [codec (index = 8)] Offences (runtime_types :: pallet_offences :: pallet :: Event ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Event ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Event ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Event ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Event ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Event ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Event ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Event ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Event ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Event ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Event ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Event ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Event ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Event ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Event ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Event ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Event ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Event ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Event ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Event ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Event ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Event ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Event ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Event ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Event ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Event ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Event ,) , } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Event ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Event ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: pallet :: Event ,) , # [codec (index = 4)] Indices (runtime_types :: pallet_indices :: pallet :: Event ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Event ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Event ,) , # [codec (index = 8)] Offences (runtime_types :: pallet_offences :: pallet :: Event ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Event ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Event ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Event ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Event ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Event ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Event ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Event ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Event ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Event ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Event ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Event ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Event ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Event ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Event ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Event ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Event ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Event ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Event ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Event ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Event ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Event ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Event ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Event ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Event ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Event ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Event ,) , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct NposCompactSolution16 { pub votes1: ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u16)>, @@ -49335,24 +37037,28 @@ pub mod api { ::core::primitive::u16, )>, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum OriginCaller { #[codec(index = 0)] system( runtime_types::frame_support::dispatch::RawOrigin< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, ), #[codec(index = 15)] Council( runtime_types::pallet_collective::RawOrigin< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, ), #[codec(index = 16)] TechnicalCommittee( runtime_types::pallet_collective::RawOrigin< - ::subxt::sp_core::crypto::AccountId32, + ::subxt::ext::sp_core::crypto::AccountId32, >, ), #[codec(index = 50)] @@ -49364,7 +37070,11 @@ pub mod api { #[codec(index = 5)] Void(runtime_types::sp_core::Void), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum ProxyType { #[codec(index = 0)] Any, @@ -49381,9 +37091,17 @@ pub mod api { #[codec(index = 7)] Auction, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Runtime; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct SessionKeys { pub grandpa: runtime_types::sp_finality_grandpa::app::Public, pub babe: runtime_types::sp_consensus_babe::app::Public, @@ -49404,7 +37122,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -49456,7 +37176,9 @@ pub mod api { cancel_auction, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -49483,7 +37205,9 @@ pub mod api { AlreadyLeasedOut, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -49504,14 +37228,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::sp_core::crypto::AccountId32, + bidder: ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, + bidder: ::subxt::ext::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 4)] @@ -49519,13 +37243,13 @@ pub mod api { #[doc = "but no parachain slot has been leased."] ReserveConfiscated { para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::sp_core::crypto::AccountId32, + leaser: ::subxt::ext::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 5)] #[doc = "A new bid has been accepted as the current winner."] BidAccepted { - bidder: ::subxt::sp_core::crypto::AccountId32, + bidder: ::subxt::ext::sp_core::crypto::AccountId32, para_id: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, first_slot: ::core::primitive::u32, @@ -49545,13 +37269,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[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 :: 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 :: 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 :: 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 :: 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 > , } , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -49576,26 +37304,36 @@ pub mod api { VestedBalanceExists, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-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 :: 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 :: ext :: sp_core :: crypto :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct PrevalidateAttests; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum StatementKind { #[codec(index = 0)] @@ -49609,7 +37347,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -49664,7 +37404,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::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, #[codec(compact)] index: runtime_types::polkadot_parachain::primitives::Id, }, @@ -49730,7 +37470,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -49805,7 +37547,9 @@ pub mod api { NoLeasePeriod, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -49817,14 +37561,14 @@ pub mod api { #[codec(index = 1)] #[doc = "Contributed to a crowd sale."] Contributed { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::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::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, fund_index: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, }, @@ -49861,7 +37605,7 @@ pub mod api { #[codec(index = 8)] #[doc = "A memo has been updated."] MemoUpdated { - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, para_id: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, }, @@ -49873,11 +37617,15 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct FundInfo < _0 , _1 , _2 , _3 > { pub depositor : _0 , pub verifier : :: core :: option :: Option < runtime_types :: sp_runtime :: MultiSigner > , pub deposit : _1 , pub raised : _1 , pub end : _2 , pub cap : _1 , pub last_contribution : runtime_types :: polkadot_runtime_common :: crowdloan :: LastContribution < _2 > , pub first_period : _2 , pub last_period : _2 , pub fund_index : _2 , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _3 > } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum LastContribution<_0> { #[codec(index = 0)] @@ -49893,13 +37641,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[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 :: 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."] force_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 = 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."] force_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 , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -49948,14 +37700,16 @@ pub mod api { CannotSwap, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] Registered { para_id: runtime_types::polkadot_parachain::primitives::Id, - manager: ::subxt::sp_core::crypto::AccountId32, + manager: ::subxt::ext::sp_core::crypto::AccountId32, }, #[codec(index = 1)] Deregistered { @@ -49964,12 +37718,14 @@ pub mod api { #[codec(index = 2)] Reserved { para_id: runtime_types::polkadot_parachain::primitives::Id, - who: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::ext::sp_core::crypto::AccountId32, }, } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ParaInfo<_0, _1> { pub manager: _0, @@ -49982,7 +37738,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -49993,7 +37751,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::sp_core::crypto::AccountId32, + leaser: ::subxt::ext::sp_core::crypto::AccountId32, amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, @@ -50018,7 +37776,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50030,7 +37790,9 @@ pub mod api { LeaseError, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -50045,7 +37807,7 @@ pub mod api { #[doc = "Second balance is the total amount reserved."] Leased { para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::sp_core::crypto::AccountId32, + leaser: ::subxt::ext::sp_core::crypto::AccountId32, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, extra_reserved: ::core::primitive::u128, @@ -50062,7 +37824,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -50231,7 +37995,9 @@ pub mod api { set_bypass_consistency_check { new: ::core::primitive::bool }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50241,7 +38007,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct HostConfiguration<_0> { pub max_code_size: _0, @@ -50294,7 +38062,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -50302,7 +38072,9 @@ pub mod api { force_unfreeze, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50329,14 +38101,18 @@ pub mod api { SingleSidedDispute, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { # [codec (index = 0)] # [doc = "A dispute has been initiated. \\[candidate hash, dispute location\\]"] DisputeInitiated (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeLocation ,) , # [codec (index = 1)] # [doc = "A dispute has concluded for or against a candidate."] # [doc = "`\\[para id, candidate hash, dispute result\\]`"] DisputeConcluded (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeResult ,) , # [codec (index = 2)] # [doc = "A dispute has timed out due to insufficient participation."] # [doc = "`\\[para id, candidate hash\\]`"] DisputeTimedOut (runtime_types :: polkadot_core_primitives :: CandidateHash ,) , # [codec (index = 3)] # [doc = "A dispute has concluded with supermajority against a candidate."] # [doc = "Block authors should no longer build on top of this head and should"] # [doc = "instead revert the block at the given height. This should be the"] # [doc = "number of the child of the last known valid block in the chain."] Revert (:: core :: primitive :: u32 ,) , } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum DisputeLocation { #[codec(index = 0)] @@ -50345,7 +38121,9 @@ pub mod api { Remote, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum DisputeResult { #[codec(index = 0)] @@ -50359,7 +38137,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call {} @@ -50370,13 +38150,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] # [doc = "parameters."] # [doc = ""] # [doc = "- `proposed_max_capacity` - specifies how many messages can be in the channel at once."] # [doc = "- `proposed_max_message_size` - specifies the maximum size of the messages."] # [doc = ""] # [doc = "These numbers are a subject to the relay-chain configuration limits."] # [doc = ""] # [doc = "The channel can be opened only after the recipient confirms it and only on a session"] # [doc = "change."] hrmp_init_open_channel { recipient : runtime_types :: polkadot_parachain :: primitives :: Id , proposed_max_capacity : :: core :: primitive :: u32 , proposed_max_message_size : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Accept a pending open channel request from the given sender."] # [doc = ""] # [doc = "The channel will be opened only on the next session boundary."] hrmp_accept_open_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 2)] # [doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] # [doc = "recipient in the channel being closed."] # [doc = ""] # [doc = "The closure can only happen on a session change."] hrmp_close_channel { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , } , # [codec (index = 3)] # [doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] # [doc = "a para may have. Normally this happens once per session, but this allows"] # [doc = "you to trigger the cleanup immediately for a specific parachain."] # [doc = ""] # [doc = "Origin must be Root."] # [doc = ""] # [doc = "Number of inbound and outbound channels for `para` must be provided as witness data of weighing."] force_clean_hrmp { para : runtime_types :: polkadot_parachain :: primitives :: Id , inbound : :: core :: primitive :: u32 , outbound : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Force process HRMP open channel requests."] # [doc = ""] # [doc = "If there are pending HRMP open channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of opening channels must be provided as witness data of weighing."] force_process_hrmp_open { channels : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Force process HRMP close channel requests."] # [doc = ""] # [doc = "If there are pending HRMP close channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of closing channels must be provided as witness data of weighing."] force_process_hrmp_close { channels : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] # [doc = "or the recipient for that request. The origin must be either of those."] # [doc = ""] # [doc = "The cancellation happens immediately. It is not possible to cancel the request if it is"] # [doc = "already accepted."] # [doc = ""] # [doc = "Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as"] # [doc = "witness data."] hrmp_cancel_open_request { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , open_requests : :: core :: primitive :: u32 , } , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50439,7 +38223,9 @@ pub mod api { WrongWitness, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -50474,7 +38260,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct HrmpChannel { pub max_capacity: ::core::primitive::u32, @@ -50482,12 +38270,14 @@ 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::sp_core::H256>, + pub mqc_head: ::core::option::Option<::subxt::ext::sp_core::H256>, pub sender_deposit: ::core::primitive::u128, pub recipient_deposit: ::core::primitive::u128, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct HrmpOpenChannelRequest { pub confirmed: ::core::primitive::bool, @@ -50503,12 +38293,16 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call {} #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50604,7 +38398,9 @@ pub mod api { BitfieldReferencesFreedCore, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -50612,7 +38408,7 @@ pub mod api { #[doc = "A candidate was backed. `[candidate, head_data]`"] CandidateBacked( runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, runtime_types::polkadot_primitives::v2::CoreIndex, @@ -50622,7 +38418,7 @@ pub mod api { #[doc = "A candidate was included. `[candidate, head_data]`"] CandidateIncluded( runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, runtime_types::polkadot_primitives::v2::CoreIndex, @@ -50632,7 +38428,7 @@ pub mod api { #[doc = "A candidate timed out. `[candidate, head_data]`"] CandidateTimedOut( runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::sp_core::H256, + ::subxt::ext::sp_core::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, runtime_types::polkadot_primitives::v2::CoreIndex, @@ -50640,7 +38436,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct AvailabilityBitfieldRecord<_0> { pub bitfield: @@ -50648,20 +38446,22 @@ pub mod api { pub submitted_at: _0, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CandidatePendingAvailability<_0, _1> { pub core: runtime_types::polkadot_primitives::v2::CoreIndex, pub hash: runtime_types::polkadot_core_primitives::CandidateHash, pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, - pub availability_votes: ::subxt::bitvec::vec::BitVec< + pub availability_votes: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, - pub backers: ::subxt::bitvec::vec::BitVec< + pub backers: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, pub relay_parent_number: _1, pub backed_in_number: _1, @@ -50673,7 +38473,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -50685,7 +38487,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct BufferedSessionChange { pub validators: ::std::vec::Vec< @@ -50702,7 +38506,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Origin { #[codec(index = 0)] @@ -50715,13 +38521,17 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "Set the storage for the parachain validation code immediately."] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Set the storage for the current parachain head data immediately."] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] # [doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] force_schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , relay_parent_number : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Note a new block head for para within the context of the current block."] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] # [doc = "Put a parachain directly into the next session's action queue."] # [doc = "We can't queue it any sooner than this without going into the"] # [doc = "initializer..."] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Adds the validation code to the storage."] # [doc = ""] # [doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] # [doc = "is running for that code, it will be instantly accepted."] # [doc = ""] # [doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] # [doc = "into storage with reference count 0. This is to account the fact that there are no users"] # [doc = "for this code yet. The caller will have to make sure that this code eventually gets"] # [doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] # [doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] # [doc = ""] # [doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] # [doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] add_trusted_validation_code { validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 6)] # [doc = "Remove the validation code from the storage iff the reference count is 0."] # [doc = ""] # [doc = "This is better than removing the storage directly, because it will not remove the code"] # [doc = "that was suddenly got used by some parachain while this dispatchable was pending"] # [doc = "dispatching."] poke_unused_validation_code { validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , } , # [codec (index = 7)] # [doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] # [doc = "enacts the results if that was the last vote before achieving the supermajority."] include_pvf_check_statement { stmt : runtime_types :: polkadot_primitives :: v2 :: PvfCheckStatement , signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , } , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50764,14 +38574,18 @@ pub mod api { PvfCheckDisabled, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { # [codec (index = 0)] # [doc = "Current code has been updated for a Para. `para_id`"] CurrentCodeUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 1)] # [doc = "Current head has been updated for a Para. `para_id`"] CurrentHeadUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 2)] # [doc = "A code upgrade has been scheduled for a Para. `para_id`"] CodeUpgradeScheduled (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 3)] # [doc = "A new head has been noted for a Para. `para_id`"] NewHeadNoted (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 4)] # [doc = "A para has been queued to execute pending actions. `para_id`"] ActionQueued (runtime_types :: polkadot_parachain :: primitives :: Id , :: core :: primitive :: u32 ,) , # [codec (index = 5)] # [doc = "The given para either initiated or subscribed to a PVF check for the given validation"] # [doc = "code. `code_hash` `para_id`"] PvfCheckStarted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 6)] # [doc = "The given validation code was accepted by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckAccepted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 7)] # [doc = "The given validation code was rejected by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckRejected (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ParaGenesisArgs { pub genesis_head: @@ -50781,7 +38595,9 @@ pub mod api { pub parachain: ::core::primitive::bool, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum ParaLifecycle { #[codec(index = 0)] @@ -50800,20 +38616,24 @@ pub mod api { OffboardingParachain, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ParaPastCodeMeta < _0 > { pub upgrade_times : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: paras :: ReplacementTimes < _0 > > , pub last_pruned : :: core :: option :: Option < _0 > , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct PvfCheckActiveVoteState<_0> { - pub votes_accept: ::subxt::bitvec::vec::BitVec< + pub votes_accept: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, - pub votes_reject: ::subxt::bitvec::vec::BitVec< + pub votes_reject: ::subxt::ext::bitvec::vec::BitVec< ::core::primitive::u8, - ::subxt::bitvec::order::Lsb0, + ::subxt::ext::bitvec::order::Lsb0, >, pub age: _0, pub created_at: _0, @@ -50824,7 +38644,9 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum PvfCheckCause<_0> { #[codec(index = 0)] @@ -50836,7 +38658,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ReplacementTimes<_0> { pub expected_at: _0, @@ -50848,7 +38672,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -50864,7 +38690,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50893,7 +38721,9 @@ pub mod api { pub mod scheduler { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum AssignmentKind { #[codec(index = 0)] @@ -50905,15 +38735,21 @@ pub mod api { ), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct CoreAssignment { pub core : runtime_types :: polkadot_primitives :: v2 :: CoreIndex , pub para_id : runtime_types :: polkadot_parachain :: primitives :: Id , pub kind : runtime_types :: polkadot_runtime_parachains :: scheduler :: AssignmentKind , pub group_idx : runtime_types :: polkadot_primitives :: v2 :: GroupIndex , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct ParathreadClaimQueue { pub queue : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: QueuedParathread > , pub next_core_offset : :: core :: primitive :: u32 , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct QueuedParathread { pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, @@ -50925,7 +38761,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call {} @@ -50936,7 +38774,9 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { @@ -50959,7 +38799,9 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { @@ -50971,7 +38813,9 @@ pub mod api { WeightOverLimit, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { @@ -51034,7 +38878,11 @@ pub mod api { } pub mod primitive_types { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct H256(pub [::core::primitive::u8; 32usize]); } pub mod sp_arithmetic { @@ -51042,9 +38890,9 @@ pub mod api { pub mod fixed_point { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct FixedU128(pub ::core::primitive::u128); @@ -51052,30 +38900,30 @@ pub mod api { pub mod per_things { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct PerU16(pub ::core::primitive::u16); #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Perbill(pub ::core::primitive::u32); #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Percent(pub ::core::primitive::u8); #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Permill(pub ::core::primitive::u32); @@ -51086,7 +38934,9 @@ pub mod api { pub mod app { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } @@ -51096,14 +38946,18 @@ pub mod api { pub mod app { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } pub mod digests { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum NextConfigDescriptor { #[codec(index = 1)] @@ -51113,12 +38967,16 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum PreDigest { # [codec (index = 1)] Primary (runtime_types :: sp_consensus_babe :: digests :: PrimaryPreDigest ,) , # [codec (index = 2)] SecondaryPlain (runtime_types :: sp_consensus_babe :: digests :: SecondaryPlainPreDigest ,) , # [codec (index = 3)] SecondaryVRF (runtime_types :: sp_consensus_babe :: digests :: SecondaryVRFPreDigest ,) , } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct PrimaryPreDigest { pub authority_index: ::core::primitive::u32, @@ -51127,14 +38985,18 @@ pub mod api { pub vrf_proof: [::core::primitive::u8; 64usize], } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct SecondaryPlainPreDigest { pub authority_index: ::core::primitive::u32, pub slot: runtime_types::sp_consensus_slots::Slot, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct SecondaryVRFPreDigest { pub authority_index: ::core::primitive::u32, @@ -51143,7 +39005,11 @@ pub mod api { pub vrf_proof: [::core::primitive::u8; 64usize], } } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum AllowedSlots { #[codec(index = 0)] PrimarySlots, @@ -51152,7 +39018,11 @@ pub mod api { #[codec(index = 2)] PrimaryAndSecondaryVRFSlots, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct BabeEpochConfiguration { pub c: (::core::primitive::u64, ::core::primitive::u64), pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, @@ -51160,7 +39030,11 @@ pub mod api { } pub mod sp_consensus_slots { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct EquivocationProof<_0, _1> { pub offender: _1, pub slot: runtime_types::sp_consensus_slots::Slot, @@ -51168,9 +39042,9 @@ pub mod api { pub second_header: _0, } #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Decode, - :: subxt :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, Debug, )] pub struct Slot(pub ::core::primitive::u64); @@ -51180,44 +39054,60 @@ pub mod api { pub mod crypto { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct AccountId32(pub [::core::primitive::u8; 32usize]); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); } pub mod ecdsa { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub [::core::primitive::u8; 33usize]); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub [::core::primitive::u8; 65usize]); } pub mod ed25519 { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub [::core::primitive::u8; 32usize]); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub [::core::primitive::u8; 64usize]); } pub mod offchain { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct OpaqueNetworkState { pub peer_id: runtime_types::sp_core::OpaquePeerId, @@ -51229,17 +39119,29 @@ pub mod api { pub mod sr25519 { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub [::core::primitive::u8; 32usize]); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub [::core::primitive::u8; 64usize]); } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Void {} } pub mod sp_finality_grandpa { @@ -51247,15 +39149,23 @@ pub mod api { pub mod app { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Public(pub runtime_types::sp_core::ed25519::Public); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum Equivocation<_0, _1> { #[codec(index = 0)] Prevote( @@ -51274,7 +39184,11 @@ pub mod api { >, ), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct EquivocationProof<_0, _1> { pub set_id: ::core::primitive::u64, pub equivocation: @@ -51283,13 +39197,21 @@ pub mod api { } pub mod sp_npos_elections { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ElectionScore { pub minimal_stake: ::core::primitive::u128, pub sum_stake: ::core::primitive::u128, pub sum_stake_squared: ::core::primitive::u128, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct Support<_0> { pub total: ::core::primitive::u128, pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, @@ -51302,21 +39224,29 @@ pub mod api { pub mod bounded_btree_map { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] - pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::KeyedVec<_0, _1>); + pub struct BoundedBTreeMap<_0, _1>( + pub ::subxt::utils::KeyedVec<_0, _1>, + ); } pub mod bounded_vec { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); } pub mod weak_bounded_vec { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); } @@ -51326,7 +39256,9 @@ pub mod api { pub mod digest { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Digest { pub logs: ::std::vec::Vec< @@ -51334,7 +39266,9 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum DigestItem { #[codec(index = 6)] @@ -51361,7 +39295,9 @@ pub mod api { pub mod era { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Era { #[codec(index = 0)] @@ -51881,14 +39817,16 @@ pub mod api { pub mod header { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Header<_0, _1> { - pub parent_hash: ::subxt::sp_core::H256, + pub parent_hash: ::subxt::ext::sp_core::H256, #[codec(compact)] pub number: _0, - pub state_root: ::subxt::sp_core::H256, - pub extrinsics_root: ::subxt::sp_core::H256, + pub state_root: ::subxt::ext::sp_core::H256, + pub extrinsics_root: ::subxt::ext::sp_core::H256, pub digest: runtime_types::sp_runtime::generic::digest::Digest, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, @@ -51897,7 +39835,9 @@ pub mod api { pub mod unchecked_extrinsic { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct UncheckedExtrinsic<_0, _1, _2, _3>( pub ::std::vec::Vec<::core::primitive::u8>, @@ -51908,7 +39848,9 @@ pub mod api { pub mod multiaddress { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum MultiAddress<_0, _1> { #[codec(index = 0)] @@ -51926,11 +39868,17 @@ pub mod api { pub mod traits { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct BlakeTwo256; } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum ArithmeticError { #[codec(index = 0)] Underflow, @@ -51939,7 +39887,11 @@ pub mod api { #[codec(index = 2)] DivisionByZero, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum DispatchError { #[codec(index = 0)] Other, @@ -51962,12 +39914,20 @@ pub mod api { #[codec(index = 9)] Transactional(runtime_types::sp_runtime::TransactionalError), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct ModuleError { pub index: ::core::primitive::u8, pub error: [::core::primitive::u8; 4usize], } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum MultiSignature { #[codec(index = 0)] Ed25519(runtime_types::sp_core::ed25519::Signature), @@ -51976,7 +39936,11 @@ pub mod api { #[codec(index = 2)] Ecdsa(runtime_types::sp_core::ecdsa::Signature), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum MultiSigner { #[codec(index = 0)] Ed25519(runtime_types::sp_core::ed25519::Public), @@ -51985,7 +39949,11 @@ pub mod api { #[codec(index = 2)] Ecdsa(runtime_types::sp_core::ecdsa::Public), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum TokenError { #[codec(index = 0)] NoFunds, @@ -52002,7 +39970,11 @@ pub mod api { #[codec(index = 6)] Unsupported, } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum TransactionalError { #[codec(index = 0)] LimitReached, @@ -52012,7 +39984,11 @@ pub mod api { } pub mod sp_session { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct MembershipProof { pub session: ::core::primitive::u32, pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, @@ -52024,7 +40000,9 @@ pub mod api { pub mod offence { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct OffenceDetails<_0, _1> { pub offender: _1, @@ -52034,7 +40012,11 @@ pub mod api { } pub mod sp_version { use super::runtime_types; - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub struct RuntimeVersion { pub spec_name: ::std::string::String, pub impl_name: ::std::string::String, @@ -52054,7 +40036,9 @@ pub mod api { pub mod double_encoded { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct DoubleEncoded { pub encoded: ::std::vec::Vec<::core::primitive::u8>, @@ -52065,12 +40049,30 @@ pub mod api { pub mod junction { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum BodyId { - # [codec (index = 0)] Unit , # [codec (index = 1)] Named (runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Index (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 3)] Executive , # [codec (index = 4)] Technical , # [codec (index = 5)] Legislative , # [codec (index = 6)] Judicial , } + #[codec(index = 0)] + Unit, + #[codec(index = 1)] + Named(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 2)] + Index(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + Executive, + #[codec(index = 4)] + Technical, + #[codec(index = 5)] + Legislative, + #[codec(index = 6)] + Judicial, + } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum BodyPart { #[codec(index = 0)] @@ -52103,20 +40105,67 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Junction { - # [codec (index = 0)] Parent , # [codec (index = 1)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 2)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 3)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 4)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 5)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 6)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 7)] GeneralKey (runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 8)] OnlyChild , # [codec (index = 9)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } + #[codec(index = 0)] + Parent, + #[codec(index = 1)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 2)] + AccountId32 { + network: runtime_types::xcm::v0::junction::NetworkId, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 3)] + AccountIndex64 { + network: runtime_types::xcm::v0::junction::NetworkId, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 4)] + AccountKey20 { + network: runtime_types::xcm::v0::junction::NetworkId, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 5)] + PalletInstance(::core::primitive::u8), + #[codec(index = 6)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 7)] + GeneralKey(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 8)] + OnlyChild, + #[codec(index = 9)] + Plurality { + id: runtime_types::xcm::v0::junction::BodyId, + part: runtime_types::xcm::v0::junction::BodyPart, + }, + } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum NetworkId { - # [codec (index = 0)] Any , # [codec (index = 1)] Named (runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Polkadot , # [codec (index = 3)] Kusama , } + #[codec(index = 0)] + Any, + #[codec(index = 1)] + Named(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + } } pub mod multi_asset { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum MultiAsset { #[codec(index = 0)] @@ -52170,7 +40219,9 @@ pub mod api { pub mod multi_location { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum MultiLocation { #[codec(index = 0)] @@ -52238,7 +40289,9 @@ pub mod api { pub mod order { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Order { #[codec(index = 0)] @@ -52307,7 +40360,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum OriginKind { #[codec(index = 0)] @@ -52320,7 +40375,9 @@ pub mod api { Xcm, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Response { #[codec(index = 0)] @@ -52329,7 +40386,9 @@ pub mod api { ), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Xcm { #[codec(index = 0)] @@ -52415,15 +40474,50 @@ pub mod api { pub mod junction { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Junction { - # [codec (index = 0)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 1)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 2)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 3)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 4)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 5)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 6)] GeneralKey (runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 7)] OnlyChild , # [codec (index = 8)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } + #[codec(index = 0)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 1)] + AccountId32 { + network: runtime_types::xcm::v0::junction::NetworkId, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + AccountIndex64 { + network: runtime_types::xcm::v0::junction::NetworkId, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 3)] + AccountKey20 { + network: runtime_types::xcm::v0::junction::NetworkId, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 4)] + PalletInstance(::core::primitive::u8), + #[codec(index = 5)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 6)] + GeneralKey(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 7)] + OnlyChild, + #[codec(index = 8)] + Plurality { + id: runtime_types::xcm::v0::junction::BodyId, + part: runtime_types::xcm::v0::junction::BodyPart, + }, + } } pub mod multiasset { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum AssetId { #[codec(index = 0)] @@ -52432,7 +40526,9 @@ pub mod api { Abstract(::std::vec::Vec<::core::primitive::u8>), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum AssetInstance { #[codec(index = 0)] @@ -52451,7 +40547,9 @@ pub mod api { Blob(::std::vec::Vec<::core::primitive::u8>), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Fungibility { #[codec(index = 0)] @@ -52460,14 +40558,18 @@ pub mod api { NonFungible(runtime_types::xcm::v1::multiasset::AssetInstance), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct MultiAsset { pub id: runtime_types::xcm::v1::multiasset::AssetId, pub fun: runtime_types::xcm::v1::multiasset::Fungibility, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum MultiAssetFilter { #[codec(index = 0)] @@ -52476,7 +40578,9 @@ pub mod api { Wild(runtime_types::xcm::v1::multiasset::WildMultiAsset), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct MultiAssets( pub ::std::vec::Vec< @@ -52484,7 +40588,9 @@ pub mod api { >, ); #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum WildFungibility { #[codec(index = 0)] @@ -52493,7 +40599,9 @@ pub mod api { NonFungible, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum WildMultiAsset { #[codec(index = 0)] @@ -52508,7 +40616,9 @@ pub mod api { pub mod multilocation { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Junctions { #[codec(index = 0)] @@ -52573,7 +40683,9 @@ pub mod api { ), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct MultiLocation { pub parents: ::core::primitive::u8, @@ -52583,7 +40695,9 @@ pub mod api { pub mod order { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Order { #[codec(index = 0)] @@ -52640,7 +40754,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Response { #[codec(index = 0)] @@ -52649,7 +40765,9 @@ pub mod api { Version(::core::primitive::u32), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Xcm { #[codec(index = 0)] @@ -52734,7 +40852,9 @@ pub mod api { pub mod traits { use super::runtime_types; #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Error { #[codec(index = 0)] @@ -52791,7 +40911,9 @@ pub mod api { WeightNotComputable, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Outcome { #[codec(index = 0)] @@ -52806,7 +40928,9 @@ pub mod api { } } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Instruction { #[codec(index = 0)] @@ -52952,7 +41076,9 @@ pub mod api { UnsubscribeVersion, } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum Response { #[codec(index = 0)] @@ -52970,7 +41096,9 @@ pub mod api { Version(::core::primitive::u32), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub enum WeightLimit { #[codec(index = 0)] @@ -52979,25 +41107,39 @@ pub mod api { Limited(#[codec(compact)] ::core::primitive::u64), } #[derive( - :: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, )] pub struct Xcm(pub ::std::vec::Vec); } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum VersionedMultiAssets { #[codec(index = 0)] V0(::std::vec::Vec), #[codec(index = 1)] V1(runtime_types::xcm::v1::multiasset::MultiAssets), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum VersionedMultiLocation { #[codec(index = 0)] V0(runtime_types::xcm::v0::multi_location::MultiLocation), #[codec(index = 1)] V1(runtime_types::xcm::v1::multilocation::MultiLocation), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum VersionedResponse { #[codec(index = 0)] V0(runtime_types::xcm::v0::Response), @@ -53006,7 +41148,11 @@ pub mod api { #[codec(index = 2)] V2(runtime_types::xcm::v2::Response), } - #[derive(:: subxt :: codec :: Decode, :: subxt :: codec :: Encode, Debug)] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + Debug, + )] pub enum VersionedXcm { #[codec(index = 0)] V0(runtime_types::xcm::v0::Xcm), @@ -53019,10 +41165,10 @@ pub mod api { } #[doc = r" The default error type returned when there is a runtime issue."] pub type DispatchError = runtime_types::sp_runtime::DispatchError; - impl ::subxt::HasModuleError for runtime_types::sp_runtime::DispatchError { - fn module_error_data(&self) -> Option<::subxt::ModuleErrorData> { + impl ::subxt::error::HasModuleError for runtime_types::sp_runtime::DispatchError { + fn module_error_data(&self) -> Option<::subxt::error::ModuleErrorData> { if let Self::Module(module_error) = self { - Some(::subxt::ModuleErrorData { + Some(::subxt::error::ModuleErrorData { pallet_index: module_error.index, error: module_error.error, }) @@ -53031,519 +41177,412 @@ pub mod api { } } } - pub struct RuntimeApi { - pub client: ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl Clone for RuntimeApi { - fn clone(&self) -> Self { - Self { - client: self.client.clone(), - marker: ::core::marker::PhantomData, - } - } - } - impl ::core::convert::From<::subxt::Client> for RuntimeApi - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - fn from(client: ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - } - impl<'a, T, X> RuntimeApi - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn validate_metadata(&'a self) -> Result<(), ::subxt::MetadataError> { - let runtime_metadata_hash = { - let locked_metadata = self.client.metadata(); - let metadata = locked_metadata.read(); - metadata.metadata_hash(&PALLETS) - }; - if runtime_metadata_hash - != [ - 14u8, 118u8, 204u8, 231u8, 221u8, 216u8, 141u8, 158u8, 101u8, 64u8, - 90u8, 209u8, 109u8, 181u8, 197u8, 130u8, 199u8, 182u8, 107u8, 141u8, - 198u8, 255u8, 217u8, 71u8, 178u8, 75u8, 222u8, 13u8, 27u8, 141u8, - 199u8, 236u8, - ] - { - Err(::subxt::MetadataError::IncompatibleMetadata) - } else { - Ok(()) - } - } - pub fn constants(&'a self) -> ConstantsApi<'a, T> { - ConstantsApi { - client: &self.client, - } - } - pub fn storage(&'a self) -> StorageApi<'a, T> { - StorageApi { - client: &self.client, - } - } - pub fn tx(&'a self) -> TransactionApi<'a, T, X> { - TransactionApi { - client: &self.client, - marker: ::core::marker::PhantomData, - } - } - pub fn events(&'a self) -> EventsApi<'a, T> { - EventsApi { - client: &self.client, - } - } + pub fn constants() -> ConstantsApi { + ConstantsApi } - pub struct EventsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> EventsApi<'a, T> { - pub async fn at( - &self, - block_hash: T::Hash, - ) -> Result<::subxt::events::Events, ::subxt::BasicError> { - ::subxt::events::at::(self.client, block_hash).await - } - pub async fn subscribe( - &self, - ) -> Result< - ::subxt::events::EventSubscription< - 'a, - ::subxt::events::EventSub, - T, - Event, - >, - ::subxt::BasicError, - > { - ::subxt::events::subscribe::(self.client).await - } - pub async fn subscribe_finalized( - &self, - ) -> Result< - ::subxt::events::EventSubscription< - 'a, - ::subxt::events::FinalizedEventSub<'a, T::Header>, - T, - Event, - >, - ::subxt::BasicError, - > { - ::subxt::events::subscribe_finalized::(self.client).await - } + pub fn storage() -> StorageApi { + StorageApi } - pub struct ConstantsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + pub fn tx() -> TransactionApi { + TransactionApi } - impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { - pub fn system(&self) -> system::constants::ConstantsApi<'a, T> { - system::constants::ConstantsApi::new(self.client) + pub struct ConstantsApi; + impl ConstantsApi { + pub fn system(&self) -> system::constants::ConstantsApi { + system::constants::ConstantsApi } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi<'a, T> { - scheduler::constants::ConstantsApi::new(self.client) + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi } - pub fn babe(&self) -> babe::constants::ConstantsApi<'a, T> { - babe::constants::ConstantsApi::new(self.client) + pub fn babe(&self) -> babe::constants::ConstantsApi { + babe::constants::ConstantsApi } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi<'a, T> { - timestamp::constants::ConstantsApi::new(self.client) + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi } - pub fn indices(&self) -> indices::constants::ConstantsApi<'a, T> { - indices::constants::ConstantsApi::new(self.client) + pub fn indices(&self) -> indices::constants::ConstantsApi { + indices::constants::ConstantsApi } - pub fn balances(&self) -> balances::constants::ConstantsApi<'a, T> { - balances::constants::ConstantsApi::new(self.client) + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi } pub fn transaction_payment( &self, - ) -> transaction_payment::constants::ConstantsApi<'a, T> { - transaction_payment::constants::ConstantsApi::new(self.client) + ) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi } - pub fn authorship(&self) -> authorship::constants::ConstantsApi<'a, T> { - authorship::constants::ConstantsApi::new(self.client) + pub fn authorship(&self) -> authorship::constants::ConstantsApi { + authorship::constants::ConstantsApi } - pub fn staking(&self) -> staking::constants::ConstantsApi<'a, T> { - staking::constants::ConstantsApi::new(self.client) + pub fn staking(&self) -> staking::constants::ConstantsApi { + staking::constants::ConstantsApi } - pub fn grandpa(&self) -> grandpa::constants::ConstantsApi<'a, T> { - grandpa::constants::ConstantsApi::new(self.client) + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { + grandpa::constants::ConstantsApi } - pub fn im_online(&self) -> im_online::constants::ConstantsApi<'a, T> { - im_online::constants::ConstantsApi::new(self.client) + pub fn im_online(&self) -> im_online::constants::ConstantsApi { + im_online::constants::ConstantsApi } - pub fn democracy(&self) -> democracy::constants::ConstantsApi<'a, T> { - democracy::constants::ConstantsApi::new(self.client) + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi } - pub fn phragmen_election( - &self, - ) -> phragmen_election::constants::ConstantsApi<'a, T> { - phragmen_election::constants::ConstantsApi::new(self.client) + pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { + phragmen_election::constants::ConstantsApi } - pub fn treasury(&self) -> treasury::constants::ConstantsApi<'a, T> { - treasury::constants::ConstantsApi::new(self.client) + pub fn treasury(&self) -> treasury::constants::ConstantsApi { + treasury::constants::ConstantsApi } - pub fn claims(&self) -> claims::constants::ConstantsApi<'a, T> { - claims::constants::ConstantsApi::new(self.client) + pub fn claims(&self) -> claims::constants::ConstantsApi { + claims::constants::ConstantsApi } - pub fn vesting(&self) -> vesting::constants::ConstantsApi<'a, T> { - vesting::constants::ConstantsApi::new(self.client) + pub fn vesting(&self) -> vesting::constants::ConstantsApi { + vesting::constants::ConstantsApi } - pub fn utility(&self) -> utility::constants::ConstantsApi<'a, T> { - utility::constants::ConstantsApi::new(self.client) + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi } - pub fn identity(&self) -> identity::constants::ConstantsApi<'a, T> { - identity::constants::ConstantsApi::new(self.client) + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi } - pub fn proxy(&self) -> proxy::constants::ConstantsApi<'a, T> { - proxy::constants::ConstantsApi::new(self.client) + pub fn proxy(&self) -> proxy::constants::ConstantsApi { + proxy::constants::ConstantsApi } - pub fn multisig(&self) -> multisig::constants::ConstantsApi<'a, T> { - multisig::constants::ConstantsApi::new(self.client) + pub fn multisig(&self) -> multisig::constants::ConstantsApi { + multisig::constants::ConstantsApi } - pub fn bounties(&self) -> bounties::constants::ConstantsApi<'a, T> { - bounties::constants::ConstantsApi::new(self.client) + pub fn bounties(&self) -> bounties::constants::ConstantsApi { + bounties::constants::ConstantsApi } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi<'a, T> { - child_bounties::constants::ConstantsApi::new(self.client) + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { + child_bounties::constants::ConstantsApi } - pub fn tips(&self) -> tips::constants::ConstantsApi<'a, T> { - tips::constants::ConstantsApi::new(self.client) + pub fn tips(&self) -> tips::constants::ConstantsApi { + tips::constants::ConstantsApi } pub fn election_provider_multi_phase( &self, - ) -> election_provider_multi_phase::constants::ConstantsApi<'a, T> { - election_provider_multi_phase::constants::ConstantsApi::new(self.client) + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi } - pub fn voter_list(&self) -> voter_list::constants::ConstantsApi<'a, T> { - voter_list::constants::ConstantsApi::new(self.client) + pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { + voter_list::constants::ConstantsApi } - pub fn paras(&self) -> paras::constants::ConstantsApi<'a, T> { - paras::constants::ConstantsApi::new(self.client) + pub fn paras(&self) -> paras::constants::ConstantsApi { + paras::constants::ConstantsApi } - pub fn registrar(&self) -> registrar::constants::ConstantsApi<'a, T> { - registrar::constants::ConstantsApi::new(self.client) + pub fn registrar(&self) -> registrar::constants::ConstantsApi { + registrar::constants::ConstantsApi } - pub fn slots(&self) -> slots::constants::ConstantsApi<'a, T> { - slots::constants::ConstantsApi::new(self.client) + pub fn slots(&self) -> slots::constants::ConstantsApi { + slots::constants::ConstantsApi } - pub fn auctions(&self) -> auctions::constants::ConstantsApi<'a, T> { - auctions::constants::ConstantsApi::new(self.client) + pub fn auctions(&self) -> auctions::constants::ConstantsApi { + auctions::constants::ConstantsApi } - pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi<'a, T> { - crowdloan::constants::ConstantsApi::new(self.client) + pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { + crowdloan::constants::ConstantsApi } } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T> StorageApi<'a, T> - where - T: ::subxt::Config, - { - pub fn system(&self) -> system::storage::StorageApi<'a, T> { - system::storage::StorageApi::new(self.client) + pub struct StorageApi; + impl StorageApi { + pub fn system(&self) -> system::storage::StorageApi { + system::storage::StorageApi } - pub fn scheduler(&self) -> scheduler::storage::StorageApi<'a, T> { - scheduler::storage::StorageApi::new(self.client) + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi } - pub fn preimage(&self) -> preimage::storage::StorageApi<'a, T> { - preimage::storage::StorageApi::new(self.client) + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi } - pub fn babe(&self) -> babe::storage::StorageApi<'a, T> { - babe::storage::StorageApi::new(self.client) + pub fn babe(&self) -> babe::storage::StorageApi { + babe::storage::StorageApi } - pub fn timestamp(&self) -> timestamp::storage::StorageApi<'a, T> { - timestamp::storage::StorageApi::new(self.client) + pub fn timestamp(&self) -> timestamp::storage::StorageApi { + timestamp::storage::StorageApi } - pub fn indices(&self) -> indices::storage::StorageApi<'a, T> { - indices::storage::StorageApi::new(self.client) + pub fn indices(&self) -> indices::storage::StorageApi { + indices::storage::StorageApi } - pub fn balances(&self) -> balances::storage::StorageApi<'a, T> { - balances::storage::StorageApi::new(self.client) + pub fn balances(&self) -> balances::storage::StorageApi { + balances::storage::StorageApi } - pub fn transaction_payment( - &self, - ) -> transaction_payment::storage::StorageApi<'a, T> { - transaction_payment::storage::StorageApi::new(self.client) + pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { + transaction_payment::storage::StorageApi } - pub fn authorship(&self) -> authorship::storage::StorageApi<'a, T> { - authorship::storage::StorageApi::new(self.client) + pub fn authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi } - pub fn staking(&self) -> staking::storage::StorageApi<'a, T> { - staking::storage::StorageApi::new(self.client) + pub fn staking(&self) -> staking::storage::StorageApi { + staking::storage::StorageApi } - pub fn offences(&self) -> offences::storage::StorageApi<'a, T> { - offences::storage::StorageApi::new(self.client) + pub fn offences(&self) -> offences::storage::StorageApi { + offences::storage::StorageApi } - pub fn session(&self) -> session::storage::StorageApi<'a, T> { - session::storage::StorageApi::new(self.client) + pub fn session(&self) -> session::storage::StorageApi { + session::storage::StorageApi } - pub fn grandpa(&self) -> grandpa::storage::StorageApi<'a, T> { - grandpa::storage::StorageApi::new(self.client) + pub fn grandpa(&self) -> grandpa::storage::StorageApi { + grandpa::storage::StorageApi } - pub fn im_online(&self) -> im_online::storage::StorageApi<'a, T> { - im_online::storage::StorageApi::new(self.client) + pub fn im_online(&self) -> im_online::storage::StorageApi { + im_online::storage::StorageApi } - pub fn democracy(&self) -> democracy::storage::StorageApi<'a, T> { - democracy::storage::StorageApi::new(self.client) + pub fn democracy(&self) -> democracy::storage::StorageApi { + democracy::storage::StorageApi } - pub fn council(&self) -> council::storage::StorageApi<'a, T> { - council::storage::StorageApi::new(self.client) + pub fn council(&self) -> council::storage::StorageApi { + council::storage::StorageApi } - pub fn technical_committee( - &self, - ) -> technical_committee::storage::StorageApi<'a, T> { - technical_committee::storage::StorageApi::new(self.client) + pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { + technical_committee::storage::StorageApi } - pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi<'a, T> { - phragmen_election::storage::StorageApi::new(self.client) + pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { + phragmen_election::storage::StorageApi } - pub fn technical_membership( - &self, - ) -> technical_membership::storage::StorageApi<'a, T> { - technical_membership::storage::StorageApi::new(self.client) + pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { + technical_membership::storage::StorageApi } - pub fn treasury(&self) -> treasury::storage::StorageApi<'a, T> { - treasury::storage::StorageApi::new(self.client) + pub fn treasury(&self) -> treasury::storage::StorageApi { + treasury::storage::StorageApi } - pub fn claims(&self) -> claims::storage::StorageApi<'a, T> { - claims::storage::StorageApi::new(self.client) + pub fn claims(&self) -> claims::storage::StorageApi { + claims::storage::StorageApi } - pub fn vesting(&self) -> vesting::storage::StorageApi<'a, T> { - vesting::storage::StorageApi::new(self.client) + pub fn vesting(&self) -> vesting::storage::StorageApi { + vesting::storage::StorageApi } - pub fn identity(&self) -> identity::storage::StorageApi<'a, T> { - identity::storage::StorageApi::new(self.client) + pub fn identity(&self) -> identity::storage::StorageApi { + identity::storage::StorageApi } - pub fn proxy(&self) -> proxy::storage::StorageApi<'a, T> { - proxy::storage::StorageApi::new(self.client) + pub fn proxy(&self) -> proxy::storage::StorageApi { + proxy::storage::StorageApi } - pub fn multisig(&self) -> multisig::storage::StorageApi<'a, T> { - multisig::storage::StorageApi::new(self.client) + pub fn multisig(&self) -> multisig::storage::StorageApi { + multisig::storage::StorageApi } - pub fn bounties(&self) -> bounties::storage::StorageApi<'a, T> { - bounties::storage::StorageApi::new(self.client) + pub fn bounties(&self) -> bounties::storage::StorageApi { + bounties::storage::StorageApi } - pub fn child_bounties(&self) -> child_bounties::storage::StorageApi<'a, T> { - child_bounties::storage::StorageApi::new(self.client) + pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { + child_bounties::storage::StorageApi } - pub fn tips(&self) -> tips::storage::StorageApi<'a, T> { - tips::storage::StorageApi::new(self.client) + pub fn tips(&self) -> tips::storage::StorageApi { + tips::storage::StorageApi } pub fn election_provider_multi_phase( &self, - ) -> election_provider_multi_phase::storage::StorageApi<'a, T> { - election_provider_multi_phase::storage::StorageApi::new(self.client) + ) -> election_provider_multi_phase::storage::StorageApi { + election_provider_multi_phase::storage::StorageApi } - pub fn voter_list(&self) -> voter_list::storage::StorageApi<'a, T> { - voter_list::storage::StorageApi::new(self.client) + pub fn voter_list(&self) -> voter_list::storage::StorageApi { + voter_list::storage::StorageApi } - pub fn configuration(&self) -> configuration::storage::StorageApi<'a, T> { - configuration::storage::StorageApi::new(self.client) + pub fn configuration(&self) -> configuration::storage::StorageApi { + configuration::storage::StorageApi } - pub fn paras_shared(&self) -> paras_shared::storage::StorageApi<'a, T> { - paras_shared::storage::StorageApi::new(self.client) + pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { + paras_shared::storage::StorageApi } - pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi<'a, T> { - para_inclusion::storage::StorageApi::new(self.client) + pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { + para_inclusion::storage::StorageApi } - pub fn para_inherent(&self) -> para_inherent::storage::StorageApi<'a, T> { - para_inherent::storage::StorageApi::new(self.client) + pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { + para_inherent::storage::StorageApi } - pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi<'a, T> { - para_scheduler::storage::StorageApi::new(self.client) + pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { + para_scheduler::storage::StorageApi } - pub fn paras(&self) -> paras::storage::StorageApi<'a, T> { - paras::storage::StorageApi::new(self.client) + pub fn paras(&self) -> paras::storage::StorageApi { + paras::storage::StorageApi } - pub fn initializer(&self) -> initializer::storage::StorageApi<'a, T> { - initializer::storage::StorageApi::new(self.client) + pub fn initializer(&self) -> initializer::storage::StorageApi { + initializer::storage::StorageApi } - pub fn dmp(&self) -> dmp::storage::StorageApi<'a, T> { - dmp::storage::StorageApi::new(self.client) + pub fn dmp(&self) -> dmp::storage::StorageApi { + dmp::storage::StorageApi } - pub fn ump(&self) -> ump::storage::StorageApi<'a, T> { - ump::storage::StorageApi::new(self.client) + pub fn ump(&self) -> ump::storage::StorageApi { + ump::storage::StorageApi } - pub fn hrmp(&self) -> hrmp::storage::StorageApi<'a, T> { - hrmp::storage::StorageApi::new(self.client) + pub fn hrmp(&self) -> hrmp::storage::StorageApi { + hrmp::storage::StorageApi } - pub fn para_session_info(&self) -> para_session_info::storage::StorageApi<'a, T> { - para_session_info::storage::StorageApi::new(self.client) + pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { + para_session_info::storage::StorageApi } - pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi<'a, T> { - paras_disputes::storage::StorageApi::new(self.client) + pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { + paras_disputes::storage::StorageApi } - pub fn registrar(&self) -> registrar::storage::StorageApi<'a, T> { - registrar::storage::StorageApi::new(self.client) + pub fn registrar(&self) -> registrar::storage::StorageApi { + registrar::storage::StorageApi } - pub fn slots(&self) -> slots::storage::StorageApi<'a, T> { - slots::storage::StorageApi::new(self.client) + pub fn slots(&self) -> slots::storage::StorageApi { + slots::storage::StorageApi } - pub fn auctions(&self) -> auctions::storage::StorageApi<'a, T> { - auctions::storage::StorageApi::new(self.client) + pub fn auctions(&self) -> auctions::storage::StorageApi { + auctions::storage::StorageApi } - pub fn crowdloan(&self) -> crowdloan::storage::StorageApi<'a, T> { - crowdloan::storage::StorageApi::new(self.client) + pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { + crowdloan::storage::StorageApi } - pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi<'a, T> { - xcm_pallet::storage::StorageApi::new(self.client) + pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { + xcm_pallet::storage::StorageApi } } - pub struct TransactionApi<'a, T: ::subxt::Config, X> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData, - } - impl<'a, T, X> TransactionApi<'a, T, X> - where - T: ::subxt::Config, - X: ::subxt::extrinsic::ExtrinsicParams, - { - pub fn system(&self) -> system::calls::TransactionApi<'a, T, X> { - system::calls::TransactionApi::new(self.client) + pub struct TransactionApi; + impl TransactionApi { + pub fn system(&self) -> system::calls::TransactionApi { + system::calls::TransactionApi } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi<'a, T, X> { - scheduler::calls::TransactionApi::new(self.client) + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi } - pub fn preimage(&self) -> preimage::calls::TransactionApi<'a, T, X> { - preimage::calls::TransactionApi::new(self.client) + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi } - pub fn babe(&self) -> babe::calls::TransactionApi<'a, T, X> { - babe::calls::TransactionApi::new(self.client) + pub fn babe(&self) -> babe::calls::TransactionApi { + babe::calls::TransactionApi } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi<'a, T, X> { - timestamp::calls::TransactionApi::new(self.client) + pub fn timestamp(&self) -> timestamp::calls::TransactionApi { + timestamp::calls::TransactionApi } - pub fn indices(&self) -> indices::calls::TransactionApi<'a, T, X> { - indices::calls::TransactionApi::new(self.client) + pub fn indices(&self) -> indices::calls::TransactionApi { + indices::calls::TransactionApi } - pub fn balances(&self) -> balances::calls::TransactionApi<'a, T, X> { - balances::calls::TransactionApi::new(self.client) + pub fn balances(&self) -> balances::calls::TransactionApi { + balances::calls::TransactionApi } - pub fn authorship(&self) -> authorship::calls::TransactionApi<'a, T, X> { - authorship::calls::TransactionApi::new(self.client) + pub fn authorship(&self) -> authorship::calls::TransactionApi { + authorship::calls::TransactionApi } - pub fn staking(&self) -> staking::calls::TransactionApi<'a, T, X> { - staking::calls::TransactionApi::new(self.client) + pub fn staking(&self) -> staking::calls::TransactionApi { + staking::calls::TransactionApi } - pub fn session(&self) -> session::calls::TransactionApi<'a, T, X> { - session::calls::TransactionApi::new(self.client) + pub fn session(&self) -> session::calls::TransactionApi { + session::calls::TransactionApi } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi<'a, T, X> { - grandpa::calls::TransactionApi::new(self.client) + pub fn grandpa(&self) -> grandpa::calls::TransactionApi { + grandpa::calls::TransactionApi } - pub fn im_online(&self) -> im_online::calls::TransactionApi<'a, T, X> { - im_online::calls::TransactionApi::new(self.client) + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi } - pub fn democracy(&self) -> democracy::calls::TransactionApi<'a, T, X> { - democracy::calls::TransactionApi::new(self.client) + pub fn democracy(&self) -> democracy::calls::TransactionApi { + democracy::calls::TransactionApi } - pub fn council(&self) -> council::calls::TransactionApi<'a, T, X> { - council::calls::TransactionApi::new(self.client) + pub fn council(&self) -> council::calls::TransactionApi { + council::calls::TransactionApi } - pub fn technical_committee( - &self, - ) -> technical_committee::calls::TransactionApi<'a, T, X> { - technical_committee::calls::TransactionApi::new(self.client) + pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { + technical_committee::calls::TransactionApi } - pub fn phragmen_election( - &self, - ) -> phragmen_election::calls::TransactionApi<'a, T, X> { - phragmen_election::calls::TransactionApi::new(self.client) + pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { + phragmen_election::calls::TransactionApi } pub fn technical_membership( &self, - ) -> technical_membership::calls::TransactionApi<'a, T, X> { - technical_membership::calls::TransactionApi::new(self.client) + ) -> technical_membership::calls::TransactionApi { + technical_membership::calls::TransactionApi } - pub fn treasury(&self) -> treasury::calls::TransactionApi<'a, T, X> { - treasury::calls::TransactionApi::new(self.client) + pub fn treasury(&self) -> treasury::calls::TransactionApi { + treasury::calls::TransactionApi } - pub fn claims(&self) -> claims::calls::TransactionApi<'a, T, X> { - claims::calls::TransactionApi::new(self.client) + pub fn claims(&self) -> claims::calls::TransactionApi { + claims::calls::TransactionApi } - pub fn vesting(&self) -> vesting::calls::TransactionApi<'a, T, X> { - vesting::calls::TransactionApi::new(self.client) + pub fn vesting(&self) -> vesting::calls::TransactionApi { + vesting::calls::TransactionApi } - pub fn utility(&self) -> utility::calls::TransactionApi<'a, T, X> { - utility::calls::TransactionApi::new(self.client) + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi } - pub fn identity(&self) -> identity::calls::TransactionApi<'a, T, X> { - identity::calls::TransactionApi::new(self.client) + pub fn identity(&self) -> identity::calls::TransactionApi { + identity::calls::TransactionApi } - pub fn proxy(&self) -> proxy::calls::TransactionApi<'a, T, X> { - proxy::calls::TransactionApi::new(self.client) + pub fn proxy(&self) -> proxy::calls::TransactionApi { + proxy::calls::TransactionApi } - pub fn multisig(&self) -> multisig::calls::TransactionApi<'a, T, X> { - multisig::calls::TransactionApi::new(self.client) + pub fn multisig(&self) -> multisig::calls::TransactionApi { + multisig::calls::TransactionApi } - pub fn bounties(&self) -> bounties::calls::TransactionApi<'a, T, X> { - bounties::calls::TransactionApi::new(self.client) + pub fn bounties(&self) -> bounties::calls::TransactionApi { + bounties::calls::TransactionApi } - pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi<'a, T, X> { - child_bounties::calls::TransactionApi::new(self.client) + pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { + child_bounties::calls::TransactionApi } - pub fn tips(&self) -> tips::calls::TransactionApi<'a, T, X> { - tips::calls::TransactionApi::new(self.client) + pub fn tips(&self) -> tips::calls::TransactionApi { + tips::calls::TransactionApi } pub fn election_provider_multi_phase( &self, - ) -> election_provider_multi_phase::calls::TransactionApi<'a, T, X> { - election_provider_multi_phase::calls::TransactionApi::new(self.client) + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi } - pub fn voter_list(&self) -> voter_list::calls::TransactionApi<'a, T, X> { - voter_list::calls::TransactionApi::new(self.client) + pub fn voter_list(&self) -> voter_list::calls::TransactionApi { + voter_list::calls::TransactionApi } - pub fn configuration(&self) -> configuration::calls::TransactionApi<'a, T, X> { - configuration::calls::TransactionApi::new(self.client) + pub fn configuration(&self) -> configuration::calls::TransactionApi { + configuration::calls::TransactionApi } - pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi<'a, T, X> { - paras_shared::calls::TransactionApi::new(self.client) + pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { + paras_shared::calls::TransactionApi } - pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi<'a, T, X> { - para_inclusion::calls::TransactionApi::new(self.client) + pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { + para_inclusion::calls::TransactionApi } - pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi<'a, T, X> { - para_inherent::calls::TransactionApi::new(self.client) + pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { + para_inherent::calls::TransactionApi } - pub fn paras(&self) -> paras::calls::TransactionApi<'a, T, X> { - paras::calls::TransactionApi::new(self.client) + pub fn paras(&self) -> paras::calls::TransactionApi { + paras::calls::TransactionApi } - pub fn initializer(&self) -> initializer::calls::TransactionApi<'a, T, X> { - initializer::calls::TransactionApi::new(self.client) + pub fn initializer(&self) -> initializer::calls::TransactionApi { + initializer::calls::TransactionApi } - pub fn dmp(&self) -> dmp::calls::TransactionApi<'a, T, X> { - dmp::calls::TransactionApi::new(self.client) + pub fn dmp(&self) -> dmp::calls::TransactionApi { + dmp::calls::TransactionApi } - pub fn ump(&self) -> ump::calls::TransactionApi<'a, T, X> { - ump::calls::TransactionApi::new(self.client) + pub fn ump(&self) -> ump::calls::TransactionApi { + ump::calls::TransactionApi } - pub fn hrmp(&self) -> hrmp::calls::TransactionApi<'a, T, X> { - hrmp::calls::TransactionApi::new(self.client) + pub fn hrmp(&self) -> hrmp::calls::TransactionApi { + hrmp::calls::TransactionApi } - pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi<'a, T, X> { - paras_disputes::calls::TransactionApi::new(self.client) + pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { + paras_disputes::calls::TransactionApi } - pub fn registrar(&self) -> registrar::calls::TransactionApi<'a, T, X> { - registrar::calls::TransactionApi::new(self.client) + pub fn registrar(&self) -> registrar::calls::TransactionApi { + registrar::calls::TransactionApi } - pub fn slots(&self) -> slots::calls::TransactionApi<'a, T, X> { - slots::calls::TransactionApi::new(self.client) + pub fn slots(&self) -> slots::calls::TransactionApi { + slots::calls::TransactionApi } - pub fn auctions(&self) -> auctions::calls::TransactionApi<'a, T, X> { - auctions::calls::TransactionApi::new(self.client) + pub fn auctions(&self) -> auctions::calls::TransactionApi { + auctions::calls::TransactionApi } - pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi<'a, T, X> { - crowdloan::calls::TransactionApi::new(self.client) + pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { + crowdloan::calls::TransactionApi } - pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi<'a, T, X> { - xcm_pallet::calls::TransactionApi::new(self.client) + pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { + xcm_pallet::calls::TransactionApi + } + } + #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] + pub fn validate_codegen>( + client: &C, + ) -> Result<(), ::subxt::error::MetadataError> { + let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); + if runtime_metadata_hash + != [ + 141u8, 61u8, 173u8, 80u8, 230u8, 59u8, 229u8, 153u8, 169u8, 25u8, 105u8, + 219u8, 165u8, 1u8, 254u8, 195u8, 143u8, 137u8, 51u8, 220u8, 83u8, 165u8, + 88u8, 56u8, 18u8, 29u8, 227u8, 241u8, 164u8, 143u8, 24u8, 69u8, + ] + { + Err(::subxt::error::MetadataError::IncompatibleMetadata) + } else { + Ok(()) } } } From 180ec97477f6ef9e262d5dd507b6aba842817dbf Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 13 Jul 2022 17:10:31 +0100 Subject: [PATCH 33/75] update test utils and start fixing frame tests --- .../integration-tests/src/frame/balances.rs | 158 +++++++++--------- .../integration-tests/src/frame/contracts.rs | 68 ++++---- .../integration-tests/src/utils/context.rs | 25 +-- .../integration-tests/src/utils/node_proc.rs | 11 +- 4 files changed, 120 insertions(+), 142 deletions(-) diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index d71ea2612a..21079d406b 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -4,6 +4,7 @@ use crate::{ node_runtime::{ + self, balances, runtime_types, system, @@ -29,25 +30,26 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = pair_signer(AccountKeyring::Bob.pair()); let bob_address = bob.account_id().clone().into(); - let cxt = test_context().await; - let api = &cxt.api; + let ctx = test_context().await; + let api = ctx.client(); - let alice_pre = api - .storage() + let alice_account_addr = node_runtime::storage() .system() - .account(alice.account_id(), None) - .await?; - let bob_pre = api - .storage() + .account(alice.account_id()); + let bob_account_addr = node_runtime::storage() .system() - .account(bob.account_id(), None) - .await?; + .account(bob.account_id()); + + let alice_pre = api.storage().fetch_or_default(&alice_account_addr, None).await?; + let bob_pre = api.storage().fetch_or_default(&bob_account_addr, None).await?; + + let tx = node_runtime::tx() + .balances() + .transfer(bob_address, 10_000); let events = api .tx() - .balances() - .transfer(bob_address, 10_000)? - .sign_and_submit_then_watch_default(&alice) + .sign_and_submit_then_watch_default(&tx, &alice) .await? .wait_for_finalized_success() .await?; @@ -67,16 +69,8 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { }; assert_eq!(event, expected_event); - let alice_post = api - .storage() - .system() - .account(alice.account_id(), None) - .await?; - let bob_post = api - .storage() - .system() - .account(bob.account_id(), None) - .await?; + let alice_post = api.storage().fetch_or_default(&alice_account_addr, None).await?; + let bob_post = api.storage().fetch_or_default(&bob_account_addr, None).await?; assert!(alice_pre.data.free - 10_000 >= alice_post.data.free); assert_eq!(bob_pre.data.free + 10_000, bob_post.data.free); @@ -89,21 +83,22 @@ async fn multiple_transfers_work_nonce_incremented( let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = pair_signer(AccountKeyring::Bob.pair()); let bob_address: MultiAddress = bob.account_id().clone().into(); - let cxt = test_context().await; - let api = &cxt.api; + let ctx = test_context().await; + let api = ctx.client(); - let bob_pre = api - .storage() + let bob_account_addr = node_runtime::storage() .system() - .account(bob.account_id(), None) - .await?; + .account(bob.account_id()); + + let bob_pre = api.storage().fetch_or_default(&bob_account_addr, None).await?; + let tx = node_runtime::tx() + .balances() + .transfer(bob_address.clone(), 10_000); for _ in 0..3 { api .tx() - .balances() - .transfer(bob_address.clone(), 10_000)? - .sign_and_submit_then_watch_default(&alice) + .sign_and_submit_then_watch_default(&tx, &alice) .await? .wait_for_in_block() // Don't need to wait for finalization; this is quicker. .await? @@ -111,11 +106,7 @@ async fn multiple_transfers_work_nonce_incremented( .await?; } - let bob_post = api - .storage() - .system() - .account(bob.account_id(), None) - .await?; + let bob_post = api.storage().fetch_or_default(&bob_account_addr, None).await?; assert_eq!(bob_pre.data.free + 30_000, bob_post.data.free); Ok(()) @@ -123,14 +114,11 @@ async fn multiple_transfers_work_nonce_incremented( #[tokio::test] async fn storage_total_issuance() { - let cxt = test_context().await; - let total_issuance = cxt - .api - .storage() - .balances() - .total_issuance(None) - .await - .unwrap(); + let ctx = test_context().await; + let api = ctx.client(); + + let addr = node_runtime::storage().balances().total_issuance(); + let total_issuance = api.storage().fetch_or_default(&addr, None).await.unwrap(); assert_ne!(total_issuance, 0); } @@ -138,30 +126,30 @@ async fn storage_total_issuance() { async fn storage_balance_lock() -> Result<(), subxt::Error> { let bob = pair_signer(AccountKeyring::Bob.pair()); let charlie = AccountKeyring::Charlie.to_account_id(); - let cxt = test_context().await; + let ctx = test_context().await; + let api = ctx.client(); - cxt.api - .tx() + let tx = node_runtime::tx() .staking() .bond( charlie.into(), 100_000_000_000_000, runtime_types::pallet_staking::RewardDestination::Stash, - )? - .sign_and_submit_then_watch_default(&bob) + ); + + api.tx() + .sign_and_submit_then_watch_default(&tx, &bob) .await? .wait_for_finalized_success() .await? .find_first::()? .expect("No ExtrinsicSuccess Event found"); - let locked_account = AccountKeyring::Bob.to_account_id(); - let locks = cxt - .api - .storage() - .balances() - .locks(&locked_account, None) - .await?; + let locks_addr = node_runtime::storage().balances().locks( + &AccountKeyring::Bob.to_account_id() + ); + + let locks = api.storage().fetch_or_default(&locks_addr, None).await?; assert_eq!( locks.0, @@ -183,26 +171,26 @@ async fn transfer_error() { let hans = pair_signer(Pair::generate().0); let hans_address = hans.account_id().clone().into(); let ctx = test_context().await; + let api = ctx.client(); - ctx.api - .tx() + let to_hans_tx = node_runtime::tx() .balances() - .transfer(hans_address, 100_000_000_000_000_000) - .unwrap() - .sign_and_submit_then_watch_default(&alice) + .transfer(hans_address, 100_000_000_000_000_000); + let to_alice_tx = node_runtime::tx() + .balances() + .transfer(alice_addr, 100_000_000_000_000_000); + + api.tx() + .sign_and_submit_then_watch_default(&to_hans_tx, &alice) .await .unwrap() .wait_for_finalized_success() .await .unwrap(); - let res = ctx - .api + let res = api .tx() - .balances() - .transfer(alice_addr, 100_000_000_000_000_000) - .unwrap() - .sign_and_submit_then_watch_default(&hans) + .sign_and_submit_then_watch_default(&to_alice_tx, &hans) .await .unwrap() .wait_for_finalized_success() @@ -222,15 +210,16 @@ 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 cxt = test_context().await; + let ctx = test_context().await; + let api = ctx.client(); - let event = cxt - .api - .tx() + let to_bob_tx = node_runtime::tx() .balances() - .transfer(bob_addr, 10_000) - .unwrap() - .sign_and_submit_then_watch_default(&alice) + .transfer(bob_addr, 10_000); + + let event = api + .tx() + .sign_and_submit_then_watch_default(&to_bob_tx, &alice) .await .unwrap() .wait_for_finalized_success() @@ -252,19 +241,22 @@ async fn transfer_implicit_subscription() { #[tokio::test] async fn constant_existential_deposit() { - let cxt = test_context().await; - let locked_metadata = cxt.client().metadata(); - let metadata = locked_metadata.read(); + let ctx = test_context().await; + let api = ctx.client(); + + // get and decode constant manually via metadata: + let metadata = api.metadata(); let balances_metadata = metadata.pallet("Balances").unwrap(); let constant_metadata = balances_metadata.constant("ExistentialDeposit").unwrap(); let existential_deposit = u128::decode(&mut &constant_metadata.value[..]).unwrap(); assert_eq!(existential_deposit, 100_000_000_000_000); + + // constant address for API access: + let addr = node_runtime::constants().balances().existential_deposit(); + + // Make sure thetwo are identical: assert_eq!( existential_deposit, - cxt.api - .constants() - .balances() - .existential_deposit() - .unwrap() + api.constants().at(&addr).unwrap() ); } diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 2aa995066b..30d6b2be8f 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -8,26 +8,25 @@ use crate::{ node_runtime::{ self, contracts::{ - calls::TransactionApi, events, - storage, }, system, DispatchError, }, test_context, - NodeRuntimeParams, TestContext, }; use sp_core::sr25519::Pair; use sp_runtime::MultiAddress; use subxt::{ - Client, + OnlineClient, Config, SubstrateConfig, Error, - PairSigner, - TransactionProgress, + extrinsic::{ + PairSigner, + TransactionProgress, + } }; struct ContractsTestContext { @@ -47,14 +46,10 @@ impl ContractsTestContext { Self { cxt, signer } } - fn client(&self) -> &Client { + fn client(&self) -> OnlineClient { self.cxt.client() } - fn contracts_tx(&self) -> TransactionApi { - self.cxt.api.tx().contracts() - } - async fn instantiate_with_code( &self, ) -> Result<(Hash, AccountId), Error> { @@ -67,10 +62,7 @@ impl ContractsTestContext { "#; let code = wabt::wat2wasm(CONTRACT).expect("invalid wabt"); - let events = self - .cxt - .api - .tx() + let instantiate_tx = node_runtime::tx() .contracts() .instantiate_with_code( 100_000_000_000_000_000, // endowment @@ -79,8 +71,12 @@ impl ContractsTestContext { code, vec![], // data vec![], // salt - )? - .sign_and_submit_then_watch_default(&self.signer) + ); + + let events = self + .client() + .tx() + .sign_and_submit_then_watch_default(&instantiate_tx, &self.signer) .await? .wait_for_finalized_success() .await?; @@ -110,8 +106,8 @@ impl ContractsTestContext { salt: Vec, ) -> Result> { // call instantiate extrinsic - let result = self - .contracts_tx() + let instantiate_tx = node_runtime::tx() + .contracts() .instantiate( 100_000_000_000_000_000, // endowment 500_000_000_000, // gas_limit @@ -119,8 +115,12 @@ impl ContractsTestContext { code_hash, data, salt, - )? - .sign_and_submit_then_watch_default(&self.signer) + ); + + let result = self + .client() + .tx() + .sign_and_submit_then_watch_default(&instantiate_tx, &self.signer) .await? .wait_for_finalized_success() .await?; @@ -138,20 +138,24 @@ impl ContractsTestContext { contract: AccountId, input_data: Vec, ) -> Result< - TransactionProgress<'_, SubstrateConfig, DispatchError, node_runtime::Event>, + TransactionProgress, DispatchError>, Error, > { tracing::info!("call: {:?}", contract); - let result = self - .contracts_tx() + let call_tx = node_runtime::tx() + .contracts() .call( MultiAddress::Id(contract), 0, // value 500_000_000, // gas_limit None, // storage_deposit_limit input_data, - )? - .sign_and_submit_then_watch_default(&self.signer) + ); + + let result = self + .client() + .tx() + .sign_and_submit_then_watch_default(&call_tx, &self.signer) .await?; tracing::info!("Call result: {:?}", result); @@ -190,19 +194,21 @@ async fn tx_call() { let cxt = ContractsTestContext::init().await; let (_, contract) = cxt.instantiate_with_code().await.unwrap(); + let info_addr = node_runtime::storage() + .contracts() + .contract_info_of(&contract); + let contract_info = cxt - .cxt - .api + .client() .storage() - .contracts() - .contract_info_of(&contract, None) + .fetch(&info_addr, None) .await; assert!(contract_info.is_ok()); let keys = cxt .client() .storage() - .fetch_keys::(5, None, None) + .fetch_keys(&info_addr, 10, None, None) .await .unwrap() .iter() diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index d1307db5cf..d300422a97 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -10,17 +10,13 @@ pub(crate) use crate::{ use sp_core::sr25519::Pair; use sp_keyring::AccountKeyring; use subxt::{ - Client, SubstrateConfig, - PairSigner, - SubstrateExtrinsicParams, + extrinsic::PairSigner, }; /// substrate node should be installed on the $PATH const SUBSTRATE_NODE_PATH: &str = "substrate"; -pub type NodeRuntimeParams = SubstrateExtrinsicParams; - pub async fn test_node_process_with( key: AccountKeyring, ) -> TestNodeProcess { @@ -39,26 +35,11 @@ pub async fn test_node_process_with( proc.unwrap() } -pub async fn test_node_process() -> TestNodeProcess { - test_node_process_with(AccountKeyring::Alice).await -} - -pub struct TestContext { - pub node_proc: TestNodeProcess, - pub api: node_runtime::RuntimeApi, -} - -impl TestContext { - pub fn client(&self) -> &Client { - &self.api.client - } -} +pub type TestContext = TestNodeProcess; pub async fn test_context() -> TestContext { tracing_subscriber::fmt::try_init().ok(); - let node_proc = test_node_process_with(AccountKeyring::Alice).await; - let api = node_proc.client().clone().to_runtime_api(); - TestContext { node_proc, api } + test_node_process_with(AccountKeyring::Alice).await } pub fn pair_signer(pair: Pair) -> PairSigner { diff --git a/testing/integration-tests/src/utils/node_proc.rs b/testing/integration-tests/src/utils/node_proc.rs index b156e223ba..9585b8d444 100644 --- a/testing/integration-tests/src/utils/node_proc.rs +++ b/testing/integration-tests/src/utils/node_proc.rs @@ -16,15 +16,14 @@ use std::{ process, }; use subxt::{ - Client, - ClientBuilder, + OnlineClient, Config, }; /// Spawn a local substrate node for testing subxt. pub struct TestNodeProcess { proc: process::Child, - client: Client, + client: OnlineClient, ws_url: String, } @@ -61,8 +60,8 @@ where } /// Returns the subxt client connected to the running node. - pub fn client(&self) -> &Client { - &self.client + pub fn client(&self) -> OnlineClient { + self.client.clone() } /// Returns the address to which the client is connected. @@ -129,7 +128,7 @@ impl TestNodeProcessBuilder { let ws_url = format!("ws://127.0.0.1:{}", ws_port); // Connect to the node with a subxt client: - let client = ClientBuilder::new().set_url(ws_url.clone()).build().await; + let client = OnlineClient::from_url(ws_url.clone()).await; match client { Ok(client) => { Ok(TestNodeProcess { From 374b68dca8ec92a0dc684eb3c7757785f12077f3 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 13 Jul 2022 17:33:32 +0100 Subject: [PATCH 34/75] fix frame staking tests --- .../integration-tests/src/frame/staking.rs | 151 ++++++++++-------- 1 file changed, 80 insertions(+), 71 deletions(-) diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index f7ca86216f..6c6f95698c 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -4,6 +4,7 @@ use crate::{ node_runtime::{ + self, runtime_types::pallet_staking::{ RewardDestination, ValidatorPrefs, @@ -37,14 +38,17 @@ fn default_validator_prefs() -> ValidatorPrefs { #[tokio::test] async fn validate_with_controller_account() { - let alice = pair_signer(AccountKeyring::Alice.pair()); let ctx = test_context().await; - ctx.api - .tx() + let api = ctx.client(); + + let alice = pair_signer(AccountKeyring::Alice.pair()); + + let tx = node_runtime::tx() .staking() - .validate(default_validator_prefs()) - .unwrap() - .sign_and_submit_then_watch_default(&alice) + .validate(default_validator_prefs()); + + api.tx() + .sign_and_submit_then_watch_default(&tx, &alice) .await .unwrap() .wait_for_finalized_success() @@ -54,14 +58,18 @@ async fn validate_with_controller_account() { #[tokio::test] async fn validate_not_possible_for_stash_account() -> Result<(), Error> { - let alice_stash = pair_signer(get_from_seed("Alice//stash")); let ctx = test_context().await; - let announce_validator = ctx - .api - .tx() + let api = ctx.client(); + + let alice_stash = pair_signer(get_from_seed("Alice//stash")); + + let tx = node_runtime::tx() .staking() - .validate(default_validator_prefs())? - .sign_and_submit_then_watch_default(&alice_stash) + .validate(default_validator_prefs()); + + let announce_validator = api + .tx() + .sign_and_submit_then_watch_default(&tx, &alice_stash) .await? .wait_for_finalized_success() .await; @@ -74,16 +82,18 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error Result<(), Error> { + let ctx = test_context().await; + let api = ctx.client(); + let alice_stash = pair_signer(get_from_seed("Alice//stash")); let bob = pair_signer(AccountKeyring::Bob.pair()); - let ctx = test_context().await; - let nomination = ctx - .api - .tx() + let tx = node_runtime::tx() .staking() - .nominate(vec![bob.account_id().clone().into()])? - .sign_and_submit_then_watch_default(&alice_stash) - .await? + .nominate(vec![bob.account_id().clone().into()]); + + let nomination = api + .tx() + .sign_and_submit_then_watch_default(&tx, &alice_stash) + .await + .unwrap() .wait_for_finalized_success() .await; @@ -116,36 +130,38 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error Result<(), Error> { + let ctx = test_context().await; + let api = ctx.client(); + let alice_stash = pair_signer(get_from_seed("Alice//stash")); let bob_stash = pair_signer(get_from_seed("Bob//stash")); let alice = pair_signer(AccountKeyring::Alice.pair()); - let ctx = test_context().await; // this will fail the second time, which is why this is one test, not two - ctx.api - .tx() + let nominate_tx = node_runtime::tx() .staking() - .nominate(vec![bob_stash.account_id().clone().into()])? - .sign_and_submit_then_watch_default(&alice) + .nominate(vec![bob_stash.account_id().clone().into()]); + api.tx() + .sign_and_submit_then_watch_default(&nominate_tx, &alice) .await? .wait_for_finalized_success() .await?; - let ledger = ctx - .api - .storage() + let ledger_addr = node_runtime::storage() .staking() - .ledger(alice.account_id(), None) + .ledger(alice.account_id()); + let ledger = api + .storage() + .fetch(&ledger_addr, None) .await? .unwrap(); assert_eq!(alice_stash.account_id(), &ledger.stash); - let chill = ctx - .api + let chill_tx = node_runtime::tx().staking().chill(); + + let chill = api .tx() - .staking() - .chill()? - .sign_and_submit_then_watch_default(&alice_stash) + .sign_and_submit_then_watch_default(&chill_tx, &alice_stash) .await? .wait_for_finalized_success() .await; @@ -155,12 +171,9 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { assert_eq!(err.error, "NotController"); }); - let is_chilled = ctx - .api + let is_chilled = api .tx() - .staking() - .chill()? - .sign_and_submit_then_watch_default(&alice) + .sign_and_submit_then_watch_default(&chill_tx, &alice) .await? .wait_for_finalized_success() .await? @@ -172,37 +185,31 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { #[tokio::test] async fn tx_bond() -> Result<(), Error> { - let alice = pair_signer(AccountKeyring::Alice.pair()); let ctx = test_context().await; + let api = ctx.client(); - let bond = ctx - .api - .tx() + let alice = pair_signer(AccountKeyring::Alice.pair()); + + let bond_tx = node_runtime::tx() .staking() .bond( AccountKeyring::Bob.to_account_id().into(), 100_000_000_000_000, RewardDestination::Stash, - ) - .unwrap() - .sign_and_submit_then_watch_default(&alice) + ); + + let bond = api + .tx() + .sign_and_submit_then_watch_default(&bond_tx, &alice) .await? .wait_for_finalized_success() .await; assert!(bond.is_ok()); - let bond_again = ctx - .api + let bond_again = api .tx() - .staking() - .bond( - AccountKeyring::Bob.to_account_id().into(), - 100_000_000_000_000, - RewardDestination::Stash, - ) - .unwrap() - .sign_and_submit_then_watch_default(&alice) + .sign_and_submit_then_watch_default(&bond_tx, &alice) .await? .wait_for_finalized_success() .await; @@ -217,7 +224,9 @@ async fn tx_bond() -> Result<(), Error> { #[tokio::test] async fn storage_history_depth() -> Result<(), Error> { let ctx = test_context().await; - let history_depth = ctx.api.storage().staking().history_depth(None).await?; + let api = ctx.client(); + let history_depth_addr = node_runtime::storage().staking().history_depth(); + let history_depth = api.storage().fetch_or_default(&history_depth_addr, None).await?; assert_eq!(history_depth, 84); Ok(()) } @@ -225,11 +234,11 @@ async fn storage_history_depth() -> Result<(), Error> { #[tokio::test] async fn storage_current_era() -> Result<(), Error> { let ctx = test_context().await; - let _current_era = ctx - .api + let api = ctx.client(); + let current_era_addr = node_runtime::storage().staking().current_era(); + let _current_era = api .storage() - .staking() - .current_era(None) + .fetch(¤t_era_addr, None) .await? .expect("current era always exists"); Ok(()) @@ -237,12 +246,12 @@ async fn storage_current_era() -> Result<(), Error> { #[tokio::test] async fn storage_era_reward_points() -> Result<(), Error> { - let cxt = test_context().await; - let current_era_result = cxt - .api + let ctx = test_context().await; + let api = ctx.client(); + let reward_points_addr = node_runtime::storage().staking().eras_reward_points(&0); + let current_era_result = api .storage() - .staking() - .eras_reward_points(&0, None) + .fetch(&reward_points_addr, None) .await; assert!(current_era_result.is_ok()); From 89c2cfff548a03dc0353e57d6eecfeccaac45bb2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 14 Jul 2022 16:30:24 +0100 Subject: [PATCH 35/75] fix the rest of the test compile issues, Borrow on storage values --- codegen/src/api/storage.rs | 18 +- examples/examples/metadata_compatibility.rs | 2 +- subxt/src/client/online_client.rs | 11 + subxt/src/constants/constants_client.rs | 21 +- subxt/src/events/events_client.rs | 25 +- subxt/src/events/mod.rs | 2 + subxt/src/extrinsic/tx_client.rs | 26 +- subxt/src/storage/storage_address.rs | 2 +- subxt/src/storage/storage_client.rs | 53 +- testing/integration-tests/src/client/mod.rs | 137 ++-- .../integration-tests/src/codegen/polkadot.rs | 612 ++++++++++-------- testing/integration-tests/src/events/mod.rs | 43 +- testing/integration-tests/src/frame/sudo.rs | 27 +- testing/integration-tests/src/frame/system.rs | 30 +- .../integration-tests/src/frame/timestamp.rs | 13 +- .../src/metadata/validation.rs | 153 ++--- testing/integration-tests/src/storage/mod.rs | 62 +- .../integration-tests/src/utils/context.rs | 8 +- .../integration-tests/src/utils/node_proc.rs | 7 - 19 files changed, 669 insertions(+), 583 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index a243b1c914..34bd5c131f 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -116,7 +116,7 @@ fn generate_storage_entry_fns( .into_iter() .zip(&fields) .map(|(hasher, (field_name, _))| { - quote!( ::subxt::storage::address::StorageMapKey::new(#field_name, #hasher) ) + quote!( ::subxt::storage::address::StorageMapKey::new(#field_name.borrow(), #hasher) ) }); quote! { vec![ #( #keys ),* ] @@ -130,7 +130,7 @@ fn generate_storage_entry_fns( quote!( #field_name ) }); quote! { - vec![ ::subxt::storage::address::StorageMapKey::new(&(#( #items ),*), #hasher) ] + vec![ ::subxt::storage::address::StorageMapKey::new(&(#( #items.borrow() ),*), #hasher) ] } } else { // If we hit this condition, we don't know how to handle the number of hashes vs fields @@ -151,7 +151,7 @@ fn generate_storage_entry_fns( abort_call_site!("No hasher found for single key") }); let key_impl = quote! { - vec![ ::subxt::storage::address::StorageMapKey::new(_0, #hasher) ] + vec![ ::subxt::storage::address::StorageMapKey::new(_0.borrow(), #hasher) ] }; (fields, key_impl) } @@ -182,14 +182,16 @@ fn generate_storage_entry_fns( let docs_token = quote! { #( #[doc = #docs ] )* }; let key_args = fields.iter().map(|(field_name, field_type)| { - // The field type is translated from `std::vec::Vec` to `[T]`, if the - // interface should generate a reference. In such cases, the vector ultimately is - // a slice. + // The field type is translated from `std::vec::Vec` to `[T]`. We apply + // AsRef to all types, so this just makes it a little more ergonomic. + // + // TODO [jsdw]: Support mappings like `String -> str` too for better Borrow + // ergonomics. let field_ty = match field_type.vec_type_param() { - Some(ty) => quote!(&[#ty]), + Some(ty) => quote!([#ty]), _ => quote!(#field_type), }; - quote!( #field_name: & #field_ty ) + quote!( #field_name: impl ::std::borrow::Borrow<#field_ty> ) }); let is_map_type = matches!(storage_entry.ty, StorageEntryType::Map { .. }); diff --git a/examples/examples/metadata_compatibility.rs b/examples/examples/metadata_compatibility.rs index 7463d6a3b8..96b35412ea 100644 --- a/examples/examples/metadata_compatibility.rs +++ b/examples/examples/metadata_compatibility.rs @@ -30,7 +30,7 @@ async fn main() -> Result<(), Box> { // this check. If it fails, then there is some breaking change between the metadata // used to generate this static code, and the runtime metadata from a node that the // client is using. - polkadot::validate_codegen(api)?; + polkadot::validate_codegen(&api)?; Ok(()) } diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index a288173330..2056c18d48 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -5,6 +5,7 @@ use std::sync::Arc; use parking_lot::RwLock; use super::{ + OfflineClient, OfflineClientT, }; use futures::future; @@ -139,6 +140,16 @@ impl OnlineClient { &self.rpc } + /// Return an offline client with the same configuration as this. + pub fn offline(&self) -> OfflineClient { + let inner = self.inner.read(); + OfflineClient::new( + inner.genesis_hash.clone(), + inner.runtime_version.clone(), + inner.metadata.clone() + ) + } + // Just a copy of the most important trait methods so that people // don't need to import the trait for most things: diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index bbe326cbbd..085eb2ec69 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -30,6 +30,20 @@ impl ConstantsClient { } impl > ConstantsClient { + /// Run the validation logic against some constant address you'd like to access. Returns `Ok(())` + /// if the address is valid (or if it's not possible to check since the address has no validation hash). + /// Return an error if the address was not valid or something went wrong trying to validate it (ie + /// the pallet or constant in question do not exist at all). + pub fn validate(&self, address: &ConstantAddress<'_, ReturnTy>) -> Result<(), BasicError> { + if let Some(actual_hash) = address.validation_hash() { + let expected_hash = self.client.metadata().constant_hash(address.pallet_name(), address.constant_name())?; + if actual_hash != expected_hash { + return Err(MetadataError::IncompatibleMetadata.into()); + } + } + Ok(()) + } + /// Access the constant at the address given, returning the type defined by this address. /// This is probably used with addresses given from static codegen, although you can manually /// construct your own, too. @@ -37,12 +51,7 @@ impl > ConstantsClient { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: - if let Some(actual_hash) = address.validation_hash() { - let expected_hash = metadata.constant_hash(address.pallet_name(), address.constant_name())?; - if actual_hash != expected_hash { - return Err(MetadataError::IncompatibleMetadata.into()); - } - } + self.validate(address)?; // 2. Attempt to decode the constant into the type given: let pallet = metadata.pallet(address.pallet_name())?; diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index b731d2de16..ffb41ec211 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -108,7 +108,7 @@ where } /// Subscribe to events from finalized blocks. - pub async fn subscribe_finalized( + pub fn subscribe_finalized( &self, ) -> impl Future>, BasicError>> + Send + 'static where @@ -119,24 +119,6 @@ where subscribe_finalized(client).await } } - - /// Take a subscription that returns block headers, and if any block numbers are missed out - /// betweem the block number provided and what's returned from the subscription, we fill in - /// the gaps and get hold of all intermediate block headers. - pub fn subscribe_to_block_headers_filling_in_gaps( - &self, - last_block_num: Option, - sub: S, - ) -> impl Stream> + Send - where - T: Config, - Client: OnlineClientT, - S: Stream> + Send, - E: Into + Send + 'static, - { - let client = self.client.clone(); - subscribe_to_block_headers_filling_in_gaps(client, last_block_num, sub) - } } async fn at( @@ -201,7 +183,10 @@ where Ok(EventSubscription::new(client, Box::pin(block_subscription))) } -fn subscribe_to_block_headers_filling_in_gaps( +/// Note: This is exposed for testing but is not considered stable and may change +/// without notice in a patch release. +#[doc(hidden)] +pub fn subscribe_to_block_headers_filling_in_gaps( client: Client, mut last_block_num: Option, sub: S, diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 074cb7c19c..b5d0285fd7 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -28,6 +28,8 @@ pub use filter_events::{ }; pub use events_client::{ EventsClient, + // Exposed only for testing: + subscribe_to_block_headers_filling_in_gaps, }; use codec::{ Encode, Decode }; diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index b968869424..2f3aab09df 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -58,6 +58,24 @@ impl TxClient { } impl > TxClient { + /// Run the validation logic against some extrinsic you'd like to submit. Returns `Ok(())` + /// if the call is valid (or if it's not possible to check since the call has no validation hash). + /// Return an error if the call was not valid or something went wrong trying to validate it (ie + /// the pallet or call in question do not exist at all). + pub fn validate(&self, call: &SubmittableExtrinsic) -> Result<(), BasicError> + where + Call: MetadataLocation, + { + if let Some(actual_hash) = call.call_hash { + let metadata = self.client.metadata(); + let expected_hash = metadata.call_hash(call.call_data.pallet(), call.call_data.item())?; + if actual_hash != expected_hash { + return Err(crate::metadata::MetadataError::IncompatibleMetadata.into()) + } + } + Ok(()) + } + /// Return the SCALE encoded bytes representing the call data of the transaction. pub fn call_data(&self, call: &Call) -> Result, BasicError> where @@ -81,13 +99,7 @@ impl > TxClient { { // 1. Validate this call against the current node metadata if the call comes // with a hash allowing us to do so. - if let Some(actual_hash) = call.call_hash { - let metadata = self.client.metadata(); - let expected_hash = metadata.call_hash(call.call_data.pallet(), call.call_data.item())?; - if actual_hash != expected_hash { - return Err(crate::metadata::MetadataError::IncompatibleMetadata.into()) - } - } + self.validate(call)?; // 2. SCALE encode call data to bytes (pallet u8, call u8, call params). let call_data = Encoded(self.call_data(call)?); diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 16c0e877e3..bf2491f065 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -126,7 +126,7 @@ pub struct StorageMapKey { impl StorageMapKey { /// Create a new [`StorageMapKey`] with the encoded data and the hasher. - pub fn new(value: &T, hasher: StorageHasher) -> Self { + pub fn new(value: T, hasher: StorageHasher) -> Self { Self { value: value.encode(), hasher, diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 2c580cafbf..fb6efd60b7 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -20,6 +20,7 @@ use crate::{ }, client::{ OnlineClientT, + OfflineClientT, }, metadata::Metadata, Config, @@ -51,6 +52,31 @@ impl StorageClient{ } } +impl StorageClient +where + T: Config, + Client: OfflineClientT, +{ + /// Run the validation logic against some storage address you'd like to access. Returns `Ok(())` + /// if the address is valid (or if it's not possible to check since the address has no validation hash). + /// Return an error if the address was not valid or something went wrong trying to validate it (ie + /// the pallet or storage entry in question do not exist at all). + pub fn validate<'a, ReturnTy, Iterable, Defaultable>( + &self, + address: &'a StorageAddress<'_, ReturnTy, Iterable, Defaultable>, + ) -> Result<(), BasicError> { + if let Some(hash) = address.validation_hash() { + validate_storage( + address.pallet_name(), + address.entry_name(), + hash, + &self.client.metadata() + )?; + } + Ok(()) + } +} + impl StorageClient where T: Config, @@ -104,22 +130,15 @@ where address: &'a StorageAddress<'_, ReturnTy, Iterable, Defaultable>, hash: Option, ) -> impl Future, BasicError>> + 'a { - let client = self.client.clone(); + let client = self.clone(); async move { // Metadata validation checks whether the static address given // is likely to actually correspond to a real storage entry or not. // if not, it means static codegen doesn't line up with runtime // metadata. - if let Some(validation_hash) = address.validation_hash() { - validate_storage( - address.pallet_name(), - address.entry_name(), - validation_hash, - &client.metadata() - )?; - } + client.validate(address)?; - if let Some(data) = client.storage().fetch_raw(address, hash).await? { + if let Some(data) = client.client.storage().fetch_raw(address, hash).await? { Ok(Some(Decode::decode(&mut &*data)?)) } else { Ok(None) @@ -215,20 +234,13 @@ where page_size: u32, hash: Option, ) -> impl Future, BasicError>> + 'a { - let client = self.client.clone(); + let client = self.clone(); async move { // Metadata validation checks whether the static address given // is likely to actually correspond to a real storage entry or not. // if not, it means static codegen doesn't line up with runtime // metadata. - if let Some(validation_hash) = address.validation_hash() { - validate_storage( - address.pallet_name(), - address.entry_name(), - validation_hash, - &client.metadata() - )?; - } + client.validate(&address)?; // Fetch a concrete block hash to iterate over. We do this so that if new blocks // are produced midway through iteration, we continue to iterate at the block @@ -237,6 +249,7 @@ where hash } else { client + .client .rpc() .block_hash(None) .await? @@ -251,7 +264,7 @@ where }; Ok(KeyIter { - client: client.storage(), + client: client, address: root_addr, block_hash: hash, count: page_size, diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index b130f7bd6e..c085268a3e 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -3,23 +3,25 @@ // see LICENSE for license details. use crate::{ - test_node_process, - test_node_process_with, - utils::node_runtime::system, + test_context, + test_context_with, + pair_signer, + utils::node_runtime, }; - use sp_core::storage::{ well_known_keys, StorageKey, }; +use sp_core::{ Pair, sr25519::Pair as Sr25519Pair }; use sp_keyring::AccountKeyring; #[tokio::test] async fn insert_key() { - let test_node_process = test_node_process_with(AccountKeyring::Bob).await; - let client = test_node_process.client(); + let ctx = test_context_with(AccountKeyring::Bob).await; + let api = ctx.client(); + let public = AccountKeyring::Alice.public().as_array_ref().to_vec(); - client + api .rpc() .insert_key( "aura".to_string(), @@ -28,7 +30,7 @@ async fn insert_key() { ) .await .unwrap(); - assert!(client + assert!(api .rpc() .has_key(public.clone().into(), "aura".to_string()) .await @@ -37,25 +39,26 @@ async fn insert_key() { #[tokio::test] async fn fetch_block_hash() { - let node_process = test_node_process().await; - node_process.client().rpc().block_hash(None).await.unwrap(); + let ctx = test_context().await; + ctx.client().rpc().block_hash(None).await.unwrap(); } #[tokio::test] async fn fetch_block() { - let node_process = test_node_process().await; - let client = node_process.client(); - let block_hash = client.rpc().block_hash(None).await.unwrap(); - client.rpc().block(block_hash).await.unwrap(); + let ctx = test_context().await; + let api = ctx.client(); + + let block_hash = api.rpc().block_hash(None).await.unwrap(); + api.rpc().block(block_hash).await.unwrap(); } #[tokio::test] async fn fetch_read_proof() { - let node_process = test_node_process().await; - let client = node_process.client(); - let block_hash = client.rpc().block_hash(None).await.unwrap(); - client - .rpc() + let ctx = test_context().await; + let api = ctx.client(); + + let block_hash = api.rpc().block_hash(None).await.unwrap(); + api.rpc() .read_proof( vec![ StorageKey(well_known_keys::HEAP_PAGES.to_vec()), @@ -69,27 +72,31 @@ async fn fetch_read_proof() { #[tokio::test] async fn chain_subscribe_blocks() { - let node_process = test_node_process().await; - let client = node_process.client(); - let mut blocks = client.rpc().subscribe_blocks().await.unwrap(); + let ctx = test_context().await; + let api = ctx.client(); + + let mut blocks = api.rpc().subscribe_blocks().await.unwrap(); blocks.next().await.unwrap().unwrap(); } #[tokio::test] async fn chain_subscribe_finalized_blocks() { - let node_process = test_node_process().await; - let client = node_process.client(); - let mut blocks = client.rpc().subscribe_finalized_blocks().await.unwrap(); + let ctx = test_context().await; + let api = ctx.client(); + + let mut blocks = api.rpc().subscribe_finalized_blocks().await.unwrap(); blocks.next().await.unwrap().unwrap(); } #[tokio::test] async fn fetch_keys() { - let node_process = test_node_process().await; - let client = node_process.client(); - let keys = client + let ctx = test_context().await; + let api = ctx.client(); + + let addr = node_runtime::storage().system().account_root(); + let keys = api .storage() - .fetch_keys::(4, None, None) + .fetch_keys(&addr, 4, None, None) .await .unwrap(); assert_eq!(keys.len(), 4) @@ -97,11 +104,13 @@ async fn fetch_keys() { #[tokio::test] async fn test_iter() { - let node_process = test_node_process().await; - let client = node_process.client(); - let mut iter = client + let ctx = test_context().await; + let api = ctx.client(); + + let addr = node_runtime::storage().system().account_root(); + let mut iter = api .storage() - .iter::(None) + .iter(addr, 10, None) .await .unwrap(); let mut i = 0; @@ -113,39 +122,39 @@ async fn test_iter() { #[tokio::test] async fn fetch_system_info() { - let node_process = test_node_process().await; - let client = node_process.client(); - assert_eq!(client.rpc().system_chain().await.unwrap(), "Development"); - assert_eq!(client.rpc().system_name().await.unwrap(), "Substrate Node"); - assert!(!client.rpc().system_version().await.unwrap().is_empty()); + let ctx = test_context().await; + let api = ctx.client(); + + assert_eq!(api.rpc().system_chain().await.unwrap(), "Development"); + assert_eq!(api.rpc().system_name().await.unwrap(), "Substrate Node"); + assert!(!api.rpc().system_version().await.unwrap().is_empty()); } #[tokio::test] async fn dry_run_passes() { - let node_process = test_node_process().await; - let client = node_process.client(); + let ctx = test_context().await; + let api = ctx.client(); let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = pair_signer(AccountKeyring::Bob.pair()); - let bob_address = bob.account_id().clone().into(); - let cxt = test_context().await; - let api = &cxt.api; + + let tx = node_runtime::tx() + .balances() + .transfer(bob.account_id().clone().into(), 10_000); + let signed_extrinsic = api .tx() - .balances() - .transfer(bob_address, 10_000) - .unwrap() - .create_signed(&alice, Default::default()) + .create_signed(&tx, &alice, Default::default()) .await .unwrap(); - client - .rpc() + api.rpc() .dry_run(signed_extrinsic.encoded(), None) .await .expect("dryrunning failed") .expect("expected dryrunning to be successful") .unwrap(); + signed_extrinsic .submit_and_watch() .await @@ -157,45 +166,47 @@ async fn dry_run_passes() { #[tokio::test] async fn dry_run_fails() { - let node_process = test_node_process().await; - let client = node_process.client(); + let ctx = test_context().await; + let api = ctx.client(); let alice = pair_signer(AccountKeyring::Alice.pair()); - let hans = pair_signer(Pair::generate().0); - let hans_address = hans.account_id().clone().into(); - let cxt = test_context().await; - let api = &cxt.api; - let signed_extrinsic = api - .tx() + let hans = pair_signer(Sr25519Pair::generate().0); + + let tx = node_runtime::tx() .balances() .transfer( - hans_address, + hans.account_id().clone().into(), 100_000_000_000_000_000_000_000_000_000_000_000, - ) - .unwrap() - .create_signed(&alice, Default::default()) + ); + + let signed_extrinsic = api + .tx() + .create_signed(&tx, &alice, Default::default()) .await .unwrap(); - let dry_run_res: DispatchOutcome = client + let dry_run_res = api .rpc() .dry_run(signed_extrinsic.encoded(), None) .await .expect("dryrunning failed") .expect("expected dryrun transaction to be valid"); + if let Err(sp_runtime::DispatchError::Module(module_error)) = dry_run_res { assert_eq!(module_error.index, 6); assert_eq!(module_error.error, 2); } else { panic!("expected a module error when dryrunning"); } + let res = signed_extrinsic .submit_and_watch() .await .unwrap() .wait_for_finalized_success() .await; - if let Err(Error::Module(err)) = res { + + if let Err(subxt::error::Error::Module(err)) = res { assert_eq!(err.pallet, "Balances"); assert_eq!(err.error, "InsufficientBalance"); } else { diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 43a7878c27..a7e14f1398 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -540,7 +540,7 @@ pub mod api { #[doc = " The full account information for a particular account ID."] pub fn account( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::frame_system::AccountInfo< @@ -556,7 +556,7 @@ pub mod api { "System", "Account", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -661,7 +661,7 @@ pub mod api { #[doc = " Map of block numbers to block hashes."] pub fn block_hash( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::subxt::ext::sp_core::H256, @@ -672,7 +672,7 @@ pub mod api { "System", "BlockHash", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -707,7 +707,7 @@ pub mod api { #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] pub fn extrinsic_data( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::core::primitive::u8>, @@ -718,7 +718,7 @@ pub mod api { "System", "ExtrinsicData", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -878,7 +878,7 @@ pub mod api { #[doc = " no notification will be triggered thus the event might be lost."] pub fn event_topics( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, @@ -889,7 +889,7 @@ pub mod api { "System", "EventTopics", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -1520,12 +1520,12 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : & :: core :: primitive :: u32 ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: storage :: address :: AddressIsIterable , :: subxt :: storage :: address :: AddressHasDefaultValue >{ + #[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 :: StorageAddress :: < 'static , :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: storage :: address :: AddressIsIterable , :: subxt :: storage :: address :: AddressHasDefaultValue >{ ::subxt::storage::address::StorageAddress::new_with_validation( "Scheduler", "Agenda", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -1552,7 +1552,7 @@ pub mod api { #[doc = " Lookup from identity to the block number and index of the task."] pub fn lookup( &self, - _0: &&[::core::primitive::u8], + _0: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StorageAddress< 'static, (::core::primitive::u32, ::core::primitive::u32), @@ -1563,7 +1563,7 @@ pub mod api { "Scheduler", "Lookup", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -1833,7 +1833,7 @@ pub mod api { #[doc = " The request status of a given hash."] pub fn status_for( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_preimage::RequestStatus< @@ -1847,7 +1847,7 @@ pub mod api { "Preimage", "StatusFor", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -1885,7 +1885,7 @@ pub mod api { #[doc = " The preimages stored by this pallet."] pub fn preimage_for( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< @@ -1898,7 +1898,7 @@ pub mod api { "Preimage", "PreimageFor", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -2305,7 +2305,7 @@ pub mod api { #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] pub fn under_construction( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< @@ -2318,7 +2318,7 @@ pub mod api { "Babe", "UnderConstruction", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -3012,7 +3012,7 @@ pub mod api { #[doc = " The lookup from index to account."] pub fn accounts( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -3027,7 +3027,7 @@ pub mod api { "Indices", "Accounts", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -3615,7 +3615,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: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_balances::AccountData<::core::primitive::u128>, @@ -3626,7 +3626,7 @@ pub mod api { "Balances", "Account", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -3685,7 +3685,7 @@ pub mod api { #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] pub fn locks( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< @@ -3700,7 +3700,7 @@ pub mod api { "Balances", "Locks", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -3740,7 +3740,7 @@ pub mod api { #[doc = " Named reserves on some account balances."] pub fn reserves( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< @@ -3756,7 +3756,7 @@ pub mod api { "Balances", "Reserves", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -5603,7 +5603,7 @@ pub mod api { #[doc = " Map from all locked \"stash\" accounts to the controller account."] pub fn bonded( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::subxt::ext::sp_core::crypto::AccountId32, @@ -5614,7 +5614,7 @@ pub mod api { "Staking", "Bonded", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -5714,7 +5714,7 @@ pub mod api { #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] pub fn ledger( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::StakingLedger, @@ -5725,7 +5725,7 @@ pub mod api { "Staking", "Ledger", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -5760,7 +5760,7 @@ pub mod api { #[doc = " Where the reward payment should be made. Keyed by stash."] pub fn payee( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::RewardDestination< @@ -5773,7 +5773,7 @@ pub mod api { "Staking", "Payee", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -5810,7 +5810,7 @@ pub mod api { #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] pub fn validators( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::ValidatorPrefs, @@ -5821,7 +5821,7 @@ pub mod api { "Staking", "Validators", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -5915,7 +5915,7 @@ pub mod api { #[doc = " [`Call::chill_other`] dispatchable by anyone."] pub fn nominators( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::Nominations, @@ -5926,7 +5926,7 @@ pub mod api { "Staking", "Nominators", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6071,7 +6071,7 @@ pub mod api { #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] pub fn eras_start_session_index( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -6082,7 +6082,7 @@ pub mod api { "Staking", "ErasStartSessionIndex", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6125,8 +6125,8 @@ pub mod api { #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] pub fn eras_stakers( &self, - _0: &::core::primitive::u32, - _1: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::Exposure< @@ -6141,11 +6141,11 @@ pub mod api { "ErasStakers", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -6199,8 +6199,8 @@ pub mod api { #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] pub fn eras_stakers_clipped( &self, - _0: &::core::primitive::u32, - _1: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::Exposure< @@ -6215,11 +6215,11 @@ pub mod api { "ErasStakersClipped", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -6272,8 +6272,8 @@ pub mod api { #[doc = " Is it removed after `HISTORY_DEPTH` eras."] pub fn eras_validator_prefs( &self, - _0: &::core::primitive::u32, - _1: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::ValidatorPrefs, @@ -6285,11 +6285,11 @@ pub mod api { "ErasValidatorPrefs", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -6331,7 +6331,7 @@ pub mod api { #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] pub fn eras_validator_reward( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u128, @@ -6342,7 +6342,7 @@ pub mod api { "Staking", "ErasValidatorReward", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6380,7 +6380,7 @@ pub mod api { #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] pub fn eras_reward_points( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::EraRewardPoints< @@ -6393,7 +6393,7 @@ pub mod api { "Staking", "ErasRewardPoints", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6432,7 +6432,7 @@ pub mod api { #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] pub fn eras_total_stake( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u128, @@ -6443,7 +6443,7 @@ pub mod api { "Staking", "ErasTotalStake", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6545,7 +6545,7 @@ pub mod api { #[doc = " All unapplied slashes that are queued for later."] pub fn unapplied_slashes( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec< @@ -6561,7 +6561,7 @@ pub mod api { "Staking", "UnappliedSlashes", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6626,8 +6626,8 @@ pub mod api { #[doc = " and slash value of the era."] pub fn validator_slash_in_era( &self, - _0: &::core::primitive::u32, - _1: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -6642,11 +6642,11 @@ pub mod api { "ValidatorSlashInEra", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -6686,8 +6686,8 @@ pub mod api { #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] pub fn nominator_slash_in_era( &self, - _0: &::core::primitive::u32, - _1: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u128, @@ -6699,11 +6699,11 @@ pub mod api { "NominatorSlashInEra", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -6739,7 +6739,7 @@ pub mod api { #[doc = " Slashing spans for stash accounts."] pub fn slashing_spans( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::slashing::SlashingSpans, @@ -6750,7 +6750,7 @@ pub mod api { "Staking", "SlashingSpans", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -6786,8 +6786,8 @@ pub mod api { #[doc = " as well as how much reward has been paid out."] pub fn span_slash( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, - _1: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_staking::slashing::SpanRecord< @@ -6800,7 +6800,7 @@ pub mod api { "Staking", "SpanSlash", vec![::subxt::storage::address::StorageMapKey::new( - &(_0, _1), + &(_0.borrow(), _1.borrow()), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -7110,7 +7110,7 @@ pub mod api { #[doc = " The primary structure that holds all offence records keyed by report identifiers."] pub fn reports( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_staking::offence::OffenceDetails< @@ -7130,7 +7130,7 @@ pub mod api { "Offences", "Reports", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -7174,8 +7174,8 @@ pub mod api { #[doc = " A vector of reports of the same kind that happened at the same time slot."] pub fn concurrent_reports_index( &self, - _0: &[::core::primitive::u8; 16usize], - _1: &&[::core::primitive::u8], + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::subxt::ext::sp_core::H256>, @@ -7187,11 +7187,11 @@ pub mod api { "ConcurrentReportsIndex", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -7232,7 +7232,7 @@ pub mod api { #[doc = " different types are not supported at the moment so we are doing the manual serialization."] pub fn reports_by_kind_index( &self, - _0: &[::core::primitive::u8; 16usize], + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::core::primitive::u8>, @@ -7243,7 +7243,7 @@ pub mod api { "Offences", "ReportsByKindIndex", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -7527,7 +7527,7 @@ pub mod api { #[doc = " The next session keys for a validator."] pub fn next_keys( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime::SessionKeys, @@ -7538,7 +7538,7 @@ pub mod api { "Session", "NextKeys", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -7573,8 +7573,8 @@ pub mod api { #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] pub fn key_owner( &self, - _0: &runtime_types::sp_core::crypto::KeyTypeId, - _1: &&[::core::primitive::u8], + _0: impl ::std::borrow::Borrow, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::subxt::ext::sp_core::crypto::AccountId32, @@ -7585,7 +7585,7 @@ pub mod api { "Session", "KeyOwner", vec![::subxt::storage::address::StorageMapKey::new( - &(_0, _1), + &(_0.borrow(), _1.borrow()), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -7934,7 +7934,7 @@ pub mod api { #[doc = " TWOX-NOTE: `SetId` is not under user control."] pub fn set_id_session( &self, - _0: &::core::primitive::u64, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -7945,7 +7945,7 @@ pub mod api { "Grandpa", "SetIdSession", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -8177,8 +8177,8 @@ pub mod api { #[doc = " `WrapperOpaque`."] pub fn received_heartbeats( &self, - _0: &::core::primitive::u32, - _1: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::frame_support::traits::misc::WrapperOpaque< @@ -8192,11 +8192,11 @@ pub mod api { "ReceivedHeartbeats", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -8236,8 +8236,8 @@ pub mod api { #[doc = " number of blocks authored by the given authority."] pub fn authored_blocks( &self, - _0: &::core::primitive::u32, - _1: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -8249,11 +8249,11 @@ pub mod api { "AuthoredBlocks", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -9713,7 +9713,7 @@ pub mod api { #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] pub fn deposit_of( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -9727,7 +9727,7 @@ pub mod api { "Democracy", "DepositOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -9768,7 +9768,7 @@ pub mod api { #[doc = " The block number is the block at which it was deposited."] pub fn preimages( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_democracy::PreimageStatus< @@ -9783,7 +9783,7 @@ pub mod api { "Democracy", "Preimages", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -9868,7 +9868,7 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] pub fn referendum_info_of( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_democracy::types::ReferendumInfo< @@ -9883,7 +9883,7 @@ pub mod api { "Democracy", "ReferendumInfoOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -9927,7 +9927,7 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] pub fn voting_of( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_democracy::vote::Voting< @@ -9942,7 +9942,7 @@ pub mod api { "Democracy", "VotingOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -10034,7 +10034,7 @@ pub mod api { #[doc = " (until when it may not be resubmitted) and who vetoed it."] pub fn blacklist( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -10048,7 +10048,7 @@ pub mod api { "Democracy", "Blacklist", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -10087,7 +10087,7 @@ pub mod api { #[doc = " Record of all proposals that have been subject to emergency cancellation."] pub fn cancellations( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::bool, @@ -10098,7 +10098,7 @@ pub mod api { "Democracy", "Cancellations", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -10883,7 +10883,7 @@ pub mod api { #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime::Call, @@ -10894,7 +10894,7 @@ pub mod api { "Council", "ProposalOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -10929,7 +10929,7 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_collective::Votes< @@ -10943,7 +10943,7 @@ pub mod api { "Council", "Voting", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -11555,7 +11555,7 @@ pub mod api { #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime::Call, @@ -11566,7 +11566,7 @@ pub mod api { "TechnicalCommittee", "ProposalOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -11601,7 +11601,7 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_collective::Votes< @@ -11615,7 +11615,7 @@ pub mod api { "TechnicalCommittee", "Voting", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -12226,7 +12226,7 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] pub fn voting( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_elections_phragmen::Voter< @@ -12240,7 +12240,7 @@ pub mod api { "PhragmenElection", "Voting", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -13158,7 +13158,7 @@ pub mod api { #[doc = " Proposals that have been made."] pub fn proposals( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_treasury::Proposal< @@ -13172,7 +13172,7 @@ pub mod api { "Treasury", "Proposals", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -13691,7 +13691,9 @@ pub mod api { impl StorageApi { pub fn claims( &self, - _0: &runtime_types::polkadot_runtime_common::claims::EthereumAddress, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u128, @@ -13702,7 +13704,7 @@ pub mod api { "Claims", "Claims", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -13759,7 +13761,9 @@ pub mod api { #[doc = " The block number is when the vesting should start."] pub fn vesting( &self, - _0: &runtime_types::polkadot_runtime_common::claims::EthereumAddress, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -13774,7 +13778,7 @@ pub mod api { "Claims", "Vesting", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -13816,7 +13820,9 @@ pub mod api { #[doc = " The statement kind that must be signed, if any."] pub fn signing( &self, - _0: &runtime_types::polkadot_runtime_common::claims::EthereumAddress, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_common::claims::StatementKind, @@ -13827,7 +13833,7 @@ pub mod api { "Claims", "Signing", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -13862,7 +13868,7 @@ pub mod api { #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] pub fn preclaims( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_common::claims::EthereumAddress, @@ -13873,7 +13879,7 @@ pub mod api { "Claims", "Preclaims", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -14262,7 +14268,7 @@ pub mod api { #[doc = " Information regarding the vesting of a given account."] pub fn vesting( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< @@ -14278,7 +14284,7 @@ pub mod api { "Vesting", "Vesting", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -15615,7 +15621,7 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn identity_of( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_identity::types::Registration< @@ -15628,7 +15634,7 @@ pub mod api { "Identity", "IdentityOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -15668,7 +15674,7 @@ 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: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -15682,7 +15688,7 @@ pub mod api { "Identity", "SuperOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -15725,7 +15731,7 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn subs_of( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -15741,7 +15747,7 @@ pub mod api { "Identity", "SubsOf", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -16560,7 +16566,7 @@ pub mod api { #[doc = " which are being delegated to, together with the amount held on deposit."] pub fn proxies( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -16580,7 +16586,7 @@ pub mod api { "Proxy", "Proxies", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -16625,7 +16631,7 @@ pub mod api { #[doc = " The announcements made by the proxy (key)."] pub fn announcements( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -16645,7 +16651,7 @@ pub mod api { "Proxy", "Announcements", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -17220,8 +17226,8 @@ pub mod api { #[doc = " The set of open multisig operations."] pub fn multisigs( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, - _1: &[::core::primitive::u8; 32usize], + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_multisig::Multisig< @@ -17232,7 +17238,7 @@ pub mod api { ::subxt::storage::address::AddressIsIterable, (), > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("Multisig" , "Multisigs" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [145u8 , 78u8 , 57u8 , 171u8 , 199u8 , 158u8 , 226u8 , 250u8 , 224u8 , 133u8 , 45u8 , 251u8 , 202u8 , 22u8 , 171u8 , 132u8 , 229u8 , 110u8 , 248u8 , 233u8 , 38u8 , 2u8 , 247u8 , 140u8 , 150u8 , 103u8 , 211u8 , 209u8 , 160u8 , 158u8 , 23u8 , 215u8 ,]) + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("Multisig" , "Multisigs" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [145u8 , 78u8 , 57u8 , 171u8 , 199u8 , 158u8 , 226u8 , 250u8 , 224u8 , 133u8 , 45u8 , 251u8 , 202u8 , 22u8 , 171u8 , 132u8 , 229u8 , 110u8 , 248u8 , 233u8 , 38u8 , 2u8 , 247u8 , 140u8 , 150u8 , 103u8 , 211u8 , 209u8 , 160u8 , 158u8 , 23u8 , 215u8 ,]) } #[doc = " The set of open multisig operations."] pub fn multisigs_root( @@ -17261,7 +17267,7 @@ pub mod api { } pub fn calls( &self, - _0: &[::core::primitive::u8; 32usize], + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -17278,7 +17284,7 @@ pub mod api { "Multisig", "Calls", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -17922,7 +17928,7 @@ pub mod api { #[doc = " Bounties that have been made."] pub fn bounties( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_bounties::Bounty< @@ -17937,7 +17943,7 @@ pub mod api { "Bounties", "Bounties", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -17976,7 +17982,7 @@ pub mod api { #[doc = " The description of each bounty."] pub fn bounty_descriptions( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< @@ -17989,7 +17995,7 @@ pub mod api { "Bounties", "BountyDescriptions", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -18752,7 +18758,7 @@ pub mod api { #[doc = " Map of parent bounty index to number of child bounties."] pub fn parent_child_bounties( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -18763,7 +18769,7 @@ pub mod api { "ChildBounties", "ParentChildBounties", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -18799,8 +18805,8 @@ pub mod api { #[doc = " Child bounties that have been added."] pub fn child_bounties( &self, - _0: &::core::primitive::u32, - _1: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_child_bounties::ChildBounty< @@ -18816,11 +18822,11 @@ pub mod api { "ChildBounties", vec![ ::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ::subxt::storage::address::StorageMapKey::new( - _1, + _1.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], @@ -18860,7 +18866,7 @@ pub mod api { #[doc = " The description of each child-bounty."] pub fn child_bounty_descriptions( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< @@ -18873,7 +18879,7 @@ pub mod api { "ChildBounties", "ChildBountyDescriptions", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -18910,7 +18916,7 @@ pub mod api { #[doc = " The cumulative child-bounty curator fee for each parent bounty."] pub fn children_curator_fees( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u128, @@ -18921,7 +18927,7 @@ pub mod api { "ChildBounties", "ChildrenCuratorFees", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -19393,7 +19399,7 @@ pub mod api { #[doc = " guaranteed to be a secure hash."] pub fn tips( &self, - _0: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_tips::OpenTip< @@ -19409,7 +19415,7 @@ pub mod api { "Tips", "Tips", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -19452,7 +19458,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: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::core::primitive::u8>, @@ -19463,7 +19469,7 @@ pub mod api { "Tips", "Reasons", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -20111,12 +20117,12 @@ 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 : & :: core :: primitive :: u32 ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , 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 :: AddressIsIterable , () >{ + #[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 :: StorageAddress :: < 'static , 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 :: AddressIsIterable , () >{ ::subxt::storage::address::StorageAddress::new_with_validation( "ElectionProviderMultiPhase", "SignedSubmissionsMap", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -20601,7 +20607,7 @@ pub mod api { #[doc = " Nodes store links forward and back within their respective bags."] pub fn list_nodes( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_bags_list::list::Node, @@ -20612,7 +20618,7 @@ pub mod api { "VoterList", "ListNodes", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -20672,7 +20678,7 @@ pub mod api { #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] pub fn list_bags( &self, - _0: &::core::primitive::u64, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_bags_list::list::Bag, @@ -20683,7 +20689,7 @@ pub mod api { "VoterList", "ListBags", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -22437,12 +22443,12 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : & runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ ::subxt::storage::address::StorageAddress::new_with_validation( "ParaInclusion", "AvailabilityBitfields", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -22466,12 +22472,12 @@ pub mod api { ], ) } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : & runtime_types :: polkadot_parachain :: primitives :: Id ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + #[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 :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ ::subxt::storage::address::StorageAddress::new_with_validation( "ParaInclusion", "PendingAvailability", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -22498,7 +22504,9 @@ pub mod api { #[doc = " The commitments of candidates pending availability, by `ParaId`."] pub fn pending_availability_commitments( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_primitives::v2::CandidateCommitments< @@ -22511,7 +22519,7 @@ pub mod api { "ParaInclusion", "PendingAvailabilityCommitments", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23225,12 +23233,12 @@ pub mod api { #[doc = " All currently active PVF pre-checking votes."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : & runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ ::subxt::storage::address::StorageAddress::new_with_validation( "Paras", "PvfActiveVoteMap", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23306,7 +23314,9 @@ pub mod api { #[doc = " The current lifecycle of a all known Para IDs."] pub fn para_lifecycles( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, @@ -23317,7 +23327,7 @@ pub mod api { "Paras", "ParaLifecycles", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23352,7 +23362,9 @@ pub mod api { #[doc = " The head-data of every registered para."] pub fn heads( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_parachain::primitives::HeadData, @@ -23363,7 +23375,7 @@ pub mod api { "Paras", "Heads", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23400,7 +23412,9 @@ pub mod api { #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn current_code_hash( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -23411,7 +23425,7 @@ pub mod api { "Paras", "CurrentCodeHash", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23451,8 +23465,10 @@ pub mod api { #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn past_code_hash( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, - _1: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -23463,7 +23479,7 @@ pub mod api { "Paras", "PastCodeHash", vec![::subxt::storage::address::StorageMapKey::new( - &(_0, _1), + &(_0.borrow(), _1.borrow()), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23503,7 +23519,9 @@ pub mod api { #[doc = " to keep it available for secondary checkers."] pub fn past_code_meta( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< @@ -23516,7 +23534,7 @@ pub mod api { "Paras", "PastCodeMeta", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23586,7 +23604,9 @@ pub mod api { #[doc = " in the context of a relay chain block with a number >= `expected_at`."] pub fn future_code_upgrades( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -23597,7 +23617,7 @@ pub mod api { "Paras", "FutureCodeUpgrades", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23636,7 +23656,9 @@ pub mod api { #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn future_code_hash( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -23647,7 +23669,7 @@ pub mod api { "Paras", "FutureCodeHash", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23692,7 +23714,9 @@ pub mod api { #[doc = " the format will require migration of parachains."] pub fn upgrade_go_ahead_signal( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_primitives::v2::UpgradeGoAhead, @@ -23703,7 +23727,7 @@ pub mod api { "Paras", "UpgradeGoAheadSignal", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23754,7 +23778,9 @@ pub mod api { #[doc = " the format will require migration of parachains."] pub fn upgrade_restriction_signal( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_primitives::v2::UpgradeRestriction, @@ -23765,7 +23791,7 @@ pub mod api { "Paras", "UpgradeRestrictionSignal", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23861,7 +23887,7 @@ pub mod api { #[doc = " The actions to perform during the start of a specific session index."] pub fn actions_queue( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec, @@ -23872,7 +23898,7 @@ pub mod api { "Paras", "ActionsQueue", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23910,7 +23936,9 @@ pub mod api { #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] pub fn upcoming_paras_genesis( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, @@ -23921,7 +23949,7 @@ pub mod api { "Paras", "UpcomingParasGenesis", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -23959,7 +23987,9 @@ pub mod api { #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] pub fn code_by_hash_refs( &self, - _0 : & runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -23970,7 +24000,7 @@ pub mod api { "Paras", "CodeByHashRefs", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -24008,7 +24038,9 @@ pub mod api { #[doc = " [`PastCodeHash`]."] pub fn code_by_hash( &self, - _0 : & runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_parachain::primitives::ValidationCode, @@ -24019,7 +24051,7 @@ pub mod api { "Paras", "CodeByHash", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -24193,7 +24225,9 @@ pub mod api { #[doc = " The downward messages addressed for a certain para."] pub fn downward_message_queues( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec< @@ -24208,7 +24242,7 @@ pub mod api { "Dmp", "DownwardMessageQueues", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -24253,7 +24287,9 @@ pub mod api { #[doc = " - `H(M)`: is the hash of the message being appended."] pub fn downward_message_queue_heads( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::subxt::ext::sp_core::H256, @@ -24264,7 +24300,7 @@ pub mod api { "Dmp", "DownwardMessageQueueHeads", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -24489,7 +24525,9 @@ pub mod api { #[doc = " The messages are processed in FIFO order."] pub fn relay_dispatch_queues( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, @@ -24500,7 +24538,7 @@ pub mod api { "Ump", "RelayDispatchQueues", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -24550,7 +24588,9 @@ pub mod api { #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] pub fn relay_dispatch_queue_size( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, (::core::primitive::u32, ::core::primitive::u32), @@ -24561,7 +24601,7 @@ pub mod api { "Ump", "RelayDispatchQueueSize", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -24658,7 +24698,7 @@ pub mod api { #[doc = " These messages stay there until manually dispatched."] pub fn overweight( &self, - _0: &::core::primitive::u64, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -24672,7 +24712,7 @@ pub mod api { "Ump", "Overweight", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25092,12 +25132,12 @@ pub mod api { #[doc = " The set is accompanied by a list for iteration."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : & runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: AddressIsIterable , () >{ + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId > ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: AddressIsIterable , () >{ ::subxt::storage::address::StorageAddress::new_with_validation( "Hrmp", "HrmpOpenChannelRequests", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25153,7 +25193,9 @@ pub mod api { #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] pub fn hrmp_open_channel_request_count( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -25164,7 +25206,7 @@ pub mod api { "Hrmp", "HrmpOpenChannelRequestCount", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25203,7 +25245,9 @@ pub mod api { #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] pub fn hrmp_accepted_channel_request_count( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -25214,7 +25258,7 @@ pub mod api { "Hrmp", "HrmpAcceptedChannelRequestCount", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25257,7 +25301,9 @@ pub mod api { #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_close_channel_requests( &self, - _0: &runtime_types::polkadot_parachain::primitives::HrmpChannelId, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, (), @@ -25268,7 +25314,7 @@ pub mod api { "Hrmp", "HrmpCloseChannelRequests", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25333,7 +25379,9 @@ pub mod api { #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] pub fn hrmp_watermarks( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -25344,7 +25392,7 @@ pub mod api { "Hrmp", "HrmpWatermarks", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25383,7 +25431,9 @@ pub mod api { #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] pub fn hrmp_channels( &self, - _0: &runtime_types::polkadot_parachain::primitives::HrmpChannelId, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, @@ -25394,7 +25444,7 @@ pub mod api { "Hrmp", "HrmpChannels", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25443,7 +25493,9 @@ pub mod api { #[doc = " - the vectors are sorted."] pub fn hrmp_ingress_channels_index( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec, @@ -25454,7 +25506,7 @@ pub mod api { "Hrmp", "HrmpIngressChannelsIndex", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25500,7 +25552,9 @@ pub mod api { } pub fn hrmp_egress_channels_index( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec, @@ -25511,7 +25565,7 @@ pub mod api { "Hrmp", "HrmpEgressChannelsIndex", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25546,7 +25600,9 @@ pub mod api { #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] pub fn hrmp_channel_contents( &self, - _0: &runtime_types::polkadot_parachain::primitives::HrmpChannelId, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec< @@ -25561,7 +25617,7 @@ pub mod api { "Hrmp", "HrmpChannelContents", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25606,7 +25662,9 @@ pub mod api { #[doc = " same block number."] pub fn hrmp_channel_digests( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<( @@ -25622,7 +25680,7 @@ pub mod api { "Hrmp", "HrmpChannelDigests", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -25725,7 +25783,7 @@ pub mod api { #[doc = " Does not have any entries before the session index in the first session change notification."] pub fn sessions( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_primitives::v2::SessionInfo, @@ -25736,7 +25794,7 @@ pub mod api { "ParaSessionInfo", "Sessions", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -25773,7 +25831,7 @@ pub mod api { #[doc = " The validator account keys of the validators actively participating in parachain consensus."] pub fn account_keys( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, @@ -25784,7 +25842,7 @@ pub mod api { "ParaSessionInfo", "AccountKeys", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -25950,8 +26008,10 @@ pub mod api { #[doc = " All ongoing or concluded disputes for the last several sessions."] pub fn disputes( &self, - _0: &::core::primitive::u32, - _1: &runtime_types::polkadot_core_primitives::CandidateHash, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_core_primitives::CandidateHash, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_primitives::v2::DisputeState< @@ -25960,7 +26020,7 @@ pub mod api { ::subxt::storage::address::AddressIsIterable, (), > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Disputes" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [192u8 , 238u8 , 255u8 , 67u8 , 169u8 , 86u8 , 99u8 , 243u8 , 228u8 , 88u8 , 142u8 , 138u8 , 183u8 , 117u8 , 82u8 , 22u8 , 163u8 , 30u8 , 175u8 , 247u8 , 50u8 , 204u8 , 12u8 , 171u8 , 57u8 , 189u8 , 151u8 , 191u8 , 196u8 , 89u8 , 94u8 , 165u8 ,]) + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Disputes" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [192u8 , 238u8 , 255u8 , 67u8 , 169u8 , 86u8 , 99u8 , 243u8 , 228u8 , 88u8 , 142u8 , 138u8 , 183u8 , 117u8 , 82u8 , 22u8 , 163u8 , 30u8 , 175u8 , 247u8 , 50u8 , 204u8 , 12u8 , 171u8 , 57u8 , 189u8 , 151u8 , 191u8 , 196u8 , 89u8 , 94u8 , 165u8 ,]) } #[doc = " All ongoing or concluded disputes for the last several sessions."] pub fn disputes_root( @@ -25989,15 +26049,17 @@ pub mod api { #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] pub fn included( &self, - _0: &::core::primitive::u32, - _1: &runtime_types::polkadot_core_primitives::CandidateHash, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_core_primitives::CandidateHash, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, ::subxt::storage::address::AddressIsIterable, (), > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Included" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [129u8 , 50u8 , 76u8 , 60u8 , 82u8 , 106u8 , 248u8 , 164u8 , 152u8 , 80u8 , 58u8 , 185u8 , 211u8 , 225u8 , 122u8 , 100u8 , 234u8 , 241u8 , 123u8 , 205u8 , 4u8 , 8u8 , 193u8 , 116u8 , 167u8 , 158u8 , 252u8 , 223u8 , 204u8 , 226u8 , 74u8 , 195u8 ,]) + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Included" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [129u8 , 50u8 , 76u8 , 60u8 , 82u8 , 106u8 , 248u8 , 164u8 , 152u8 , 80u8 , 58u8 , 185u8 , 211u8 , 225u8 , 122u8 , 100u8 , 234u8 , 241u8 , 123u8 , 205u8 , 4u8 , 8u8 , 193u8 , 116u8 , 167u8 , 158u8 , 252u8 , 223u8 , 204u8 , 226u8 , 74u8 , 195u8 ,]) } #[doc = " All included blocks on the chain, as well as the block number in this chain that"] #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] @@ -26028,7 +26090,7 @@ pub mod api { #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] pub fn spam_slots( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec<::core::primitive::u32>, @@ -26039,7 +26101,7 @@ pub mod api { "ParasDisputes", "SpamSlots", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -26414,7 +26476,9 @@ pub mod api { #[doc = " Pending swap operations."] pub fn pending_swap( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_parachain::primitives::Id, @@ -26425,7 +26489,7 @@ pub mod api { "Registrar", "PendingSwap", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -26463,7 +26527,9 @@ pub mod api { #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] pub fn paras( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< @@ -26477,7 +26543,7 @@ pub mod api { "Registrar", "Paras", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -26770,7 +26836,9 @@ pub mod api { #[doc = " It is illegal for a `None` value to trail in the list."] pub fn leases( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::std::vec::Vec< @@ -26786,7 +26854,7 @@ pub mod api { "Slots", "Leases", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -27195,8 +27263,10 @@ pub mod api { #[doc = " (sub-)ranges."] pub fn reserved_amounts( &self, - _0: &::subxt::ext::sp_core::crypto::AccountId32, - _1: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u128, @@ -27207,7 +27277,7 @@ pub mod api { "Auctions", "ReservedAmounts", vec![::subxt::storage::address::StorageMapKey::new( - &(_0, _1), + &(_0.borrow(), _1.borrow()), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -27245,7 +27315,7 @@ pub mod api { #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] pub fn winning( &self, - _0: &::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StorageAddress< 'static, [::core::option::Option<( @@ -27260,7 +27330,7 @@ pub mod api { "Auctions", "Winning", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -27919,7 +27989,9 @@ pub mod api { #[doc = " Info on all of the funds."] pub fn funds( &self, - _0: &runtime_types::polkadot_parachain::primitives::Id, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::polkadot_runtime_common::crowdloan::FundInfo< @@ -27935,7 +28007,7 @@ pub mod api { "Crowdloan", "Funds", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ @@ -28895,7 +28967,7 @@ pub mod api { #[doc = " The ongoing queries."] pub fn queries( &self, - _0: &::core::primitive::u64, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, ) -> ::subxt::storage::address::StorageAddress< 'static, runtime_types::pallet_xcm::pallet::QueryStatus< @@ -28908,7 +28980,7 @@ pub mod api { "XcmPallet", "Queries", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ @@ -28948,7 +29020,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: &::subxt::ext::sp_core::H256, + _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, @@ -28959,7 +29031,7 @@ pub mod api { "XcmPallet", "AssetTraps", vec![::subxt::storage::address::StorageMapKey::new( - _0, + _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ @@ -29019,15 +29091,15 @@ pub mod api { #[doc = " The Latest versions that we know various locations support."] pub fn supported_version( &self, - _0: &::core::primitive::u32, - _1: &runtime_types::xcm::VersionedMultiLocation, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u32, ::subxt::storage::address::AddressIsIterable, (), > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "SupportedVersion" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [227u8 , 149u8 , 251u8 , 204u8 , 40u8 , 150u8 , 151u8 , 177u8 , 154u8 , 187u8 , 9u8 , 205u8 , 174u8 , 137u8 , 228u8 , 128u8 , 18u8 , 244u8 , 151u8 , 120u8 , 6u8 , 44u8 , 5u8 , 167u8 , 56u8 , 35u8 , 192u8 , 141u8 , 108u8 , 169u8 , 91u8 , 7u8 ,]) + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "SupportedVersion" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [227u8 , 149u8 , 251u8 , 204u8 , 40u8 , 150u8 , 151u8 , 177u8 , 154u8 , 187u8 , 9u8 , 205u8 , 174u8 , 137u8 , 228u8 , 128u8 , 18u8 , 244u8 , 151u8 , 120u8 , 6u8 , 44u8 , 5u8 , 167u8 , 56u8 , 35u8 , 192u8 , 141u8 , 108u8 , 169u8 , 91u8 , 7u8 ,]) } #[doc = " The Latest versions that we know various locations support."] pub fn supported_version_root( @@ -29053,15 +29125,15 @@ pub mod api { #[doc = " All locations that we have requested version notifications from."] pub fn version_notifiers( &self, - _0: &::core::primitive::u32, - _1: &runtime_types::xcm::VersionedMultiLocation, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::StorageAddress< 'static, ::core::primitive::u64, ::subxt::storage::address::AddressIsIterable, (), > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifiers" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [122u8 , 110u8 , 119u8 , 25u8 , 216u8 , 237u8 , 44u8 , 91u8 , 133u8 , 165u8 , 77u8 , 86u8 , 232u8 , 69u8 , 110u8 , 121u8 , 234u8 , 176u8 , 208u8 , 62u8 , 47u8 , 196u8 , 151u8 , 193u8 , 197u8 , 41u8 , 203u8 , 36u8 , 147u8 , 218u8 , 31u8 , 199u8 ,]) + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifiers" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [122u8 , 110u8 , 119u8 , 25u8 , 216u8 , 237u8 , 44u8 , 91u8 , 133u8 , 165u8 , 77u8 , 86u8 , 232u8 , 69u8 , 110u8 , 121u8 , 234u8 , 176u8 , 208u8 , 62u8 , 47u8 , 196u8 , 151u8 , 193u8 , 197u8 , 41u8 , 203u8 , 36u8 , 147u8 , 218u8 , 31u8 , 199u8 ,]) } #[doc = " All locations that we have requested version notifications from."] pub fn version_notifiers_root( @@ -29088,8 +29160,8 @@ pub mod api { #[doc = " of our versions we informed them of."] pub fn version_notify_targets( &self, - _0: &::core::primitive::u32, - _1: &runtime_types::xcm::VersionedMultiLocation, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow, ) -> ::subxt::storage::address::StorageAddress< 'static, ( @@ -29100,7 +29172,7 @@ pub mod api { ::subxt::storage::address::AddressIsIterable, (), > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifyTargets" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [255u8 , 223u8 , 137u8 , 192u8 , 243u8 , 162u8 , 26u8 , 237u8 , 4u8 , 29u8 , 179u8 , 75u8 , 5u8 , 145u8 , 11u8 , 149u8 , 164u8 , 202u8 , 14u8 , 18u8 , 244u8 , 36u8 , 209u8 , 1u8 , 21u8 , 0u8 , 191u8 , 79u8 , 126u8 , 160u8 , 149u8 , 58u8 ,]) + :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifyTargets" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [255u8 , 223u8 , 137u8 , 192u8 , 243u8 , 162u8 , 26u8 , 237u8 , 4u8 , 29u8 , 179u8 , 75u8 , 5u8 , 145u8 , 11u8 , 149u8 , 164u8 , 202u8 , 14u8 , 18u8 , 244u8 , 36u8 , 209u8 , 1u8 , 21u8 , 0u8 , 191u8 , 79u8 , 126u8 , 160u8 , 149u8 , 58u8 ,]) } #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] #[doc = " of our versions we informed them of."] diff --git a/testing/integration-tests/src/events/mod.rs b/testing/integration-tests/src/events/mod.rs index 59ddc145df..252a4b5608 100644 --- a/testing/integration-tests/src/events/mod.rs +++ b/testing/integration-tests/src/events/mod.rs @@ -4,6 +4,7 @@ use crate::{ node_runtime::{ + self, balances, system, }, @@ -18,14 +19,15 @@ use sp_keyring::AccountKeyring; async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; + let api = ctx.client(); - let mut event_sub = ctx.api.events().subscribe().await?; + let mut event_sub = api.events().subscribe().await?; // Wait for the next set of events, and check that the // associated block hash is not finalized yet. let events = event_sub.next().await.unwrap()?; let event_block_hash = events.block_hash(); - let current_block_hash = ctx.api.client.rpc().block_hash(None).await?.unwrap(); + let current_block_hash = api.rpc().block_hash(None).await?.unwrap(); assert_eq!(event_block_hash, current_block_hash); Ok(()) @@ -36,15 +38,16 @@ async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; + let api = ctx.client(); - let mut event_sub = ctx.api.events().subscribe_finalized().await?; + let mut event_sub = api.events().subscribe_finalized().await?; // Wait for the next set of events, and check that the // associated block hash is the one we just finalized. // (this can be a bit slow as we have to wait for finalization) let events = event_sub.next().await.unwrap()?; let event_block_hash = events.block_hash(); - let finalized_hash = ctx.api.client.rpc().finalized_head().await?; + let finalized_hash = api.rpc().finalized_head().await?; assert_eq!(event_block_hash, finalized_hash); Ok(()) @@ -56,8 +59,9 @@ async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicError> { tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; + let api = ctx.client(); - let mut event_sub = ctx.api.events().subscribe().await?; + let mut event_sub = api.events().subscribe().await?; for i in 0..3 { let events = event_sub @@ -67,6 +71,7 @@ async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicErr let success_event = events .find_first::() .expect("decode error"); + // Every now and then I get no bytes back for the first block events; // I assume that this might be the case for the genesis block, so don't // worry if no event found (but we should have no decode errors etc either way). @@ -85,10 +90,10 @@ async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicErr async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; + let api = ctx.client(); // Subscribe to balance transfer events, ignoring all else. - let event_sub = ctx - .api + let event_sub = api .events() .subscribe() .await? @@ -101,12 +106,9 @@ async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { // Make a transfer: let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id(); - ctx.api - .tx() - .balances() - .transfer(bob.clone().into(), 10_000)? - .sign_and_submit_then_watch_default(&alice) - .await?; + let transfer_tx = node_runtime::tx().balances().transfer(bob.clone().into(), 10_000); + + api.tx().sign_and_submit_then_watch_default(&transfer_tx, &alice).await?; // Wait for the next balance transfer event in our subscription stream // and check that it lines up: @@ -125,20 +127,19 @@ async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { #[tokio::test] async fn missing_block_headers_will_be_filled_in() -> Result<(), subxt::BasicError> { + let ctx = test_context().await; + let api = ctx.client(); + // This function is not publically available to use, but contains // the key logic for filling in missing blocks, so we want to test it. // This is used in `subscribe_finalized` to ensure no block headers are // missed. use subxt::events::subscribe_to_block_headers_filling_in_gaps; - let ctx = test_context().await; - // Manually subscribe to the next 6 finalized block headers, but deliberately // filter out some in the middle so we get back b _ _ b _ b. This guarantees // that there will be some gaps, even if there aren't any from the subscription. - let some_finalized_blocks = ctx - .api - .client + let some_finalized_blocks = api .rpc() .subscribe_finalized_blocks() .await? @@ -152,7 +153,7 @@ async fn missing_block_headers_will_be_filled_in() -> Result<(), subxt::BasicErr // This should spot any gaps in the middle and fill them back in. let all_finalized_blocks = subscribe_to_block_headers_filling_in_gaps( - &ctx.api.client, + ctx.client(), None, some_finalized_blocks, ); @@ -185,7 +186,7 @@ async fn check_events_are_sendable() { tokio::task::spawn(async { let ctx = test_context().await; - let mut event_sub = ctx.api.events().subscribe().await?; + let mut event_sub = ctx.client().events().subscribe().await?; while let Some(ev) = event_sub.next().await { // if `event_sub` doesn't implement Send, we can't hold @@ -201,7 +202,7 @@ async fn check_events_are_sendable() { let ctx = test_context().await; let mut event_sub = ctx - .api + .client() .events() .subscribe() .await? diff --git a/testing/integration-tests/src/frame/sudo.rs b/testing/integration-tests/src/frame/sudo.rs index 91e90a4c88..9d4273d5f7 100644 --- a/testing/integration-tests/src/frame/sudo.rs +++ b/testing/integration-tests/src/frame/sudo.rs @@ -4,6 +4,7 @@ use crate::{ node_runtime::{ + self, runtime_types, sudo, DispatchError, @@ -18,21 +19,21 @@ type BalancesCall = runtime_types::pallet_balances::pallet::Call; #[tokio::test] async fn test_sudo() -> Result<(), subxt::Error> { + let ctx = test_context().await; + let api = ctx.client(); + let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id().into(); - let cxt = test_context().await; let call = Call::Balances(BalancesCall::transfer { dest: bob, value: 10_000, }); + let tx = node_runtime::tx().sudo().sudo(call); - let found_event = cxt - .api + let found_event = api .tx() - .sudo() - .sudo(call)? - .sign_and_submit_then_watch_default(&alice) + .sign_and_submit_then_watch_default(&tx, &alice) .await? .wait_for_finalized_success() .await? @@ -44,21 +45,23 @@ async fn test_sudo() -> Result<(), subxt::Error> { #[tokio::test] async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> { + let ctx = test_context().await; + let api = ctx.client(); + let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id().into(); - let cxt = test_context().await; let call = Call::Balances(BalancesCall::transfer { dest: bob, value: 10_000, }); + let tx = node_runtime::tx() + .sudo() + .sudo_unchecked_weight(call, 0); - let found_event = cxt - .api + let found_event = api .tx() - .sudo() - .sudo_unchecked_weight(call, 0)? - .sign_and_submit_then_watch_default(&alice) + .sign_and_submit_then_watch_default(&tx, &alice) .await? .wait_for_finalized_success() .await? diff --git a/testing/integration-tests/src/frame/system.rs b/testing/integration-tests/src/frame/system.rs index f226ec45ed..807260943a 100644 --- a/testing/integration-tests/src/frame/system.rs +++ b/testing/integration-tests/src/frame/system.rs @@ -4,6 +4,7 @@ use crate::{ node_runtime::{ + self, system, DispatchError, }, @@ -15,14 +16,18 @@ use sp_keyring::AccountKeyring; #[tokio::test] async fn storage_account() -> Result<(), subxt::Error> { + let ctx = test_context().await; + let api = ctx.client(); + let alice = pair_signer(AccountKeyring::Alice.pair()); - let cxt = test_context().await; - let account_info = cxt - .api - .storage() + let account_info_addr = node_runtime::storage() .system() - .account(alice.account_id(), None) + .account(alice.account_id()); + + let account_info = api + .storage() + .fetch_or_default(&account_info_addr, None) .await; assert_matches!(account_info, Ok(_)); @@ -31,15 +36,18 @@ async fn storage_account() -> Result<(), subxt::Error> { #[tokio::test] async fn tx_remark_with_event() -> Result<(), subxt::Error> { + let ctx = test_context().await; + let api = ctx.client(); + let alice = pair_signer(AccountKeyring::Alice.pair()); - let cxt = test_context().await; - let found_event = cxt - .api - .tx() + let tx = node_runtime::tx() .system() - .remark_with_event(b"remarkable".to_vec())? - .sign_and_submit_then_watch_default(&alice) + .remark_with_event(b"remarkable".to_vec()); + + let found_event = api + .tx() + .sign_and_submit_then_watch_default(&tx, &alice) .await? .wait_for_finalized_success() .await? diff --git a/testing/integration-tests/src/frame/timestamp.rs b/testing/integration-tests/src/frame/timestamp.rs index 7f908e9af1..f4f69631f7 100644 --- a/testing/integration-tests/src/frame/timestamp.rs +++ b/testing/integration-tests/src/frame/timestamp.rs @@ -2,13 +2,20 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::test_context; +use crate::{ + test_context, + node_runtime, +}; #[tokio::test] async fn storage_get_current_timestamp() { - let cxt = test_context().await; + let ctx = test_context().await; + let api = ctx.client(); - let timestamp = cxt.api.storage().timestamp().now(None).await; + let timestamp = api + .storage() + .fetch(&node_runtime::storage().timestamp().now(), None) + .await; assert!(timestamp.is_ok()) } diff --git a/testing/integration-tests/src/metadata/validation.rs b/testing/integration-tests/src/metadata/validation.rs index 412b5855bf..3d98e8f6a9 100644 --- a/testing/integration-tests/src/metadata/validation.rs +++ b/testing/integration-tests/src/metadata/validation.rs @@ -4,6 +4,7 @@ use crate::{ test_context, + node_runtime, TestContext, }; use frame_metadata::{ @@ -28,72 +29,54 @@ use scale_info::{ TypeInfo, }; use subxt::{ - ClientBuilder, + OfflineClient, SubstrateConfig, Metadata, - SubstrateExtrinsicParams, }; -use crate::utils::node_runtime; - -type RuntimeApi = - node_runtime::RuntimeApi>; - -async fn metadata_to_api(metadata: RuntimeMetadataV14, cxt: &TestContext) -> RuntimeApi { +async fn metadata_to_api(metadata: RuntimeMetadataV14, ctx: &TestContext) -> OfflineClient { let prefixed = RuntimeMetadataPrefixed::from(metadata); let metadata = Metadata::try_from(prefixed).unwrap(); - ClientBuilder::new() - .set_url(cxt.node_proc.ws_url().to_string()) - .set_metadata(metadata) - .build() - .await - .unwrap() - .to_runtime_api::, - >>() + OfflineClient::new( + ctx.client().genesis_hash(), + ctx.client().runtime_version(), + metadata + ) } #[tokio::test] async fn full_metadata_check() { - let cxt = test_context().await; - let api = &cxt.api; + let ctx = test_context().await; + let api = ctx.client(); // Runtime metadata is identical to the metadata used during API generation. - assert!(api.validate_metadata().is_ok()); + assert!(node_runtime::validate_codegen(&api).is_ok()); // Modify the metadata. - let mut metadata: RuntimeMetadataV14 = { - let locked_client_metadata = api.client.metadata(); - let client_metadata = locked_client_metadata.read(); - client_metadata.runtime_metadata().clone() - }; + let mut metadata: RuntimeMetadataV14 = api.metadata().runtime_metadata().clone(); metadata.pallets[0].name = "NewPallet".to_string(); - let new_api = metadata_to_api(metadata, &cxt).await; + let api = metadata_to_api(metadata, &ctx).await; assert_eq!( - new_api - .validate_metadata() + node_runtime::validate_codegen(&api) .expect_err("Validation should fail for incompatible metadata"), - ::subxt::MetadataError::IncompatibleMetadata + ::subxt::error::MetadataError::IncompatibleMetadata ); } #[tokio::test] async fn constant_values_are_not_validated() { - let cxt = test_context().await; - let api = &cxt.api; + let ctx = test_context().await; + let api = ctx.client(); - // Ensure that `ExistentialDeposit` is compatible before altering the metadata. - assert!(cxt.api.constants().balances().existential_deposit().is_ok()); + let deposit_addr = node_runtime::constants().balances().existential_deposit(); + + // Retrieve existential deposit to validate it and confirm that it's OK. + assert!(api.constants().at(&deposit_addr).is_ok()); // Modify the metadata. - let mut metadata: RuntimeMetadataV14 = { - let locked_client_metadata = api.client.metadata(); - let client_metadata = locked_client_metadata.read(); - client_metadata.runtime_metadata().clone() - }; + let mut metadata: RuntimeMetadataV14 = api.metadata().runtime_metadata().clone(); let mut existential = metadata .pallets @@ -108,13 +91,10 @@ async fn constant_values_are_not_validated() { // Modifying a constant value should not lead to an error: existential.value = vec![0u8; 32]; - let new_api = metadata_to_api(metadata, &cxt).await; - - assert!(new_api.validate_metadata().is_ok()); - assert!(new_api.constants().balances().existential_deposit().is_ok()); + let api = metadata_to_api(metadata, &ctx).await; - // Other constant validation should not be impacted. - assert!(new_api.constants().balances().max_locks().is_ok()); + assert!(node_runtime::validate_codegen(&api).is_ok()); + assert!(api.constants().at(&deposit_addr).is_ok()); } fn default_pallet() -> PalletMetadata { @@ -143,11 +123,15 @@ fn pallets_to_metadata(pallets: Vec) -> RuntimeMetadataV14 { #[tokio::test] async fn calls_check() { - let cxt = test_context().await; + let ctx = test_context().await; + let api = ctx.client(); + + let unbond_tx = node_runtime::tx().staking().unbond(123_456_789_012_345); + let withdraw_unbonded_addr = node_runtime::tx().staking().withdraw_unbonded(10); // Ensure that `Unbond` and `WinthdrawUnbonded` calls are compatible before altering the metadata. - assert!(cxt.api.tx().staking().unbond(123_456_789_012_345).is_ok()); - assert!(cxt.api.tx().staking().withdraw_unbonded(10).is_ok()); + assert!(api.tx().validate(&unbond_tx).is_ok()); + assert!(api.tx().validate(&withdraw_unbonded_addr).is_ok()); // Reconstruct the `Staking` call as is. struct CallRec; @@ -181,9 +165,11 @@ async fn calls_check() { ..default_pallet() }; let metadata = pallets_to_metadata(vec![pallet]); - let new_api = metadata_to_api(metadata, &cxt).await; - assert!(new_api.tx().staking().unbond(123_456_789_012_345).is_ok()); - assert!(new_api.tx().staking().withdraw_unbonded(10).is_ok()); + let api = metadata_to_api(metadata, &ctx).await; + + // The calls should still be valid with this new type info: + assert!(api.tx().validate(&unbond_tx).is_ok()); + assert!(api.tx().validate(&withdraw_unbonded_addr).is_ok()); // Change `Unbond` call but leave the rest as is. struct CallRecSecond; @@ -216,31 +202,24 @@ async fn calls_check() { ..default_pallet() }; let metadata = pallets_to_metadata(vec![pallet]); - let new_api = metadata_to_api(metadata, &cxt).await; + let api = metadata_to_api(metadata, &ctx).await; + // Unbond call should fail, while withdraw_unbonded remains compatible. - assert!(new_api.tx().staking().unbond(123_456_789_012_345).is_err()); - assert!(new_api.tx().staking().withdraw_unbonded(10).is_ok()); + assert!(api.tx().validate(&unbond_tx).is_err()); + assert!(api.tx().validate(&withdraw_unbonded_addr).is_ok()); } #[tokio::test] async fn storage_check() { - let cxt = test_context().await; + let ctx = test_context().await; + let api = ctx.client(); + + let tx_count_addr = node_runtime::storage().system().extrinsic_count(); + let tx_len_addr = node_runtime::storage().system().all_extrinsics_len(); // Ensure that `ExtrinsicCount` and `EventCount` storages are compatible before altering the metadata. - assert!(cxt - .api - .storage() - .system() - .extrinsic_count(None) - .await - .is_ok()); - assert!(cxt - .api - .storage() - .system() - .all_extrinsics_len(None) - .await - .is_ok()); + assert!(api.storage().validate(&tx_count_addr).is_ok()); + assert!(api.storage().validate(&tx_len_addr).is_ok()); // Reconstruct the storage. let storage = PalletStorageMetadata { @@ -268,19 +247,11 @@ async fn storage_check() { ..default_pallet() }; let metadata = pallets_to_metadata(vec![pallet]); - let new_api = metadata_to_api(metadata, &cxt).await; - assert!(new_api - .storage() - .system() - .extrinsic_count(None) - .await - .is_ok()); - assert!(new_api - .storage() - .system() - .all_extrinsics_len(None) - .await - .is_ok()); + let api = metadata_to_api(metadata, &ctx).await; + + // The addresses should still validate: + assert!(api.storage().validate(&tx_count_addr).is_ok()); + assert!(api.storage().validate(&tx_len_addr).is_ok()); // Reconstruct the storage while modifying ExtrinsicCount. let storage = PalletStorageMetadata { @@ -309,17 +280,9 @@ async fn storage_check() { ..default_pallet() }; let metadata = pallets_to_metadata(vec![pallet]); - let new_api = metadata_to_api(metadata, &cxt).await; - assert!(new_api - .storage() - .system() - .extrinsic_count(None) - .await - .is_err()); - assert!(new_api - .storage() - .system() - .all_extrinsics_len(None) - .await - .is_ok()); + let api = metadata_to_api(metadata, &ctx).await; + + // The count route should fail now; the other will be ok still. + assert!(api.storage().validate(&tx_count_addr).is_err()); + assert!(api.storage().validate(&tx_len_addr).is_ok()); } diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index af903e3ab1..f4ca04e3b3 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -15,11 +15,14 @@ use sp_keyring::AccountKeyring; #[tokio::test] async fn storage_plain_lookup() -> Result<(), subxt::Error> { let ctx = test_context().await; + let api = ctx.client(); // Look up a plain value. Wait long enough that we don't get the genesis block data, // because it may have no storage associated with it. tokio::time::sleep(std::time::Duration::from_secs(6)).await; - let entry = ctx.api.storage().timestamp().now(None).await?; + + let addr = node_runtime::storage().timestamp().now(); + let entry = api.storage().fetch_or_default(&addr, None).await?; assert!(entry > 0); Ok(()) @@ -28,22 +31,24 @@ async fn storage_plain_lookup() -> Result<(), subxt::Error> { #[tokio::test] async fn storage_map_lookup() -> Result<(), subxt::Error> { let ctx = test_context().await; + let api = ctx.client(); let signer = pair_signer(AccountKeyring::Alice.pair()); let alice = AccountKeyring::Alice.to_account_id(); // Do some transaction to bump the Alice nonce to 1: - ctx.api - .tx() + let remark_tx = node_runtime::tx() .system() - .remark(vec![1, 2, 3, 4, 5])? - .sign_and_submit_then_watch_default(&signer) + .remark(vec![1, 2, 3, 4, 5]); + api.tx() + .sign_and_submit_then_watch_default(&remark_tx, &signer) .await? .wait_for_finalized_success() .await?; // Look up the nonce for the user (we expect it to be 1). - let entry = ctx.api.storage().system().account(&alice, None).await?; + 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); Ok(()) @@ -54,23 +59,15 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { // treated as a StorageKey (ie we should hash both values together with one hasher, rather // than hash both values separately, or ignore the second value). #[tokio::test] -async fn storage_n_mapish_key_is_properly_created( -) -> Result<(), subxt::Error> { +async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error> { use codec::Encode; - use node_runtime::{ - runtime_types::sp_core::crypto::KeyTypeId, - session::storage::KeyOwner, - }; - use subxt::{ - storage::StorageKeyPrefix, - StorageEntry, - }; + use node_runtime::runtime_types::sp_core::crypto::KeyTypeId; // This is what the generated code hashes a `session().key_owner(..)` key into: - let actual_key_bytes = KeyOwner(&KeyTypeId([1, 2, 3, 4]), &[5u8, 6, 7, 8]) - .key() - .final_key(StorageKeyPrefix::new::()) - .0; + let actual_key_bytes = node_runtime::storage() + .session() + .key_owner(KeyTypeId([1, 2, 3, 4]), [5u8, 6, 7, 8]) + .to_bytes(); // Let's manually hash to what we assume it should be and compare: let expected_key_bytes = { @@ -91,6 +88,7 @@ async fn storage_n_mapish_key_is_properly_created( #[tokio::test] async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error> { let ctx = test_context().await; + let api = ctx.client(); // Boilerplate; we create a new asset class with ID 99, and then // we "approveTransfer" of some of this asset class. This gives us an @@ -98,29 +96,25 @@ async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error TestNodeProcess { +) -> TestContext { let path = std::env::var("SUBSTRATE_NODE_PATH").unwrap_or_else(|_| { if which::which(SUBSTRATE_NODE_PATH).is_err() { panic!("A substrate binary should be installed on your path for integration tests. \ @@ -28,7 +28,7 @@ pub async fn test_node_process_with( SUBSTRATE_NODE_PATH.to_string() }); - let proc = TestNodeProcess::::build(path.as_str()) + let proc = TestContext::build(path.as_str()) .with_authority(key) .spawn::() .await; @@ -39,7 +39,7 @@ pub type TestContext = TestNodeProcess; pub async fn test_context() -> TestContext { tracing_subscriber::fmt::try_init().ok(); - test_node_process_with(AccountKeyring::Alice).await + test_context_with(AccountKeyring::Alice).await } pub fn pair_signer(pair: Pair) -> PairSigner { diff --git a/testing/integration-tests/src/utils/node_proc.rs b/testing/integration-tests/src/utils/node_proc.rs index 9585b8d444..43a7f2221a 100644 --- a/testing/integration-tests/src/utils/node_proc.rs +++ b/testing/integration-tests/src/utils/node_proc.rs @@ -24,7 +24,6 @@ use subxt::{ pub struct TestNodeProcess { proc: process::Child, client: OnlineClient, - ws_url: String, } impl Drop for TestNodeProcess @@ -63,11 +62,6 @@ where pub fn client(&self) -> OnlineClient { self.client.clone() } - - /// Returns the address to which the client is connected. - pub fn ws_url(&self) -> &str { - &self.ws_url - } } /// Construct a test node process. @@ -134,7 +128,6 @@ impl TestNodeProcessBuilder { Ok(TestNodeProcess { proc, client, - ws_url, }) } Err(err) => { From 71ca97a893566b6077619e4a5fb0ae2690634da8 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 14 Jul 2022 17:10:01 +0100 Subject: [PATCH 36/75] cargo fmt --- codegen/src/api/storage.rs | 9 +-- examples/examples/balance_transfer.rs | 5 +- .../examples/balance_transfer_with_params.rs | 7 +- examples/examples/custom_config.rs | 7 +- examples/examples/fetch_staking_details.rs | 21 ++--- examples/examples/rpc_call.rs | 5 +- .../examples/rpc_call_subscribe_blocks.rs | 5 +- examples/examples/storage_query.rs | 26 +++---- examples/examples/submit_and_watch.rs | 16 +--- examples/examples/subscribe_all_events.rs | 4 +- examples/examples/subscribe_one_event.rs | 4 +- examples/examples/subscribe_some_events.rs | 4 +- subxt/src/client/offline_client.rs | 22 +++--- subxt/src/client/online_client.rs | 42 +++++----- subxt/src/config.rs | 16 +++- subxt/src/constants/constant_address.rs | 16 ++-- subxt/src/constants/constants_client.rs | 36 ++++++--- subxt/src/constants/mod.rs | 10 +-- subxt/src/error.rs | 6 +- subxt/src/events/event_subscription.rs | 29 +++---- subxt/src/events/events_client.rs | 78 +++++++++---------- subxt/src/events/events_type.rs | 20 ++--- subxt/src/events/filter_events.rs | 15 ++-- subxt/src/events/mod.rs | 21 ++--- subxt/src/extrinsic/mod.rs | 2 +- subxt/src/extrinsic/params.rs | 12 +-- subxt/src/extrinsic/transaction.rs | 20 ++--- subxt/src/extrinsic/tx_client.rs | 65 ++++++++-------- subxt/src/lib.rs | 12 ++- subxt/src/metadata/decode_with_metadata.rs | 28 ++++--- subxt/src/metadata/encode_with_metadata.rs | 40 ++++++---- subxt/src/metadata/metadata_type.rs | 66 ++++++++-------- subxt/src/metadata/mod.rs | 14 ++-- subxt/src/rpc.rs | 2 +- subxt/src/storage/mod.rs | 10 +-- subxt/src/storage/storage_address.rs | 35 ++++----- subxt/src/storage/storage_client.rs | 76 ++++++++++-------- subxt/src/utils.rs | 6 +- testing/integration-tests/src/client/mod.rs | 32 ++++---- testing/integration-tests/src/events/mod.rs | 8 +- .../integration-tests/src/frame/balances.rs | 73 ++++++++--------- .../integration-tests/src/frame/contracts.rs | 78 +++++++++---------- .../integration-tests/src/frame/staking.rs | 32 +++----- testing/integration-tests/src/frame/sudo.rs | 4 +- testing/integration-tests/src/frame/system.rs | 4 +- .../integration-tests/src/frame/timestamp.rs | 2 +- .../src/metadata/validation.rs | 11 ++- testing/integration-tests/src/storage/mod.rs | 20 ++--- .../integration-tests/src/utils/context.rs | 6 +- .../integration-tests/src/utils/node_proc.rs | 9 +-- 50 files changed, 532 insertions(+), 559 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 34bd5c131f..147f183f82 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -70,9 +70,7 @@ fn generate_storage_entry_fns( storage_entry: &StorageEntryMetadata, ) -> TokenStream2 { let (fields, key_impl) = match storage_entry.ty { - StorageEntryType::Plain(_) => { - (vec![], quote!(vec![])) - } + StorageEntryType::Plain(_) => (vec![], quote!(vec![])), StorageEntryType::Map { ref key, ref hashers, @@ -126,9 +124,8 @@ fn generate_storage_entry_fns( // tuple of them using the one hasher we're told about. This corresponds to a // StorageMap. let hasher = hashers.get(0).expect("checked for 1 hasher"); - let items = fields.iter().map(|(field_name, _)| { - quote!( #field_name ) - }); + let items = + fields.iter().map(|(field_name, _)| quote!( #field_name )); quote! { vec![ ::subxt::storage::address::StorageMapKey::new(&(#( #items.borrow() ),*), #hasher) ] } diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index 2bcf765a46..b85929fe71 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -36,10 +36,7 @@ async fn main() -> Result<(), Box> { .transfer(dest, 123_456_789_012_345); // submit the transaction with default params: - let hash = api - .tx() - .sign_and_submit_default(&tx, &signer) - .await?; + let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; println!("Balance transfer extrinsic submitted: {}", hash); diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index 9dc8eb64ab..dbde159950 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -14,8 +14,8 @@ use sp_keyring::AccountKeyring; use subxt::{ extrinsic::{ Era, - PlainTip, PairSigner, + PlainTip, PolkadotExtrinsicParamsBuilder as Params, }, OnlineClient, @@ -46,10 +46,7 @@ async fn main() -> Result<(), Box> { .era(Era::Immortal, api.genesis_hash()); // submit the transaction: - let hash = api - .tx() - .sign_and_submit(&tx, &signer, tx_params) - .await?; + let hash = api.tx().sign_and_submit(&tx, &signer, tx_params).await?; println!("Balance transfer extrinsic submitted: {}", hash); diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index 64f590ee96..9a615bbe8a 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -7,7 +7,6 @@ use sp_keyring::AccountKeyring; use subxt::{ - OnlineClient, config::{ Config, SubstrateConfig, @@ -16,6 +15,7 @@ use subxt::{ PairSigner, SubstrateExtrinsicParams, }, + OnlineClient, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -59,10 +59,7 @@ async fn main() -> Result<(), Box> { .transfer(dest, 123_456_789_012_345); // submit the transaction with default params: - let hash = api - .tx() - .sign_and_submit_default(&tx, &signer) - .await?; + let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; println!("Balance transfer extrinsic submitted: {}", hash); diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index a3aa1ffa22..5dfde2c81d 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -17,9 +17,7 @@ use subxt::{ sr25519, Pair, }, - sp_runtime::{ - AccountId32, - } + sp_runtime::AccountId32, }, OnlineClient, PolkadotConfig, @@ -35,9 +33,7 @@ async fn main() -> Result<(), Box> { // Create a client to use: let api = OnlineClient::::new().await?; - let active_era_addr = polkadot::storage() - .staking() - .active_era(); + let active_era_addr = polkadot::storage().staking().active_era(); let era = api.storage().fetch(&active_era_addr, None).await?.unwrap(); println!( "Staking active era: index: {:?}, start: {:?}", @@ -55,9 +51,7 @@ async fn main() -> Result<(), Box> { println!(" Alice//stash account id: {:?}", alice_stash_id); // Map from all locked "stash" accounts to the controller account. - let controller_acc_addr = polkadot::storage() - .staking() - .bonded(&alice_stash_id); + let controller_acc_addr = polkadot::storage().staking().bonded(&alice_stash_id); let controller_acc = api .storage() .fetch(&controller_acc_addr, None) @@ -65,13 +59,8 @@ async fn main() -> Result<(), Box> { .unwrap(); println!(" account controlled by: {:?}", controller_acc); - let era_reward_addr = polkadot::storage() - .staking() - .eras_reward_points(&era.index); - let era_result = api - .storage() - .fetch(&era_reward_addr, None) - .await?; + let era_reward_addr = polkadot::storage().staking().eras_reward_points(&era.index); + let era_result = api.storage().fetch(&era_reward_addr, None).await?; println!("Era reward points: {:?}", era_result); Ok(()) diff --git a/examples/examples/rpc_call.rs b/examples/examples/rpc_call.rs index e0590c91f1..25464b869a 100644 --- a/examples/examples/rpc_call.rs +++ b/examples/examples/rpc_call.rs @@ -23,10 +23,7 @@ async fn main() -> Result<(), Box> { let block_number = 1u32; - let block_hash = api - .rpc() - .block_hash(Some(block_number.into())) - .await?; + let block_hash = api.rpc().block_hash(Some(block_number.into())).await?; if let Some(hash) = block_hash { println!("Block hash for block number {block_number}: {hash}"); diff --git a/examples/examples/rpc_call_subscribe_blocks.rs b/examples/examples/rpc_call_subscribe_blocks.rs index 7baf533b2a..a39af4fea2 100644 --- a/examples/examples/rpc_call_subscribe_blocks.rs +++ b/examples/examples/rpc_call_subscribe_blocks.rs @@ -11,11 +11,11 @@ //! ``` use subxt::{ - rpc::Subscription, ext::sp_runtime::{ generic::Header, traits::BlakeTwo256, }, + rpc::Subscription, OnlineClient, PolkadotConfig, }; @@ -24,7 +24,8 @@ use subxt::{ async fn main() -> Result<(), Box> { tracing_subscriber::fmt::init(); - let api = OnlineClient::::from_url("wss://rpc.polkadot.io:443").await?; + let api = + OnlineClient::::from_url("wss://rpc.polkadot.io:443").await?; // For non-finalised blocks use `.subscribe_blocks()` let mut blocks: Subscription> = diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_query.rs index ea5f306147..01f1399026 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_query.rs @@ -13,11 +13,11 @@ use codec::Decode; use subxt::{ storage::{ - StorageKey, address::{ - StorageMapKey, StorageHasher, - } + StorageMapKey, + }, + StorageKey, }, OnlineClient, PolkadotConfig, @@ -54,16 +54,14 @@ async fn main() -> Result<(), Box> { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); // Fetch at most 10 keys from below the prefix XcmPallet' VersionNotifiers. - let keys = api - .storage() - .fetch_keys(&key_addr, 10, None, None) - .await?; + let keys = api.storage().fetch_keys(&key_addr, 10, None, None).await?; println!("Example 1. Obtained keys:"); for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); - if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? { + if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? + { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn @@ -78,9 +76,7 @@ async fn main() -> Result<(), Box> { { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); - let mut iter = api.storage() - .iter(key_addr, 10, None) - .await?; + let mut iter = api.storage().iter(key_addr, 10, None).await?; println!("\nExample 2. Obtained keys:"); while let Some((key, value)) = iter.next().await? { @@ -106,10 +102,7 @@ async fn main() -> Result<(), Box> { // ``` // while `XcmVersion` is `u32`. // Pass `2` as `XcmVersion` and concatenate the key to the prefix. - StorageMapKey::new( - &2u32, - StorageHasher::Twox64Concat, - ).to_bytes(&mut query_key); + StorageMapKey::new(&2u32, StorageHasher::Twox64Concat).to_bytes(&mut query_key); // The final query key is: // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(2u32) ++ 2u32` @@ -123,7 +116,8 @@ async fn main() -> Result<(), Box> { for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); - if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? { + if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? + { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index eb8c810902..c2f4698475 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -13,11 +13,9 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use subxt::{ + extrinsic::PairSigner, OnlineClient, PolkadotConfig, - extrinsic::{ - PairSigner, - } }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -43,9 +41,7 @@ async fn simple_transfer() -> Result<(), Box> { let api = OnlineClient::::new().await?; - let balance_transfer_tx = polkadot::tx() - .balances() - .transfer(dest, 10_000); + let balance_transfer_tx = polkadot::tx().balances().transfer(dest, 10_000); let balance_transfer = api .tx() @@ -74,9 +70,7 @@ async fn simple_transfer_separate_events() -> Result<(), Box::new().await?; - let balance_transfer_tx = polkadot::tx() - .balances() - .transfer(dest, 10_000); + let balance_transfer_tx = polkadot::tx().balances().transfer(dest, 10_000); let balance_transfer = api .tx() @@ -124,9 +118,7 @@ async fn handle_transfer_events() -> Result<(), Box> { let api = OnlineClient::::new().await?; - let balance_transfer_tx = polkadot::tx() - .balances() - .transfer(dest, 10_000); + let balance_transfer_tx = polkadot::tx().balances().transfer(dest, 10_000); let mut balance_transfer_progress = api .tx() diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs index ef926ad3bd..54b9560c4f 100644 --- a/examples/examples/subscribe_all_events.rs +++ b/examples/examples/subscribe_all_events.rs @@ -14,8 +14,8 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - OnlineClient, extrinsic::PairSigner, + OnlineClient, PolkadotConfig, }; @@ -45,7 +45,7 @@ async fn main() -> Result<(), Box> { loop { let transfer_tx = polkadot::tx().balances().transfer( AccountKeyring::Bob.to_account_id().into(), - transfer_amount + transfer_amount, ); api.tx() .sign_and_submit_default(&transfer_tx, &signer) diff --git a/examples/examples/subscribe_one_event.rs b/examples/examples/subscribe_one_event.rs index 8bdc625a98..93f24a05a9 100644 --- a/examples/examples/subscribe_one_event.rs +++ b/examples/examples/subscribe_one_event.rs @@ -14,8 +14,8 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - OnlineClient, extrinsic::PairSigner, + OnlineClient, PolkadotConfig, }; @@ -50,7 +50,7 @@ async fn main() -> Result<(), Box> { loop { let transfer_tx = polkadot::tx().balances().transfer( AccountKeyring::Bob.to_account_id().into(), - transfer_amount + transfer_amount, ); api.tx() .sign_and_submit_default(&transfer_tx, &signer) diff --git a/examples/examples/subscribe_some_events.rs b/examples/examples/subscribe_some_events.rs index 529a304efd..7e59854ef3 100644 --- a/examples/examples/subscribe_some_events.rs +++ b/examples/examples/subscribe_some_events.rs @@ -14,9 +14,9 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ + extrinsic::PairSigner, OnlineClient, PolkadotConfig, - extrinsic::PairSigner, }; #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] @@ -51,7 +51,7 @@ async fn main() -> Result<(), Box> { loop { let transfer_tx = polkadot::tx().balances().transfer( AccountKeyring::Bob.to_account_id().into(), - transfer_amount + transfer_amount, ); api.tx() .sign_and_submit_default(&transfer_tx, &signer) diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index 5037289fad..f62c47bde9 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -3,16 +3,16 @@ // see LICENSE for license details. use crate::{ - Config, - Metadata, - rpc::RuntimeVersion, constants::ConstantsClient, - extrinsic::TxClient, events::EventsClient, + extrinsic::TxClient, + rpc::RuntimeVersion, storage::StorageClient, + Config, + Metadata, }; -use std::sync::Arc; use derivative::Derivative; +use std::sync::Arc; /// A trait representing a client that can perform /// offline-only actions. @@ -50,7 +50,7 @@ pub trait OfflineClientT: Clone + Send + Sync + 'static { #[derive(Derivative)] #[derivative(Debug(bound = ""), Clone(bound = ""))] pub struct OfflineClient { - inner: Arc> + inner: Arc>, } #[derive(Derivative)] @@ -61,7 +61,7 @@ struct Inner { metadata: Metadata, } -impl OfflineClient { +impl OfflineClient { /// Construct a new [`OfflineClient`], providing /// the necessary runtime and compile-time arguments. pub fn new( @@ -74,7 +74,7 @@ impl OfflineClient { genesis_hash, runtime_version, metadata, - }) + }), } } @@ -117,7 +117,7 @@ impl OfflineClient { } } -impl OfflineClientT for OfflineClient { +impl OfflineClientT for OfflineClient { fn genesis_hash(&self) -> T::Hash { self.genesis_hash() } @@ -133,8 +133,8 @@ impl OfflineClientT for OfflineClient { // so this allows users to pass references to a client rather than explicitly // cloning. This is partly for consistency with OnlineClient, which can be // easily converted into an OfflineClient for ergonomics. -impl <'a, T: Config> From<&'a OfflineClient> for OfflineClient { +impl<'a, T: Config> From<&'a OfflineClient> for OfflineClient { fn from(c: &'a OfflineClient) -> Self { c.clone() } -} \ No newline at end of file +} diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 2056c18d48..45c2e32437 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -2,30 +2,28 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use std::sync::Arc; -use parking_lot::RwLock; use super::{ OfflineClient, OfflineClientT, }; -use futures::future; use crate::{ - Config, + constants::ConstantsClient, + error::BasicError, + events::EventsClient, + extrinsic::TxClient, rpc::{ Rpc, RpcClient, - RuntimeVersion + RuntimeVersion, }, - error::{ - BasicError, - }, - Metadata, - constants::ConstantsClient, - extrinsic::TxClient, - events::EventsClient, storage::StorageClient, + Config, + Metadata, }; use derivative::Derivative; +use futures::future; +use parking_lot::RwLock; +use std::sync::Arc; /// A trait representing a client that can perform /// online actions. @@ -59,7 +57,7 @@ impl std::fmt::Debug for OnlineClient { } } -impl OnlineClient { +impl OnlineClient { /// Construct a new [`OnlineClient`] using default settings which /// point to a locally running node on `ws://127.0.0.1:9944`. pub async fn new() -> Result, BasicError> { @@ -75,13 +73,15 @@ impl OnlineClient { /// Construct a new [`OnlineClient`] by providing the underlying [`RpcClient`] /// to use to drive the connection. - pub async fn from_rpc_client(rpc_client: impl Into) -> Result, BasicError> { + pub async fn from_rpc_client( + rpc_client: impl Into, + ) -> Result, BasicError> { let rpc = Rpc::new(rpc_client.into()); let (genesis_hash, runtime_version, metadata) = future::join3( rpc.genesis_hash(), rpc.runtime_version(None), - rpc.metadata() + rpc.metadata(), ) .await; @@ -91,7 +91,7 @@ impl OnlineClient { runtime_version: runtime_version?, metadata: metadata?, })), - rpc + rpc, }) } @@ -146,7 +146,7 @@ impl OnlineClient { OfflineClient::new( inner.genesis_hash.clone(), inner.runtime_version.clone(), - inner.metadata.clone() + inner.metadata.clone(), ) } @@ -174,7 +174,7 @@ impl OnlineClient { } } -impl OfflineClientT for OnlineClient { +impl OfflineClientT for OnlineClient { fn metadata(&self) -> Metadata { self.metadata() } @@ -186,7 +186,7 @@ impl OfflineClientT for OnlineClient { } } -impl OnlineClientT for OnlineClient { +impl OnlineClientT for OnlineClient { fn rpc(&self) -> &Rpc { &self.rpc } @@ -216,7 +216,7 @@ impl ClientRuntimeUpdater { // Ignore this update if there is no difference. if !self.is_runtime_version_different(&new_runtime_version) { - continue; + continue } // Fetch new metadata. @@ -230,4 +230,4 @@ impl ClientRuntimeUpdater { Ok(()) } -} \ No newline at end of file +} diff --git a/subxt/src/config.rs b/subxt/src/config.rs index 887dd64941..3edb2ff8e6 100644 --- a/subxt/src/config.rs +++ b/subxt/src/config.rs @@ -108,7 +108,10 @@ impl Config for SubstrateConfig { } /// Default set of commonly used types by Polkadot nodes. -pub type PolkadotConfig = WithExtrinsicParams>; +pub type PolkadotConfig = WithExtrinsicParams< + SubstrateConfig, + crate::extrinsic::PolkadotExtrinsicParams, +>; /// Take a type implementing [`Config`] (eg [`SubstrateConfig`]), and some type which describes the /// additional and extra parameters to pass to an extrinsic (see [`crate::extrinsic::ExtrinsicParams`]), @@ -123,11 +126,16 @@ pub type PolkadotConfig = WithExtrinsicParams>; /// ``` -pub struct WithExtrinsicParams> { - _marker: std::marker::PhantomData<(T, E)> +pub struct WithExtrinsicParams< + T: Config, + E: crate::extrinsic::ExtrinsicParams, +> { + _marker: std::marker::PhantomData<(T, E)>, } -impl > Config for WithExtrinsicParams { +impl> Config + for WithExtrinsicParams +{ type Index = T::Index; type BlockNumber = T::BlockNumber; type Hash = T::Hash; diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index cd0621c68f..c2f1cbd75f 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -9,18 +9,22 @@ pub struct ConstantAddress<'a, ReturnTy> { pallet_name: &'a str, constant_name: &'a str, constant_hash: Option<[u8; 32]>, - _marker: std::marker::PhantomData + _marker: std::marker::PhantomData, } -impl <'a, ReturnTy> ConstantAddress<'a, ReturnTy> { +impl<'a, ReturnTy> ConstantAddress<'a, ReturnTy> { /// Create a new [`ConstantAddress`] that will be validated /// against node metadata using the hash given. - pub fn new_with_validation(pallet_name: &'a str, constant_name: &'a str, hash: [u8; 32]) -> Self { + pub fn new_with_validation( + pallet_name: &'a str, + constant_name: &'a str, + hash: [u8; 32], + ) -> Self { Self { pallet_name, constant_name, constant_hash: Some(hash), - _marker: std::marker::PhantomData + _marker: std::marker::PhantomData, } } @@ -30,7 +34,7 @@ impl <'a, ReturnTy> ConstantAddress<'a, ReturnTy> { pallet_name: self.pallet_name, constant_name: self.constant_name, constant_hash: None, - _marker: self._marker + _marker: self._marker, } } @@ -48,4 +52,4 @@ impl <'a, ReturnTy> ConstantAddress<'a, ReturnTy> { pub(super) fn validation_hash(&self) -> Option<[u8; 32]> { self.constant_hash } -} \ No newline at end of file +} diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index 085eb2ec69..df03d3a56f 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -4,13 +4,13 @@ use super::ConstantAddress; use crate::{ - Config, client::OfflineClientT, error::BasicError, metadata::{ - MetadataError, DecodeWithMetadata, + MetadataError, }, + Config, }; use derivative::Derivative; @@ -22,23 +22,32 @@ pub struct ConstantsClient { _marker: std::marker::PhantomData, } -impl ConstantsClient { +impl ConstantsClient { /// Create a new [`ConstantsClient`]. pub fn new(client: Client) -> Self { - Self { client, _marker: std::marker::PhantomData } + Self { + client, + _marker: std::marker::PhantomData, + } } } -impl > ConstantsClient { +impl> ConstantsClient { /// Run the validation logic against some constant address you'd like to access. Returns `Ok(())` /// if the address is valid (or if it's not possible to check since the address has no validation hash). /// Return an error if the address was not valid or something went wrong trying to validate it (ie /// the pallet or constant in question do not exist at all). - pub fn validate(&self, address: &ConstantAddress<'_, ReturnTy>) -> Result<(), BasicError> { + pub fn validate( + &self, + address: &ConstantAddress<'_, ReturnTy>, + ) -> Result<(), BasicError> { if let Some(actual_hash) = address.validation_hash() { - let expected_hash = self.client.metadata().constant_hash(address.pallet_name(), address.constant_name())?; + let expected_hash = self + .client + .metadata() + .constant_hash(address.pallet_name(), address.constant_name())?; if actual_hash != expected_hash { - return Err(MetadataError::IncompatibleMetadata.into()); + return Err(MetadataError::IncompatibleMetadata.into()) } } Ok(()) @@ -47,7 +56,10 @@ impl > ConstantsClient { /// Access the constant at the address given, returning the type defined by this address. /// This is probably used with addresses given from static codegen, although you can manually /// construct your own, too. - pub fn at(&self, address: &ConstantAddress<'_, ReturnTy>) -> Result { + pub fn at( + &self, + address: &ConstantAddress<'_, ReturnTy>, + ) -> Result { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: @@ -56,7 +68,11 @@ impl > ConstantsClient { // 2. Attempt to decode the constant into the type given: let pallet = metadata.pallet(address.pallet_name())?; let constant = pallet.constant(address.constant_name())?; - let value = ReturnTy::decode_with_metadata(&mut &*constant.value, constant.ty.id(), &metadata)?; + let value = ReturnTy::decode_with_metadata( + &mut &*constant.value, + constant.ty.id(), + &metadata, + )?; Ok(value) } } diff --git a/subxt/src/constants/mod.rs b/subxt/src/constants/mod.rs index a0f06e9ed6..96daf8dd5d 100644 --- a/subxt/src/constants/mod.rs +++ b/subxt/src/constants/mod.rs @@ -4,12 +4,8 @@ //! Types associated with accessing constants. -mod constants_client; mod constant_address; +mod constants_client; -pub use constants_client::{ - ConstantsClient, -}; -pub use constant_address::{ - ConstantAddress, -}; \ No newline at end of file +pub use constant_address::ConstantAddress; +pub use constants_client::ConstantsClient; diff --git a/subxt/src/error.rs b/subxt/src/error.rs index c4946551c1..419cbf371f 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -7,8 +7,10 @@ use core::fmt::Debug; // Re-expose the errors we use from other crates here: -pub use crate::metadata::MetadataError; -pub use crate::metadata::InvalidMetadataError; +pub use crate::metadata::{ + InvalidMetadataError, + MetadataError, +}; pub use jsonrpsee::core::error::Error as RequestError; pub use scale_value::scale::DecodeError; pub use sp_core::crypto::SecretStringError; diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 974b53a9ba..53976cae8a 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -5,12 +5,10 @@ //! Subscribing to events. use crate::{ + client::OnlineClientT, error::BasicError, - Config, - client::{ - OnlineClientT, - }, events::EventsClient, + Config, }; use derivative::Derivative; use futures::{ @@ -28,10 +26,10 @@ use std::{ }; pub use super::{ + EventDetails, EventFilter, Events, FilterEvents, - EventDetails, }; /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back @@ -53,14 +51,11 @@ pub struct EventSubscription { block_header_subscription: Sub, #[derivative(Debug = "ignore")] at: Option< - std::pin::Pin< - Box, BasicError>> + Send>, - >, + std::pin::Pin, BasicError>> + Send>>, >, } -impl> - EventSubscription +impl> EventSubscription where Sub: Stream> + Unpin, { @@ -69,7 +64,7 @@ where pub fn new(client: Client, block_header_subscription: Sub) -> Self { EventSubscription { finished: false, - client: client, + client, block_header_subscription, at: None, } @@ -111,15 +106,14 @@ where /// } /// # } /// ``` - pub fn filter_events(self) -> FilterEvents<'static, Self, T, Filter> { + pub fn filter_events( + self, + ) -> FilterEvents<'static, Self, T, Filter> { FilterEvents::new(self) } } -impl<'a, T: Config, Client, Sub: Unpin> Unpin - for EventSubscription -{ -} +impl<'a, T: Config, Client, Sub: Unpin> Unpin for EventSubscription {} // We want `EventSubscription` to implement Stream. The below implementation is the rather verbose // way to roughly implement the following function: @@ -171,7 +165,8 @@ where Some(Ok(block_header)) => { // Note [jsdw]: We may be able to get rid of the per-item allocation // with https://github.com/oblique/reusable-box-future. - let at = EventsClient::new(self.client.clone()).at(block_header.hash()); + let at = + EventsClient::new(self.client.clone()).at(block_header.hash()); self.at = Some(Box::pin(at)); // Continue, so that we poll this function future we've just created. } diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index ffb41ec211..6102718838 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -2,57 +2,53 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +use crate::{ + client::OnlineClientT, + error::BasicError, + events::{ + EventSub, + EventSubscription, + Events, + FinalizedEventSub, + }, + Config, +}; +use derivative::Derivative; use futures::{ future::Either, stream, Stream, StreamExt, }; -use sp_runtime::traits::Header; use sp_core::{ storage::StorageKey, twox_128, }; +use sp_runtime::traits::Header; use std::future::Future; -use crate::{ - client::{ - OnlineClientT - }, - error::{ - BasicError, - }, - Config, -}; -use crate::events::{ - EventSubscription, - Events, - EventSub, - FinalizedEventSub, -}; -use derivative::Derivative; /// A client for working with events. #[derive(Derivative)] #[derivative(Clone(bound = "Client: Clone"))] pub struct EventsClient { client: Client, - _marker: std::marker::PhantomData + _marker: std::marker::PhantomData, } -impl EventsClient { +impl EventsClient { /// Create a new [`EventsClient`]. pub fn new(client: Client) -> Self { Self { client, - _marker: std::marker::PhantomData + _marker: std::marker::PhantomData, } } } -impl EventsClient +impl EventsClient where T: Config, - Client: OnlineClientT + Client: OnlineClientT, { /// Obtain events at some block hash. pub fn at( @@ -62,9 +58,7 @@ where // Clone and pass the client in like this so that we can explicitly // return a Future that's Send + 'static, rather than tied to &self. let client = self.client.clone(); - async move { - at(client, block_hash).await - } + async move { at(client, block_hash).await } } /// Subscribe to all events from blocks. @@ -98,26 +92,30 @@ where /// # } /// ``` pub fn subscribe( - &self - ) -> impl Future>, BasicError>> + Send + 'static - { + &self, + ) -> impl Future< + Output = Result>, BasicError>, + > + Send + + 'static { let client = self.client.clone(); - async move { - subscribe(client).await - } + async move { subscribe(client).await } } /// Subscribe to events from finalized blocks. pub fn subscribe_finalized( &self, - ) -> impl Future>, BasicError>> + Send + 'static + ) -> impl Future< + Output = Result< + EventSubscription>, + BasicError, + >, + > + Send + + 'static where Client: Send + Sync + 'static, { let client = self.client.clone(); - async move { - subscribe_finalized(client).await - } + async move { subscribe_finalized(client).await } } } @@ -136,15 +134,11 @@ where .map(|e| e.0) .unwrap_or_else(Vec::new); - Ok(Events::new( - client.metadata(), - block_hash, - event_bytes, - )) + Ok(Events::new(client.metadata(), block_hash, event_bytes)) } async fn subscribe( - client: Client + client: Client, ) -> Result>, BasicError> where T: Config, @@ -239,4 +233,4 @@ fn system_events_key() -> StorageKey { let mut storage_key = twox_128(b"System").to_vec(); storage_key.extend(twox_128(b"Events").to_vec()); StorageKey(storage_key) -} \ No newline at end of file +} diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index a983926c53..fd7b7a114b 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -4,6 +4,10 @@ //! A representation of a block of events. +use super::{ + Phase, + StaticEvent, +}; use crate::{ error::BasicError, Config, @@ -16,10 +20,6 @@ use codec::{ Input, }; use derivative::Derivative; -use super::{ - Phase, - StaticEvent -}; /// A collection of events obtained from a block, bundled with the necessary /// information needed to decode and iterate over them. @@ -36,10 +36,10 @@ pub struct Events { } impl<'a, T: Config> Events { - pub (crate) fn new( + pub(crate) fn new( metadata: Metadata, block_hash: T::Hash, - mut event_bytes: Vec + mut event_bytes: Vec, ) -> Self { // event_bytes is a SCALE encoded vector of events. So, pluck the // compact encoded length from the front, leaving the remaining bytes @@ -80,9 +80,7 @@ impl<'a, T: Config> Events { /// Iterate over all of the events, using metadata to dynamically /// decode them as we go, and returning the raw bytes and other associated /// details. If an error occurs, all subsequent iterations return `None`. - pub fn iter( - &self, - ) -> impl Iterator> + '_ { + pub fn iter(&self) -> impl Iterator> + '_ { let event_bytes = &self.event_bytes; let metadata = self.metadata.clone(); @@ -162,7 +160,9 @@ impl<'a, T: Config> Events { /// /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to /// use even if you do not statically know about all of the possible events. - pub fn find(&self) -> impl Iterator> + '_ { + pub fn find( + &self, + ) -> impl Iterator> + '_ { self.iter().filter_map(|ev| { ev.and_then(|ev| ev.as_event::().map_err(Into::into)) .transpose() diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index 35e61a2efd..a3371851be 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -4,15 +4,15 @@ //! Filtering individual events from subscriptions. -use super::Events; +use super::{ + Events, + Phase, + StaticEvent, +}; use crate::{ BasicError, Config, }; -use super::{ - StaticEvent, - Phase -}; use futures::{ Stream, StreamExt, @@ -237,8 +237,8 @@ mod test { }; use crate::{ Config, - SubstrateConfig, Metadata, + SubstrateConfig, }; use codec::{ Decode, @@ -286,8 +286,7 @@ mod test { // A stream of fake events for us to try filtering on. fn events_stream( metadata: Metadata, - ) -> impl Stream, BasicError>> - { + ) -> impl Stream, BasicError>> { stream::iter(vec![ events::( metadata.clone(), diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index b5d0285fd7..5460367ee1 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -7,32 +7,35 @@ //! and calls like [crate::extrinsic::TransactionProgress::wait_for_finalized_success()]. mod event_subscription; +mod events_client; mod events_type; mod filter_events; -mod events_client; pub use event_subscription::{ EventSub, EventSubscription, FinalizedEventSub, }; +pub use events_client::{ + // Exposed only for testing: + subscribe_to_block_headers_filling_in_gaps, + EventsClient, +}; pub use events_type::{ DecodedValue, - Events, EventDetails, + Events, }; pub use filter_events::{ EventFilter, FilterEvents, FilteredEventDetails, }; -pub use events_client::{ - EventsClient, - // Exposed only for testing: - subscribe_to_block_headers_filling_in_gaps, -}; -use codec::{ Encode, Decode }; +use codec::{ + Decode, + Encode, +}; /// Trait to uniquely identify the events's identity from the runtime metadata. /// @@ -61,4 +64,4 @@ pub enum Phase { Finalization, /// Initializing the block. Initialization, -} \ No newline at end of file +} diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/extrinsic/mod.rs index 3d13f4a149..74549c5001 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/extrinsic/mod.rs @@ -50,5 +50,5 @@ pub use self::{ SignedSubmittableExtrinsic, SubmittableExtrinsic, TxClient, - } + }, }; diff --git a/subxt/src/extrinsic/params.rs b/subxt/src/extrinsic/params.rs index 598fd15cc4..50b69286b6 100644 --- a/subxt/src/extrinsic/params.rs +++ b/subxt/src/extrinsic/params.rs @@ -2,15 +2,15 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +use crate::{ + utils::Encoded, + Config, +}; use codec::{ Compact, Encode, }; use core::fmt::Debug; -use crate::{ - Config, - utils::Encoded, -}; use derivative::Derivative; // We require Era as a param below, so make it available from here. @@ -133,7 +133,9 @@ impl Default for BaseExtrinsicParamsBuilder { } } -impl ExtrinsicParams for BaseExtrinsicParams { +impl ExtrinsicParams + for BaseExtrinsicParams +{ type OtherParams = BaseExtrinsicParamsBuilder; fn new( diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index e5c4f85084..6af41832c1 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -6,12 +6,8 @@ use std::task::Poll; -use codec::Decode; -use sp_runtime::traits::Hash; use crate::{ - client::{ - OnlineClientT, - }, + client::OnlineClientT, error::{ BasicError, Error, @@ -22,8 +18,8 @@ use crate::{ }, events::{ self, - Events, EventDetails, + Events, EventsClient, Phase, StaticEvent, @@ -32,6 +28,7 @@ use crate::{ utils::PhantomDataSendSync, Config, }; +use codec::Decode; use derivative::Derivative; use futures::{ Stream, @@ -41,6 +38,7 @@ use jsonrpsee::core::{ client::Subscription as RpcSubscription, Error as RpcError, }; +use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; @@ -336,11 +334,7 @@ pub struct TransactionInBlock { impl, Err: Decode + HasModuleError> TransactionInBlock { - pub(crate) fn new( - block_hash: T::Hash, - ext_hash: T::Hash, - client: C, - ) -> Self { + pub(crate) fn new(block_hash: T::Hash, ext_hash: T::Hash, client: C) -> Self { Self { block_hash, ext_hash, @@ -466,9 +460,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::iter()`] does, with the /// exception that it filters out events not related to the submitted extrinsic. - pub fn iter( - &self, - ) -> impl Iterator> + '_ { + pub fn iter(&self) -> impl Iterator> + '_ { self.events.iter().filter(|ev| { ev.as_ref() .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/extrinsic/tx_client.rs index 2f3aab09df..4e3fc47b8c 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/extrinsic/tx_client.rs @@ -2,12 +2,7 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use sp_runtime::{ - traits::Hash, - ApplyExtrinsicResult, -}; use crate::{ - Config, client::{ OfflineClientT, OnlineClientT, @@ -19,6 +14,7 @@ use crate::{ extrinsic::{ ExtrinsicParams, Signer, + TransactionProgress, }, metadata::{ EncodeWithMetadata, @@ -27,17 +23,19 @@ use crate::{ utils::{ Encoded, PhantomDataSendSync, - } + }, + Config, }; use codec::{ Compact, Decode, Encode, }; -use crate::extrinsic::{ - TransactionProgress, -}; use derivative::Derivative; +use sp_runtime::{ + traits::Hash, + ApplyExtrinsicResult, +}; /// A client for working with transactions. #[derive(Derivative)] @@ -47,28 +45,32 @@ pub struct TxClient { _marker: PhantomDataSendSync, } -impl TxClient { +impl TxClient { /// Create a new [`TxClient`] pub fn new(client: Client) -> Self { Self { client, - _marker: PhantomDataSendSync::new() + _marker: PhantomDataSendSync::new(), } } } -impl > TxClient { +impl> TxClient { /// Run the validation logic against some extrinsic you'd like to submit. Returns `Ok(())` /// if the call is valid (or if it's not possible to check since the call has no validation hash). /// Return an error if the call was not valid or something went wrong trying to validate it (ie /// the pallet or call in question do not exist at all). - pub fn validate(&self, call: &SubmittableExtrinsic) -> Result<(), BasicError> + pub fn validate( + &self, + call: &SubmittableExtrinsic, + ) -> Result<(), BasicError> where Call: MetadataLocation, { if let Some(actual_hash) = call.call_hash { let metadata = self.client.metadata(); - let expected_hash = metadata.call_hash(call.call_data.pallet(), call.call_data.item())?; + let expected_hash = + metadata.call_hash(call.call_data.pallet(), call.call_data.item())?; if actual_hash != expected_hash { return Err(crate::metadata::MetadataError::IncompatibleMetadata.into()) } @@ -175,8 +177,7 @@ impl > TxClient { } } -impl > TxClient { - +impl> TxClient { /// Creates a returns a raw signed extrinsic, without submitting it. pub async fn create_signed( &self, @@ -198,7 +199,8 @@ impl > TxClient { .await? }; - self.create_signed_with_nonce(call, signer, account_nonce, other_params).await + self.create_signed_with_nonce(call, signer, account_nonce, other_params) + .await } /// Creates and signs an extrinsic and submits it to the chain. Passes default parameters @@ -301,28 +303,23 @@ pub struct SubmittableExtrinsic { marker: std::marker::PhantomData, } -impl SubmittableExtrinsic { +impl SubmittableExtrinsic { /// Create a new [`SubmittableExtrinsic`] that will not be validated /// against node metadata. - pub fn new_unvalidated( - call_data: Call - ) -> Self { + pub fn new_unvalidated(call_data: Call) -> Self { Self { call_data, call_hash: None, - marker: std::marker::PhantomData + marker: std::marker::PhantomData, } } /// Create a new [`SubmittableExtrinsic`] that will be validated /// against node metadata. - pub fn new_with_validation( - call_data: Call, - hash: [u8; 32] - ) -> Self { + pub fn new_with_validation(call_data: Call, hash: [u8; 32]) -> Self { Self { call_data, call_hash: Some(hash), - marker: std::marker::PhantomData + marker: std::marker::PhantomData, } } /// Do not validate this call prior to submitting it. @@ -330,13 +327,19 @@ impl SubmittableExtrinsic { Self { call_data: self.call_data, call_hash: None, - marker: self.marker + marker: self.marker, } } } -impl EncodeWithMetadata for SubmittableExtrinsic { - fn encode_to_with_metadata(&self, metadata: &crate::Metadata, out: &mut Vec) -> Result<(), BasicError> { +impl EncodeWithMetadata + for SubmittableExtrinsic +{ + fn encode_to_with_metadata( + &self, + metadata: &crate::Metadata, + out: &mut Vec, + ) -> Result<(), BasicError> { self.call_data.encode_to_with_metadata(metadata, out) } } @@ -396,4 +399,4 @@ where pub fn encoded(&self) -> &[u8] { &self.encoded.0 } -} \ No newline at end of file +} diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 051516d3c8..c5f09f92f4 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -124,10 +124,10 @@ pub use subxt_macro::subxt; pub mod client; pub mod config; +pub mod constants; pub mod error; pub mod events; pub mod extrinsic; -pub mod constants; pub mod metadata; pub mod rpc; pub mod storage; @@ -142,24 +142,22 @@ pub use crate::{ }, config::{ Config, - SubstrateConfig, PolkadotConfig, + SubstrateConfig, }, error::{ BasicError, Error, }, - metadata::{ - Metadata, - }, + metadata::Metadata, }; /// Re-export external crates that are made use of in the subxt API. pub mod ext { pub use bitvec; pub use codec; - pub use sp_core; - pub use sp_runtime; pub use frame_metadata; pub use scale_value; + pub use sp_core; + pub use sp_runtime; } diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs index 749c9a645a..f4f3528ac2 100644 --- a/subxt/src/metadata/decode_with_metadata.rs +++ b/subxt/src/metadata/decode_with_metadata.rs @@ -2,12 +2,8 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use super::{ - Metadata, -}; -use crate::{ - error::BasicError, -}; +use super::Metadata; +use crate::error::BasicError; use codec::Decode; /// This trait is implemented for types which can be decoded with the help of metadata. @@ -15,13 +11,21 @@ pub trait DecodeWithMetadata: Sized { /// The type that we'll get back from decoding. type Target; /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. - fn decode_with_metadata(bytes: &mut &[u8], type_id: u32, metadata: &Metadata) -> Result; + fn decode_with_metadata( + bytes: &mut &[u8], + type_id: u32, + metadata: &Metadata, + ) -> Result; } // Things can be dynamically decoded to our Value type: impl DecodeWithMetadata for scale_value::Value { type Target = Self; - fn decode_with_metadata(bytes: &mut &[u8], type_id: u32, metadata: &Metadata) -> Result { + fn decode_with_metadata( + bytes: &mut &[u8], + type_id: u32, + metadata: &Metadata, + ) -> Result { let res = scale_value::scale::decode_as_type(bytes, type_id, metadata.types())?; Ok(res) } @@ -30,10 +34,14 @@ impl DecodeWithMetadata for scale_value::Value { /// Any type implementing [`Decode`] can also be decoded with the help of metadata. pub struct DecodeStaticType(std::marker::PhantomData); -impl DecodeWithMetadata for DecodeStaticType { +impl DecodeWithMetadata for DecodeStaticType { type Target = T; - fn decode_with_metadata(bytes: &mut &[u8], _type_id: u32, _metadata: &Metadata) -> Result { + fn decode_with_metadata( + bytes: &mut &[u8], + _type_id: u32, + _metadata: &Metadata, + ) -> Result { T::decode(bytes).map_err(|e| e.into()) } } diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs index 1f2c4ad3d4..f919769e88 100644 --- a/subxt/src/metadata/encode_with_metadata.rs +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -7,18 +7,18 @@ use super::{ MetadataError, MetadataLocation, }; -use crate::{ - error::BasicError, -}; -use codec::{ - Encode, -}; +use crate::error::BasicError; +use codec::Encode; use std::borrow::Cow; /// This trait represents any type that can be encoded to bytes with the support of [`Metadata`]. pub trait EncodeWithMetadata { /// Given some metadata, attempt to SCALE encode `Self` to the provided bytes. - fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError>; + fn encode_to_with_metadata( + &self, + metadata: &Metadata, + out: &mut Vec, + ) -> Result<(), BasicError>; /// Given some metadata, attempt to SCALE encode `Self` and return the resulting bytes. fn encode_with_metadata(&self, metadata: &Metadata) -> Result, BasicError> { @@ -38,8 +38,12 @@ pub struct EncodeStaticCall { pub data: T, } -impl EncodeWithMetadata for EncodeStaticCall { - fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError> { +impl EncodeWithMetadata for EncodeStaticCall { + fn encode_to_with_metadata( + &self, + metadata: &Metadata, + out: &mut Vec, + ) -> Result<(), BasicError> { let pallet = metadata.pallet(self.pallet)?; let pallet_index = pallet.index(); let call_index = pallet.call_index(self.call)?; @@ -51,7 +55,7 @@ impl EncodeWithMetadata for EncodeStaticCall { } } -impl MetadataLocation for EncodeStaticCall { +impl MetadataLocation for EncodeStaticCall { fn pallet(&self) -> &str { self.pallet } @@ -67,22 +71,22 @@ pub struct EncodeDynamicCall<'a> { data: Vec, } -impl <'a> EncodeDynamicCall<'a> { +impl<'a> EncodeDynamicCall<'a> { /// Construct a new [`EncodeDynamicCall`], which can be SCALE encoded to call data. pub fn new( pallet: impl Into>, call: impl Into>, - data: Vec + data: Vec, ) -> Self { Self { pallet: pallet.into(), call: call.into(), - data + data, } } } -impl <'a> MetadataLocation for EncodeDynamicCall<'a> { +impl<'a> MetadataLocation for EncodeDynamicCall<'a> { fn pallet(&self) -> &str { self.pallet.as_ref() } @@ -91,8 +95,12 @@ impl <'a> MetadataLocation for EncodeDynamicCall<'a> { } } -impl <'a> EncodeWithMetadata for EncodeDynamicCall<'a> { - fn encode_to_with_metadata(&self, metadata: &Metadata, out: &mut Vec) -> Result<(), BasicError> { +impl<'a> EncodeWithMetadata for EncodeDynamicCall<'a> { + fn encode_to_with_metadata( + &self, + metadata: &Metadata, + out: &mut Vec, + ) -> Result<(), BasicError> { let pallet = metadata.pallet(&self.pallet)?; let pallet_index = pallet.index(); let call_ty = pallet diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index a28b18d97f..cf23f965fa 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -15,9 +15,9 @@ use frame_metadata::{ use parking_lot::RwLock; use scale_info::{ form::PortableForm, + PortableRegistry, Type, Variant, - PortableRegistry, }; use std::{ collections::HashMap, @@ -152,17 +152,17 @@ impl Metadata { self.inner .cached_storage_hashes .get_or_insert(pallet, storage, || { - subxt_metadata::get_storage_hash( - &self.inner.metadata, - pallet, - storage, - ) - .map_err(|e| { - match e { - subxt_metadata::NotFound::Pallet => MetadataError::PalletNotFound, - subxt_metadata::NotFound::Item => MetadataError::StorageNotFound, - } - }) + subxt_metadata::get_storage_hash(&self.inner.metadata, pallet, storage) + .map_err(|e| { + match e { + subxt_metadata::NotFound::Pallet => { + MetadataError::PalletNotFound + } + subxt_metadata::NotFound::Item => { + MetadataError::StorageNotFound + } + } + }) }) } @@ -198,17 +198,15 @@ impl Metadata { self.inner .cached_call_hashes .get_or_insert(pallet, function, || { - subxt_metadata::get_call_hash( - &self.inner.metadata, - pallet, - function, - ) - .map_err(|e| { - match e { - subxt_metadata::NotFound::Pallet => MetadataError::PalletNotFound, - subxt_metadata::NotFound::Item => MetadataError::CallNotFound, - } - }) + subxt_metadata::get_call_hash(&self.inner.metadata, pallet, function) + .map_err(|e| { + match e { + subxt_metadata::NotFound::Pallet => { + MetadataError::PalletNotFound + } + subxt_metadata::NotFound::Item => MetadataError::CallNotFound, + } + }) }) } @@ -258,8 +256,7 @@ impl PalletMetadata { /// Attempt to resolve a call into an index in this pallet, failing /// if the call is not found in this pallet. - pub fn call_index(&self, function: &str) -> Result - { + pub fn call_index(&self, function: &str) -> Result { let fn_index = *self .call_indexes .get(function) @@ -388,15 +385,16 @@ impl TryFrom for Metadata { .map(|pallet| { let call_ty_id = pallet.calls.as_ref().map(|c| c.ty.id()); - let call_indexes = pallet.calls.as_ref().map_or(Ok(HashMap::new()), |call| { - let type_def_variant = get_type_def_variant(call.ty.id())?; - let call_indexes = type_def_variant - .variants() - .iter() - .map(|v| (v.name().clone(), v.index())) - .collect(); - Ok(call_indexes) - })?; + let call_indexes = + pallet.calls.as_ref().map_or(Ok(HashMap::new()), |call| { + let type_def_variant = get_type_def_variant(call.ty.id())?; + let call_indexes = type_def_variant + .variants() + .iter() + .map(|v| (v.name().clone(), v.index())) + .collect(); + Ok(call_indexes) + })?; let storage = pallet.storage.as_ref().map_or(HashMap::new(), |storage| { storage diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index f7b3701a5c..61685b6127 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -4,15 +4,13 @@ //! Types representing the metadata obtained from a node. -mod encode_with_metadata; mod decode_with_metadata; -mod metadata_location; +mod encode_with_metadata; mod hash_cache; +mod metadata_location; mod metadata_type; -pub use metadata_location::{ - MetadataLocation, -}; +pub use metadata_location::MetadataLocation; pub use metadata_type::{ ErrorMetadata, @@ -24,12 +22,12 @@ pub use metadata_type::{ }; pub use encode_with_metadata::{ - EncodeStaticCall, EncodeDynamicCall, + EncodeStaticCall, EncodeWithMetadata, }; pub use decode_with_metadata::{ - DecodeWithMetadata, DecodeStaticType, -}; \ No newline at end of file + DecodeWithMetadata, +}; diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index 4618569c3a..9b99513ac1 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -51,9 +51,9 @@ use std::{ use crate::{ error::BasicError, + utils::PhantomDataSendSync, Config, Metadata, - utils::PhantomDataSendSync, }; use codec::{ Decode, diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index ad3f4f817b..f3249d8766 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -4,12 +4,12 @@ //! Types associated with accessing and working with storage items. -mod storage_client; mod storage_address; +mod storage_client; pub use storage_client::{ - StorageClient, KeyIter, + StorageClient, }; // Re-export as this is used in the public API: @@ -19,10 +19,10 @@ pub use sp_core::storage::StorageKey; /// entry lives and how to properly decode it. pub mod address { pub use super::storage_address::{ - StorageAddress, - StorageMapKey, - StorageHasher, AddressHasDefaultValue, AddressIsIterable, + StorageAddress, + StorageHasher, + StorageMapKey, }; } diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index bf2491f065..a302fded98 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -2,16 +2,10 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use codec::{ - Encode, -}; -use sp_core::storage::{ - StorageKey, -}; +use codec::Encode; +use sp_core::storage::StorageKey; pub use sp_runtime::traits::SignedExtension; -use std::{ - borrow::Cow, -}; +use std::borrow::Cow; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; @@ -19,31 +13,33 @@ pub use frame_metadata::StorageHasher; /// This is returned from storage accesses in the statically generated /// code, and contains the information needed to find, validate and decode /// the storage entry. -pub struct StorageAddress <'a, ReturnTy, Iterable, Defaultable> { +pub struct StorageAddress<'a, ReturnTy, Iterable, Defaultable> { pallet_name: Cow<'a, str>, entry_name: Cow<'a, str>, // How to access the specific value at that storage address. storage_entry_key: Vec, // Hash provided from static code for validation. validation_hash: Option<[u8; 32]>, - _marker: std::marker::PhantomData<(ReturnTy, Iterable, Defaultable)> + _marker: std::marker::PhantomData<(ReturnTy, Iterable, Defaultable)>, } -impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable, Defaultable> { +impl<'a, ReturnTy, Iterable, Defaultable> + StorageAddress<'a, ReturnTy, Iterable, Defaultable> +{ /// Create a new [`StorageAddress`] that will be validated /// against node metadata using the hash given. pub fn new_with_validation( pallet_name: impl Into>, storage_name: impl Into>, storage_entry_key: Vec, - hash: [u8; 32] + hash: [u8; 32], ) -> Self { Self { pallet_name: pallet_name.into(), entry_name: storage_name.into(), storage_entry_key: storage_entry_key.into(), validation_hash: Some(hash), - _marker: std::marker::PhantomData + _marker: std::marker::PhantomData, } } @@ -54,7 +50,7 @@ impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable entry_name: self.entry_name, storage_entry_key: self.storage_entry_key, validation_hash: None, - _marker: self._marker + _marker: self._marker, } } @@ -91,7 +87,7 @@ impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable entry_name: Cow::Owned(self.entry_name.into_owned()), storage_entry_key: self.storage_entry_key, validation_hash: self.validation_hash, - _marker: self._marker + _marker: self._marker, } } @@ -111,7 +107,9 @@ impl <'a, ReturnTy, Iterable, Defaultable> StorageAddress<'a, ReturnTy, Iterable } } -impl <'a, ReturnTy, Iterable, Defaultable> From<&StorageAddress<'a, ReturnTy, Iterable, Defaultable>> for StorageKey { +impl<'a, ReturnTy, Iterable, Defaultable> + From<&StorageAddress<'a, ReturnTy, Iterable, Defaultable>> for StorageKey +{ fn from(address: &StorageAddress<'a, ReturnTy, Iterable, Defaultable>) -> Self { StorageKey(address.to_bytes()) } @@ -159,7 +157,6 @@ impl StorageMapKey { /// If a [`StorageAddress`] is annotated with this, we can iterate over it. pub struct AddressIsIterable; - /// If a [`StorageAddress`] is annotated with this, it has a default value /// that we can use if it's not been set. -pub struct AddressHasDefaultValue; \ No newline at end of file +pub struct AddressHasDefaultValue; diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index fb6efd60b7..1d7538884c 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -2,34 +2,32 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use codec::{ - Decode, -}; -use sp_core::storage::{ - StorageData, - StorageKey, -}; -use std::{ - marker::PhantomData, - future::Future, +use super::storage_address::{ + AddressHasDefaultValue, + AddressIsIterable, + StorageAddress, }; use crate::{ + client::{ + OfflineClientT, + OnlineClientT, + }, error::BasicError, metadata::{ + Metadata, MetadataError, }, - client::{ - OnlineClientT, - OfflineClientT, - }, - metadata::Metadata, Config, }; +use codec::Decode; use derivative::Derivative; -use super::storage_address::{ - StorageAddress, - AddressHasDefaultValue, - AddressIsIterable, +use sp_core::storage::{ + StorageData, + StorageKey, +}; +use std::{ + future::Future, + marker::PhantomData, }; /// Query the runtime storage. @@ -37,14 +35,12 @@ use super::storage_address::{ #[derivative(Clone(bound = "Client: Clone"))] pub struct StorageClient { client: Client, - _marker: PhantomData + _marker: PhantomData, } -impl StorageClient{ +impl StorageClient { /// Create a new [`StorageClient`] - pub fn new( - client: Client, - ) -> Self { + pub fn new(client: Client) -> Self { Self { client, _marker: PhantomData, @@ -70,7 +66,7 @@ where address.pallet_name(), address.entry_name(), hash, - &self.client.metadata() + &self.client.metadata(), )?; } Ok(()) @@ -172,7 +168,6 @@ where Ok(default) } } - } /// Fetch up to `count` keys for a storage map in lexicographic order. @@ -233,7 +228,8 @@ where address: StorageAddress<'a, ReturnTy, AddressIsIterable, Defaultable>, page_size: u32, hash: Option, - ) -> impl Future, BasicError>> + 'a { + ) -> impl Future, BasicError>> + 'a + { let client = self.clone(); async move { // Metadata validation checks whether the static address given @@ -264,7 +260,7 @@ where }; Ok(KeyIter { - client: client, + client, address: root_addr, block_hash: hash, count: page_size, @@ -285,7 +281,9 @@ pub struct KeyIter { buffer: Vec<(StorageKey, StorageData)>, } -impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> KeyIter { +impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> + KeyIter +{ /// Returns the next key value pair from a map. pub async fn next(&mut self) -> Result, BasicError> { loop { @@ -294,7 +292,12 @@ impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> Key } else { let keys = self .client - .fetch_keys(&self.address, self.count, self.start_key.take(), Some(self.block_hash)) + .fetch_keys( + &self.address, + self.count, + self.start_key.take(), + Some(self.block_hash), + ) .await?; if keys.is_empty() { @@ -323,13 +326,18 @@ impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> Key } /// Validate a storage entry against the metadata. -fn validate_storage(pallet_name: &str, storage_name: &str, hash: [u8; 32], metadata: &Metadata) -> Result<(), BasicError> { +fn validate_storage( + pallet_name: &str, + storage_name: &str, + hash: [u8; 32], + metadata: &Metadata, +) -> Result<(), BasicError> { let expected_hash = match metadata.storage_hash(pallet_name, storage_name) { Ok(hash) => hash, - Err(e) => return Err(e.into()) + Err(e) => return Err(e.into()), }; match expected_hash == hash { true => Ok(()), - false => Err(crate::error::MetadataError::IncompatibleMetadata.into()) + false => Err(crate::error::MetadataError::IncompatibleMetadata.into()), } -} \ No newline at end of file +} diff --git a/subxt/src/utils.rs b/subxt/src/utils.rs index f12a54f5c7..d8bff8d7fb 100644 --- a/subxt/src/utils.rs +++ b/subxt/src/utils.rs @@ -4,7 +4,11 @@ //! Miscellaneous utility helpers. -use codec::{ Encode, Decode, DecodeAll }; +use codec::{ + Decode, + DecodeAll, + Encode, +}; use derivative::Derivative; /// Wraps an already encoded byte vector, prevents being encoded as a raw byte vector as part of diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index c085268a3e..a1f12bf660 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -3,16 +3,19 @@ // see LICENSE for license details. use crate::{ + pair_signer, test_context, test_context_with, - pair_signer, utils::node_runtime, }; -use sp_core::storage::{ - well_known_keys, - StorageKey, +use sp_core::{ + sr25519::Pair as Sr25519Pair, + storage::{ + well_known_keys, + StorageKey, + }, + Pair, }; -use sp_core::{ Pair, sr25519::Pair as Sr25519Pair }; use sp_keyring::AccountKeyring; #[tokio::test] @@ -21,8 +24,7 @@ async fn insert_key() { let api = ctx.client(); let public = AccountKeyring::Alice.public().as_array_ref().to_vec(); - api - .rpc() + api.rpc() .insert_key( "aura".to_string(), "//Alice".to_string(), @@ -108,11 +110,7 @@ async fn test_iter() { let api = ctx.client(); let addr = node_runtime::storage().system().account_root(); - let mut iter = api - .storage() - .iter(addr, 10, None) - .await - .unwrap(); + let mut iter = api.storage().iter(addr, 10, None).await.unwrap(); let mut i = 0; while iter.next().await.unwrap().is_some() { i += 1; @@ -172,12 +170,10 @@ async fn dry_run_fails() { let alice = pair_signer(AccountKeyring::Alice.pair()); let hans = pair_signer(Sr25519Pair::generate().0); - let tx = node_runtime::tx() - .balances() - .transfer( - hans.account_id().clone().into(), - 100_000_000_000_000_000_000_000_000_000_000_000, - ); + let tx = node_runtime::tx().balances().transfer( + hans.account_id().clone().into(), + 100_000_000_000_000_000_000_000_000_000_000_000, + ); let signed_extrinsic = api .tx() diff --git a/testing/integration-tests/src/events/mod.rs b/testing/integration-tests/src/events/mod.rs index 252a4b5608..ca33e373b2 100644 --- a/testing/integration-tests/src/events/mod.rs +++ b/testing/integration-tests/src/events/mod.rs @@ -106,9 +106,13 @@ async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { // Make a transfer: let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id(); - let transfer_tx = node_runtime::tx().balances().transfer(bob.clone().into(), 10_000); + let transfer_tx = node_runtime::tx() + .balances() + .transfer(bob.clone().into(), 10_000); - api.tx().sign_and_submit_then_watch_default(&transfer_tx, &alice).await?; + api.tx() + .sign_and_submit_then_watch_default(&transfer_tx, &alice) + .await?; // Wait for the next balance transfer event in our subscription stream // and check that it lines up: diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index 21079d406b..2f662d2dfc 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -33,19 +33,19 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); - let alice_account_addr = node_runtime::storage() - .system() - .account(alice.account_id()); - let bob_account_addr = node_runtime::storage() - .system() - .account(bob.account_id()); + let alice_account_addr = node_runtime::storage().system().account(alice.account_id()); + let bob_account_addr = node_runtime::storage().system().account(bob.account_id()); - let alice_pre = api.storage().fetch_or_default(&alice_account_addr, None).await?; - let bob_pre = api.storage().fetch_or_default(&bob_account_addr, None).await?; + let alice_pre = api + .storage() + .fetch_or_default(&alice_account_addr, None) + .await?; + let bob_pre = api + .storage() + .fetch_or_default(&bob_account_addr, None) + .await?; - let tx = node_runtime::tx() - .balances() - .transfer(bob_address, 10_000); + let tx = node_runtime::tx().balances().transfer(bob_address, 10_000); let events = api .tx() @@ -69,8 +69,14 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { }; assert_eq!(event, expected_event); - let alice_post = api.storage().fetch_or_default(&alice_account_addr, None).await?; - let bob_post = api.storage().fetch_or_default(&bob_account_addr, None).await?; + let alice_post = api + .storage() + .fetch_or_default(&alice_account_addr, None) + .await?; + let bob_post = api + .storage() + .fetch_or_default(&bob_account_addr, None) + .await?; assert!(alice_pre.data.free - 10_000 >= alice_post.data.free); assert_eq!(bob_pre.data.free + 10_000, bob_post.data.free); @@ -86,11 +92,12 @@ async fn multiple_transfers_work_nonce_incremented( let ctx = test_context().await; let api = ctx.client(); - let bob_account_addr = node_runtime::storage() - .system() - .account(bob.account_id()); + let bob_account_addr = node_runtime::storage().system().account(bob.account_id()); - let bob_pre = api.storage().fetch_or_default(&bob_account_addr, None).await?; + let bob_pre = api + .storage() + .fetch_or_default(&bob_account_addr, None) + .await?; let tx = node_runtime::tx() .balances() @@ -106,7 +113,10 @@ async fn multiple_transfers_work_nonce_incremented( .await?; } - let bob_post = api.storage().fetch_or_default(&bob_account_addr, None).await?; + let bob_post = api + .storage() + .fetch_or_default(&bob_account_addr, None) + .await?; assert_eq!(bob_pre.data.free + 30_000, bob_post.data.free); Ok(()) @@ -129,13 +139,11 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); - let tx = node_runtime::tx() - .staking() - .bond( - charlie.into(), - 100_000_000_000_000, - runtime_types::pallet_staking::RewardDestination::Stash, - ); + let tx = node_runtime::tx().staking().bond( + charlie.into(), + 100_000_000_000_000, + runtime_types::pallet_staking::RewardDestination::Stash, + ); api.tx() .sign_and_submit_then_watch_default(&tx, &bob) @@ -145,9 +153,9 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> { .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(&AccountKeyring::Bob.to_account_id()); let locks = api.storage().fetch_or_default(&locks_addr, None).await?; @@ -213,9 +221,7 @@ async fn transfer_implicit_subscription() { 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_addr, 10_000); let event = api .tx() @@ -255,8 +261,5 @@ async fn constant_existential_deposit() { let addr = node_runtime::constants().balances().existential_deposit(); // Make sure thetwo are identical: - assert_eq!( - existential_deposit, - api.constants().at(&addr).unwrap() - ); + assert_eq!(existential_deposit, api.constants().at(&addr).unwrap()); } diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 30d6b2be8f..c2cc7334ab 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -7,9 +7,7 @@ use sp_keyring::AccountKeyring; use crate::{ node_runtime::{ self, - contracts::{ - events, - }, + contracts::events, system, DispatchError, }, @@ -19,14 +17,14 @@ use crate::{ use sp_core::sr25519::Pair; use sp_runtime::MultiAddress; use subxt::{ - OnlineClient, - Config, - SubstrateConfig, - Error, extrinsic::{ PairSigner, TransactionProgress, - } + }, + Config, + Error, + OnlineClient, + SubstrateConfig, }; struct ContractsTestContext { @@ -62,16 +60,14 @@ impl ContractsTestContext { "#; let code = wabt::wat2wasm(CONTRACT).expect("invalid wabt"); - let instantiate_tx = node_runtime::tx() - .contracts() - .instantiate_with_code( - 100_000_000_000_000_000, // endowment - 500_000_000_000, // gas_limit - None, // storage_deposit_limit - code, - vec![], // data - vec![], // salt - ); + let instantiate_tx = node_runtime::tx().contracts().instantiate_with_code( + 100_000_000_000_000_000, // endowment + 500_000_000_000, // gas_limit + None, // storage_deposit_limit + code, + vec![], // data + vec![], // salt + ); let events = self .client() @@ -106,16 +102,14 @@ impl ContractsTestContext { salt: Vec, ) -> Result> { // call instantiate extrinsic - let instantiate_tx = node_runtime::tx() - .contracts() - .instantiate( - 100_000_000_000_000_000, // endowment - 500_000_000_000, // gas_limit - None, // storage_deposit_limit - code_hash, - data, - salt, - ); + let instantiate_tx = node_runtime::tx().contracts().instantiate( + 100_000_000_000_000_000, // endowment + 500_000_000_000, // gas_limit + None, // storage_deposit_limit + code_hash, + data, + salt, + ); let result = self .client() @@ -138,19 +132,21 @@ impl ContractsTestContext { contract: AccountId, input_data: Vec, ) -> Result< - TransactionProgress, DispatchError>, + TransactionProgress< + SubstrateConfig, + OnlineClient, + DispatchError, + >, Error, > { tracing::info!("call: {:?}", contract); - let call_tx = node_runtime::tx() - .contracts() - .call( - MultiAddress::Id(contract), - 0, // value - 500_000_000, // gas_limit - None, // storage_deposit_limit - input_data, - ); + let call_tx = node_runtime::tx().contracts().call( + MultiAddress::Id(contract), + 0, // value + 500_000_000, // gas_limit + None, // storage_deposit_limit + input_data, + ); let result = self .client() @@ -198,11 +194,7 @@ async fn tx_call() { .contracts() .contract_info_of(&contract); - let contract_info = cxt - .client() - .storage() - .fetch(&info_addr, None) - .await; + let contract_info = cxt.client().storage().fetch(&info_addr, None).await; assert!(contract_info.is_ok()); let keys = cxt diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index 6c6f95698c..1b1a62bc27 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -147,14 +147,8 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .wait_for_finalized_success() .await?; - let ledger_addr = node_runtime::storage() - .staking() - .ledger(alice.account_id()); - let ledger = api - .storage() - .fetch(&ledger_addr, None) - .await? - .unwrap(); + let ledger_addr = node_runtime::storage().staking().ledger(alice.account_id()); + let ledger = api.storage().fetch(&ledger_addr, None).await?.unwrap(); assert_eq!(alice_stash.account_id(), &ledger.stash); let chill_tx = node_runtime::tx().staking().chill(); @@ -190,13 +184,11 @@ async fn tx_bond() -> Result<(), Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); - let bond_tx = node_runtime::tx() - .staking() - .bond( - AccountKeyring::Bob.to_account_id().into(), - 100_000_000_000_000, - RewardDestination::Stash, - ); + let bond_tx = node_runtime::tx().staking().bond( + AccountKeyring::Bob.to_account_id().into(), + 100_000_000_000_000, + RewardDestination::Stash, + ); let bond = api .tx() @@ -226,7 +218,10 @@ async fn storage_history_depth() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); let history_depth_addr = node_runtime::storage().staking().history_depth(); - let history_depth = api.storage().fetch_or_default(&history_depth_addr, None).await?; + let history_depth = api + .storage() + .fetch_or_default(&history_depth_addr, None) + .await?; assert_eq!(history_depth, 84); Ok(()) } @@ -249,10 +244,7 @@ async fn storage_era_reward_points() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); let reward_points_addr = node_runtime::storage().staking().eras_reward_points(&0); - let current_era_result = api - .storage() - .fetch(&reward_points_addr, None) - .await; + let current_era_result = api.storage().fetch(&reward_points_addr, None).await; assert!(current_era_result.is_ok()); Ok(()) diff --git a/testing/integration-tests/src/frame/sudo.rs b/testing/integration-tests/src/frame/sudo.rs index 9d4273d5f7..e02d862bd3 100644 --- a/testing/integration-tests/src/frame/sudo.rs +++ b/testing/integration-tests/src/frame/sudo.rs @@ -55,9 +55,7 @@ async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> dest: bob, value: 10_000, }); - let tx = node_runtime::tx() - .sudo() - .sudo_unchecked_weight(call, 0); + let tx = node_runtime::tx().sudo().sudo_unchecked_weight(call, 0); let found_event = api .tx() diff --git a/testing/integration-tests/src/frame/system.rs b/testing/integration-tests/src/frame/system.rs index 807260943a..76e6214486 100644 --- a/testing/integration-tests/src/frame/system.rs +++ b/testing/integration-tests/src/frame/system.rs @@ -21,9 +21,7 @@ async fn storage_account() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); - let account_info_addr = node_runtime::storage() - .system() - .account(alice.account_id()); + let account_info_addr = node_runtime::storage().system().account(alice.account_id()); let account_info = api .storage() diff --git a/testing/integration-tests/src/frame/timestamp.rs b/testing/integration-tests/src/frame/timestamp.rs index f4f69631f7..4db9942d2e 100644 --- a/testing/integration-tests/src/frame/timestamp.rs +++ b/testing/integration-tests/src/frame/timestamp.rs @@ -3,8 +3,8 @@ // see LICENSE for license details. use crate::{ - test_context, node_runtime, + test_context, }; #[tokio::test] diff --git a/testing/integration-tests/src/metadata/validation.rs b/testing/integration-tests/src/metadata/validation.rs index 3d98e8f6a9..5d8efcb4ea 100644 --- a/testing/integration-tests/src/metadata/validation.rs +++ b/testing/integration-tests/src/metadata/validation.rs @@ -3,8 +3,8 @@ // see LICENSE for license details. use crate::{ - test_context, node_runtime, + test_context, TestContext, }; use frame_metadata::{ @@ -29,19 +29,22 @@ use scale_info::{ TypeInfo, }; use subxt::{ + Metadata, OfflineClient, SubstrateConfig, - Metadata, }; -async fn metadata_to_api(metadata: RuntimeMetadataV14, ctx: &TestContext) -> OfflineClient { +async fn metadata_to_api( + metadata: RuntimeMetadataV14, + ctx: &TestContext, +) -> OfflineClient { let prefixed = RuntimeMetadataPrefixed::from(metadata); let metadata = Metadata::try_from(prefixed).unwrap(); OfflineClient::new( ctx.client().genesis_hash(), ctx.client().runtime_version(), - metadata + metadata, ) } diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index f4ca04e3b3..596133e921 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -37,9 +37,7 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { let alice = AccountKeyring::Alice.to_account_id(); // Do some transaction to bump the Alice nonce to 1: - let remark_tx = node_runtime::tx() - .system() - .remark(vec![1, 2, 3, 4, 5]); + let remark_tx = node_runtime::tx().system().remark(vec![1, 2, 3, 4, 5]); api.tx() .sign_and_submit_then_watch_default(&remark_tx, &signer) .await? @@ -59,7 +57,8 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { // treated as a StorageKey (ie we should hash both values together with one hasher, rather // than hash both values separately, or ignore the second value). #[tokio::test] -async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error> { +async fn storage_n_mapish_key_is_properly_created( +) -> Result<(), subxt::Error> { use codec::Encode; use node_runtime::runtime_types::sp_core::crypto::KeyTypeId; @@ -97,8 +96,12 @@ async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error Result<(), subxt::Error TestContext { +pub async fn test_context_with(key: AccountKeyring) -> TestContext { let path = std::env::var("SUBSTRATE_NODE_PATH").unwrap_or_else(|_| { if which::which(SUBSTRATE_NODE_PATH).is_err() { panic!("A substrate binary should be installed on your path for integration tests. \ diff --git a/testing/integration-tests/src/utils/node_proc.rs b/testing/integration-tests/src/utils/node_proc.rs index 43a7f2221a..1f18fe0434 100644 --- a/testing/integration-tests/src/utils/node_proc.rs +++ b/testing/integration-tests/src/utils/node_proc.rs @@ -16,8 +16,8 @@ use std::{ process, }; use subxt::{ - OnlineClient, Config, + OnlineClient, }; /// Spawn a local substrate node for testing subxt. @@ -124,12 +124,7 @@ impl TestNodeProcessBuilder { // Connect to the node with a subxt client: let client = OnlineClient::from_url(ws_url.clone()).await; match client { - Ok(client) => { - Ok(TestNodeProcess { - proc, - client, - }) - } + Ok(client) => Ok(TestNodeProcess { proc, client }), Err(err) => { let err = format!("Failed to connect to node rpc at {}: {}", ws_url, err); tracing::error!("{}", err); From 055b3dcd3192675a0402b061b83b9b3f79cf43c5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 14 Jul 2022 17:47:22 +0100 Subject: [PATCH 37/75] remove extra logging during tests --- testing/integration-tests/src/events/mod.rs | 4 ---- testing/integration-tests/src/frame/balances.rs | 2 -- testing/integration-tests/src/frame/contracts.rs | 1 - testing/integration-tests/src/lib.rs | 5 +++++ testing/integration-tests/src/utils/context.rs | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/testing/integration-tests/src/events/mod.rs b/testing/integration-tests/src/events/mod.rs index ca33e373b2..fd9f9567c8 100644 --- a/testing/integration-tests/src/events/mod.rs +++ b/testing/integration-tests/src/events/mod.rs @@ -17,7 +17,6 @@ use sp_keyring::AccountKeyring; // Check that we can subscribe to non-finalized block events. #[tokio::test] async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { - tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; let api = ctx.client(); @@ -36,7 +35,6 @@ async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { // Check that we can subscribe to finalized block events. #[tokio::test] async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { - tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; let api = ctx.client(); @@ -57,7 +55,6 @@ async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { // a few blocks. #[tokio::test] async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicError> { - tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; let api = ctx.client(); @@ -88,7 +85,6 @@ async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicErr // it's Stream impl, and ultimately see the event we expect. #[tokio::test] async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { - tracing_subscriber::fmt::try_init().ok(); let ctx = test_context().await; let api = ctx.client(); diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index 2f662d2dfc..c90c776503 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -173,7 +173,6 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> { #[tokio::test] async fn transfer_error() { - tracing_subscriber::fmt::try_init().ok(); let alice = pair_signer(AccountKeyring::Alice.pair()); let alice_addr = alice.account_id().clone().into(); let hans = pair_signer(Pair::generate().0); @@ -214,7 +213,6 @@ async fn transfer_error() { #[tokio::test] async fn transfer_implicit_subscription() { - tracing_subscriber::fmt::try_init().ok(); let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id(); let bob_addr = bob.clone().into(); diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index c2cc7334ab..d39ed3748b 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -37,7 +37,6 @@ type AccountId = ::AccountId; impl ContractsTestContext { async fn init() -> Self { - tracing_subscriber::fmt::try_init().ok(); let cxt = test_context().await; let signer = PairSigner::new(AccountKeyring::Alice.pair()); diff --git a/testing/integration-tests/src/lib.rs b/testing/integration-tests/src/lib.rs index b1f1490930..13dbcb9cda 100644 --- a/testing/integration-tests/src/lib.rs +++ b/testing/integration-tests/src/lib.rs @@ -24,3 +24,8 @@ mod storage; use test_runtime::node_runtime; #[cfg(test)] use utils::*; + +// We don't use this dependency, but it's here so that we +// can enable logging easily if need be. +#[cfg(test)] +use tracing_subscriber as _; \ No newline at end of file diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index f10f4053f9..8432a68fdd 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -36,7 +36,7 @@ pub async fn test_context_with(key: AccountKeyring) -> TestContext { pub type TestContext = TestNodeProcess; pub async fn test_context() -> TestContext { - tracing_subscriber::fmt::try_init().ok(); + // tracing_subscriber::fmt::try_init().ok(); test_context_with(AccountKeyring::Alice).await } From cef039a0d8ec5bea30e0e581947e3fdcd0d58ad5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 14 Jul 2022 18:03:42 +0100 Subject: [PATCH 38/75] Appease clippy and no more need for into_iter on events --- codegen/src/api/storage.rs | 2 +- subxt/src/client/online_client.rs | 2 +- subxt/src/events/event_subscription.rs | 2 +- subxt/src/events/events_type.rs | 56 ++++------------------ subxt/src/events/filter_events.rs | 4 +- subxt/src/metadata/encode_with_metadata.rs | 2 +- subxt/src/storage/storage_address.rs | 2 +- 7 files changed, 16 insertions(+), 54 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 147f183f82..0fd7d3b961 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -143,7 +143,7 @@ fn generate_storage_entry_fns( } _ => { let ty_path = type_gen.resolve_type_path(key.id(), &[]); - let fields = vec![(format_ident!("_0"), ty_path.clone())]; + let fields = vec![(format_ident!("_0"), ty_path)]; let hasher = hashers.get(0).unwrap_or_else(|| { abort_call_site!("No hasher found for single key") }); diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 45c2e32437..ed60c4ee95 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -144,7 +144,7 @@ impl OnlineClient { pub fn offline(&self) -> OfflineClient { let inner = self.inner.read(); OfflineClient::new( - inner.genesis_hash.clone(), + inner.genesis_hash, inner.runtime_version.clone(), inner.metadata.clone(), ) diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 53976cae8a..0e3438c76e 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -113,7 +113,7 @@ where } } -impl<'a, T: Config, Client, Sub: Unpin> Unpin for EventSubscription {} +impl Unpin for EventSubscription {} // We want `EventSubscription` to implement Stream. The below implementation is the rather verbose // way to roughly implement the following function: diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index fd7b7a114b..1a0cf4c8b7 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -20,6 +20,7 @@ use codec::{ Input, }; use derivative::Derivative; +use std::sync::Arc; /// A collection of events obtained from a block, bundled with the necessary /// information needed to decode and iterate over them. @@ -31,11 +32,11 @@ pub struct Events { // Note; raw event bytes are prefixed with a Compact containing // the number of events to be decoded. We should have stripped that off // before storing the bytes here. - event_bytes: Vec, + event_bytes: Arc<[u8]>, num_events: u32, } -impl<'a, T: Config> Events { +impl Events { pub(crate) fn new( metadata: Metadata, block_hash: T::Hash, @@ -56,7 +57,7 @@ impl<'a, T: Config> Events { Self { metadata, block_hash, - event_bytes, + event_bytes: event_bytes.into(), num_events, } } @@ -80,8 +81,9 @@ impl<'a, T: Config> Events { /// Iterate over all of the events, using metadata to dynamically /// decode them as we go, and returning the raw bytes and other associated /// details. If an error occurs, all subsequent iterations return `None`. - pub fn iter(&self) -> impl Iterator> + '_ { - let event_bytes = &self.event_bytes; + pub fn iter(&self) -> impl Iterator> + Send + Sync + 'static { + let event_bytes = self.event_bytes.clone(); + let num_events = self.num_events; let metadata = self.metadata.clone(); let mut pos = 0; @@ -90,7 +92,7 @@ impl<'a, T: Config> Events { let cursor = &mut &event_bytes[pos..]; let start_len = cursor.len(); - if start_len == 0 || self.num_events == index { + if start_len == 0 || num_events == index { None } else { match decode_raw_event_details::(&metadata, index, cursor) { @@ -114,46 +116,6 @@ impl<'a, T: Config> Events { }) } - /// Iterate over all of the events, using metadata to dynamically - /// decode them as we go, and returning the raw bytes and other associated - /// details. If an error occurs, all subsequent iterations return `None`. - /// - /// Unlike [`Events::iter()`] this consumes `self`, which can be useful - /// if you need to store the iterator somewhere and avoid lifetime issues. - pub fn into_iter( - self, - ) -> impl Iterator> + 'a { - let mut pos = 0; - let mut index = 0; - let metadata = self.metadata.clone(); - std::iter::from_fn(move || { - let cursor = &mut &self.event_bytes[pos..]; - let start_len = cursor.len(); - - if start_len == 0 || self.num_events == index { - None - } else { - match decode_raw_event_details::(&metadata, index, cursor) { - Ok(raw_event) => { - // Skip over decoded bytes in next iteration: - pos += start_len - cursor.len(); - // Increment the index: - index += 1; - // Return the event details: - Some(Ok(raw_event)) - } - Err(e) => { - // By setting the position to the "end" of the event bytes, - // the cursor len will become 0 and the iterator will return `None` - // from now on: - pos = self.event_bytes.len(); - Some(Err(e)) - } - } - } - }) - } - /// Iterate through the events using metadata to dynamically decode and skip /// them, and return only those which should decode to the provided `Ev` type. /// If an error occurs, all subsequent iterations return `None`. @@ -384,7 +346,7 @@ pub(crate) mod test_utils { ) -> Events { Events { block_hash: ::Hash::default(), - event_bytes, + event_bytes: event_bytes.into(), metadata, num_events, } diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index a3371851be..7925588805 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -145,7 +145,7 @@ impl EventFilter for (Ev,) { + 'a, > { let block_hash = events.block_hash(); - let mut iter = events.into_iter(); + let mut iter = events.iter(); Box::new(std::iter::from_fn(move || { for ev in iter.by_ref() { // Forward any error immediately: @@ -183,7 +183,7 @@ macro_rules! impl_event_filter { events: Events ) -> Box, BasicError>> + Send + 'a> { let block_hash = events.block_hash(); - let mut iter = events.into_iter(); + let mut iter = events.iter(); Box::new(std::iter::from_fn(move || { let mut out: ( $(Option<$ty>,)+ ) = Default::default(); for ev in iter.by_ref() { diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs index f919769e88..156912fd68 100644 --- a/subxt/src/metadata/encode_with_metadata.rs +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -105,7 +105,7 @@ impl<'a> EncodeWithMetadata for EncodeDynamicCall<'a> { let pallet_index = pallet.index(); let call_ty = pallet .call_ty_id() - .ok_or_else(|| MetadataError::CallNotFound)?; + .ok_or(MetadataError::CallNotFound)?; // Assemble the variant representing the specific call within the pallet. // (we could do this ourselves a little more efficiently but it's easier diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index a302fded98..0975a0b42e 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -37,7 +37,7 @@ impl<'a, ReturnTy, Iterable, Defaultable> Self { pallet_name: pallet_name.into(), entry_name: storage_name.into(), - storage_entry_key: storage_entry_key.into(), + storage_entry_key, validation_hash: Some(hash), _marker: std::marker::PhantomData, } From eb7ed42bf945580d91920ced22722e400b0405c4 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 14 Jul 2022 18:05:47 +0100 Subject: [PATCH 39/75] cargo fmt --- subxt/src/events/events_type.rs | 5 ++++- subxt/src/metadata/encode_with_metadata.rs | 4 +--- testing/integration-tests/src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 1a0cf4c8b7..15543f7cf7 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -81,7 +81,10 @@ impl Events { /// Iterate over all of the events, using metadata to dynamically /// decode them as we go, and returning the raw bytes and other associated /// details. If an error occurs, all subsequent iterations return `None`. - pub fn iter(&self) -> impl Iterator> + Send + Sync + 'static { + pub fn iter( + &self, + ) -> impl Iterator> + Send + Sync + 'static + { let event_bytes = self.event_bytes.clone(); let num_events = self.num_events; diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs index 156912fd68..d98c0c9876 100644 --- a/subxt/src/metadata/encode_with_metadata.rs +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -103,9 +103,7 @@ impl<'a> EncodeWithMetadata for EncodeDynamicCall<'a> { ) -> Result<(), BasicError> { let pallet = metadata.pallet(&self.pallet)?; let pallet_index = pallet.index(); - let call_ty = pallet - .call_ty_id() - .ok_or(MetadataError::CallNotFound)?; + let call_ty = pallet.call_ty_id().ok_or(MetadataError::CallNotFound)?; // Assemble the variant representing the specific call within the pallet. // (we could do this ourselves a little more efficiently but it's easier diff --git a/testing/integration-tests/src/lib.rs b/testing/integration-tests/src/lib.rs index 13dbcb9cda..dbda88f274 100644 --- a/testing/integration-tests/src/lib.rs +++ b/testing/integration-tests/src/lib.rs @@ -28,4 +28,4 @@ use utils::*; // We don't use this dependency, but it's here so that we // can enable logging easily if need be. #[cfg(test)] -use tracing_subscriber as _; \ No newline at end of file +use tracing_subscriber as _; From 9d8a2db7e52b85e0ee70dac71ae2d309ca23f918 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 15 Jul 2022 13:42:36 +0100 Subject: [PATCH 40/75] fix dryRun tests by waiting for blocks --- testing/integration-tests/src/client/mod.rs | 9 ++++++++- testing/integration-tests/src/utils/mod.rs | 2 ++ .../src/utils/wait_for_blocks.rs | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 testing/integration-tests/src/utils/wait_for_blocks.rs diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index a1f12bf660..8eb2faa02c 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -6,7 +6,10 @@ use crate::{ pair_signer, test_context, test_context_with, - utils::node_runtime, + utils::{ + node_runtime, + wait_for_blocks, + } }; use sp_core::{ sr25519::Pair as Sr25519Pair, @@ -136,6 +139,8 @@ async fn dry_run_passes() { let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = pair_signer(AccountKeyring::Bob.pair()); + wait_for_blocks(&api).await; + let tx = node_runtime::tx() .balances() .transfer(bob.account_id().clone().into(), 10_000); @@ -167,6 +172,8 @@ async fn dry_run_fails() { let ctx = test_context().await; let api = ctx.client(); + wait_for_blocks(&api).await; + let alice = pair_signer(AccountKeyring::Alice.pair()); let hans = pair_signer(Sr25519Pair::generate().0); diff --git a/testing/integration-tests/src/utils/mod.rs b/testing/integration-tests/src/utils/mod.rs index 60cff25b5a..5d365d20d5 100644 --- a/testing/integration-tests/src/utils/mod.rs +++ b/testing/integration-tests/src/utils/mod.rs @@ -4,6 +4,8 @@ mod context; mod node_proc; +mod wait_for_blocks; pub use context::*; pub use node_proc::TestNodeProcess; +pub use wait_for_blocks::wait_for_blocks; diff --git a/testing/integration-tests/src/utils/wait_for_blocks.rs b/testing/integration-tests/src/utils/wait_for_blocks.rs new file mode 100644 index 0000000000..b8ed367615 --- /dev/null +++ b/testing/integration-tests/src/utils/wait_for_blocks.rs @@ -0,0 +1,17 @@ +// 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. + +use subxt::{ + client::OnlineClientT, + Config, +}; + +/// Wait for blocks to be produced before running tests. waiting for two blocks +/// (the genesis block aond one actual one?) seems to be enough to allow tests +/// like `dry_run_passes` to work properly. +pub async fn wait_for_blocks(api: &impl OnlineClientT) { + let mut sub = api.rpc().subscribe_blocks().await.unwrap(); + sub.next().await; + sub.next().await; +} \ No newline at end of file From bedf3d23d1e5ca8a7114905fb6c3413d6e352b98 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 15 Jul 2022 13:44:59 +0100 Subject: [PATCH 41/75] wait for blocks instead of sleeping or other test hacks --- testing/integration-tests/src/events/mod.rs | 9 +++++---- testing/integration-tests/src/storage/mod.rs | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/testing/integration-tests/src/events/mod.rs b/testing/integration-tests/src/events/mod.rs index fd9f9567c8..74219f1a73 100644 --- a/testing/integration-tests/src/events/mod.rs +++ b/testing/integration-tests/src/events/mod.rs @@ -10,6 +10,7 @@ use crate::{ }, pair_signer, test_context, + utils::wait_for_blocks, }; use futures::StreamExt; use sp_keyring::AccountKeyring; @@ -58,6 +59,8 @@ async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicErr let ctx = test_context().await; let api = ctx.client(); + wait_for_blocks(&api).await; + let mut event_sub = api.events().subscribe().await?; for i in 0..3 { @@ -65,14 +68,12 @@ async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicErr .next() .await .expect("events expected each block")?; + let success_event = events .find_first::() .expect("decode error"); - // Every now and then I get no bytes back for the first block events; - // I assume that this might be the case for the genesis block, so don't - // worry if no event found (but we should have no decode errors etc either way). - if i > 0 && success_event.is_none() { + if success_event.is_none() { let n = events.len(); panic!("Expected an extrinsic success event on iteration {i} (saw {n} other events)") } diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index 596133e921..1d034af99b 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -9,6 +9,7 @@ use crate::{ }, pair_signer, test_context, + utils::wait_for_blocks, }; use sp_keyring::AccountKeyring; @@ -19,7 +20,7 @@ async fn storage_plain_lookup() -> Result<(), subxt::Error> { // Look up a plain value. Wait long enough that we don't get the genesis block data, // because it may have no storage associated with it. - tokio::time::sleep(std::time::Duration::from_secs(6)).await; + wait_for_blocks(&api).await; let addr = node_runtime::storage().timestamp().now(); let entry = api.storage().fetch_or_default(&addr, None).await?; From 815e1003d93964995e8f4802c98d1f6cf1020252 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 15 Jul 2022 13:45:19 +0100 Subject: [PATCH 42/75] cargo fmt --- testing/integration-tests/src/client/mod.rs | 2 +- testing/integration-tests/src/utils/wait_for_blocks.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 8eb2faa02c..02ec0ad86d 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -9,7 +9,7 @@ use crate::{ utils::{ node_runtime, wait_for_blocks, - } + }, }; use sp_core::{ sr25519::Pair as Sr25519Pair, diff --git a/testing/integration-tests/src/utils/wait_for_blocks.rs b/testing/integration-tests/src/utils/wait_for_blocks.rs index b8ed367615..8157db4471 100644 --- a/testing/integration-tests/src/utils/wait_for_blocks.rs +++ b/testing/integration-tests/src/utils/wait_for_blocks.rs @@ -14,4 +14,4 @@ pub async fn wait_for_blocks(api: &impl OnlineClientT) { let mut sub = api.rpc().subscribe_blocks().await.unwrap(); sub.next().await; sub.next().await; -} \ No newline at end of file +} From a00b0119bf885f1414abe70d4ad0456fffcdf2cf Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 15 Jul 2022 14:10:38 +0100 Subject: [PATCH 43/75] Fix doc links --- subxt/src/config.rs | 5 +++-- subxt/src/events/events_client.rs | 4 ++-- subxt/src/events/events_type.rs | 11 +---------- subxt/src/extrinsic/transaction.rs | 3 +-- subxt/src/metadata/metadata_type.rs | 2 -- 5 files changed, 7 insertions(+), 18 deletions(-) diff --git a/subxt/src/config.rs b/subxt/src/config.rs index 3edb2ff8e6..64e555eb81 100644 --- a/subxt/src/config.rs +++ b/subxt/src/config.rs @@ -4,8 +4,9 @@ //! This module provides a [`Config`] type, which is used to define various //! types that are important in order to speak to a particular chain. -//! [`DefaultConfig`] provides a default set of these types suitable for the -//! default Substrate node implementation. +//! [`SubstrateConfig`] provides a default set of these types suitable for the +//! default Substrate node implementation, and [`PolkadotConfig`] for a +//! Polkadot node. use codec::{ Codec, diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index 6102718838..f84730a5c1 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -64,7 +64,7 @@ where /// Subscribe to all events from blocks. /// /// **Note:** these blocks haven't necessarily been finalised yet; prefer - /// [`Events::subscribe_finalized()`] if that is important. + /// [`EventsClient::subscribe_finalized()`] if that is important. /// /// # Example /// @@ -101,7 +101,7 @@ where async move { subscribe(client).await } } - /// Subscribe to events from finalized blocks. + /// Subscribe to events from finalized blocks. See [`EventsClient::subscribe()`] for details. pub fn subscribe_finalized( &self, ) -> impl Future< diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 15543f7cf7..7dcb459b59 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -122,9 +122,6 @@ impl Events { /// Iterate through the events using metadata to dynamically decode and skip /// them, and return only those which should decode to the provided `Ev` type. /// If an error occurs, all subsequent iterations return `None`. - /// - /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to - /// use even if you do not statically know about all of the possible events. pub fn find( &self, ) -> impl Iterator> + '_ { @@ -136,17 +133,11 @@ impl Events { /// Iterate through the events using metadata to dynamically decode and skip /// them, and return the first event found which decodes to the provided `Ev` type. - /// - /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to - /// use even if you do not statically know about all of the possible events. pub fn find_first(&self) -> Result, BasicError> { self.find::().next().transpose() } /// Find an event that decodes to the type provided. Returns true if it was found. - /// - /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to - /// use even if you do not statically know about all of the possible events. pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) } @@ -178,7 +169,7 @@ pub struct EventDetails { } impl EventDetails { - /// Attempt to decode this [`RawEventDetails`] into a specific event. + /// Attempt to decode these [`EventDetails`] into a specific event. pub fn as_event(&self) -> Result, CodecError> { if self.pallet == E::PALLET && self.variant == E::EVENT { Ok(Some(E::decode(&mut &self.bytes[..])?)) diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/extrinsic/transaction.rs index 6af41832c1..19d4142c49 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/extrinsic/transaction.rs @@ -42,8 +42,7 @@ use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; -/// This struct represents a subscription to the progress of some transaction, and is -/// returned from [`crate::SubmittableExtrinsic::sign_and_submit_then_watch()`]. +/// This struct represents a subscription to the progress of some transaction. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] pub struct TransactionProgress { diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index cf23f965fa..b3e4fada9f 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -338,8 +338,6 @@ impl ErrorMetadata { /// Error originated from converting a runtime metadata [RuntimeMetadataPrefixed] to /// the internal [Metadata] representation. -/// -/// The runtime metadata is converted when building the [crate::client::Client]. #[derive(Debug, thiserror::Error)] pub enum InvalidMetadataError { /// Invalid prefix From 470ab2de1a3957b0148777a5dc017abfd8f7cc3f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 15 Jul 2022 17:04:59 +0100 Subject: [PATCH 44/75] Traitify StorageAddress --- codegen/src/api/storage.rs | 16 +- examples/examples/storage_query.rs | 24 +- subxt/src/events/events_client.rs | 2 +- subxt/src/rpc.rs | 26 +- subxt/src/storage/mod.rs | 6 +- subxt/src/storage/storage_address.rs | 177 +- subxt/src/storage/storage_client.rs | 176 +- testing/integration-tests/src/client/mod.rs | 11 +- .../integration-tests/src/codegen/polkadot.rs | 4970 +++++++++-------- .../integration-tests/src/frame/contracts.rs | 2 +- 10 files changed, 2929 insertions(+), 2481 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 0fd7d3b961..6cdd99edfe 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -194,8 +194,8 @@ fn generate_storage_entry_fns( let is_map_type = matches!(storage_entry.ty, StorageEntryType::Map { .. }); // Is the entry iterable? - let iterable_type = if is_map_type { - quote!(::subxt::storage::address::AddressIsIterable) + let is_iterable_type = if is_map_type { + quote!(::subxt::storage::address::Yes) } else { quote!(()) }; @@ -206,8 +206,8 @@ fn generate_storage_entry_fns( }; // Does the entry have a default value? - let defaultable_type = if has_default_value { - quote!(::subxt::storage::address::AddressHasDefaultValue) + let is_defaultable_type = if has_default_value { + quote!(::subxt::storage::address::Yes) } else { quote!(()) }; @@ -220,8 +220,8 @@ fn generate_storage_entry_fns( #docs_token pub fn #fn_name_root( &self, - ) -> ::subxt::storage::address::StorageAddress::<'static, #storage_entry_value_ty, #iterable_type, #defaultable_type> { - ::subxt::storage::address::StorageAddress::new_with_validation( + ) -> ::subxt::storage::address::StaticStorageAddress::<::subxt::metadata::DecodeStaticType<#storage_entry_value_ty>, (), #is_defaultable_type, #is_iterable_type> { + ::subxt::storage::address::StaticStorageAddress::new( #pallet_name, #storage_name, Vec::new(), @@ -239,8 +239,8 @@ fn generate_storage_entry_fns( pub fn #fn_name( &self, #( #key_args, )* - ) -> ::subxt::storage::address::StorageAddress::<'static, #storage_entry_value_ty, #iterable_type, #defaultable_type> { - ::subxt::storage::address::StorageAddress::new_with_validation( + ) -> ::subxt::storage::address::StaticStorageAddress::<::subxt::metadata::DecodeStaticType<#storage_entry_value_ty>, ::subxt::storage::address::Yes, #is_defaultable_type, #is_iterable_type> { + ::subxt::storage::address::StaticStorageAddress::new( #pallet_name, #storage_name, #key_impl, diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_query.rs index 01f1399026..1ff658e126 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_query.rs @@ -12,12 +12,9 @@ use codec::Decode; use subxt::{ - storage::{ - address::{ - StorageHasher, - StorageMapKey, - }, - StorageKey, + storage::address::{ + StorageHasher, + StorageMapKey, }, OnlineClient, PolkadotConfig, @@ -54,14 +51,16 @@ async fn main() -> Result<(), Box> { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); // Fetch at most 10 keys from below the prefix XcmPallet' VersionNotifiers. - let keys = api.storage().fetch_keys(&key_addr, 10, None, None).await?; + let keys = api + .storage() + .fetch_keys(&key_addr.to_root_bytes(), 10, None, None) + .await?; println!("Example 1. Obtained keys:"); for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); - if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? - { + if let Some(storage_data) = api.storage().fetch_raw(&key.0, None).await? { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn @@ -108,16 +107,13 @@ async fn main() -> Result<(), Box> { // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(2u32) ++ 2u32` println!("\nExample 4\nQuery key: 0x{}", hex::encode(&query_key)); - let keys = rpc - .storage_keys_paged(StorageKey(query_key), 10, None, None) - .await?; + let keys = rpc.storage_keys_paged(&query_key, 10, None, None).await?; println!("Obtained keys:"); for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); - if let Some(storage_data) = api.storage().fetch_raw(key.clone(), None).await? - { + if let Some(storage_data) = api.storage().fetch_raw(&key.0, None).await? { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index f84730a5c1..36c371d857 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -129,7 +129,7 @@ where { let event_bytes = client .rpc() - .storage(&system_events_key(), Some(block_hash)) + .storage(&*system_events_key().0, Some(block_hash)) .await? .map(|e| e.0) .unwrap_or_else(Vec::new); diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index 9b99513ac1..f4d5bef309 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -289,10 +289,10 @@ impl Rpc { /// Fetch the raw bytes for a given storage key pub async fn storage( &self, - key: &StorageKey, + key: &[u8], hash: Option, ) -> Result, BasicError> { - let params = rpc_params![key, hash]; + let params = rpc_params![to_hex(key), hash]; let data = self.client.request("state_getStorage", params).await?; Ok(data) } @@ -302,12 +302,13 @@ impl Rpc { /// If `start_key` is passed, return next keys in storage in lexicographic order. pub async fn storage_keys_paged( &self, - key: StorageKey, + key: &[u8], count: u32, - start_key: Option, + start_key: Option<&[u8]>, hash: Option, ) -> Result, BasicError> { - let params = rpc_params![key, count, start_key, hash]; + 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?; Ok(data) } @@ -315,10 +316,11 @@ impl Rpc { /// Query historical storage entries pub async fn query_storage( &self, - keys: Vec, + keys: impl IntoIterator, from: T::Hash, to: Option, ) -> Result>, BasicError> { + let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, from, to]; self.client .request("state_queryStorage", params) @@ -329,9 +331,10 @@ impl Rpc { /// Query historical storage entries pub async fn query_storage_at( &self, - keys: &[StorageKey], + keys: impl IntoIterator, at: Option, ) -> Result>, BasicError> { + let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, at]; self.client .request("state_queryStorageAt", params) @@ -454,9 +457,10 @@ impl Rpc { /// Get proof of storage entries at a specific block's state. pub async fn read_proof( &self, - keys: Vec, + keys: impl IntoIterator, hash: Option, ) -> Result, BasicError> { + 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?; Ok(proof) @@ -605,7 +609,7 @@ impl Rpc { encoded_signed: &[u8], at: Option, ) -> Result { - let params = rpc_params![format!("0x{}", hex::encode(encoded_signed)), at]; + 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())?; @@ -631,6 +635,10 @@ async fn ws_transport(url: &str) -> Result<(WsSender, WsReceiver), RpcError> { .map_err(|e| RpcError::Transport(e.into())) } +fn to_hex(bytes: impl AsRef<[u8]>) -> String { + format!("0x{}", hex::encode(bytes.as_ref())) +} + #[cfg(test)] mod test { use super::*; diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index f3249d8766..ac232bb7ad 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -19,10 +19,10 @@ pub use sp_core::storage::StorageKey; /// entry lives and how to properly decode it. pub mod address { pub use super::storage_address::{ - AddressHasDefaultValue, - AddressIsIterable, - StorageAddress, + StaticStorageAddress, + StorageAddressT, StorageHasher, StorageMapKey, + Yes, }; } diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 0975a0b42e..18ef3d4cb2 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -2,48 +2,114 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +use crate::metadata::DecodeWithMetadata; use codec::Encode; -use sp_core::storage::StorageKey; pub use sp_runtime::traits::SignedExtension; -use std::borrow::Cow; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; +/// A trait representing a storage address. Anything implementing this trait +/// can be used to fetch and iterate over storage entries. +pub trait StorageAddressT { + /// Thye target type of the value that lives at this address? + type Target: DecodeWithMetadata; + /// Can an entry be fetched from this address? + type IsFetchable; + /// Can a default entry be obtained from this address? + type IsDefaultable; + /// Can this address be iterated over? + type IsIterable; + + /// The name of the pallet that the entry lives under. + fn pallet_name(&self) -> &str; + + /// The name of the entry in a given pallet that the item is at. + fn entry_name(&self) -> &str; + + /// Output the non-prefix bytes; that is, any additional bytes that need + /// to be appended to the key to dig into maps. + fn append_entry_bytes(&self, bytes: &mut Vec); + + /// An optional hash which, if present, will be checked against + /// the node metadata to confirm that the return type matches what + /// we are expecting. + fn validation_hash(&self) -> Option<[u8; 32]> { + None + } + + /// Output the "prefix"; the bytes which encode the pallet + /// name and entry name. + /// + /// There should be no need to override this. + fn append_root_bytes(&self, bytes: &mut Vec) { + bytes.extend(&sp_core::twox_128(self.pallet_name().as_bytes())); + bytes.extend(&sp_core::twox_128(self.entry_name().as_bytes())); + } + + /// This is a helper which combines [`StorageAddressT::append_root_bytes()`] + /// and [`StorageAddressT::append_entry_bytes`] and gives back all of the bytes + /// that represent this storage address. + /// + /// There should be no need to override this. + fn to_bytes(&self) -> Vec { + let mut bytes = Vec::new(); + self.append_root_bytes(&mut bytes); + self.append_entry_bytes(&mut bytes); + bytes + } + + /// This is a helper which returns bytes representing the root pallet/entry + /// location of this address; useful for manually iterating over for instance. + /// + /// There should be no need to override this. + fn to_root_bytes(&self) -> Vec { + let mut bytes = Vec::new(); + self.append_root_bytes(&mut bytes); + bytes + } +} + +/// Used to signal whether a [`StorageAddressT`] can be iterated, +/// fetched and returned with a default value in the type system. +pub struct Yes; + /// This is returned from storage accesses in the statically generated /// code, and contains the information needed to find, validate and decode /// the storage entry. -pub struct StorageAddress<'a, ReturnTy, Iterable, Defaultable> { - pallet_name: Cow<'a, str>, - entry_name: Cow<'a, str>, +pub struct StaticStorageAddress { + pallet_name: &'static str, + entry_name: &'static str, // How to access the specific value at that storage address. storage_entry_key: Vec, // Hash provided from static code for validation. validation_hash: Option<[u8; 32]>, - _marker: std::marker::PhantomData<(ReturnTy, Iterable, Defaultable)>, + _marker: std::marker::PhantomData<(ReturnTy, Fetchable, Defaultable, Iterable)>, } -impl<'a, ReturnTy, Iterable, Defaultable> - StorageAddress<'a, ReturnTy, Iterable, Defaultable> +impl + StaticStorageAddress +where + ReturnTy: DecodeWithMetadata, { - /// Create a new [`StorageAddress`] that will be validated + /// Create a new [`StaticStorageAddress`] that will be validated /// against node metadata using the hash given. - pub fn new_with_validation( - pallet_name: impl Into>, - storage_name: impl Into>, + pub fn new( + pallet_name: &'static str, + entry_name: &'static str, storage_entry_key: Vec, hash: [u8; 32], ) -> Self { Self { - pallet_name: pallet_name.into(), - entry_name: storage_name.into(), + pallet_name, + entry_name, storage_entry_key, validation_hash: Some(hash), _marker: std::marker::PhantomData, } } - /// Do not validate this storage prior to accessing it. + /// Do not validate this storage entry prior to accessing it. pub fn unvalidated(self) -> Self { Self { pallet_name: self.pallet_name, @@ -54,64 +120,46 @@ impl<'a, ReturnTy, Iterable, Defaultable> } } - /// Strip any map keys from a storage entry. If the storage entry is pointing at - /// a plain, non-map storage value, then this will have no effect. - pub fn root(&mut self) { - self.storage_entry_key.clear(); - } - - /// Append a map key to the existing storage address. - pub fn append_map_key(&mut self, key: StorageMapKey) { - self.storage_entry_key.push(key); - } + // A common trait methods implemented to avoid needingto import the trait: - /// Convert this address into bytes that we can pass to a node to look up - /// the associated value at this address. + /// Return bytes representing this storage entry. pub fn to_bytes(&self) -> Vec { - // First encode the pallet/name part: - let mut bytes = sp_core::twox_128(self.pallet_name.as_bytes()).to_vec(); - bytes.extend(&sp_core::twox_128(self.entry_name.as_bytes())[..]); - - // Then encode any additional params to dig further into the entry: - for entry in &self.storage_entry_key { - entry.to_bytes(&mut bytes); - } - - bytes + StorageAddressT::to_bytes(self) } - /// Take a storage address and return an owned storage address. - pub fn to_owned(self) -> StorageAddress<'static, ReturnTy, Iterable, Defaultable> { - StorageAddress { - pallet_name: Cow::Owned(self.pallet_name.into_owned()), - entry_name: Cow::Owned(self.entry_name.into_owned()), - storage_entry_key: self.storage_entry_key, - validation_hash: self.validation_hash, - _marker: self._marker, - } + /// Return bytes representing the root of this storage entry (ie a hash of + /// the pallet and entry name). + pub fn to_root_bytes(&self) -> Vec { + StorageAddressT::to_root_bytes(self) } +} + +impl StorageAddressT + for StaticStorageAddress +where + ReturnTy: DecodeWithMetadata, +{ + type Target = ReturnTy; + type IsDefaultable = Defaultable; + type IsIterable = Iterable; + type IsFetchable = Fetchable; - /// Pallet name the entry lives at. - pub fn pallet_name(&self) -> &str { - &*self.pallet_name + fn pallet_name(&self) -> &str { + self.pallet_name } - /// The name of the storage entry in the pallet. - pub fn entry_name(&self) -> &str { - &*self.entry_name + fn entry_name(&self) -> &str { + self.entry_name } - /// A hash which validates that the address is valid. - pub fn validation_hash(&self) -> Option<[u8; 32]> { - self.validation_hash + fn append_entry_bytes(&self, bytes: &mut Vec) { + for entry in &self.storage_entry_key { + entry.to_bytes(bytes); + } } -} -impl<'a, ReturnTy, Iterable, Defaultable> - From<&StorageAddress<'a, ReturnTy, Iterable, Defaultable>> for StorageKey -{ - fn from(address: &StorageAddress<'a, ReturnTy, Iterable, Defaultable>) -> Self { - StorageKey(address.to_bytes()) + fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash } } @@ -153,10 +201,3 @@ impl StorageMapKey { } } } - -/// If a [`StorageAddress`] is annotated with this, we can iterate over it. -pub struct AddressIsIterable; - -/// If a [`StorageAddress`] is annotated with this, it has a default value -/// that we can use if it's not been set. -pub struct AddressHasDefaultValue; diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 1d7538884c..138a1731c1 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -3,9 +3,8 @@ // see LICENSE for license details. use super::storage_address::{ - AddressHasDefaultValue, - AddressIsIterable, - StorageAddress, + StorageAddressT, + Yes, }; use crate::{ client::{ @@ -14,13 +13,14 @@ use crate::{ }, error::BasicError, metadata::{ + DecodeWithMetadata, Metadata, - MetadataError, }, Config, }; -use codec::Decode; use derivative::Derivative; +use frame_metadata::StorageEntryType; +use scale_info::form::PortableForm; use sp_core::storage::{ StorageData, StorageKey, @@ -57,9 +57,9 @@ where /// if the address is valid (or if it's not possible to check since the address has no validation hash). /// Return an error if the address was not valid or something went wrong trying to validate it (ie /// the pallet or storage entry in question do not exist at all). - pub fn validate<'a, ReturnTy, Iterable, Defaultable>( + pub fn validate( &self, - address: &'a StorageAddress<'_, ReturnTy, Iterable, Defaultable>, + address: &Address, ) -> Result<(), BasicError> { if let Some(hash) = address.validation_hash() { validate_storage( @@ -79,17 +79,16 @@ where Client: OnlineClientT, { /// Fetch the raw encoded value at the address/key given. - pub fn fetch_raw>( + pub fn fetch_raw<'a>( &self, - key: K, + key: &'a [u8], hash: Option, - ) -> impl Future>, BasicError>> + 'static { + ) -> impl Future>, BasicError>> + 'a { let client = self.client.clone(); - let key = key.into(); // Ensure that the returned future doesn't have a lifetime tied to api.storage(), // which is a temporary thing we'll be throwing away quickly: async move { - let data = client.rpc().storage(&key, hash).await?; + let data = client.rpc().storage(key, hash).await?; Ok(data.map(|d| d.0)) } } @@ -121,11 +120,19 @@ where /// println!("Value: {:?}", value); /// # } /// ``` - pub fn fetch<'a, ReturnTy: Decode, Iterable, Defaultable>( + pub fn fetch<'a, Address>( &self, - address: &'a StorageAddress<'_, ReturnTy, Iterable, Defaultable>, + address: &'a Address, hash: Option, - ) -> impl Future, BasicError>> + 'a { + ) -> impl Future< + Output = Result< + Option<::Target>, + BasicError, + >, + > + 'a + where + Address: StorageAddressT + 'a, + { let client = self.clone(); async move { // Metadata validation checks whether the static address given @@ -134,8 +141,27 @@ where // metadata. client.validate(address)?; - if let Some(data) = client.client.storage().fetch_raw(address, hash).await? { - Ok(Some(Decode::decode(&mut &*data)?)) + // Look up the return type ID to enable DecodeWithMetadata: + let metadata = client.client.metadata(); + let return_ty_id = lookup_storage_return_type( + &metadata, + address.pallet_name(), + address.entry_name(), + )?; + + let lookup_bytes = address.to_bytes(); + if let Some(data) = client + .client + .storage() + .fetch_raw(&lookup_bytes, hash) + .await? + { + let val = ::decode_with_metadata( + &mut &*data, + return_ty_id, + &metadata, + )?; + Ok(Some(val)) } else { Ok(None) } @@ -147,11 +173,16 @@ where /// Note: The [`StorageAddress`] provided must be tagged with [`AddressHasDefaultValue`] /// in order to use this function. Statically generated storage addresses will be /// tagged appropriately. - pub fn fetch_or_default<'a, ReturnTy: Decode, Iterable>( + pub fn fetch_or_default<'a, Address>( &self, - address: &'a StorageAddress<'_, ReturnTy, Iterable, AddressHasDefaultValue>, + address: &'a Address, hash: Option, - ) -> impl Future> + 'a { + ) -> impl Future< + Output = Result<::Target, BasicError>, + > + 'a + where + Address: StorageAddressT + 'a, + { let client = self.client.clone(); async move { let pallet_name = address.pallet_name(); @@ -161,11 +192,19 @@ where Ok(data) } else { let metadata = client.metadata(); + let pallet_metadata = metadata.pallet(pallet_name)?; let storage_metadata = pallet_metadata.storage(storage_name)?; - let default = Decode::decode(&mut &storage_metadata.default[..]) - .map_err(MetadataError::DefaultError)?; - Ok(default) + let return_ty_id = + return_type_from_storage_entry_type(&storage_metadata.ty); + let bytes = &mut &storage_metadata.default[..]; + + let val = ::decode_with_metadata( + bytes, + return_ty_id, + &metadata, + )?; + Ok(val) } } } @@ -173,15 +212,14 @@ where /// Fetch up to `count` keys for a storage map in lexicographic order. /// /// Supports pagination by passing a value to `start_key`. - pub fn fetch_keys>( + pub fn fetch_keys<'a>( &self, - key: K, + key: &'a [u8], count: u32, - start_key: Option, + start_key: Option<&'a [u8]>, hash: Option, - ) -> impl Future, BasicError>> + 'static { + ) -> impl Future, BasicError>> + 'a { let client = self.client.clone(); - let key = key.into(); async move { let keys = client .rpc() @@ -223,12 +261,14 @@ where /// } /// # } /// ``` - pub fn iter<'a, ReturnTy: Decode + 'static, Defaultable: 'static>( + pub fn iter
( &self, - address: StorageAddress<'a, ReturnTy, AddressIsIterable, Defaultable>, + address: Address, page_size: u32, hash: Option, - ) -> impl Future, BasicError>> + 'a + ) -> impl Future, BasicError>> + 'static + where + Address: StorageAddressT + 'static, { let client = self.clone(); async move { @@ -252,50 +292,73 @@ where .expect("didn't pass a block number; qed") }; - // Strip any keys off; we want the top level entry only. - let root_addr = { - let mut a = address.to_owned(); - a.root(); - a - }; + let metadata = client.client.metadata(); + + // Look up the return type for flexible decoding: + let return_type_id = lookup_storage_return_type( + &metadata, + address.pallet_name(), + address.entry_name(), + )?; + + // The root pallet/entry bytes for this storage entry: + let mut address_root_bytes = Vec::new(); + address.append_root_bytes(&mut address_root_bytes); Ok(KeyIter { client, - address: root_addr, + address_root_bytes, + metadata, + return_type_id, block_hash: hash, count: page_size, start_key: None, buffer: Default::default(), + _marker: std::marker::PhantomData, }) } } } /// Iterates over key value pairs in a map. -pub struct KeyIter { +pub struct KeyIter { client: StorageClient, - address: StorageAddress<'static, ReturnTy, AddressIsIterable, Defaultable>, + address_root_bytes: Vec, + return_type_id: u32, + metadata: Metadata, count: u32, block_hash: T::Hash, start_key: Option, buffer: Vec<(StorageKey, StorageData)>, + _marker: std::marker::PhantomData, } -impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> - KeyIter +impl<'a, T: Config, Client: OnlineClientT, ReturnTy> KeyIter +where + T: Config, + Client: OnlineClientT, + ReturnTy: DecodeWithMetadata, { /// Returns the next key value pair from a map. - pub async fn next(&mut self) -> Result, BasicError> { + pub async fn next( + &mut self, + ) -> Result, BasicError> { loop { if let Some((k, v)) = self.buffer.pop() { - return Ok(Some((k, Decode::decode(&mut &v.0[..])?))) + let val = ReturnTy::decode_with_metadata( + &mut &v.0[..], + self.return_type_id, + &self.metadata, + )?; + return Ok(Some((k, val))) } else { + let start_key = self.start_key.take(); let keys = self .client .fetch_keys( - &self.address, + &self.address_root_bytes, self.count, - self.start_key.take(), + start_key.as_ref().map(|k| &*k.0), Some(self.block_hash), ) .await?; @@ -310,7 +373,7 @@ impl<'a, T: Config, Client: OnlineClientT, ReturnTy: Decode, Defaultable> .client .client .rpc() - .query_storage_at(&keys, Some(self.block_hash)) + .query_storage_at(keys.iter().map(|k| &*k.0), Some(self.block_hash)) .await?; for change_set in change_sets { for (k, v) in change_set.changes { @@ -341,3 +404,22 @@ fn validate_storage( false => Err(crate::error::MetadataError::IncompatibleMetadata.into()), } } + +/// look up a return type ID for some storage entry. +fn lookup_storage_return_type( + metadata: &Metadata, + pallet: &str, + entry: &str, +) -> Result { + let storage_entry_type = &metadata.pallet(pallet)?.storage(entry)?.ty; + + Ok(return_type_from_storage_entry_type(storage_entry_type)) +} + +/// Fetch the return type out of a [`StorageEntryType`]. +fn return_type_from_storage_entry_type(entry: &StorageEntryType) -> u32 { + match entry { + StorageEntryType::Plain(ty) => ty.id(), + StorageEntryType::Map { value, .. } => value.id(), + } +} diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 02ec0ad86d..27480af014 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -13,10 +13,7 @@ use crate::{ }; use sp_core::{ sr25519::Pair as Sr25519Pair, - storage::{ - well_known_keys, - StorageKey, - }, + storage::well_known_keys, Pair, }; use sp_keyring::AccountKeyring; @@ -66,8 +63,8 @@ async fn fetch_read_proof() { api.rpc() .read_proof( vec![ - StorageKey(well_known_keys::HEAP_PAGES.to_vec()), - StorageKey(well_known_keys::EXTRINSIC_INDEX.to_vec()), + well_known_keys::HEAP_PAGES, + well_known_keys::EXTRINSIC_INDEX, ], block_hash, ) @@ -101,7 +98,7 @@ async fn fetch_keys() { let addr = node_runtime::storage().system().account_root(); let keys = api .storage() - .fetch_keys(&addr, 4, None, None) + .fetch_keys(&addr.to_root_bytes(), 4, None, None) .await .unwrap(); assert_eq!(keys.len(), 4) diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index a7e14f1398..9505a69289 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -541,18 +541,20 @@ pub mod api { pub fn account( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::AccountData< - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "Account", vec![::subxt::storage::address::StorageMapKey::new( @@ -570,18 +572,20 @@ pub mod api { #[doc = " The full account information for a particular account ID."] pub fn account_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::pallet_balances::AccountData< - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "Account", Vec::new(), @@ -596,13 +600,13 @@ pub mod api { #[doc = " Total extrinsics count for the current block."] pub fn extrinsic_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "ExtrinsicCount", vec![], @@ -617,15 +621,17 @@ pub mod api { #[doc = " The current weight for the block."] pub fn block_weight( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u64, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_support::weights::PerDispatchClass< + ::core::primitive::u64, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "BlockWeight", vec![], @@ -640,13 +646,13 @@ pub mod api { #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] pub fn all_extrinsics_len( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "AllExtrinsicsLen", vec![], @@ -662,13 +668,13 @@ pub mod api { pub fn block_hash( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::H256, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "BlockHash", vec![::subxt::storage::address::StorageMapKey::new( @@ -686,13 +692,13 @@ pub mod api { #[doc = " Map of block numbers to block hashes."] pub fn block_hash_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::H256, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "BlockHash", Vec::new(), @@ -708,13 +714,15 @@ pub mod api { pub fn extrinsic_data( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "ExtrinsicData", vec![::subxt::storage::address::StorageMapKey::new( @@ -732,13 +740,15 @@ pub mod api { #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] pub fn extrinsic_data_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "ExtrinsicData", Vec::new(), @@ -753,13 +763,13 @@ pub mod api { #[doc = " The current block number being processed. Set by `execute_block`."] pub fn number( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "Number", vec![], @@ -774,13 +784,13 @@ pub mod api { #[doc = " Hash of the previous block."] pub fn parent_hash( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "ParentHash", vec![], @@ -795,13 +805,15 @@ pub mod api { #[doc = " Digest of the current block, also part of the block header."] pub fn digest( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::generic::digest::Digest, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::generic::digest::Digest, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "Digest", vec![], @@ -822,18 +834,20 @@ pub mod api { #[doc = " just in case someone still reads them from within the runtime."] pub fn events( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::polkadot_runtime::Event, - ::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::polkadot_runtime::Event, + ::subxt::ext::sp_core::H256, + >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "Events", vec![], @@ -848,13 +862,13 @@ pub mod api { #[doc = " The number of events in the `Events` list."] pub fn event_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "EventCount", vec![], @@ -879,13 +893,15 @@ pub mod api { pub fn event_topics( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "EventTopics", vec![::subxt::storage::address::StorageMapKey::new( @@ -912,13 +928,15 @@ pub mod api { #[doc = " no notification will be triggered thus the event might be lost."] pub fn event_topics_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "EventTopics", Vec::new(), @@ -933,13 +951,15 @@ pub mod api { #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] pub fn last_runtime_upgrade( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_system::LastRuntimeUpgradeInfo, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_system::LastRuntimeUpgradeInfo, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "LastRuntimeUpgrade", vec![], @@ -954,13 +974,13 @@ pub mod api { #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] pub fn upgraded_to_u32_ref_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "UpgradedToU32RefCount", vec![], @@ -976,13 +996,13 @@ pub mod api { #[doc = " (default) if not."] pub fn upgraded_to_triple_ref_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "UpgradedToTripleRefCount", vec![], @@ -997,13 +1017,15 @@ pub mod api { #[doc = " The execution phase of the block."] pub fn execution_phase( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_system::Phase, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_system::Phase, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "System", "ExecutionPhase", vec![], @@ -1520,8 +1542,8 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[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 :: StorageAddress :: < 'static , :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: storage :: address :: AddressIsIterable , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 < :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: 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 >{ + ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Agenda", vec![::subxt::storage::address::StorageMapKey::new( @@ -1536,8 +1558,8 @@ 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 :: StorageAddress :: < 'static , :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > > , :: subxt :: storage :: address :: AddressIsIterable , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 < :: std :: vec :: Vec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: ScheduledV3 < runtime_types :: frame_support :: traits :: schedule :: MaybeHashed < runtime_types :: polkadot_runtime :: Call , :: subxt :: ext :: sp_core :: H256 > , :: 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::StaticStorageAddress::new( "Scheduler", "Agenda", Vec::new(), @@ -1553,13 +1575,16 @@ pub mod api { pub fn lookup( &self, _0: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Lookup", vec![::subxt::storage::address::StorageMapKey::new( @@ -1577,13 +1602,16 @@ pub mod api { #[doc = " Lookup from identity to the block number and index of the task."] pub fn lookup_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Lookup", Vec::new(), @@ -1834,16 +1862,18 @@ pub mod api { pub fn status_for( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_preimage::RequestStatus< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_preimage::RequestStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Preimage", "StatusFor", vec![::subxt::storage::address::StorageMapKey::new( @@ -1861,16 +1891,18 @@ pub mod api { #[doc = " The request status of a given hash."] pub fn status_for_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_preimage::RequestStatus< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_preimage::RequestStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Preimage", "StatusFor", Vec::new(), @@ -1886,15 +1918,17 @@ pub mod api { pub fn preimage_for( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Preimage", "PreimageFor", vec![::subxt::storage::address::StorageMapKey::new( @@ -1912,15 +1946,17 @@ pub mod api { #[doc = " The preimages stored by this pallet."] pub fn preimage_for_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Preimage", "PreimageFor", Vec::new(), @@ -2088,13 +2124,13 @@ pub mod api { #[doc = " Current epoch index."] pub fn epoch_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "EpochIndex", vec![], @@ -2106,21 +2142,8 @@ pub mod api { ], ) } - #[doc = " Current epoch authorities."] - pub fn authorities( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - ( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - ), - >, - (), - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " Current epoch authorities."] pub fn authorities (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "Authorities", vec![], @@ -2136,13 +2159,15 @@ pub mod api { #[doc = " until the first block of the chain."] pub fn genesis_slot( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_consensus_slots::Slot, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_consensus_slots::Slot, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "GenesisSlot", vec![], @@ -2157,13 +2182,15 @@ pub mod api { #[doc = " Current slot number."] pub fn current_slot( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_consensus_slots::Slot, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_consensus_slots::Slot, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "CurrentSlot", vec![], @@ -2187,13 +2214,13 @@ pub mod api { #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] pub fn randomness( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - [::core::primitive::u8; 32usize], + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "Randomness", vec![], @@ -2208,13 +2235,15 @@ pub mod api { #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] pub fn pending_epoch_config_change( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "PendingEpochConfigChange", vec![], @@ -2229,13 +2258,13 @@ pub mod api { #[doc = " Next epoch randomness."] pub fn next_randomness( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - [::core::primitive::u8; 32usize], + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "NextRandomness", vec![], @@ -2247,21 +2276,8 @@ pub mod api { ], ) } - #[doc = " Next epoch authorities."] - pub fn next_authorities( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - ( - runtime_types::sp_consensus_babe::app::Public, - ::core::primitive::u64, - ), - >, - (), - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " Next epoch authorities."] pub fn next_authorities (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "NextAuthorities", vec![], @@ -2284,13 +2300,13 @@ pub mod api { #[doc = " epoch."] pub fn segment_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "SegmentIndex", vec![], @@ -2306,15 +2322,17 @@ pub mod api { pub fn under_construction( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "UnderConstruction", vec![::subxt::storage::address::StorageMapKey::new( @@ -2332,15 +2350,17 @@ pub mod api { #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] pub fn under_construction_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "UnderConstruction", Vec::new(), @@ -2356,15 +2376,17 @@ pub mod api { #[doc = " if per-block initialization has already been called for current block."] pub fn initialized( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::option::Option< - runtime_types::sp_consensus_babe::digests::PreDigest, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::core::option::Option< + runtime_types::sp_consensus_babe::digests::PreDigest, + >, >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "Initialized", vec![], @@ -2382,13 +2404,15 @@ pub mod api { #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] pub fn author_vrf_randomness( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::option::Option<[::core::primitive::u8; 32usize]>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::core::option::Option<[::core::primitive::u8; 32usize]>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "AuthorVrfRandomness", vec![], @@ -2407,13 +2431,16 @@ pub mod api { #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] pub fn epoch_start( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "EpochStart", vec![], @@ -2432,13 +2459,13 @@ pub mod api { #[doc = " execution context should always yield zero."] pub fn lateness( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "Lateness", vec![], @@ -2454,13 +2481,15 @@ pub mod api { #[doc = " genesis."] pub fn epoch_config( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_consensus_babe::BabeEpochConfiguration, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "EpochConfig", vec![], @@ -2476,13 +2505,15 @@ pub mod api { #[doc = " (you can fallback to `EpochConfig` instead in that case)."] pub fn next_epoch_config( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_consensus_babe::BabeEpochConfiguration, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_consensus_babe::BabeEpochConfiguration, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Babe", "NextEpochConfig", vec![], @@ -2628,13 +2659,13 @@ pub mod api { #[doc = " Current time for the current block."] pub fn now( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Timestamp", "Now", vec![], @@ -2649,13 +2680,13 @@ pub mod api { #[doc = " Did the timestamp get updated in this block?"] pub fn did_update( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Timestamp", "DidUpdate", vec![], @@ -3013,17 +3044,17 @@ pub mod api { pub fn accounts( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ::core::primitive::bool, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Indices", "Accounts", vec![::subxt::storage::address::StorageMapKey::new( @@ -3041,17 +3072,17 @@ pub mod api { #[doc = " The lookup from index to account."] pub fn accounts_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, ::core::primitive::bool, - ), - ::subxt::storage::address::AddressIsIterable, + )>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Indices", "Accounts", Vec::new(), @@ -3571,13 +3602,13 @@ pub mod api { #[doc = " The total units issued in the system."] pub fn total_issuance( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "TotalIssuance", vec![], @@ -3616,13 +3647,17 @@ pub mod api { pub fn account( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "Account", vec![::subxt::storage::address::StorageMapKey::new( @@ -3663,13 +3698,17 @@ pub mod api { #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] pub fn account_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "Account", Vec::new(), @@ -3682,21 +3721,8 @@ pub mod api { ) } #[doc = " Any liquidity locks on some account balances."] - #[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>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock< - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "Locks", vec![::subxt::storage::address::StorageMapKey::new( @@ -3712,20 +3738,8 @@ pub mod api { ) } #[doc = " Any liquidity locks on some account balances."] - #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] - pub fn locks_root( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_balances::BalanceLock< - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] pub fn locks_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "Locks", Vec::new(), @@ -3741,18 +3755,20 @@ pub mod api { pub fn reserves( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "Reserves", vec![::subxt::storage::address::StorageMapKey::new( @@ -3770,18 +3786,20 @@ pub mod api { #[doc = " Named reserves on some account balances."] pub fn reserves_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_balances::ReserveData< - [::core::primitive::u8; 8usize], - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "Reserves", Vec::new(), @@ -3798,13 +3816,15 @@ pub mod api { #[doc = " This is set to v2.0.0 for new networks."] pub fn storage_version( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_balances::Releases, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_balances::Releases, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Balances", "StorageVersion", vec![], @@ -3889,13 +3909,15 @@ pub mod api { impl StorageApi { pub fn next_fee_multiplier( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_arithmetic::fixed_point::FixedU128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::fixed_point::FixedU128, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TransactionPayment", "NextFeeMultiplier", vec![], @@ -3909,13 +3931,15 @@ pub mod api { } pub fn storage_version( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_transaction_payment::Releases, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_transaction_payment::Releases, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TransactionPayment", "StorageVersion", vec![], @@ -4033,19 +4057,21 @@ pub mod api { #[doc = " Uncles"] pub fn uncles( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::pallet_authorship::UncleEntryItem< - ::core::primitive::u32, - ::subxt::ext::sp_core::H256, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::pallet_authorship::UncleEntryItem< + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Authorship", "Uncles", vec![], @@ -4060,13 +4086,15 @@ pub mod api { #[doc = " Author of current block."] pub fn author( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Authorship", "Author", vec![], @@ -4081,13 +4109,13 @@ pub mod api { #[doc = " Whether uncles were already set in this block."] pub fn did_set_uncles( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Authorship", "DidSetUncles", vec![], @@ -5517,13 +5545,13 @@ pub mod api { #[doc = " guaranteed."] pub fn history_depth( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "HistoryDepth", vec![], @@ -5538,13 +5566,13 @@ pub mod api { #[doc = " The ideal number of staking participants."] pub fn validator_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ValidatorCount", vec![], @@ -5559,13 +5587,13 @@ pub mod api { #[doc = " Minimum number of staking participants before emergency conditions are imposed."] pub fn minimum_validator_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "MinimumValidatorCount", vec![], @@ -5582,13 +5610,15 @@ pub mod api { #[doc = " invulnerables) and restricted to testnets."] pub fn invulnerables( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Invulnerables", vec![], @@ -5604,13 +5634,15 @@ pub mod api { pub fn bonded( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Bonded", vec![::subxt::storage::address::StorageMapKey::new( @@ -5628,13 +5660,15 @@ pub mod api { #[doc = " Map from all locked \"stash\" accounts to the controller account."] pub fn bonded_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Bonded", Vec::new(), @@ -5649,13 +5683,13 @@ pub mod api { #[doc = " The minimum active bond to become and maintain the role of a nominator."] pub fn min_nominator_bond( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "MinNominatorBond", vec![], @@ -5670,13 +5704,13 @@ pub mod api { #[doc = " The minimum active bond to become and maintain the role of a validator."] pub fn min_validator_bond( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "MinValidatorBond", vec![], @@ -5693,13 +5727,15 @@ pub mod api { #[doc = " If set to `0`, no limit exists."] pub fn min_commission( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "MinCommission", vec![], @@ -5715,13 +5751,15 @@ pub mod api { pub fn ledger( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::StakingLedger, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::StakingLedger, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Ledger", vec![::subxt::storage::address::StorageMapKey::new( @@ -5739,13 +5777,15 @@ pub mod api { #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] pub fn ledger_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::StakingLedger, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::StakingLedger, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Ledger", Vec::new(), @@ -5761,15 +5801,17 @@ pub mod api { pub fn payee( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::RewardDestination< + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Payee", vec![::subxt::storage::address::StorageMapKey::new( @@ -5787,15 +5829,17 @@ pub mod api { #[doc = " Where the reward payment should be made. Keyed by stash."] pub fn payee_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::RewardDestination< - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::RewardDestination< + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Payee", Vec::new(), @@ -5811,13 +5855,15 @@ pub mod api { pub fn validators( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::ValidatorPrefs, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Validators", vec![::subxt::storage::address::StorageMapKey::new( @@ -5835,13 +5881,15 @@ pub mod api { #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] pub fn validators_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::ValidatorPrefs, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Validators", Vec::new(), @@ -5856,13 +5904,13 @@ pub mod api { #[doc = "Counter for the related counted storage map"] pub fn counter_for_validators( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "CounterForValidators", vec![], @@ -5879,13 +5927,13 @@ pub mod api { #[doc = " When this value is not set, no limits are enforced."] pub fn max_validators_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "MaxValidatorsCount", vec![], @@ -5916,13 +5964,15 @@ pub mod api { pub fn nominators( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Nominations, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Nominations, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Nominators", vec![::subxt::storage::address::StorageMapKey::new( @@ -5955,13 +6005,15 @@ pub mod api { #[doc = " [`Call::chill_other`] dispatchable by anyone."] pub fn nominators_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Nominations, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Nominations, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "Nominators", Vec::new(), @@ -5976,13 +6028,13 @@ pub mod api { #[doc = "Counter for the related counted storage map"] pub fn counter_for_nominators( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "CounterForNominators", vec![], @@ -5999,13 +6051,13 @@ pub mod api { #[doc = " When this value is not set, no limits are enforced."] pub fn max_nominators_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "MaxNominatorsCount", vec![], @@ -6023,13 +6075,13 @@ pub mod api { #[doc = " set, it might be active or not."] pub fn current_era( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "CurrentEra", vec![], @@ -6047,13 +6099,15 @@ pub mod api { #[doc = " equal to [`SessionInterface::validators`]."] pub fn active_era( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::ActiveEraInfo, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::ActiveEraInfo, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ActiveEra", vec![], @@ -6072,13 +6126,13 @@ pub mod api { pub fn eras_start_session_index( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasStartSessionIndex", vec![::subxt::storage::address::StorageMapKey::new( @@ -6099,13 +6153,13 @@ pub mod api { #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] pub fn eras_start_session_index_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasStartSessionIndex", Vec::new(), @@ -6127,16 +6181,18 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasStakers", vec![ @@ -6165,16 +6221,18 @@ pub mod api { #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] pub fn eras_stakers_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasStakers", Vec::new(), @@ -6201,16 +6259,18 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasStakersClipped", vec![ @@ -6244,16 +6304,18 @@ pub mod api { #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] pub fn eras_stakers_clipped_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Exposure< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasStakersClipped", Vec::new(), @@ -6274,13 +6336,15 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::ValidatorPrefs, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasValidatorPrefs", vec![ @@ -6308,13 +6372,15 @@ pub mod api { #[doc = " Is it removed after `HISTORY_DEPTH` eras."] pub fn eras_validator_prefs_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::ValidatorPrefs, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasValidatorPrefs", Vec::new(), @@ -6332,13 +6398,13 @@ pub mod api { pub fn eras_validator_reward( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasValidatorReward", vec![::subxt::storage::address::StorageMapKey::new( @@ -6358,13 +6424,13 @@ pub mod api { #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] pub fn eras_validator_reward_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasValidatorReward", Vec::new(), @@ -6381,15 +6447,17 @@ pub mod api { pub fn eras_reward_points( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::EraRewardPoints< - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::EraRewardPoints< + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasRewardPoints", vec![::subxt::storage::address::StorageMapKey::new( @@ -6408,15 +6476,17 @@ pub mod api { #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] pub fn eras_reward_points_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::EraRewardPoints< - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::EraRewardPoints< + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasRewardPoints", Vec::new(), @@ -6433,13 +6503,13 @@ pub mod api { pub fn eras_total_stake( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasTotalStake", vec![::subxt::storage::address::StorageMapKey::new( @@ -6458,13 +6528,13 @@ pub mod api { #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] pub fn eras_total_stake_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ErasTotalStake", Vec::new(), @@ -6479,13 +6549,15 @@ pub mod api { #[doc = " Mode of era forcing."] pub fn force_era( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Forcing, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Forcing, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ForceEra", vec![], @@ -6502,13 +6574,15 @@ pub mod api { #[doc = " The rest of the slashed value is handled by the `Slash`."] pub fn slash_reward_fraction( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "SlashRewardFraction", vec![], @@ -6524,13 +6598,13 @@ pub mod api { #[doc = " canceled by extraordinary circumstances (e.g. governance)."] pub fn canceled_slash_payout( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "CanceledSlashPayout", vec![], @@ -6546,18 +6620,20 @@ pub mod api { pub fn unapplied_slashes( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "UnappliedSlashes", vec![::subxt::storage::address::StorageMapKey::new( @@ -6575,18 +6651,20 @@ pub mod api { #[doc = " All unapplied slashes that are queued for later."] pub fn unapplied_slashes_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "UnappliedSlashes", Vec::new(), @@ -6604,13 +6682,15 @@ pub mod api { #[doc = " `[active_era - bounding_duration; active_era]`"] pub fn bonded_eras( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "BondedEras", vec![], @@ -6628,16 +6708,16 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::sp_arithmetic::per_things::Perbill, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ValidatorSlashInEra", vec![ @@ -6662,16 +6742,16 @@ pub mod api { #[doc = " and slash value of the era."] pub fn validator_slash_in_era_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::sp_arithmetic::per_things::Perbill, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ValidatorSlashInEra", Vec::new(), @@ -6688,13 +6768,13 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "NominatorSlashInEra", vec![ @@ -6718,13 +6798,13 @@ pub mod api { #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] pub fn nominator_slash_in_era_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "NominatorSlashInEra", Vec::new(), @@ -6740,13 +6820,15 @@ pub mod api { pub fn slashing_spans( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::slashing::SlashingSpans, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::slashing::SlashingSpans, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "SlashingSpans", vec![::subxt::storage::address::StorageMapKey::new( @@ -6764,13 +6846,15 @@ pub mod api { #[doc = " Slashing spans for stash accounts."] pub fn slashing_spans_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::slashing::SlashingSpans, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::slashing::SlashingSpans, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "SlashingSpans", Vec::new(), @@ -6788,15 +6872,17 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::slashing::SpanRecord< + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "SpanSlash", vec![::subxt::storage::address::StorageMapKey::new( @@ -6815,15 +6901,17 @@ pub mod api { #[doc = " as well as how much reward has been paid out."] pub fn span_slash_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::slashing::SpanRecord< + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "SpanSlash", Vec::new(), @@ -6838,13 +6926,13 @@ pub mod api { #[doc = " The earliest era for which we have a pending, unapplied slash."] pub fn earliest_unapplied_slash( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "EarliestUnappliedSlash", vec![], @@ -6861,13 +6949,13 @@ pub mod api { #[doc = " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]."] pub fn current_planned_session( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "CurrentPlannedSession", vec![], @@ -6890,13 +6978,18 @@ pub mod api { #[doc = " the era ends."] pub fn offending_validators( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + ::core::primitive::u32, + ::core::primitive::bool, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "OffendingValidators", vec![], @@ -6914,13 +7007,15 @@ pub mod api { #[doc = " This is set to v7.0.0 for new networks."] pub fn storage_version( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_staking::Releases, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_staking::Releases, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "StorageVersion", vec![], @@ -6937,13 +7032,15 @@ pub mod api { #[doc = " (`CountFor*`) in the system compared to the configured max (`Max*Count`)."] pub fn chill_threshold( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_arithmetic::per_things::Percent, - (), + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_arithmetic::per_things::Percent, + >, + ::subxt::storage::address::Yes, + (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", "ChillThreshold", vec![], @@ -7111,22 +7208,24 @@ pub mod api { pub fn reports( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::ext::sp_core::crypto::AccountId32, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_staking::offence::OffenceDetails< ::subxt::ext::sp_core::crypto::AccountId32, - runtime_types::pallet_staking::Exposure< + ( ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ), + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ), + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Offences", "Reports", vec![::subxt::storage::address::StorageMapKey::new( @@ -7144,22 +7243,24 @@ pub mod api { #[doc = " The primary structure that holds all offence records keyed by report identifiers."] pub fn reports_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::ext::sp_core::crypto::AccountId32, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_staking::offence::OffenceDetails< ::subxt::ext::sp_core::crypto::AccountId32, - runtime_types::pallet_staking::Exposure< + ( ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ), + runtime_types::pallet_staking::Exposure< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ), + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Offences", "Reports", Vec::new(), @@ -7176,13 +7277,15 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::H256>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::H256>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Offences", "ConcurrentReportsIndex", vec![ @@ -7206,13 +7309,15 @@ pub mod api { #[doc = " A vector of reports of the same kind that happened at the same time slot."] pub fn concurrent_reports_index_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::H256>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::H256>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Offences", "ConcurrentReportsIndex", Vec::new(), @@ -7233,13 +7338,15 @@ pub mod api { pub fn reports_by_kind_index( &self, _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Offences", "ReportsByKindIndex", vec![::subxt::storage::address::StorageMapKey::new( @@ -7262,13 +7369,15 @@ pub mod api { #[doc = " different types are not supported at the moment so we are doing the manual serialization."] pub fn reports_by_kind_index_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Offences", "ReportsByKindIndex", Vec::new(), @@ -7413,13 +7522,15 @@ pub mod api { #[doc = " The current set of validators."] pub fn validators( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "Validators", vec![], @@ -7434,13 +7545,13 @@ pub mod api { #[doc = " Current index of the session."] pub fn current_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "CurrentIndex", vec![], @@ -7456,13 +7567,13 @@ pub mod api { #[doc = " has changed in the queued validator set."] pub fn queued_changed( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "QueuedChanged", vec![], @@ -7478,16 +7589,18 @@ pub mod api { #[doc = " will be used to determine the validator's session keys."] pub fn queued_keys( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::SessionKeys, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_runtime::SessionKeys, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "QueuedKeys", vec![], @@ -7506,13 +7619,15 @@ pub mod api { #[doc = " a new set of identities."] pub fn disabled_validators( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u32>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "DisabledValidators", vec![], @@ -7528,13 +7643,15 @@ pub mod api { pub fn next_keys( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime::SessionKeys, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime::SessionKeys, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "NextKeys", vec![::subxt::storage::address::StorageMapKey::new( @@ -7552,13 +7669,15 @@ pub mod api { #[doc = " The next session keys for a validator."] pub fn next_keys_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime::SessionKeys, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime::SessionKeys, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "NextKeys", Vec::new(), @@ -7575,13 +7694,15 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow, _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "KeyOwner", vec![::subxt::storage::address::StorageMapKey::new( @@ -7599,13 +7720,15 @@ pub mod api { #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] pub fn key_owner_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Session", "KeyOwner", Vec::new(), @@ -7823,13 +7946,17 @@ pub mod api { #[doc = " State of the current authority set."] pub fn state( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_grandpa::StoredState< + ::core::primitive::u32, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "State", vec![], @@ -7844,15 +7971,17 @@ pub mod api { #[doc = " Pending change: (signaled at, scheduled change)."] pub fn pending_change( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_grandpa::StoredPendingChange< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_grandpa::StoredPendingChange< + ::core::primitive::u32, + >, >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "PendingChange", vec![], @@ -7867,13 +7996,13 @@ pub mod api { #[doc = " next block number where we can force a change."] pub fn next_forced( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "NextForced", vec![], @@ -7888,13 +8017,16 @@ pub mod api { #[doc = " `true` if we are currently stalled."] pub fn stalled( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "Stalled", vec![], @@ -7910,13 +8042,13 @@ pub mod api { #[doc = " in the \"set\" of Grandpa validators from genesis."] pub fn current_set_id( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "CurrentSetId", vec![], @@ -7935,13 +8067,13 @@ pub mod api { pub fn set_id_session( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "SetIdSession", vec![::subxt::storage::address::StorageMapKey::new( @@ -7962,13 +8094,13 @@ pub mod api { #[doc = " TWOX-NOTE: `SetId` is not under user control."] pub fn set_id_session_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Grandpa", "SetIdSession", Vec::new(), @@ -8132,13 +8264,13 @@ pub mod api { #[doc = " more accurate then the value we calculate for `HeartbeatAfter`."] pub fn heartbeat_after( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ImOnline", "HeartbeatAfter", vec![], @@ -8150,18 +8282,8 @@ pub mod api { ], ) } - #[doc = " The current set of keys that may issue a heartbeat."] - pub fn keys( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - >, - (), - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The current set of keys that may issue a heartbeat."] pub fn keys (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_runtime :: bounded :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Public > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ImOnline", "Keys", vec![], @@ -8179,15 +8301,17 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ImOnline", "ReceivedHeartbeats", vec![ @@ -8212,15 +8336,17 @@ pub mod api { #[doc = " `WrapperOpaque`."] pub fn received_heartbeats_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ImOnline", "ReceivedHeartbeats", Vec::new(), @@ -8238,13 +8364,13 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ImOnline", "AuthoredBlocks", vec![ @@ -8269,13 +8395,13 @@ pub mod api { #[doc = " number of blocks authored by the given authority."] pub fn authored_blocks_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ImOnline", "AuthoredBlocks", Vec::new(), @@ -9665,13 +9791,13 @@ pub mod api { #[doc = " The number of (public) proposals that have been made so far."] pub fn public_prop_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "PublicPropCount", vec![], @@ -9686,17 +9812,19 @@ pub mod api { #[doc = " The public proposals. Unsorted. The second item is the proposal's hash."] pub fn public_props( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - ::core::primitive::u32, - ::subxt::ext::sp_core::H256, - ::subxt::ext::sp_core::crypto::AccountId32, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::subxt::ext::sp_core::crypto::AccountId32, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "PublicProps", vec![], @@ -9714,16 +9842,16 @@ pub mod api { pub fn deposit_of( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "DepositOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -9743,16 +9871,16 @@ pub mod api { #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] pub fn deposit_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, + )>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "DepositOf", Vec::new(), @@ -9769,17 +9897,19 @@ pub mod api { pub fn preimages( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::PreimageStatus< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::PreimageStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "Preimages", vec![::subxt::storage::address::StorageMapKey::new( @@ -9798,17 +9928,19 @@ pub mod api { #[doc = " The block number is the block at which it was deposited."] pub fn preimages_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::PreimageStatus< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::PreimageStatus< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "Preimages", Vec::new(), @@ -9823,13 +9955,13 @@ pub mod api { #[doc = " The next free referendum index, aka the number of referenda started so far."] pub fn referendum_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "ReferendumCount", vec![], @@ -9845,13 +9977,13 @@ pub mod api { #[doc = " `ReferendumCount` if there isn't a unbaked referendum."] pub fn lowest_unbaked( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "LowestUnbaked", vec![], @@ -9869,17 +10001,19 @@ pub mod api { pub fn referendum_info_of( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - ::subxt::ext::sp_core::H256, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "ReferendumInfoOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -9899,17 +10033,19 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] pub fn referendum_info_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::types::ReferendumInfo< - ::core::primitive::u32, - ::subxt::ext::sp_core::H256, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "ReferendumInfoOf", Vec::new(), @@ -9928,17 +10064,19 @@ pub mod api { pub fn voting_of( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "VotingOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -9959,17 +10097,19 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] pub fn voting_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::vote::Voting< - ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "VotingOf", Vec::new(), @@ -9985,13 +10125,13 @@ pub mod api { #[doc = " proposal."] pub fn last_tabled_was_external( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "LastTabledWasExternal", vec![], @@ -10009,16 +10149,16 @@ pub mod api { #[doc = " - `PublicProps` is empty."] pub fn next_external( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::ext::sp_core::H256, runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ), + )>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "NextExternal", vec![], @@ -10035,16 +10175,16 @@ pub mod api { pub fn blacklist( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u32, ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "Blacklist", vec![::subxt::storage::address::StorageMapKey::new( @@ -10063,16 +10203,16 @@ pub mod api { #[doc = " (until when it may not be resubmitted) and who vetoed it."] pub fn blacklist_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u32, ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, - ), - ::subxt::storage::address::AddressIsIterable, + )>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "Blacklist", Vec::new(), @@ -10088,13 +10228,13 @@ pub mod api { pub fn cancellations( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "Cancellations", vec![::subxt::storage::address::StorageMapKey::new( @@ -10112,13 +10252,13 @@ pub mod api { #[doc = " Record of all proposals that have been subject to emergency cancellation."] pub fn cancellations_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "Cancellations", Vec::new(), @@ -10135,13 +10275,15 @@ pub mod api { #[doc = " New networks start with last version."] pub fn storage_version( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_democracy::Releases, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_democracy::Releases, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Democracy", "StorageVersion", vec![], @@ -10860,15 +11002,17 @@ pub mod api { #[doc = " The hashes of the active proposals."] pub fn proposals( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::H256, - >, - (), - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::H256, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "Proposals", vec![], @@ -10884,13 +11028,15 @@ pub mod api { pub fn proposal_of( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime::Call, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime::Call, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "ProposalOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -10908,13 +11054,15 @@ pub mod api { #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime::Call, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime::Call, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "ProposalOf", Vec::new(), @@ -10930,16 +11078,18 @@ pub mod api { pub fn voting( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "Voting", vec![::subxt::storage::address::StorageMapKey::new( @@ -10957,16 +11107,18 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "Voting", Vec::new(), @@ -10981,13 +11133,13 @@ pub mod api { #[doc = " Proposals so far."] pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "ProposalCount", vec![], @@ -11002,13 +11154,15 @@ pub mod api { #[doc = " The current members of the collective. This is stored sorted (just by value)."] pub fn members( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "Members", vec![], @@ -11023,13 +11177,15 @@ pub mod api { #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] pub fn prime( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Council", "Prime", vec![], @@ -11532,15 +11688,17 @@ pub mod api { #[doc = " The hashes of the active proposals."] pub fn proposals( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::H256, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "Proposals", vec![], @@ -11556,13 +11714,15 @@ pub mod api { pub fn proposal_of( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime::Call, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime::Call, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "ProposalOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -11580,13 +11740,15 @@ pub mod api { #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime::Call, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime::Call, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "ProposalOf", Vec::new(), @@ -11602,16 +11764,18 @@ pub mod api { pub fn voting( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "Voting", vec![::subxt::storage::address::StorageMapKey::new( @@ -11629,16 +11793,18 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_collective::Votes< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_collective::Votes< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "Voting", Vec::new(), @@ -11653,13 +11819,13 @@ pub mod api { #[doc = " Proposals so far."] pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "ProposalCount", vec![], @@ -11674,13 +11840,15 @@ pub mod api { #[doc = " The current members of the collective. This is stored sorted (just by value)."] pub fn members( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "Members", vec![], @@ -11695,13 +11863,15 @@ pub mod api { #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] pub fn prime( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalCommittee", "Prime", vec![], @@ -12119,18 +12289,20 @@ pub mod api { #[doc = " Invariant: Always sorted based on account id."] pub fn members( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "PhragmenElection", "Members", vec![], @@ -12148,18 +12320,20 @@ pub mod api { #[doc = " last (i.e. _best_) runner-up will be replaced."] pub fn runners_up( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "PhragmenElection", "RunnersUp", vec![], @@ -12179,16 +12353,18 @@ pub mod api { #[doc = " Invariant: Always sorted based on account id."] pub fn candidates( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "PhragmenElection", "Candidates", vec![], @@ -12203,13 +12379,13 @@ pub mod api { #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."] pub fn election_rounds( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "PhragmenElection", "ElectionRounds", vec![], @@ -12227,16 +12403,18 @@ pub mod api { pub fn voting( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_elections_phragmen::Voter< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "PhragmenElection", "Voting", vec![::subxt::storage::address::StorageMapKey::new( @@ -12256,16 +12434,18 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] pub fn voting_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_elections_phragmen::Voter< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "PhragmenElection", "Voting", Vec::new(), @@ -12735,15 +12915,17 @@ pub mod api { #[doc = " The current membership, stored as an ordered Vec."] pub fn members( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalMembership", "Members", vec![], @@ -12758,13 +12940,15 @@ pub mod api { #[doc = " The current prime member, if one exists."] pub fn prime( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::subxt::ext::sp_core::crypto::AccountId32, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "TechnicalMembership", "Prime", vec![], @@ -13137,13 +13321,13 @@ pub mod api { #[doc = " Number of proposals that have been made."] pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Treasury", "ProposalCount", vec![], @@ -13159,16 +13343,18 @@ pub mod api { pub fn proposals( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_treasury::Proposal< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_treasury::Proposal< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Treasury", "Proposals", vec![::subxt::storage::address::StorageMapKey::new( @@ -13186,16 +13372,18 @@ pub mod api { #[doc = " Proposals that have been made."] pub fn proposals_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_treasury::Proposal< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_treasury::Proposal< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Treasury", "Proposals", Vec::new(), @@ -13210,15 +13398,17 @@ pub mod api { #[doc = " Proposal indices that have been approved but not yet awarded."] pub fn approvals( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Treasury", "Approvals", vec![], @@ -13694,13 +13884,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Claims", vec![::subxt::storage::address::StorageMapKey::new( @@ -13717,13 +13907,13 @@ pub mod api { } pub fn claims_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Claims", Vec::new(), @@ -13737,13 +13927,13 @@ pub mod api { } pub fn total( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Total", vec![], @@ -13764,17 +13954,17 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, ::core::primitive::u128, ::core::primitive::u32, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Vesting", vec![::subxt::storage::address::StorageMapKey::new( @@ -13795,17 +13985,17 @@ pub mod api { #[doc = " The block number is when the vesting should start."] pub fn vesting_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, ::core::primitive::u128, ::core::primitive::u32, - ), - ::subxt::storage::address::AddressIsIterable, + )>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Vesting", Vec::new(), @@ -13823,13 +14013,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::claims::StatementKind, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::claims::StatementKind, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Signing", vec![::subxt::storage::address::StorageMapKey::new( @@ -13847,13 +14039,15 @@ pub mod api { #[doc = " The statement kind that must be signed, if any."] pub fn signing_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::claims::StatementKind, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::claims::StatementKind, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Signing", Vec::new(), @@ -13869,13 +14063,15 @@ pub mod api { pub fn preclaims( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Preclaims", vec![::subxt::storage::address::StorageMapKey::new( @@ -13893,13 +14089,15 @@ pub mod api { #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] pub fn preclaims_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Claims", "Preclaims", Vec::new(), @@ -14269,18 +14467,20 @@ pub mod api { pub fn vesting( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Vesting", "Vesting", vec![::subxt::storage::address::StorageMapKey::new( @@ -14298,18 +14498,20 @@ pub mod api { #[doc = " Information regarding the vesting of a given account."] pub fn vesting_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Vesting", "Vesting", Vec::new(), @@ -14326,13 +14528,15 @@ pub mod api { #[doc = " New networks start with latest version, as determined by the genesis build."] pub fn storage_version( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_vesting::Releases, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_vesting::Releases, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Vesting", "StorageVersion", vec![], @@ -15622,15 +15826,17 @@ pub mod api { pub fn identity_of( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "IdentityOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -15650,15 +15856,17 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn identity_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "IdentityOf", Vec::new(), @@ -15675,16 +15883,16 @@ pub mod api { pub fn super_of( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "SuperOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -15703,16 +15911,16 @@ pub mod api { #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] pub fn super_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, - ), - ::subxt::storage::address::AddressIsIterable, + )>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "SuperOf", Vec::new(), @@ -15732,18 +15940,18 @@ pub mod api { pub fn subs_of( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< ::subxt::ext::sp_core::crypto::AccountId32, >, - ), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "SubsOf", vec![::subxt::storage::address::StorageMapKey::new( @@ -15765,18 +15973,18 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn subs_of_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< ::subxt::ext::sp_core::crypto::AccountId32, >, - ), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "SubsOf", Vec::new(), @@ -15794,20 +16002,22 @@ pub mod api { #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] pub fn registrars( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_identity::types::RegistrarInfo< - ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_identity::types::RegistrarInfo< + ::core::primitive::u128, + ::subxt::ext::sp_core::crypto::AccountId32, + >, >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Identity", "Registrars", vec![], @@ -16567,9 +16777,8 @@ pub mod api { pub fn proxies( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::ProxyDefinition< ::subxt::ext::sp_core::crypto::AccountId32, @@ -16578,11 +16787,12 @@ pub mod api { >, >, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Proxy", "Proxies", vec![::subxt::storage::address::StorageMapKey::new( @@ -16601,9 +16811,8 @@ pub mod api { #[doc = " which are being delegated to, together with the amount held on deposit."] pub fn proxies_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::ProxyDefinition< ::subxt::ext::sp_core::crypto::AccountId32, @@ -16612,11 +16821,12 @@ pub mod api { >, >, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Proxy", "Proxies", Vec::new(), @@ -16632,9 +16842,8 @@ pub mod api { pub fn announcements( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::Announcement< ::subxt::ext::sp_core::crypto::AccountId32, @@ -16643,11 +16852,12 @@ pub mod api { >, >, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Proxy", "Announcements", vec![::subxt::storage::address::StorageMapKey::new( @@ -16665,9 +16875,8 @@ pub mod api { #[doc = " The announcements made by the proxy (key)."] pub fn announcements_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::Announcement< ::subxt::ext::sp_core::crypto::AccountId32, @@ -16676,11 +16885,12 @@ pub mod api { >, >, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Proxy", "Announcements", Vec::new(), @@ -17228,32 +17438,36 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::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::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("Multisig" , "Multisigs" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [145u8 , 78u8 , 57u8 , 171u8 , 199u8 , 158u8 , 226u8 , 250u8 , 224u8 , 133u8 , 45u8 , 251u8 , 202u8 , 22u8 , 171u8 , 132u8 , 229u8 , 110u8 , 248u8 , 233u8 , 38u8 , 2u8 , 247u8 , 140u8 , 150u8 , 103u8 , 211u8 , 209u8 , 160u8 , 158u8 , 23u8 , 215u8 ,]) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Multisig" , "Multisigs" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [145u8 , 78u8 , 57u8 , 171u8 , 199u8 , 158u8 , 226u8 , 250u8 , 224u8 , 133u8 , 45u8 , 251u8 , 202u8 , 22u8 , 171u8 , 132u8 , 229u8 , 110u8 , 248u8 , 233u8 , 38u8 , 2u8 , 247u8 , 140u8 , 150u8 , 103u8 , 211u8 , 209u8 , 160u8 , 158u8 , 23u8 , 215u8 ,]) } #[doc = " The set of open multisig operations."] pub fn multisigs_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::ext::sp_core::crypto::AccountId32, + ) -> ::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::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Multisig", "Multisigs", Vec::new(), @@ -17268,19 +17482,19 @@ pub mod api { pub fn calls( &self, _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::utils::WrapperKeepOpaque< runtime_types::polkadot_runtime::Call, >, ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Multisig", "Calls", vec![::subxt::storage::address::StorageMapKey::new( @@ -17297,19 +17511,19 @@ pub mod api { } pub fn calls_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::subxt::utils::WrapperKeepOpaque< runtime_types::polkadot_runtime::Call, >, ::subxt::ext::sp_core::crypto::AccountId32, ::core::primitive::u128, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Multisig", "Calls", Vec::new(), @@ -17907,13 +18121,13 @@ pub mod api { #[doc = " Number of bounty proposals that have been made."] pub fn bounty_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Bounties", "BountyCount", vec![], @@ -17929,17 +18143,19 @@ pub mod api { pub fn bounties( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_bounties::Bounty< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_bounties::Bounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Bounties", "Bounties", vec![::subxt::storage::address::StorageMapKey::new( @@ -17957,17 +18173,19 @@ pub mod api { #[doc = " Bounties that have been made."] pub fn bounties_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_bounties::Bounty< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_bounties::Bounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Bounties", "Bounties", Vec::new(), @@ -17983,15 +18201,17 @@ pub mod api { pub fn bounty_descriptions( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Bounties", "BountyDescriptions", vec![::subxt::storage::address::StorageMapKey::new( @@ -18009,15 +18229,17 @@ pub mod api { #[doc = " The description of each bounty."] pub fn bounty_descriptions_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Bounties", "BountyDescriptions", Vec::new(), @@ -18032,15 +18254,17 @@ pub mod api { #[doc = " Bounty indices that have been approved but not yet funded."] pub fn bounty_approvals( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Bounties", "BountyApprovals", vec![], @@ -18736,13 +18960,13 @@ pub mod api { #[doc = " Number of total child bounties."] pub fn child_bounty_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildBountyCount", vec![], @@ -18759,13 +18983,13 @@ pub mod api { pub fn parent_child_bounties( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ParentChildBounties", vec![::subxt::storage::address::StorageMapKey::new( @@ -18784,13 +19008,13 @@ pub mod api { #[doc = " Map of parent bounty index to number of child bounties."] pub fn parent_child_bounties_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ParentChildBounties", Vec::new(), @@ -18807,17 +19031,19 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildBounties", vec![ @@ -18841,17 +19067,19 @@ pub mod api { #[doc = " Child bounties that have been added."] pub fn child_bounties_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildBounties", Vec::new(), @@ -18867,15 +19095,17 @@ pub mod api { pub fn child_bounty_descriptions( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildBountyDescriptions", vec![::subxt::storage::address::StorageMapKey::new( @@ -18893,15 +19123,17 @@ pub mod api { #[doc = " The description of each child-bounty."] pub fn child_bounty_descriptions_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildBountyDescriptions", Vec::new(), @@ -18917,13 +19149,13 @@ pub mod api { pub fn children_curator_fees( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildrenCuratorFees", vec![::subxt::storage::address::StorageMapKey::new( @@ -18941,13 +19173,13 @@ pub mod api { #[doc = " The cumulative child-bounty curator fee for each parent bounty."] pub fn children_curator_fees_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ChildBounties", "ChildrenCuratorFees", Vec::new(), @@ -19400,18 +19632,20 @@ pub mod api { pub fn tips( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_tips::OpenTip< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_tips::OpenTip< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Tips", "Tips", vec![::subxt::storage::address::StorageMapKey::new( @@ -19431,18 +19665,20 @@ pub mod api { #[doc = " guaranteed to be a secure hash."] pub fn tips_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_tips::OpenTip< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_tips::OpenTip< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::ext::sp_core::H256, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Tips", "Tips", Vec::new(), @@ -19459,13 +19695,15 @@ pub mod api { pub fn reasons( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Tips", "Reasons", vec![::subxt::storage::address::StorageMapKey::new( @@ -19484,13 +19722,15 @@ pub mod api { #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] pub fn reasons_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u8>, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Tips", "Reasons", Vec::new(), @@ -19939,13 +20179,13 @@ pub mod api { #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] pub fn round( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "Round", vec![], @@ -19960,15 +20200,17 @@ pub mod api { #[doc = " Current phase."] pub fn current_phase( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "CurrentPhase", vec![], @@ -19980,18 +20222,8 @@ pub mod api { ], ) } - #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] - pub fn queued_solution( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_election_provider_multi_phase::ReadySolution< - ::subxt::ext::sp_core::crypto::AccountId32, - >, - (), - (), - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] pub fn queued_solution (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution < :: subxt :: ext :: sp_core :: crypto :: AccountId32 > > , :: subxt :: storage :: address :: Yes , () , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "QueuedSolution", vec![], @@ -20005,16 +20237,8 @@ pub mod api { } #[doc = " Snapshot data of the round."] #[doc = ""] - #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] - pub fn snapshot( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, - (), - (), - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] pub fn snapshot (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot > , :: subxt :: storage :: address :: Yes , () , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "Snapshot", vec![], @@ -20031,13 +20255,13 @@ pub mod api { #[doc = " Only exists when [`Snapshot`] is present."] pub fn desired_targets( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "DesiredTargets", vec![], @@ -20051,8 +20275,8 @@ pub mod api { } #[doc = " The metadata of the [`RoundSnapshot`]"] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , () , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: storage :: address :: Yes , () , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SnapshotMetadata", vec![], @@ -20075,13 +20299,13 @@ pub mod api { #[doc = " because iteration is slow. Instead, we store the value here."] pub fn signed_submission_next_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionNextIndex", vec![], @@ -20098,8 +20322,8 @@ pub mod api { #[doc = ""] #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] - #[doc = " them one at a time instead of reading and decoding all of them at once."] pub fn signed_submission_indices (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: sp_runtime :: bounded :: bounded_btree_map :: BoundedBTreeMap < runtime_types :: sp_npos_elections :: ElectionScore , :: core :: primitive :: u32 > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " them one at a time instead of reading and decoding all of them at once."] pub fn signed_submission_indices (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_runtime :: bounded :: bounded_btree_map :: BoundedBTreeMap < runtime_types :: sp_npos_elections :: ElectionScore , :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionIndices", vec![], @@ -20117,8 +20341,8 @@ 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 :: StorageAddress :: < 'static , 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 :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 >{ + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionsMap", vec![::subxt::storage::address::StorageMapKey::new( @@ -20139,8 +20363,8 @@ 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 :: StorageAddress :: < 'static , 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 :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 >{ + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionsMap", Vec::new(), @@ -20158,13 +20382,15 @@ pub mod api { #[doc = " Can be set via `set_minimum_untrusted_score`."] pub fn minimum_untrusted_score( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_npos_elections::ElectionScore, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_npos_elections::ElectionScore, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "MinimumUntrustedScore", vec![], @@ -20608,13 +20834,15 @@ pub mod api { pub fn list_nodes( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_bags_list::list::Node, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_bags_list::list::Node, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "VoterList", "ListNodes", vec![::subxt::storage::address::StorageMapKey::new( @@ -20634,13 +20862,15 @@ pub mod api { #[doc = " Nodes store links forward and back within their respective bags."] pub fn list_nodes_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_bags_list::list::Node, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_bags_list::list::Node, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "VoterList", "ListNodes", Vec::new(), @@ -20655,13 +20885,13 @@ pub mod api { #[doc = "Counter for the related counted storage map"] pub fn counter_for_list_nodes( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "VoterList", "CounterForListNodes", vec![], @@ -20679,13 +20909,15 @@ pub mod api { pub fn list_bags( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_bags_list::list::Bag, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_bags_list::list::Bag, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "VoterList", "ListBags", vec![::subxt::storage::address::StorageMapKey::new( @@ -20705,13 +20937,15 @@ pub mod api { #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] pub fn list_bags_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_bags_list::list::Bag, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_bags_list::list::Bag, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "VoterList", "ListBags", Vec::new(), @@ -22225,8 +22459,8 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The active configuration for the current session."] pub fn active_config (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The active configuration for the current session."] pub fn active_config (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "Configuration", "ActiveConfig", vec![], @@ -22244,8 +22478,8 @@ pub mod api { #[doc = " be applied."] #[doc = ""] #[doc = " The list is sorted ascending by session index. Also, this list can only contain at most"] - #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "Configuration", "PendingConfigs", vec![], @@ -22261,13 +22495,13 @@ pub mod api { #[doc = " is meant to be used only as the last resort."] pub fn bypass_consistency_check( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::bool, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Configuration", "BypassConsistencyCheck", vec![], @@ -22300,13 +22534,13 @@ pub mod api { #[doc = " The current session index."] pub fn current_session_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasShared", "CurrentSessionIndex", vec![], @@ -22322,15 +22556,17 @@ pub mod api { #[doc = " Indices are into the broader validator set."] pub fn active_validator_indices( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasShared", "ActiveValidatorIndices", vec![], @@ -22346,15 +22582,17 @@ pub mod api { #[doc = " This should be the same length as `ActiveValidatorIndices`."] pub fn active_validator_keys( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::validator_app::Public, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasShared", "ActiveValidatorKeys", vec![], @@ -22443,8 +22681,8 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "AvailabilityBitfields", vec![::subxt::storage::address::StorageMapKey::new( @@ -22459,8 +22697,8 @@ pub mod api { ], ) } - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "AvailabilityBitfields", Vec::new(), @@ -22472,8 +22710,8 @@ 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 :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "PendingAvailability", vec![::subxt::storage::address::StorageMapKey::new( @@ -22488,8 +22726,8 @@ pub mod api { ], ) } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[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 >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "PendingAvailability", Vec::new(), @@ -22507,15 +22745,17 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "PendingAvailabilityCommitments", vec![::subxt::storage::address::StorageMapKey::new( @@ -22533,15 +22773,17 @@ pub mod api { #[doc = " The commitments of candidates pending availability, by `ParaId`."] pub fn pending_availability_commitments_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaInclusion", "PendingAvailabilityCommitments", Vec::new(), @@ -22620,9 +22862,13 @@ pub mod api { #[doc = " If this is `None` at the end of the block, we panic and render the block invalid."] pub fn included( &self, - ) -> ::subxt::storage::address::StorageAddress<'static, (), (), ()> - { - ::subxt::storage::address::StorageAddress::new_with_validation( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<()>, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( "ParaInherent", "Included", vec![], @@ -22637,15 +22883,17 @@ pub mod api { #[doc = " Scraped on chain data for extracting resolved disputes as well as backing votes."] pub fn on_chain_votes( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< - ::subxt::ext::sp_core::H256, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< + ::subxt::ext::sp_core::H256, + >, >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaInherent", "OnChainVotes", vec![], @@ -22675,17 +22923,19 @@ pub mod api { #[doc = " Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k."] pub fn validator_groups( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaScheduler", "ValidatorGroups", vec![], @@ -22700,8 +22950,8 @@ pub mod api { #[doc = " A queue of upcoming claims and which core they should be mapped onto."] #[doc = ""] #[doc = " The number of queued claims is bounded at the `scheduling_lookahead`"] - #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] pub fn parathread_queue (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] pub fn parathread_queue (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaScheduler", "ParathreadQueue", vec![], @@ -22723,17 +22973,19 @@ pub mod api { #[doc = " * The number of validators divided by `configuration.max_validators_per_core`."] pub fn availability_cores( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::CoreOccupied, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + ::core::option::Option< + runtime_types::polkadot_primitives::v2::CoreOccupied, + >, >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaScheduler", "AvailabilityCores", vec![], @@ -22751,13 +23003,17 @@ pub mod api { #[doc = " Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500."] pub fn parathread_claim_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaScheduler", "ParathreadClaimIndex", vec![], @@ -22777,13 +23033,13 @@ pub mod api { #[doc = " block following the session change, block number of which we save in this storage value."] pub fn session_start_block( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaScheduler", "SessionStartBlock", vec![], @@ -22800,8 +23056,8 @@ pub mod api { #[doc = " Bounded by the number of cores: one for each parachain and parathread multiplexer."] #[doc = ""] #[doc = " The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/"] - #[doc = " for the upcoming block."] pub fn scheduled (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " for the upcoming block."] pub fn scheduled (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaScheduler", "Scheduled", vec![], @@ -23233,8 +23489,8 @@ pub mod api { #[doc = " All currently active PVF pre-checking votes."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PvfActiveVoteMap", vec![::subxt::storage::address::StorageMapKey::new( @@ -23252,8 +23508,8 @@ pub mod api { #[doc = " All currently active PVF pre-checking votes."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PvfActiveVoteMap", Vec::new(), @@ -23265,18 +23521,8 @@ pub mod api { ], ) } - #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] - pub fn pvf_active_vote_list( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - (), - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] pub fn pvf_active_vote_list (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PvfActiveVoteList", vec![], @@ -23293,13 +23539,17 @@ pub mod api { #[doc = " Consider using the [`ParachainsCache`] type of modifying."] pub fn parachains( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "Parachains", vec![], @@ -23317,13 +23567,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "ParaLifecycles", vec![::subxt::storage::address::StorageMapKey::new( @@ -23341,13 +23593,15 @@ pub mod api { #[doc = " The current lifecycle of a all known Para IDs."] pub fn para_lifecycles_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "ParaLifecycles", Vec::new(), @@ -23365,13 +23619,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::HeadData, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::HeadData, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "Heads", vec![::subxt::storage::address::StorageMapKey::new( @@ -23389,13 +23645,15 @@ pub mod api { #[doc = " The head-data of every registered para."] pub fn heads_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::HeadData, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::HeadData, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "Heads", Vec::new(), @@ -23415,13 +23673,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "CurrentCodeHash", vec![::subxt::storage::address::StorageMapKey::new( @@ -23441,13 +23701,15 @@ pub mod api { #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn current_code_hash_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "CurrentCodeHash", Vec::new(), @@ -23469,13 +23731,15 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, >, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PastCodeHash", vec![::subxt::storage::address::StorageMapKey::new( @@ -23496,13 +23760,15 @@ pub mod api { #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn past_code_hash_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PastCodeHash", Vec::new(), @@ -23516,21 +23782,8 @@ pub mod api { } #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] - pub fn past_code_meta( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< - ::core::primitive::u32, - >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " to keep it available for secondary checkers."] pub fn past_code_meta (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaPastCodeMeta < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PastCodeMeta", vec![::subxt::storage::address::StorageMapKey::new( @@ -23547,18 +23800,8 @@ pub mod api { } #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] - pub fn past_code_meta_root( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< - ::core::primitive::u32, - >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " to keep it available for secondary checkers."] pub fn past_code_meta_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaPastCodeMeta < :: core :: primitive :: u32 > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PastCodeMeta", Vec::new(), @@ -23578,16 +23821,18 @@ pub mod api { #[doc = " Multiple entries for a single para are permitted. Ordered ascending by block number."] pub fn past_code_pruning( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "PastCodePruning", vec![], @@ -23607,13 +23852,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "FutureCodeUpgrades", vec![::subxt::storage::address::StorageMapKey::new( @@ -23633,13 +23878,13 @@ pub mod api { #[doc = " in the context of a relay chain block with a number >= `expected_at`."] pub fn future_code_upgrades_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "FutureCodeUpgrades", Vec::new(), @@ -23659,13 +23904,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "FutureCodeHash", vec![::subxt::storage::address::StorageMapKey::new( @@ -23685,13 +23932,15 @@ pub mod api { #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] pub fn future_code_hash_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "FutureCodeHash", Vec::new(), @@ -23717,13 +23966,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpgradeGoAheadSignal", vec![::subxt::storage::address::StorageMapKey::new( @@ -23749,13 +24000,15 @@ pub mod api { #[doc = " the format will require migration of parachains."] pub fn upgrade_go_ahead_signal_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpgradeGoAheadSignal", Vec::new(), @@ -23781,13 +24034,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::UpgradeRestriction, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::UpgradeRestriction, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpgradeRestrictionSignal", vec![::subxt::storage::address::StorageMapKey::new( @@ -23813,13 +24068,15 @@ pub mod api { #[doc = " the format will require migration of parachains."] pub fn upgrade_restriction_signal_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::UpgradeRestriction, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::UpgradeRestriction, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpgradeRestrictionSignal", Vec::new(), @@ -23836,16 +24093,18 @@ pub mod api { #[doc = " Ordered ascending by block number."] pub fn upgrade_cooldowns( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpgradeCooldowns", vec![], @@ -23863,16 +24122,18 @@ pub mod api { #[doc = " Ordered ascending by block number."] pub fn upcoming_upgrades( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpcomingUpgrades", vec![], @@ -23888,13 +24149,17 @@ pub mod api { pub fn actions_queue( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "ActionsQueue", vec![::subxt::storage::address::StorageMapKey::new( @@ -23912,13 +24177,17 @@ pub mod api { #[doc = " The actions to perform during the start of a specific session index."] pub fn actions_queue_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "ActionsQueue", Vec::new(), @@ -23933,19 +24202,8 @@ pub mod api { #[doc = " Upcoming paras instantiation arguments."] #[doc = ""] #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] - pub fn upcoming_paras_genesis( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, - ::subxt::storage::address::AddressIsIterable, - (), - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] pub fn upcoming_paras_genesis (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpcomingParasGenesis", vec![::subxt::storage::address::StorageMapKey::new( @@ -23963,16 +24221,8 @@ pub mod api { #[doc = " Upcoming paras instantiation arguments."] #[doc = ""] #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] - pub fn upcoming_paras_genesis_root( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, - ::subxt::storage::address::AddressIsIterable, - (), - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] pub fn upcoming_paras_genesis_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "UpcomingParasGenesis", Vec::new(), @@ -23990,13 +24240,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "CodeByHashRefs", vec![::subxt::storage::address::StorageMapKey::new( @@ -24014,13 +24264,13 @@ pub mod api { #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] pub fn code_by_hash_refs_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "CodeByHashRefs", Vec::new(), @@ -24041,13 +24291,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCode, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "CodeByHash", vec![::subxt::storage::address::StorageMapKey::new( @@ -24068,13 +24320,15 @@ pub mod api { #[doc = " [`PastCodeHash`]."] pub fn code_by_hash_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::ValidationCode, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Paras", "CodeByHash", Vec::new(), @@ -24171,9 +24425,13 @@ pub mod api { #[doc = " the semantics of this variable."] pub fn has_initialized( &self, - ) -> ::subxt::storage::address::StorageAddress<'static, (), (), ()> - { - ::subxt::storage::address::StorageAddress::new_with_validation( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<()>, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( "Initializer", "HasInitialized", vec![], @@ -24191,8 +24449,8 @@ pub mod api { #[doc = " the storage."] #[doc = ""] #[doc = " However this is a `Vec` regardless to handle various edge cases that may occur at runtime"] - #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , () , :: subxt :: storage :: address :: AddressHasDefaultValue >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "Initializer", "BufferedSessionChanges", vec![], @@ -24222,23 +24480,8 @@ pub mod api { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The downward messages addressed for a certain para."] - pub fn downward_message_queues( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The downward messages addressed for a certain para."] pub fn downward_message_queues (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_core_primitives :: InboundDownwardMessage < :: core :: primitive :: u32 > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Dmp", "DownwardMessageQueues", vec![::subxt::storage::address::StorageMapKey::new( @@ -24253,20 +24496,8 @@ pub mod api { ], ) } - #[doc = " The downward messages addressed for a certain para."] - pub fn downward_message_queues_root( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundDownwardMessage< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " The downward messages addressed for a certain para."] pub fn downward_message_queues_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_core_primitives :: InboundDownwardMessage < :: core :: primitive :: u32 > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Dmp", "DownwardMessageQueues", Vec::new(), @@ -24290,13 +24521,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::H256, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Dmp", "DownwardMessageQueueHeads", vec![::subxt::storage::address::StorageMapKey::new( @@ -24320,13 +24551,13 @@ pub mod api { #[doc = " - `H(M)`: is the hash of the message being appended."] pub fn downward_message_queue_heads_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::subxt::ext::sp_core::H256, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::subxt::ext::sp_core::H256>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Dmp", "DownwardMessageQueueHeads", Vec::new(), @@ -24528,13 +24759,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "RelayDispatchQueues", vec![::subxt::storage::address::StorageMapKey::new( @@ -24557,13 +24790,15 @@ pub mod api { #[doc = " The messages are processed in FIFO order."] pub fn relay_dispatch_queues_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "RelayDispatchQueues", Vec::new(), @@ -24591,13 +24826,16 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "RelayDispatchQueueSize", vec![::subxt::storage::address::StorageMapKey::new( @@ -24625,13 +24863,16 @@ pub mod api { #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] pub fn relay_dispatch_queue_size_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "RelayDispatchQueueSize", Vec::new(), @@ -24650,13 +24891,17 @@ pub mod api { #[doc = " `RelayDispatchQueues` and `RelayDispatchQueueSize`."] pub fn needs_dispatch( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "NeedsDispatch", vec![], @@ -24675,13 +24920,15 @@ pub mod api { #[doc = " - If `Some(para)`, then `para` must be present in `NeedsDispatch`."] pub fn next_dispatch_round_start_with( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::Id, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "NextDispatchRoundStartWith", vec![], @@ -24699,16 +24946,16 @@ pub mod api { pub fn overweight( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::polkadot_parachain::primitives::Id, ::std::vec::Vec<::core::primitive::u8>, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "Overweight", vec![::subxt::storage::address::StorageMapKey::new( @@ -24728,16 +24975,16 @@ pub mod api { #[doc = " These messages stay there until manually dispatched."] pub fn overweight_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( runtime_types::polkadot_parachain::primitives::Id, ::std::vec::Vec<::core::primitive::u8>, - ), - ::subxt::storage::address::AddressIsIterable, + )>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "Overweight", Vec::new(), @@ -24753,13 +25000,13 @@ pub mod api { #[doc = " index)."] pub fn overweight_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Ump", "OverweightCount", vec![], @@ -25132,8 +25379,8 @@ pub mod api { #[doc = " The set is accompanied by a list for iteration."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId > ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpOpenChannelRequests", vec![::subxt::storage::address::StorageMapKey::new( @@ -25153,8 +25400,8 @@ pub mod api { #[doc = " The set is accompanied by a list for iteration."] #[doc = ""] #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests_root (& self ,) -> :: subxt :: storage :: address :: StorageAddress :: < 'static , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: AddressIsIterable , () >{ - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpOpenChannelRequests", Vec::new(), @@ -25168,15 +25415,17 @@ pub mod api { } pub fn hrmp_open_channel_requests_list( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpOpenChannelRequestsList", vec![], @@ -25196,13 +25445,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpOpenChannelRequestCount", vec![::subxt::storage::address::StorageMapKey::new( @@ -25222,13 +25471,13 @@ pub mod api { #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] pub fn hrmp_open_channel_request_count_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpOpenChannelRequestCount", Vec::new(), @@ -25248,13 +25497,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpAcceptedChannelRequestCount", vec![::subxt::storage::address::StorageMapKey::new( @@ -25274,13 +25523,13 @@ pub mod api { #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] pub fn hrmp_accepted_channel_request_count_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpAcceptedChannelRequestCount", Vec::new(), @@ -25304,13 +25553,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (), - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<()>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpCloseChannelRequests", vec![::subxt::storage::address::StorageMapKey::new( @@ -25334,13 +25583,13 @@ pub mod api { #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_close_channel_requests_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<()>, (), - ::subxt::storage::address::AddressIsIterable, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpCloseChannelRequests", Vec::new(), @@ -25354,15 +25603,17 @@ pub mod api { } pub fn hrmp_close_channel_requests_list( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpCloseChannelRequestsList", vec![], @@ -25382,13 +25633,13 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpWatermarks", vec![::subxt::storage::address::StorageMapKey::new( @@ -25408,13 +25659,13 @@ pub mod api { #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] pub fn hrmp_watermarks_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpWatermarks", Vec::new(), @@ -25434,13 +25685,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpChannels", vec![::subxt::storage::address::StorageMapKey::new( @@ -25460,13 +25713,15 @@ pub mod api { #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] pub fn hrmp_channels_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpChannels", Vec::new(), @@ -25496,13 +25751,17 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpIngressChannelsIndex", vec![::subxt::storage::address::StorageMapKey::new( @@ -25532,13 +25791,17 @@ pub mod api { #[doc = " - the vectors are sorted."] pub fn hrmp_ingress_channels_index_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpIngressChannelsIndex", Vec::new(), @@ -25555,13 +25818,17 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpEgressChannelsIndex", vec![::subxt::storage::address::StorageMapKey::new( @@ -25578,13 +25845,17 @@ pub mod api { } pub fn hrmp_egress_channels_index_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpEgressChannelsIndex", Vec::new(), @@ -25603,17 +25874,19 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpChannelContents", vec![::subxt::storage::address::StorageMapKey::new( @@ -25632,17 +25905,19 @@ pub mod api { #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] pub fn hrmp_channel_contents_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpChannelContents", Vec::new(), @@ -25665,18 +25940,20 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - )>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + ::core::primitive::u32, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpChannelDigests", vec![::subxt::storage::address::StorageMapKey::new( @@ -25699,18 +25976,20 @@ pub mod api { #[doc = " same block number."] pub fn hrmp_channel_digests_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - )>, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<( + ::core::primitive::u32, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + )>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Hrmp", "HrmpChannelDigests", Vec::new(), @@ -25734,18 +26013,8 @@ pub mod api { impl StorageApi { #[doc = " Assignment keys for the current session."] #[doc = " Note that this API is private due to it being prone to 'off-by-one' at session boundaries."] - #[doc = " When in doubt, use `Sessions` API instead."] - pub fn assignment_keys_unsafe( - &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::assignment_app::Public, - >, - (), - ::subxt::storage::address::AddressHasDefaultValue, - > { - ::subxt::storage::address::StorageAddress::new_with_validation( + #[doc = " When in doubt, use `Sessions` API instead."] pub fn assignment_keys_unsafe (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_primitives :: v2 :: assignment_app :: Public > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( "ParaSessionInfo", "AssignmentKeysUnsafe", vec![], @@ -25760,13 +26029,13 @@ pub mod api { #[doc = " The earliest session for which previous session info is stored."] pub fn earliest_stored_session( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaSessionInfo", "EarliestStoredSession", vec![], @@ -25784,13 +26053,15 @@ pub mod api { pub fn sessions( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::SessionInfo, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::SessionInfo, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaSessionInfo", "Sessions", vec![::subxt::storage::address::StorageMapKey::new( @@ -25810,13 +26081,15 @@ pub mod api { #[doc = " Does not have any entries before the session index in the first session change notification."] pub fn sessions_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::SessionInfo, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::SessionInfo, + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaSessionInfo", "Sessions", Vec::new(), @@ -25832,13 +26105,15 @@ pub mod api { pub fn account_keys( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaSessionInfo", "AccountKeys", vec![::subxt::storage::address::StorageMapKey::new( @@ -25856,13 +26131,15 @@ pub mod api { #[doc = " The validator account keys of the validators actively participating in parachain consensus."] pub fn account_keys_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParaSessionInfo", "AccountKeys", Vec::new(), @@ -25987,13 +26264,13 @@ pub mod api { #[doc = " references sessions."] pub fn last_pruned_session( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasDisputes", "LastPrunedSession", vec![], @@ -26012,28 +26289,32 @@ pub mod api { _1: impl ::std::borrow::Borrow< runtime_types::polkadot_core_primitives::CandidateHash, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::DisputeState< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::DisputeState< + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Disputes" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [192u8 , 238u8 , 255u8 , 67u8 , 169u8 , 86u8 , 99u8 , 243u8 , 228u8 , 88u8 , 142u8 , 138u8 , 183u8 , 117u8 , 82u8 , 22u8 , 163u8 , 30u8 , 175u8 , 247u8 , 50u8 , 204u8 , 12u8 , 171u8 , 57u8 , 189u8 , 151u8 , 191u8 , 196u8 , 89u8 , 94u8 , 165u8 ,]) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("ParasDisputes" , "Disputes" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [192u8 , 238u8 , 255u8 , 67u8 , 169u8 , 86u8 , 99u8 , 243u8 , 228u8 , 88u8 , 142u8 , 138u8 , 183u8 , 117u8 , 82u8 , 22u8 , 163u8 , 30u8 , 175u8 , 247u8 , 50u8 , 204u8 , 12u8 , 171u8 , 57u8 , 189u8 , 151u8 , 191u8 , 196u8 , 89u8 , 94u8 , 165u8 ,]) } #[doc = " All ongoing or concluded disputes for the last several sessions."] pub fn disputes_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_primitives::v2::DisputeState< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_primitives::v2::DisputeState< + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasDisputes", "Disputes", Vec::new(), @@ -26053,25 +26334,25 @@ pub mod api { _1: impl ::std::borrow::Borrow< runtime_types::polkadot_core_primitives::CandidateHash, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("ParasDisputes" , "Included" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [129u8 , 50u8 , 76u8 , 60u8 , 82u8 , 106u8 , 248u8 , 164u8 , 152u8 , 80u8 , 58u8 , 185u8 , 211u8 , 225u8 , 122u8 , 100u8 , 234u8 , 241u8 , 123u8 , 205u8 , 4u8 , 8u8 , 193u8 , 116u8 , 167u8 , 158u8 , 252u8 , 223u8 , 204u8 , 226u8 , 74u8 , 195u8 ,]) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("ParasDisputes" , "Included" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [129u8 , 50u8 , 76u8 , 60u8 , 82u8 , 106u8 , 248u8 , 164u8 , 152u8 , 80u8 , 58u8 , 185u8 , 211u8 , 225u8 , 122u8 , 100u8 , 234u8 , 241u8 , 123u8 , 205u8 , 4u8 , 8u8 , 193u8 , 116u8 , 167u8 , 158u8 , 252u8 , 223u8 , 204u8 , 226u8 , 74u8 , 195u8 ,]) } #[doc = " All included blocks on the chain, as well as the block number in this chain that"] #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] pub fn included_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasDisputes", "Included", Vec::new(), @@ -26091,13 +26372,15 @@ pub mod api { pub fn spam_slots( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u32>, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u32>, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasDisputes", "SpamSlots", vec![::subxt::storage::address::StorageMapKey::new( @@ -26119,13 +26402,15 @@ pub mod api { #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] pub fn spam_slots_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec<::core::primitive::u32>, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec<::core::primitive::u32>, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasDisputes", "SpamSlots", Vec::new(), @@ -26143,13 +26428,15 @@ pub mod api { #[doc = " It can only be set back to `None` by governance intervention."] pub fn frozen( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::core::option::Option<::core::primitive::u32>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "ParasDisputes", "Frozen", vec![], @@ -26479,13 +26766,15 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::Id, + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Registrar", "PendingSwap", vec![::subxt::storage::address::StorageMapKey::new( @@ -26503,13 +26792,15 @@ pub mod api { #[doc = " Pending swap operations."] pub fn pending_swap_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::Id, + >, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Registrar", "PendingSwap", Vec::new(), @@ -26530,16 +26821,18 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Registrar", "Paras", vec![::subxt::storage::address::StorageMapKey::new( @@ -26560,16 +26853,18 @@ pub mod api { #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] pub fn paras_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Registrar", "Paras", Vec::new(), @@ -26584,13 +26879,15 @@ pub mod api { #[doc = " The next free `ParaId`."] pub fn next_free_para_id( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_parachain::primitives::Id, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Registrar", "NextFreeParaId", vec![], @@ -26839,18 +27136,20 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - ::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + ::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Slots", "Leases", vec![::subxt::storage::address::StorageMapKey::new( @@ -26883,18 +27182,20 @@ pub mod api { #[doc = " It is illegal for a `None` value to trail in the list."] pub fn leases_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec< - ::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + ::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + >, >, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Slots", "Leases", Vec::new(), @@ -27216,13 +27517,13 @@ pub mod api { #[doc = " Number of auctions started so far."] pub fn auction_counter( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Auctions", "AuctionCounter", vec![], @@ -27241,13 +27542,16 @@ pub mod api { #[doc = " auction will \"begin to end\", i.e. the first block of the Ending Period of the auction."] pub fn auction_info( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - (::core::primitive::u32, ::core::primitive::u32), + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Auctions", "AuctionInfo", vec![], @@ -27267,13 +27571,13 @@ pub mod api { _1: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Auctions", "ReservedAmounts", vec![::subxt::storage::address::StorageMapKey::new( @@ -27292,13 +27596,13 @@ pub mod api { #[doc = " (sub-)ranges."] pub fn reserved_amounts_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u128, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Auctions", "ReservedAmounts", Vec::new(), @@ -27316,17 +27620,19 @@ pub mod api { pub fn winning( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - [::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - )>; 36usize], - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + [::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u128, + )>; 36usize], + >, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Auctions", "Winning", vec![::subxt::storage::address::StorageMapKey::new( @@ -27346,17 +27652,19 @@ pub mod api { #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] pub fn winning_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - [::core::option::Option<( - ::subxt::ext::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - )>; 36usize], - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + [::core::option::Option<( + ::subxt::ext::sp_core::crypto::AccountId32, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u128, + )>; 36usize], + >, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Auctions", "Winning", Vec::new(), @@ -27992,18 +28300,20 @@ pub mod api { _0: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::crowdloan::FundInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Crowdloan", "Funds", vec![::subxt::storage::address::StorageMapKey::new( @@ -28021,18 +28331,20 @@ pub mod api { #[doc = " Info on all of the funds."] pub fn funds_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::ext::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::polkadot_runtime_common::crowdloan::FundInfo< + ::subxt::ext::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Crowdloan", "Funds", Vec::new(), @@ -28048,13 +28360,17 @@ pub mod api { #[doc = " in order to determine which funds should submit new or updated bids."] pub fn new_raise( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::std::vec::Vec, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Crowdloan", "NewRaise", vec![], @@ -28069,13 +28385,13 @@ pub mod api { #[doc = " The number of auctions that have entered into their ending period so far."] pub fn endings_count( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Crowdloan", "EndingsCount", vec![], @@ -28090,13 +28406,13 @@ pub mod api { #[doc = " Tracker for the next available fund index"] pub fn next_fund_index( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "Crowdloan", "NextFundIndex", vec![], @@ -28946,13 +29262,13 @@ pub mod api { #[doc = " The latest available query index."] pub fn query_counter( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "QueryCounter", vec![], @@ -28968,15 +29284,17 @@ pub mod api { pub fn queries( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "Queries", vec![::subxt::storage::address::StorageMapKey::new( @@ -28994,15 +29312,17 @@ pub mod api { #[doc = " The ongoing queries."] pub fn queries_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, + >, >, - ::subxt::storage::address::AddressIsIterable, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "Queries", Vec::new(), @@ -29021,13 +29341,13 @@ pub mod api { pub fn asset_traps( &self, _0: impl ::std::borrow::Borrow<::subxt::ext::sp_core::H256>, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "AssetTraps", vec![::subxt::storage::address::StorageMapKey::new( @@ -29048,13 +29368,13 @@ pub mod api { #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] pub fn asset_traps_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, - ::subxt::storage::address::AddressHasDefaultValue, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "AssetTraps", Vec::new(), @@ -29070,13 +29390,13 @@ pub mod api { #[doc = " then the destinations whose XCM version is unknown are considered unreachable."] pub fn safe_xcm_version( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "SafeXcmVersion", vec![], @@ -29093,24 +29413,24 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "SupportedVersion" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [227u8 , 149u8 , 251u8 , 204u8 , 40u8 , 150u8 , 151u8 , 177u8 , 154u8 , 187u8 , 9u8 , 205u8 , 174u8 , 137u8 , 228u8 , 128u8 , 18u8 , 244u8 , 151u8 , 120u8 , 6u8 , 44u8 , 5u8 , 167u8 , 56u8 , 35u8 , 192u8 , 141u8 , 108u8 , 169u8 , 91u8 , 7u8 ,]) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("XcmPallet" , "SupportedVersion" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [227u8 , 149u8 , 251u8 , 204u8 , 40u8 , 150u8 , 151u8 , 177u8 , 154u8 , 187u8 , 9u8 , 205u8 , 174u8 , 137u8 , 228u8 , 128u8 , 18u8 , 244u8 , 151u8 , 120u8 , 6u8 , 44u8 , 5u8 , 167u8 , 56u8 , 35u8 , 192u8 , 141u8 , 108u8 , 169u8 , 91u8 , 7u8 ,]) } #[doc = " The Latest versions that we know various locations support."] pub fn supported_version_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u32, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "SupportedVersion", Vec::new(), @@ -29127,24 +29447,24 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifiers" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [122u8 , 110u8 , 119u8 , 25u8 , 216u8 , 237u8 , 44u8 , 91u8 , 133u8 , 165u8 , 77u8 , 86u8 , 232u8 , 69u8 , 110u8 , 121u8 , 234u8 , 176u8 , 208u8 , 62u8 , 47u8 , 196u8 , 151u8 , 193u8 , 197u8 , 41u8 , 203u8 , 36u8 , 147u8 , 218u8 , 31u8 , 199u8 ,]) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("XcmPallet" , "VersionNotifiers" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [122u8 , 110u8 , 119u8 , 25u8 , 216u8 , 237u8 , 44u8 , 91u8 , 133u8 , 165u8 , 77u8 , 86u8 , 232u8 , 69u8 , 110u8 , 121u8 , 234u8 , 176u8 , 208u8 , 62u8 , 47u8 , 196u8 , 151u8 , 193u8 , 197u8 , 41u8 , 203u8 , 36u8 , 147u8 , 218u8 , 31u8 , 199u8 ,]) } #[doc = " All locations that we have requested version notifications from."] pub fn version_notifiers_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ::core::primitive::u64, - ::subxt::storage::address::AddressIsIterable, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "VersionNotifiers", Vec::new(), @@ -29162,33 +29482,33 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u64, ::core::primitive::u64, ::core::primitive::u32, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StorageAddress :: new_with_validation ("XcmPallet" , "VersionNotifyTargets" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [255u8 , 223u8 , 137u8 , 192u8 , 243u8 , 162u8 , 26u8 , 237u8 , 4u8 , 29u8 , 179u8 , 75u8 , 5u8 , 145u8 , 11u8 , 149u8 , 164u8 , 202u8 , 14u8 , 18u8 , 244u8 , 36u8 , 209u8 , 1u8 , 21u8 , 0u8 , 191u8 , 79u8 , 126u8 , 160u8 , 149u8 , 58u8 ,]) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("XcmPallet" , "VersionNotifyTargets" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [255u8 , 223u8 , 137u8 , 192u8 , 243u8 , 162u8 , 26u8 , 237u8 , 4u8 , 29u8 , 179u8 , 75u8 , 5u8 , 145u8 , 11u8 , 149u8 , 164u8 , 202u8 , 14u8 , 18u8 , 244u8 , 36u8 , 209u8 , 1u8 , 21u8 , 0u8 , 191u8 , 79u8 , 126u8 , 160u8 , 149u8 , 58u8 ,]) } #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] #[doc = " of our versions we informed them of."] pub fn version_notify_targets_root( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - ( + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType<( ::core::primitive::u64, ::core::primitive::u64, ::core::primitive::u32, - ), - ::subxt::storage::address::AddressIsIterable, + )>, + (), (), + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "VersionNotifyTargets", Vec::new(), @@ -29205,16 +29525,18 @@ pub mod api { #[doc = " which is used as a prioritization."] pub fn version_discovery_queue( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec<( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - )>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::sp_runtime::bounded::bounded_vec::BoundedVec<( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u32, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), - ::subxt::storage::address::AddressHasDefaultValue, > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "VersionDiscoveryQueue", vec![], @@ -29229,13 +29551,15 @@ pub mod api { #[doc = " The current migration's stage, if any."] pub fn current_migration( &self, - ) -> ::subxt::storage::address::StorageAddress< - 'static, - runtime_types::pallet_xcm::pallet::VersionMigrationStage, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::metadata::DecodeStaticType< + runtime_types::pallet_xcm::pallet::VersionMigrationStage, + >, + ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StorageAddress::new_with_validation( + ::subxt::storage::address::StaticStorageAddress::new( "XcmPallet", "CurrentMigration", vec![], diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index d39ed3748b..5b2e9613a0 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -199,7 +199,7 @@ async fn tx_call() { let keys = cxt .client() .storage() - .fetch_keys(&info_addr, 10, None, None) + .fetch_keys(&info_addr.to_bytes(), 10, None, None) .await .unwrap() .iter() From cf1bf9dc65c87684e321e50c6f5b4023b03904a0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 15 Jul 2022 17:09:53 +0100 Subject: [PATCH 45/75] remove out-of-date doc comments --- subxt/src/storage/storage_client.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 138a1731c1..630c463072 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -169,10 +169,6 @@ where } /// Fetch a StorageKey that has a default value with an optional block hash. - /// - /// Note: The [`StorageAddress`] provided must be tagged with [`AddressHasDefaultValue`] - /// in order to use this function. Statically generated storage addresses will be - /// tagged appropriately. pub fn fetch_or_default<'a, Address>( &self, address: &'a Address, @@ -231,10 +227,6 @@ where /// Returns an iterator of key value pairs. /// - /// Note: The [`StorageAddress`] provided must be tagged with [`AddressIsIterable`] - /// in order to use this function. Statically generated storage addresses will be - /// tagged appropriately. - /// /// ```no_run /// use subxt::{ PolkadotConfig, OnlineClient }; /// From c319b9d0c06f2be4c1800d46d4f2a6366c785ffd Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 09:20:04 +0100 Subject: [PATCH 46/75] optimise decoding storage a little --- subxt/src/metadata/decode_with_metadata.rs | 32 ++++++++++++++++++++++ subxt/src/storage/storage_client.rs | 16 +++++------ 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs index f4f3528ac2..0c0f59625f 100644 --- a/subxt/src/metadata/decode_with_metadata.rs +++ b/subxt/src/metadata/decode_with_metadata.rs @@ -5,6 +5,7 @@ use super::Metadata; use crate::error::BasicError; use codec::Decode; +use frame_metadata::StorageEntryType; /// This trait is implemented for types which can be decoded with the help of metadata. pub trait DecodeWithMetadata: Sized { @@ -16,6 +17,28 @@ pub trait DecodeWithMetadata: Sized { type_id: u32, metadata: &Metadata, ) -> Result; + + /// Decode a storage item using metadata. By default, this uses the metadata to + /// work out the type ID to use, but for static items we can short circuit this + /// lookup. + fn decode_storage_with_metadata( + bytes: &mut &[u8], + pallet_name: &str, + storage_entry: &str, + metadata: &Metadata, + ) -> Result { + let ty = &metadata + .pallet(pallet_name)? + .storage(storage_entry)? + .ty; + + let id = match ty { + StorageEntryType::Plain(ty) => ty.id(), + StorageEntryType::Map { value, .. } => value.id(), + }; + + Self::decode_with_metadata(bytes, id, metadata) + } } // Things can be dynamically decoded to our Value type: @@ -44,4 +67,13 @@ impl DecodeWithMetadata for DecodeStaticType { ) -> Result { T::decode(bytes).map_err(|e| e.into()) } + + fn decode_storage_with_metadata( + bytes: &mut &[u8], + _pallet_name: &str, + _storage_entry: &str, + _metadata: &Metadata, + ) -> Result { + T::decode(bytes).map_err(|e| e.into()) + } } diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 630c463072..58dd5a3bf2 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -143,12 +143,6 @@ where // Look up the return type ID to enable DecodeWithMetadata: let metadata = client.client.metadata(); - let return_ty_id = lookup_storage_return_type( - &metadata, - address.pallet_name(), - address.entry_name(), - )?; - let lookup_bytes = address.to_bytes(); if let Some(data) = client .client @@ -156,9 +150,10 @@ where .fetch_raw(&lookup_bytes, hash) .await? { - let val = ::decode_with_metadata( + let val = ::decode_storage_with_metadata( &mut &*data, - return_ty_id, + address.pallet_name(), + address.entry_name(), &metadata, )?; Ok(Some(val)) @@ -189,6 +184,7 @@ where } else { let metadata = client.metadata(); + // We have to dig into metadata already, so no point using the optimised `decode_storage_with_metadata` call. let pallet_metadata = metadata.pallet(pallet_name)?; let storage_metadata = pallet_metadata.storage(storage_name)?; let return_ty_id = @@ -286,7 +282,9 @@ where let metadata = client.client.metadata(); - // Look up the return type for flexible decoding: + // Look up the return type for flexible decoding. Do this once here to avoid + // potentially doing it every iteration if we used `decode_storage_with_metadata` + // in the iterator. let return_type_id = lookup_storage_return_type( &metadata, address.pallet_name(), From dce6b61ee1a067a307804c3369f8ec8f725dc658 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 14:59:40 +0100 Subject: [PATCH 47/75] cleanup tx stuff, trait for TxPayload, remove Err type param and decode at runtime --- CHANGELOG.md | 2 +- codegen/src/api/calls.rs | 71 +- codegen/src/api/errors.rs | 189 - codegen/src/api/mod.rs | 9 +- examples/examples/balance_transfer.rs | 2 +- .../examples/balance_transfer_with_params.rs | 2 +- examples/examples/custom_config.rs | 2 +- examples/examples/submit_and_watch.rs | 4 +- examples/examples/subscribe_all_events.rs | 2 +- examples/examples/subscribe_one_event.rs | 2 +- examples/examples/subscribe_some_events.rs | 2 +- subxt/src/client/offline_client.rs | 2 +- subxt/src/client/online_client.rs | 12 +- subxt/src/config.rs | 14 +- subxt/src/constants/constants_client.rs | 6 +- subxt/src/error.rs | 111 +- subxt/src/events/event_subscription.rs | 16 +- subxt/src/events/events_client.rs | 23 +- subxt/src/events/events_type.rs | 15 +- subxt/src/events/filter_events.rs | 25 +- subxt/src/events/mod.rs | 2 +- subxt/src/lib.rs | 9 +- subxt/src/metadata/decode_with_metadata.rs | 17 +- subxt/src/metadata/encode_with_metadata.rs | 10 +- subxt/src/metadata/metadata_type.rs | 118 +- subxt/src/rpc.rs | 66 +- subxt/src/storage/mod.rs | 2 +- subxt/src/storage/storage_address.rs | 19 +- subxt/src/storage/storage_client.rs | 36 +- subxt/src/{extrinsic => tx}/mod.rs | 20 +- subxt/src/{extrinsic => tx}/params.rs | 0 subxt/src/{extrinsic => tx}/signer.rs | 0 subxt/src/{extrinsic => tx}/tx_client.rs | 163 +- subxt/src/tx/tx_payload.rs | 98 + .../transaction.rs => tx/tx_progress.rs} | 294 +- testing/integration-tests/src/client/mod.rs | 3 +- .../integration-tests/src/codegen/polkadot.rs | 5015 ++++++----------- testing/integration-tests/src/events/mod.rs | 14 +- .../integration-tests/src/frame/balances.rs | 15 +- .../integration-tests/src/frame/contracts.rs | 20 +- .../integration-tests/src/frame/staking.rs | 28 +- testing/integration-tests/src/frame/sudo.rs | 5 +- testing/integration-tests/src/frame/system.rs | 5 +- testing/integration-tests/src/lib.rs | 5 +- testing/integration-tests/src/storage/mod.rs | 14 +- .../integration-tests/src/utils/context.rs | 2 +- 46 files changed, 2429 insertions(+), 4062 deletions(-) delete mode 100644 codegen/src/api/errors.rs rename subxt/src/{extrinsic => tx}/mod.rs (88%) rename subxt/src/{extrinsic => tx}/params.rs (100%) rename subxt/src/{extrinsic => tx}/signer.rs (100%) rename subxt/src/{extrinsic => tx}/tx_client.rs (67%) create mode 100644 subxt/src/tx/tx_payload.rs rename subxt/src/{extrinsic/transaction.rs => tx/tx_progress.rs} (65%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba5324029..5e9ac9c083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,7 +92,7 @@ parameters (such as mortality and tip payment) to be customized. See `examples/b small usage example. If you're targeting a node which involves custom additional and extra transaction data, you'll need to implement the -trait `subxt::extrinsic::ExtrinsicParams`, which determines the parameters that can be provided to `sign_and_submit`, as +trait `subxt::tx::ExtrinsicParams`, which determines the parameters that can be provided to `sign_and_submit`, as well as how to encode these into the "additional" and "extra" data needed for a transaction. Have a look at `subxt/src/extrinsic/params.rs` for the trait definition and Substrate/Polkadot implementations. The aim with this change is to make it easier to customise this for your own chains, and provide a simple way to provide values at runtime. diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 122fd3b118..4fa13388e9 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -22,7 +22,7 @@ use quote::{ }; use scale_info::form::PortableForm; -/// Generate calls from the provided pallet's metadata. Each call returns a `SubmittableExtrinsic` +/// Generate calls from the provided pallet's metadata. Each call returns a `StaticTxPayload` /// that can be passed to the subxt client to submit/sign/encode. /// /// # Arguments @@ -53,35 +53,42 @@ pub fn generate_calls( let (call_structs, call_fns): (Vec<_>, Vec<_>) = struct_defs .iter_mut() .map(|(variant_name, struct_def)| { - let (call_fn_args, call_args): (Vec<_>, Vec<_>) = - match struct_def.fields { - CompositeDefFields::Named(ref named_fields) => { - named_fields - .iter() - .map(|(name, field)| { - let fn_arg_type = &field.type_path; - let call_arg = if field.is_boxed() { - quote! { #name: ::std::boxed::Box::new(#name) } - } else { - quote! { #name } - }; - (quote!( #name: #fn_arg_type ), call_arg) - }) - .unzip() - } - CompositeDefFields::NoFields => Default::default(), - CompositeDefFields::Unnamed(_) => - abort_call_site!( - "Call variant for type {} must have all named fields", - call.ty.id() - ) - }; + let (call_fn_args, call_args): (Vec<_>, Vec<_>) = match struct_def.fields { + CompositeDefFields::Named(ref named_fields) => { + named_fields + .iter() + .map(|(name, field)| { + let fn_arg_type = &field.type_path; + let call_arg = if field.is_boxed() { + quote! { #name: ::std::boxed::Box::new(#name) } + } else { + quote! { #name } + }; + (quote!( #name: #fn_arg_type ), call_arg) + }) + .unzip() + } + CompositeDefFields::NoFields => Default::default(), + CompositeDefFields::Unnamed(_) => { + abort_call_site!( + "Call variant for type {} must have all named fields", + call.ty.id() + ) + } + }; let pallet_name = &pallet.name; let call_name = &variant_name; let struct_name = &struct_def.name; - let call_hash = subxt_metadata::get_call_hash(metadata, pallet_name, call_name) - .unwrap_or_else(|_| abort_call_site!("Metadata information for the call {}_{} could not be found", pallet_name, call_name)); + let call_hash = + subxt_metadata::get_call_hash(metadata, pallet_name, call_name) + .unwrap_or_else(|_| { + abort_call_site!( + "Metadata information for the call {}_{} could not be found", + pallet_name, + call_name + ) + }); let fn_name = format_ident!("{}", variant_name.to_snake_case()); // Propagate the documentation just to `TransactionApi` methods, while @@ -96,13 +103,11 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> ::subxt::extrinsic::SubmittableExtrinsic<::subxt::metadata::EncodeStaticCall<#struct_name>, DispatchError> { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: #pallet_name, - call: #call_name, - data: #struct_name { #( #call_args, )* } - }, + ) -> ::subxt::tx::StaticTxPayload<#struct_name> { + ::subxt::tx::StaticTxPayload::new( + #pallet_name, + #call_name, + #struct_name { #( #call_args, )* }, [#(#call_hash,)*] ) } diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs deleted file mode 100644 index b4702beadc..0000000000 --- a/codegen/src/api/errors.rs +++ /dev/null @@ -1,189 +0,0 @@ -// 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. - -use frame_metadata::v14::RuntimeMetadataV14; -use proc_macro2::TokenStream as TokenStream2; -use proc_macro_error::abort_call_site; -use quote::quote; -use scale_info::{ - form::PortableForm, - Field, - TypeDef, - TypeDefPrimitive, -}; - -/// Different substrate versions will have a different `DispatchError::Module`. -/// The following cases are ordered by versions. -enum ModuleErrorType { - /// Case 1: `DispatchError::Module { index: u8, error: u8 }` - /// - /// This is the first supported `DispatchError::Module` format. - NamedField, - /// Case 2: `DispatchError::Module ( sp_runtime::ModuleError { index: u8, error: u8 } )` - /// - /// Substrate introduced `sp_runtime::ModuleError`, while keeping the error `u8`. - LegacyError, - /// Case 3: `DispatchError::Module ( sp_runtime::ModuleError { index: u8, error: [u8; 4] } )` - /// - /// The substrate error evolved into `[u8; 4]`. - ArrayError, -} - -impl quote::ToTokens for ModuleErrorType { - fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { - let trait_fn_body = match self { - ModuleErrorType::NamedField => { - quote! { - if let &Self::Module { index, error } = self { - Some(::subxt::error::ModuleErrorData { pallet_index: index, error: [error, 0, 0, 0] }) - } else { - None - } - } - } - ModuleErrorType::LegacyError => { - quote! { - if let Self::Module (module_error) = self { - Some(::subxt::error::ModuleErrorData { pallet_index: module_error.index, error: [module_error.error, 0, 0, 0] }) - } else { - None - } - } - } - ModuleErrorType::ArrayError => { - quote! { - if let Self::Module (module_error) = self { - Some(::subxt::error::ModuleErrorData { pallet_index: module_error.index, error: module_error.error }) - } else { - None - } - } - } - }; - - tokens.extend(trait_fn_body); - } -} - -/// Determine the `ModuleError` type for the `ModuleErrorType::LegacyError` and -/// `ModuleErrorType::ErrorArray` cases. -fn module_error_type( - module_field: &Field, - metadata: &RuntimeMetadataV14, -) -> ModuleErrorType { - // Fields are named. - if module_field.name().is_some() { - return ModuleErrorType::NamedField - } - - // Get the `sp_runtime::ModuleError` structure. - let module_err = metadata - .types - .resolve(module_field.ty().id()) - .unwrap_or_else(|| { - abort_call_site!("sp_runtime::ModuleError type expected in metadata") - }); - - let error_type_def = match module_err.type_def() { - TypeDef::Composite(composite) => composite, - _ => abort_call_site!("sp_runtime::ModuleError type should be a composite type"), - }; - - // Get the error field from the `sp_runtime::ModuleError` structure. - let error_field = error_type_def - .fields() - .iter() - .find(|field| field.name() == Some(&"error".to_string())) - .unwrap_or_else(|| { - abort_call_site!("sp_runtime::ModuleError expected to contain error field") - }); - - // Resolve the error type from the metadata. - let error_field_ty = metadata - .types - .resolve(error_field.ty().id()) - .unwrap_or_else(|| { - abort_call_site!("sp_runtime::ModuleError::error type expected in metadata") - }); - - match error_field_ty.type_def() { - // Check for legacy error type. - TypeDef::Primitive(TypeDefPrimitive::U8) => ModuleErrorType::LegacyError, - TypeDef::Array(array) => { - // Check new error type of len 4 and type u8. - if array.len() != 4 { - abort_call_site!("sp_runtime::ModuleError::error array length is not 4"); - } - - let array_ty = metadata - .types - .resolve(array.type_param().id()) - .unwrap_or_else(|| { - abort_call_site!( - "sp_runtime::ModuleError::error array type expected in metadata" - ) - }); - - if let TypeDef::Primitive(TypeDefPrimitive::U8) = array_ty.type_def() { - ModuleErrorType::ArrayError - } else { - abort_call_site!( - "sp_runtime::ModuleError::error array type expected to be u8" - ) - } - } - _ => { - abort_call_site!( - "sp_runtime::ModuleError::error array type or primitive expected" - ) - } - } -} - -/// The aim of this is to implement the `::subxt::error::HasModuleError` trait for -/// the generated `DispatchError`, so that we can obtain the module error details, -/// if applicable, from it. -pub fn generate_has_module_error_impl( - metadata: &RuntimeMetadataV14, - types_mod_ident: &syn::Ident, -) -> TokenStream2 { - let dispatch_error = metadata - .types - .types() - .iter() - .find(|&ty| ty.ty().path().segments() == ["sp_runtime", "DispatchError"]) - .unwrap_or_else(|| { - abort_call_site!("sp_runtime::DispatchError type expected in metadata") - }) - .ty() - .type_def(); - - // Get the `DispatchError::Module` variant (either struct or named fields). - let module_variant = match dispatch_error { - TypeDef::Variant(variant) => { - variant - .variants() - .iter() - .find(|variant| variant.name() == "Module") - .unwrap_or_else(|| { - abort_call_site!("DispatchError::Module variant expected in metadata") - }) - } - _ => abort_call_site!("DispatchError expected to contain variant in metadata"), - }; - - let module_field = module_variant.fields().get(0).unwrap_or_else(|| { - abort_call_site!("DispatchError::Module expected to contain 1 or more fields") - }); - - let error_type = module_error_type(module_field, metadata); - - quote! { - impl ::subxt::error::HasModuleError for #types_mod_ident::sp_runtime::DispatchError { - fn module_error_data(&self) -> Option<::subxt::error::ModuleErrorData> { - #error_type - } - } - } -} diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index fa60bfd8e9..cf592bd8bd 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -6,7 +6,6 @@ mod calls; mod constants; -mod errors; mod events; mod storage; @@ -256,9 +255,6 @@ impl RuntimeGenerator { }) .collect(); - let has_module_error_impl = - errors::generate_has_module_error_impl(&self.metadata, types_mod_ident); - quote! { #[allow(dead_code, unused_imports, non_camel_case_types)] pub mod #mod_ident { @@ -271,10 +267,9 @@ impl RuntimeGenerator { #( #modules )* #types_mod - /// The default error type returned when there is a runtime issue. + /// The default error type returned when there is a runtime issue, + /// exposed here for ease of use. pub type DispatchError = #types_mod_ident::sp_runtime::DispatchError; - // Impl HasModuleError on DispatchError so we can pluck out module error details. - #has_module_error_impl pub fn constants() -> ConstantsApi { ConstantsApi diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index b85929fe71..7f76c24d79 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -12,7 +12,7 @@ use sp_keyring::AccountKeyring; use subxt::{ - extrinsic::PairSigner, + tx::PairSigner, OnlineClient, PolkadotConfig, }; diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index dbde159950..51527ddf2c 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -12,7 +12,7 @@ use sp_keyring::AccountKeyring; use subxt::{ - extrinsic::{ + tx::{ Era, PairSigner, PlainTip, diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index 9a615bbe8a..5b2c00d75c 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -11,7 +11,7 @@ use subxt::{ Config, SubstrateConfig, }, - extrinsic::{ + tx::{ PairSigner, SubstrateExtrinsicParams, }, diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index c2f4698475..ae6ff29161 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -13,7 +13,7 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use subxt::{ - extrinsic::PairSigner, + tx::PairSigner, OnlineClient, PolkadotConfig, }; @@ -127,7 +127,7 @@ async fn handle_transfer_events() -> Result<(), Box> { while let Some(ev) = balance_transfer_progress.next().await { let ev = ev?; - use subxt::extrinsic::TransactionStatus::*; + use subxt::tx::TxStatus::*; // Made it into a block, but not finalized. if let InBlock(details) = ev { diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs index 54b9560c4f..efbb446ca3 100644 --- a/examples/examples/subscribe_all_events.rs +++ b/examples/examples/subscribe_all_events.rs @@ -14,7 +14,7 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - extrinsic::PairSigner, + tx::PairSigner, OnlineClient, PolkadotConfig, }; diff --git a/examples/examples/subscribe_one_event.rs b/examples/examples/subscribe_one_event.rs index 93f24a05a9..10d29fd36f 100644 --- a/examples/examples/subscribe_one_event.rs +++ b/examples/examples/subscribe_one_event.rs @@ -14,7 +14,7 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - extrinsic::PairSigner, + tx::PairSigner, OnlineClient, PolkadotConfig, }; diff --git a/examples/examples/subscribe_some_events.rs b/examples/examples/subscribe_some_events.rs index 7e59854ef3..4fa7819c05 100644 --- a/examples/examples/subscribe_some_events.rs +++ b/examples/examples/subscribe_some_events.rs @@ -14,7 +14,7 @@ use futures::StreamExt; use sp_keyring::AccountKeyring; use std::time::Duration; use subxt::{ - extrinsic::PairSigner, + tx::PairSigner, OnlineClient, PolkadotConfig, }; diff --git a/subxt/src/client/offline_client.rs b/subxt/src/client/offline_client.rs index f62c47bde9..630bb745ac 100644 --- a/subxt/src/client/offline_client.rs +++ b/subxt/src/client/offline_client.rs @@ -5,9 +5,9 @@ use crate::{ constants::ConstantsClient, events::EventsClient, - extrinsic::TxClient, rpc::RuntimeVersion, storage::StorageClient, + tx::TxClient, Config, Metadata, }; diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index ed60c4ee95..feb839eb39 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -8,15 +8,15 @@ use super::{ }; use crate::{ constants::ConstantsClient, - error::BasicError, + error::Error, events::EventsClient, - extrinsic::TxClient, rpc::{ Rpc, RpcClient, RuntimeVersion, }, storage::StorageClient, + tx::TxClient, Config, Metadata, }; @@ -60,13 +60,13 @@ impl std::fmt::Debug for OnlineClient { impl OnlineClient { /// Construct a new [`OnlineClient`] using default settings which /// point to a locally running node on `ws://127.0.0.1:9944`. - pub async fn new() -> Result, BasicError> { + pub async fn new() -> Result, Error> { let url = "ws://127.0.0.1:9944"; OnlineClient::from_url(url).await } /// Construct a new [`OnlineClient`], providing a URL to connect to. - pub async fn from_url(url: impl AsRef) -> Result, BasicError> { + pub async fn from_url(url: impl AsRef) -> Result, Error> { let client = crate::rpc::ws_client(url.as_ref()).await?; OnlineClient::from_rpc_client(client).await } @@ -75,7 +75,7 @@ impl OnlineClient { /// to use to drive the connection. pub async fn from_rpc_client( rpc_client: impl Into, - ) -> Result, BasicError> { + ) -> Result, Error> { let rpc = Rpc::new(rpc_client.into()); let (genesis_hash, runtime_version, metadata) = future::join3( @@ -206,7 +206,7 @@ impl ClientRuntimeUpdater { /// /// *Note:* This will run indefinitely until it errors, so the typical usage /// would be to run it in a separate background task. - pub async fn perform_runtime_updates(&self) -> Result<(), BasicError> { + pub async fn perform_runtime_updates(&self) -> Result<(), Error> { // Obtain an update subscription to further detect changes in the runtime version of the node. let mut update_subscription = self.0.rpc.subscribe_runtime_version().await?; diff --git a/subxt/src/config.rs b/subxt/src/config.rs index 64e555eb81..11dcd6009a 100644 --- a/subxt/src/config.rs +++ b/subxt/src/config.rs @@ -82,7 +82,7 @@ pub trait Config: 'static { type Extrinsic: Parameter + Extrinsic + Debug + MaybeSerializeDeserialize; /// This type defines the extrinsic extra and additional parameters. - type ExtrinsicParams: crate::extrinsic::ExtrinsicParams; + type ExtrinsicParams: crate::tx::ExtrinsicParams; } /// Parameter trait copied from `substrate::frame_support` @@ -105,36 +105,36 @@ impl Config for SubstrateConfig { sp_runtime::generic::Header; type Signature = sp_runtime::MultiSignature; type Extrinsic = sp_runtime::OpaqueExtrinsic; - type ExtrinsicParams = crate::extrinsic::SubstrateExtrinsicParams; + type ExtrinsicParams = crate::tx::SubstrateExtrinsicParams; } /// Default set of commonly used types by Polkadot nodes. pub type PolkadotConfig = WithExtrinsicParams< SubstrateConfig, - crate::extrinsic::PolkadotExtrinsicParams, + crate::tx::PolkadotExtrinsicParams, >; /// Take a type implementing [`Config`] (eg [`SubstrateConfig`]), and some type which describes the -/// additional and extra parameters to pass to an extrinsic (see [`crate::extrinsic::ExtrinsicParams`]), +/// additional and extra parameters to pass to an extrinsic (see [`crate::tx::ExtrinsicParams`]), /// and returns a type implementing [`Config`] with those new `ExtrinsicParams`. /// /// # Example /// /// ``` /// use subxt::config::{ SubstrateConfig, WithExtrinsicParams }; -/// use subxt::extrinsic::PolkadotExtrinsicParams; +/// use subxt::tx::PolkadotExtrinsicParams; /// /// // This is how PolkadotConfig is implemented: /// type PolkadotConfig = WithExtrinsicParams>; /// ``` pub struct WithExtrinsicParams< T: Config, - E: crate::extrinsic::ExtrinsicParams, + E: crate::tx::ExtrinsicParams, > { _marker: std::marker::PhantomData<(T, E)>, } -impl> Config +impl> Config for WithExtrinsicParams { type Index = T::Index; diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index df03d3a56f..ea612b2604 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -5,7 +5,7 @@ use super::ConstantAddress; use crate::{ client::OfflineClientT, - error::BasicError, + error::Error, metadata::{ DecodeWithMetadata, MetadataError, @@ -40,7 +40,7 @@ impl> ConstantsClient { pub fn validate( &self, address: &ConstantAddress<'_, ReturnTy>, - ) -> Result<(), BasicError> { + ) -> Result<(), Error> { if let Some(actual_hash) = address.validation_hash() { let expected_hash = self .client @@ -59,7 +59,7 @@ impl> ConstantsClient { pub fn at( &self, address: &ConstantAddress<'_, ReturnTy>, - ) -> Result { + ) -> Result { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 419cbf371f..443a2d57be 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -16,17 +16,11 @@ pub use scale_value::scale::DecodeError; pub use sp_core::crypto::SecretStringError; pub use sp_runtime::transaction_validity::TransactionValidityError; -/// An error that may contain some runtime error `E` -pub type Error = GenericError>; - -/// An error that will never contain a runtime error. -pub type BasicError = GenericError; - /// The underlying error enum, generic over the type held by the `Runtime` -/// variant. Prefer to use the [`Error`] and [`BasicError`] aliases over +/// variant. Prefer to use the [`Error`] and [`Error`] aliases over /// using this type directly. #[derive(Debug, thiserror::Error)] -pub enum GenericError { +pub enum Error { /// Io error. #[error("Io error: {0}")] Io(#[from] std::io::Error), @@ -53,102 +47,62 @@ pub enum GenericError { Metadata(#[from] MetadataError), /// Runtime error. #[error("Runtime error: {0:?}")] - Runtime(E), + Runtime(DispatchError), /// Events decoding error. #[error("Events decoding error: {0}")] EventsDecoding(#[from] DecodeError), /// Transaction progress error. #[error("Transaction error: {0}")] Transaction(#[from] TransactionError), - #[error("Module error: {0}")] - /// An error from the `Module` variant of the generated `DispatchError`. - Module(ModuleError), /// Other error. #[error("Other error: {0}")] Other(String), } -impl GenericError { - /// [`GenericError`] is parameterised over the type that it holds in the `Runtime` - /// variant. This function allows us to map the Runtime error contained within (if present) - /// to a different type. - pub fn map_runtime_err(self, f: F) -> GenericError - where - F: FnOnce(E) -> NewE, - { - match self { - GenericError::Io(e) => GenericError::Io(e), - GenericError::Codec(e) => GenericError::Codec(e), - GenericError::Rpc(e) => GenericError::Rpc(e), - GenericError::Serialization(e) => GenericError::Serialization(e), - GenericError::SecretString(e) => GenericError::SecretString(e), - GenericError::Invalid(e) => GenericError::Invalid(e), - GenericError::InvalidMetadata(e) => GenericError::InvalidMetadata(e), - GenericError::Metadata(e) => GenericError::Metadata(e), - GenericError::EventsDecoding(e) => GenericError::EventsDecoding(e), - GenericError::Transaction(e) => GenericError::Transaction(e), - GenericError::Module(e) => GenericError::Module(e), - GenericError::Other(e) => GenericError::Other(e), - // This is the only branch we really care about: - GenericError::Runtime(e) => GenericError::Runtime(f(e)), - } - } -} - -impl BasicError { - /// Convert an [`BasicError`] into any - /// arbitrary [`Error`]. - pub fn into_error(self) -> Error { - self.map_runtime_err(|e| match e {}) - } -} - -impl From for Error { - fn from(err: BasicError) -> Self { - err.into_error() - } -} - -impl From for GenericError { +impl From for Error { fn from(error: SecretStringError) -> Self { - GenericError::SecretString(error) + Error::SecretString(error) } } -impl From for GenericError { +impl From for Error { fn from(error: TransactionValidityError) -> Self { - GenericError::Invalid(error) + Error::Invalid(error) } } -impl From<&str> for GenericError { +impl From<&str> for Error { fn from(error: &str) -> Self { - GenericError::Other(error.into()) + Error::Other(error.into()) } } -impl From for GenericError { +impl From for Error { fn from(error: String) -> Self { - GenericError::Other(error) + Error::Other(error) } } -/// This is used in the place of the `E` in [`GenericError`] when we may have a -/// Runtime Error. We use this wrapper so that it is possible to implement -/// `From` for `Error>`. -/// -/// This should not be used as a type; prefer to use the alias [`Error`] when referring -/// to errors which may contain some Runtime error `E`. -#[derive(Clone, Debug, PartialEq)] -pub struct RuntimeError(pub E); - -impl RuntimeError { - /// Extract the actual runtime error from this struct. - pub fn inner(self) -> E { - self.0 +impl From for Error { + fn from(error: DispatchError) -> Self { + Error::Runtime(error) } } +/// This is our attempt to decode a runtime DispatchError. We either +/// successfully decode it into a [`ModuleError`], or we fail and keep +/// hold of the bytes, which we can attempt to decode if we have an +/// appropriate static type to hand. +#[derive(Debug, thiserror::Error)] +pub enum DispatchError { + /// An error was emitted from a specific pallet/module. + #[error("Module error: {0}")] + Module(ModuleError), + /// Some other error was emitted. + #[error("Undecoded dispatch error: {0:?}")] + Other(Vec), +} + /// Transaction error. #[derive(Clone, Debug, Eq, thiserror::Error, PartialEq)] pub enum TransactionError { @@ -195,12 +149,3 @@ impl ModuleErrorData { self.error[0] } } - -/// This trait is automatically implemented for the generated `DispatchError`, -/// so that we can pluck out information about the `Module` error variant, if` -/// it exists. -pub trait HasModuleError { - /// If the error has a `Module` variant, return a tuple of the - /// pallet index and error index. Else, return `None`. - fn module_error_data(&self) -> Option; -} diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 0e3438c76e..48a5967fa7 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -6,7 +6,7 @@ use crate::{ client::OnlineClientT, - error::BasicError, + error::Error, events::EventsClient, Config, }; @@ -35,7 +35,7 @@ pub use super::{ /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back /// in codegen from `subscribe_finalized`, and is exposed to be used in codegen. #[doc(hidden)] -pub type FinalizedEventSub
= BoxStream<'static, Result>; +pub type FinalizedEventSub
= BoxStream<'static, Result>; /// A `jsonrpsee` Subscription. This forms a part of the `EventSubscription` type handed back /// in codegen from `subscribe`, and is exposed to be used in codegen. @@ -50,12 +50,10 @@ pub struct EventSubscription { client: Client, block_header_subscription: Sub, #[derivative(Debug = "ignore")] - at: Option< - std::pin::Pin, BasicError>> + Send>>, - >, + at: Option, Error>> + Send>>>, } -impl> EventSubscription +impl> EventSubscription where Sub: Stream> + Unpin, { @@ -119,7 +117,7 @@ impl Unpin for EventSubscription // way to roughly implement the following function: // // ``` -// fn subscribe_events(client: &'_ Client, block_sub: Subscription) -> impl Stream, BasicError>> + '_ { +// fn subscribe_events(client: &'_ Client, block_sub: Subscription) -> impl Stream, Error>> + '_ { // use futures::StreamExt; // block_sub.then(move |block_header_res| async move { // use sp_runtime::traits::Header; @@ -137,9 +135,9 @@ where T: Config, Client: OnlineClientT, Sub: Stream> + Unpin, - E: Into, + E: Into, { - type Item = Result, BasicError>; + type Item = Result, Error>; fn poll_next( mut self: std::pin::Pin<&mut Self>, diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index 36c371d857..e25d537391 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -4,7 +4,7 @@ use crate::{ client::OnlineClientT, - error::BasicError, + error::Error, events::{ EventSub, EventSubscription, @@ -54,7 +54,7 @@ where pub fn at( &self, block_hash: T::Hash, - ) -> impl Future, BasicError>> + Send + 'static { + ) -> impl Future, Error>> + Send + 'static { // Clone and pass the client in like this so that we can explicitly // return a Future that's Send + 'static, rather than tied to &self. let client = self.client.clone(); @@ -94,7 +94,7 @@ where pub fn subscribe( &self, ) -> impl Future< - Output = Result>, BasicError>, + Output = Result>, Error>, > + Send + 'static { let client = self.client.clone(); @@ -107,7 +107,7 @@ where ) -> impl Future< Output = Result< EventSubscription>, - BasicError, + Error, >, > + Send + 'static @@ -119,10 +119,7 @@ where } } -async fn at( - client: Client, - block_hash: T::Hash, -) -> Result, BasicError> +async fn at(client: Client, block_hash: T::Hash) -> Result, Error> where T: Config, Client: OnlineClientT, @@ -139,7 +136,7 @@ where async fn subscribe( client: Client, -) -> Result>, BasicError> +) -> Result>, Error> where T: Config, Client: OnlineClientT, @@ -151,7 +148,7 @@ where /// Subscribe to events from finalized blocks. async fn subscribe_finalized( client: Client, -) -> Result>, BasicError> +) -> Result>, Error> where T: Config, Client: OnlineClientT, @@ -184,12 +181,12 @@ pub fn subscribe_to_block_headers_filling_in_gaps( client: Client, mut last_block_num: Option, sub: S, -) -> impl Stream> + Send +) -> impl Stream> + Send where T: Config, Client: OnlineClientT + Send + Sync, S: Stream> + Send, - E: Into + Send + 'static, + E: Into + Send + 'static, { sub.flat_map(move |s| { let client = client.clone(); @@ -215,7 +212,7 @@ where async move { let hash = client.rpc().block_hash(Some(n.into())).await?; let header = client.rpc().header(hash).await?; - Ok::<_, BasicError>(header) + Ok::<_, Error>(header) } }) .filter_map(|h| async { h.transpose() }); diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 7dcb459b59..cc99114761 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -9,7 +9,7 @@ use super::{ StaticEvent, }; use crate::{ - error::BasicError, + error::Error, Config, Metadata, }; @@ -83,8 +83,7 @@ impl Events { /// details. If an error occurs, all subsequent iterations return `None`. pub fn iter( &self, - ) -> impl Iterator> + Send + Sync + 'static - { + ) -> impl Iterator> + Send + Sync + 'static { let event_bytes = self.event_bytes.clone(); let num_events = self.num_events; @@ -122,9 +121,7 @@ impl Events { /// Iterate through the events using metadata to dynamically decode and skip /// them, and return only those which should decode to the provided `Ev` type. /// If an error occurs, all subsequent iterations return `None`. - pub fn find( - &self, - ) -> impl Iterator> + '_ { + pub fn find(&self) -> impl Iterator> + '_ { self.iter().filter_map(|ev| { ev.and_then(|ev| ev.as_event::().map_err(Into::into)) .transpose() @@ -133,12 +130,12 @@ impl Events { /// Iterate through the events using metadata to dynamically decode and skip /// them, and return the first event found which decodes to the provided `Ev` type. - pub fn find_first(&self) -> Result, BasicError> { + pub fn find_first(&self) -> Result, Error> { self.find::().next().transpose() } /// Find an event that decodes to the type provided. Returns true if it was found. - pub fn has(&self) -> Result { + pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) } } @@ -184,7 +181,7 @@ fn decode_raw_event_details( metadata: &Metadata, index: u32, input: &mut &[u8], -) -> Result { +) -> Result { // Decode basic event details: let phase = Phase::decode(input)?; let pallet_index = input.read_byte()?; diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index 7925588805..50257ee164 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -10,8 +10,8 @@ use super::{ StaticEvent, }; use crate::{ - BasicError, Config, + Error, }; use futures::{ Stream, @@ -29,7 +29,7 @@ use std::{ /// exactly one of these will be `Some(event)` each iteration. pub struct FilterEvents<'a, Sub: 'a, T: Config, Filter: EventFilter> { // A subscription; in order for the Stream impl to apply, this will - // impl `Stream, BasicError>> + Unpin + 'a`. + // impl `Stream, Error>> + Unpin + 'a`. sub: Sub, // Each time we get Events from our subscription, they are stored here // and iterated through in future stream iterations until exhausted. @@ -38,7 +38,7 @@ pub struct FilterEvents<'a, Sub: 'a, T: Config, Filter: EventFilter> { dyn Iterator< Item = Result< FilteredEventDetails, - BasicError, + Error, >, > + Send + 'a, @@ -59,11 +59,11 @@ impl<'a, Sub: 'a, T: Config, Filter: EventFilter> FilterEvents<'a, Sub, T, Filte impl<'a, Sub, T, Filter> Stream for FilterEvents<'a, Sub, T, Filter> where - Sub: Stream, BasicError>> + Unpin + 'a, + Sub: Stream, Error>> + Unpin + 'a, T: Config, Filter: EventFilter, { - type Item = Result, BasicError>; + type Item = Result, Error>; fn poll_next( mut self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>, @@ -116,10 +116,7 @@ pub trait EventFilter: private::Sealed { events: Events, ) -> Box< dyn Iterator< - Item = Result< - FilteredEventDetails, - BasicError, - >, + Item = Result, Error>, > + Send + 'a, >; @@ -140,9 +137,7 @@ impl EventFilter for (Ev,) { fn filter<'a, T: Config>( events: Events, ) -> Box< - dyn Iterator, BasicError>> - + Send - + 'a, + dyn Iterator, Error>> + Send + 'a, > { let block_hash = events.block_hash(); let mut iter = events.iter(); @@ -181,7 +176,7 @@ macro_rules! impl_event_filter { type ReturnType = ( $(Option<$ty>,)+ ); fn filter<'a, T: Config>( events: Events - ) -> Box, BasicError>> + Send + 'a> { + ) -> Box, Error>> + Send + 'a> { let block_hash = events.block_hash(); let mut iter = events.iter(); Box::new(std::iter::from_fn(move || { @@ -286,7 +281,7 @@ mod test { // A stream of fake events for us to try filtering on. fn events_stream( metadata: Metadata, - ) -> impl Stream, BasicError>> { + ) -> impl Stream, Error>> { stream::iter(vec![ events::( metadata.clone(), @@ -311,7 +306,7 @@ mod test { ], ), ]) - .map(Ok::<_, BasicError>) + .map(Ok::<_, Error>) } #[tokio::test] diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 5460367ee1..cf3473608a 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -4,7 +4,7 @@ //! This module exposes the types and such necessary for working with events. //! The two main entry points into events are [`crate::OnlineClient::events()`] -//! and calls like [crate::extrinsic::TransactionProgress::wait_for_finalized_success()]. +//! and calls like [crate::tx::TxProgress::wait_for_finalized_success()]. mod event_subscription; mod events_client; diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index c5f09f92f4..bb20fb7a6f 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -50,7 +50,7 @@ //! # Interacting with the API //! //! Once instantiated, a client, exposes four functions: -//! - `.tx()` for submitting extrinsics/transactions. See [`crate::extrinsic::TxClient`] for more details, or see +//! - `.tx()` for submitting extrinsics/transactions. See [`crate::tx::TxClient`] for more details, or see //! the [balance_transfer](../examples/examples/balance_transfer.rs) example. //! - `.storage()` for fetching and iterating over storage entries. See [`crate::storage::StorageClient`] for more details, or see //! the [fetch_staking_details](../examples/examples/fetch_staking_details.rs) example. @@ -127,10 +127,10 @@ pub mod config; pub mod constants; pub mod error; pub mod events; -pub mod extrinsic; pub mod metadata; pub mod rpc; pub mod storage; +pub mod tx; pub mod utils; // Expose a few of the most common types at root, @@ -145,10 +145,7 @@ pub use crate::{ PolkadotConfig, SubstrateConfig, }, - error::{ - BasicError, - Error, - }, + error::Error, metadata::Metadata, }; diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs index 0c0f59625f..f247fa914b 100644 --- a/subxt/src/metadata/decode_with_metadata.rs +++ b/subxt/src/metadata/decode_with_metadata.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use super::Metadata; -use crate::error::BasicError; +use crate::error::Error; use codec::Decode; use frame_metadata::StorageEntryType; @@ -16,7 +16,7 @@ pub trait DecodeWithMetadata: Sized { bytes: &mut &[u8], type_id: u32, metadata: &Metadata, - ) -> Result; + ) -> Result; /// Decode a storage item using metadata. By default, this uses the metadata to /// work out the type ID to use, but for static items we can short circuit this @@ -26,11 +26,8 @@ pub trait DecodeWithMetadata: Sized { pallet_name: &str, storage_entry: &str, metadata: &Metadata, - ) -> Result { - let ty = &metadata - .pallet(pallet_name)? - .storage(storage_entry)? - .ty; + ) -> Result { + let ty = &metadata.pallet(pallet_name)?.storage(storage_entry)?.ty; let id = match ty { StorageEntryType::Plain(ty) => ty.id(), @@ -48,7 +45,7 @@ impl DecodeWithMetadata for scale_value::Value { bytes: &mut &[u8], type_id: u32, metadata: &Metadata, - ) -> Result { + ) -> Result { let res = scale_value::scale::decode_as_type(bytes, type_id, metadata.types())?; Ok(res) } @@ -64,7 +61,7 @@ impl DecodeWithMetadata for DecodeStaticType { bytes: &mut &[u8], _type_id: u32, _metadata: &Metadata, - ) -> Result { + ) -> Result { T::decode(bytes).map_err(|e| e.into()) } @@ -73,7 +70,7 @@ impl DecodeWithMetadata for DecodeStaticType { _pallet_name: &str, _storage_entry: &str, _metadata: &Metadata, - ) -> Result { + ) -> Result { T::decode(bytes).map_err(|e| e.into()) } } diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs index d98c0c9876..130b79844a 100644 --- a/subxt/src/metadata/encode_with_metadata.rs +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -7,7 +7,7 @@ use super::{ MetadataError, MetadataLocation, }; -use crate::error::BasicError; +use crate::error::Error; use codec::Encode; use std::borrow::Cow; @@ -18,10 +18,10 @@ pub trait EncodeWithMetadata { &self, metadata: &Metadata, out: &mut Vec, - ) -> Result<(), BasicError>; + ) -> Result<(), Error>; /// Given some metadata, attempt to SCALE encode `Self` and return the resulting bytes. - fn encode_with_metadata(&self, metadata: &Metadata) -> Result, BasicError> { + fn encode_with_metadata(&self, metadata: &Metadata) -> Result, Error> { let mut out = Vec::new(); self.encode_to_with_metadata(metadata, &mut out)?; Ok(out) @@ -43,7 +43,7 @@ impl EncodeWithMetadata for EncodeStaticCall { &self, metadata: &Metadata, out: &mut Vec, - ) -> Result<(), BasicError> { + ) -> Result<(), Error> { let pallet = metadata.pallet(self.pallet)?; let pallet_index = pallet.index(); let call_index = pallet.call_index(self.call)?; @@ -100,7 +100,7 @@ impl<'a> EncodeWithMetadata for EncodeDynamicCall<'a> { &self, metadata: &Metadata, out: &mut Vec, - ) -> Result<(), BasicError> { + ) -> Result<(), Error> { let pallet = metadata.pallet(&self.pallet)?; let pallet_index = pallet.index(); let call_ty = pallet.call_ty_id().ok_or(MetadataError::CallNotFound)?; diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index b3e4fada9f..6543310898 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -75,7 +75,11 @@ struct MetadataInner { metadata: RuntimeMetadataV14, pallets: HashMap, events: HashMap<(u8, u8), EventMetadata>, + // Errors are hashed by pallet index. errors: HashMap<(u8, u8), ErrorMetadata>, + // Type of the DispatchError type, which is what comes back if + // an extrinsic fails. + dispatch_error_ty: Option, // The hashes uniquely identify parts of the metadata; different // hashes mean some type difference exists between static and runtime // versions. We cache them here to avoid recalculating: @@ -128,6 +132,11 @@ impl Metadata { Ok(error) } + /// Return the DispatchError type ID if it exists. + pub fn dispatch_error_ty(&self) -> Option { + self.inner.dispatch_error_ty + } + /// Return the type registry embedded within the metadata. pub fn types(&self) -> &PortableRegistry { &self.inner.metadata.types @@ -286,8 +295,7 @@ impl PalletMetadata { /// Metadata for specific events. #[derive(Clone, Debug)] pub struct EventMetadata { - pallet: String, - event: String, + pallet: Arc, variant: Variant, } @@ -299,7 +307,7 @@ impl EventMetadata { /// Get the name of the pallet event which was emitted. pub fn event(&self) -> &str { - &self.event + &self.variant.name() } /// Get the type def variant for the pallet event. @@ -308,15 +316,12 @@ impl EventMetadata { } } -/// Metadata for specific errors obtained from the pallet's `PalletErrorMetadata`. -/// -/// This holds in memory information regarding the Pallet's name, Error's name, and the underlying -/// metadata representation. +/// Details abotu a specific runtime error. #[derive(Clone, Debug)] pub struct ErrorMetadata { - pallet: String, + pallet: Arc, error: String, - variant: Variant, + docs: Vec, } impl ErrorMetadata { @@ -325,14 +330,14 @@ impl ErrorMetadata { &self.pallet } - /// Get the name of the specific pallet error. + /// The name of the error. pub fn error(&self) -> &str { &self.error } - /// Get the description of the specific pallet error. - pub fn description(&self) -> &[String] { - self.variant.docs() + /// Documentation for the error. + pub fn docs(&self) -> &[String] { + &self.docs } } @@ -421,55 +426,47 @@ impl TryFrom for Metadata { }) .collect::>()?; - let pallet_events = metadata - .pallets - .iter() - .filter_map(|pallet| { - pallet.event.as_ref().map(|event| { - let type_def_variant = get_type_def_variant(event.ty.id())?; - Ok((pallet, type_def_variant)) - }) - }) - .collect::, _>>()?; - let events = pallet_events - .iter() - .flat_map(|(pallet, type_def_variant)| { - type_def_variant.variants().iter().map(move |var| { - let key = (pallet.index, var.index()); - let value = EventMetadata { - pallet: pallet.name.clone(), - event: var.name().clone(), - variant: var.clone(), - }; - (key, value) - }) - }) - .collect(); + let mut events = HashMap::<(u8, u8), EventMetadata>::new(); + for pallet in &metadata.pallets { + if let Some(event) = &pallet.event { + let pallet_name: Arc = pallet.name.to_string().into(); + let event_variant = get_type_def_variant(event.ty.id())?; + for variant in event_variant.variants() { + events.insert( + (pallet.index, variant.index()), + EventMetadata { + pallet: pallet_name.clone(), + variant: variant.clone(), + }, + ); + } + } + } - let pallet_errors = metadata - .pallets - .iter() - .filter_map(|pallet| { - pallet.error.as_ref().map(|error| { - let type_def_variant = get_type_def_variant(error.ty.id())?; - Ok((pallet, type_def_variant)) - }) - }) - .collect::, _>>()?; - let errors = pallet_errors + let mut errors = HashMap::<(u8, u8), ErrorMetadata>::new(); + for pallet in &metadata.pallets { + if let Some(error) = &pallet.error { + let pallet_name: Arc = pallet.name.to_string().into(); + let error_variant = get_type_def_variant(error.ty.id())?; + for variant in error_variant.variants() { + errors.insert( + (pallet.index, variant.index()), + ErrorMetadata { + pallet: pallet_name.clone(), + error: variant.name().clone(), + docs: variant.docs().to_vec(), + }, + ); + } + } + } + + let dispatch_error_ty = metadata + .types + .types() .iter() - .flat_map(|(pallet, type_def_variant)| { - type_def_variant.variants().iter().map(move |var| { - let key = (pallet.index, var.index()); - let value = ErrorMetadata { - pallet: pallet.name.clone(), - error: var.name().clone(), - variant: var.clone(), - }; - (key, value) - }) - }) - .collect(); + .find(|ty| ty.ty().path().segments() == &["sp_runtime", "DispatchError"]) + .map(|ty| ty.id()); Ok(Metadata { inner: Arc::new(MetadataInner { @@ -477,6 +474,7 @@ impl TryFrom for Metadata { pallets, events, errors, + dispatch_error_ty, cached_metadata_hash: Default::default(), cached_call_hashes: Default::default(), cached_constant_hashes: Default::default(), diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index f4d5bef309..fa13557b4b 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -50,7 +50,7 @@ use std::{ }; use crate::{ - error::BasicError, + error::Error, utils::PhantomDataSendSync, Config, Metadata, @@ -160,7 +160,7 @@ pub type SystemProperties = serde_json::Map; /// must be kept compatible with that type from the target substrate version. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub enum SubstrateTransactionStatus { +pub enum SubstrateTxStatus { /// Transaction is part of the future queue. Future, /// Transaction is part of the ready queue. @@ -291,7 +291,7 @@ impl Rpc { &self, key: &[u8], hash: Option, - ) -> Result, BasicError> { + ) -> Result, Error> { let params = rpc_params![to_hex(key), hash]; let data = self.client.request("state_getStorage", params).await?; Ok(data) @@ -306,7 +306,7 @@ impl Rpc { count: u32, start_key: Option<&[u8]>, hash: Option, - ) -> Result, BasicError> { + ) -> 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?; @@ -319,7 +319,7 @@ impl Rpc { keys: impl IntoIterator, from: T::Hash, to: Option, - ) -> Result>, BasicError> { + ) -> Result>, Error> { let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, from, to]; self.client @@ -333,7 +333,7 @@ impl Rpc { &self, keys: impl IntoIterator, at: Option, - ) -> Result>, BasicError> { + ) -> Result>, Error> { let keys: Vec = keys.into_iter().map(to_hex).collect(); let params = rpc_params![keys, at]; self.client @@ -343,7 +343,7 @@ impl Rpc { } /// Fetch the genesis hash - pub async fn genesis_hash(&self) -> Result { + pub async fn genesis_hash(&self) -> Result { let block_zero = 0u32; let params = rpc_params![block_zero]; let genesis_hash: Option = @@ -352,7 +352,7 @@ impl Rpc { } /// Fetch the metadata - pub async fn metadata(&self) -> Result { + pub async fn metadata(&self) -> Result { let bytes: Bytes = self .client .request("state_getMetadata", rpc_params![]) @@ -363,7 +363,7 @@ impl Rpc { } /// Fetch system properties - pub async fn system_properties(&self) -> Result { + pub async fn system_properties(&self) -> Result { Ok(self .client .request("system_properties", rpc_params![]) @@ -371,22 +371,22 @@ impl Rpc { } /// Fetch system health - pub async fn system_health(&self) -> Result { + pub async fn system_health(&self) -> Result { Ok(self.client.request("system_health", rpc_params![]).await?) } /// Fetch system chain - pub async fn system_chain(&self) -> Result { + pub async fn system_chain(&self) -> Result { Ok(self.client.request("system_chain", rpc_params![]).await?) } /// Fetch system name - pub async fn system_name(&self) -> Result { + pub async fn system_name(&self) -> Result { Ok(self.client.request("system_name", rpc_params![]).await?) } /// Fetch system version - pub async fn system_version(&self) -> Result { + pub async fn system_version(&self) -> Result { Ok(self.client.request("system_version", rpc_params![]).await?) } @@ -394,7 +394,7 @@ impl Rpc { pub async fn system_account_next_index( &self, account: &T::AccountId, - ) -> Result { + ) -> Result { Ok(self .client .request("system_accountNextIndex", rpc_params![account]) @@ -405,7 +405,7 @@ impl Rpc { pub async fn header( &self, hash: Option, - ) -> Result, BasicError> { + ) -> Result, Error> { let params = rpc_params![hash]; let header = self.client.request("chain_getHeader", params).await?; Ok(header) @@ -415,14 +415,14 @@ impl Rpc { pub async fn block_hash( &self, block_number: Option, - ) -> Result, BasicError> { + ) -> Result, Error> { let params = rpc_params![block_number]; let block_hash = self.client.request("chain_getBlockHash", params).await?; Ok(block_hash) } /// Get a block hash of the latest finalized block - pub async fn finalized_head(&self) -> Result { + pub async fn finalized_head(&self) -> Result { let hash = self .client .request("chain_getFinalizedHead", rpc_params![]) @@ -434,7 +434,7 @@ impl Rpc { pub async fn block( &self, hash: Option, - ) -> Result>, BasicError> { + ) -> Result>, Error> { let params = rpc_params![hash]; let block = self.client.request("chain_getBlock", params).await?; Ok(block) @@ -448,7 +448,7 @@ impl Rpc { pub async fn block_stats( &self, block_hash: T::Hash, - ) -> Result, BasicError> { + ) -> Result, Error> { let params = rpc_params![block_hash]; let stats = self.client.request("dev_getBlockStats", params).await?; Ok(stats) @@ -459,7 +459,7 @@ impl Rpc { &self, keys: impl IntoIterator, hash: Option, - ) -> Result, BasicError> { + ) -> 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?; @@ -470,7 +470,7 @@ impl Rpc { pub async fn runtime_version( &self, at: Option, - ) -> Result { + ) -> Result { let params = rpc_params![at]; let version = self .client @@ -480,7 +480,7 @@ impl Rpc { } /// Subscribe to blocks. - pub async fn subscribe_blocks(&self) -> Result, BasicError> { + pub async fn subscribe_blocks(&self) -> Result, Error> { let subscription = self .client .subscribe( @@ -496,7 +496,7 @@ impl Rpc { /// Subscribe to finalized blocks. pub async fn subscribe_finalized_blocks( &self, - ) -> Result, BasicError> { + ) -> Result, Error> { let subscription = self .client .subscribe( @@ -511,7 +511,7 @@ impl Rpc { /// Subscribe to runtime version updates that produce changes in the metadata. pub async fn subscribe_runtime_version( &self, - ) -> Result, BasicError> { + ) -> Result, Error> { let subscription = self .client .subscribe( @@ -527,7 +527,7 @@ impl Rpc { pub async fn submit_extrinsic( &self, extrinsic: X, - ) -> Result { + ) -> Result { let bytes: Bytes = extrinsic.encode().into(); let params = rpc_params![bytes]; let xt_hash = self @@ -541,8 +541,7 @@ impl Rpc { pub async fn watch_extrinsic( &self, extrinsic: X, - ) -> Result>, BasicError> - { + ) -> Result>, Error> { let bytes: Bytes = extrinsic.encode().into(); let params = rpc_params![bytes]; let subscription = self @@ -562,14 +561,14 @@ impl Rpc { key_type: String, suri: String, public: Bytes, - ) -> Result<(), BasicError> { + ) -> Result<(), Error> { let params = rpc_params![key_type, suri, public]; self.client.request("author_insertKey", params).await?; Ok(()) } /// Generate new session keys and returns the corresponding public keys. - pub async fn rotate_keys(&self) -> Result { + pub async fn rotate_keys(&self) -> Result { Ok(self .client .request("author_rotateKeys", rpc_params![]) @@ -581,10 +580,7 @@ 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: Bytes) -> Result { let params = rpc_params![session_keys]; Ok(self.client.request("author_hasSessionKeys", params).await?) } @@ -596,7 +592,7 @@ impl Rpc { &self, public_key: Bytes, key_type: String, - ) -> Result { + ) -> Result { let params = rpc_params![public_key, key_type]; Ok(self.client.request("author_hasKey", params).await?) } @@ -608,7 +604,7 @@ impl Rpc { &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 = diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index ac232bb7ad..7cd77dd2ac 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -20,7 +20,7 @@ pub use sp_core::storage::StorageKey; pub mod address { pub use super::storage_address::{ StaticStorageAddress, - StorageAddressT, + StorageAddress, StorageHasher, StorageMapKey, Yes, diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 18ef3d4cb2..29ae43c1b2 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -9,9 +9,9 @@ pub use sp_runtime::traits::SignedExtension; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; -/// A trait representing a storage address. Anything implementing this trait +/// This represents a storage address. Anything implementing this trait /// can be used to fetch and iterate over storage entries. -pub trait StorageAddressT { +pub trait StorageAddress { /// Thye target type of the value that lives at this address? type Target: DecodeWithMetadata; /// Can an entry be fetched from this address? @@ -74,9 +74,7 @@ pub trait StorageAddressT { /// fetched and returned with a default value in the type system. pub struct Yes; -/// This is returned from storage accesses in the statically generated -/// code, and contains the information needed to find, validate and decode -/// the storage entry. +/// This represents a statically generated storage lookup address. pub struct StaticStorageAddress { pallet_name: &'static str, entry_name: &'static str, @@ -112,11 +110,8 @@ where /// Do not validate this storage entry prior to accessing it. pub fn unvalidated(self) -> Self { Self { - pallet_name: self.pallet_name, - entry_name: self.entry_name, - storage_entry_key: self.storage_entry_key, validation_hash: None, - _marker: self._marker, + ..self } } @@ -124,17 +119,17 @@ where /// Return bytes representing this storage entry. pub fn to_bytes(&self) -> Vec { - StorageAddressT::to_bytes(self) + StorageAddress::to_bytes(self) } /// Return bytes representing the root of this storage entry (ie a hash of /// the pallet and entry name). pub fn to_root_bytes(&self) -> Vec { - StorageAddressT::to_root_bytes(self) + StorageAddress::to_root_bytes(self) } } -impl StorageAddressT +impl StorageAddress for StaticStorageAddress where ReturnTy: DecodeWithMetadata, diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 58dd5a3bf2..8dc86d9a4f 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -3,7 +3,7 @@ // see LICENSE for license details. use super::storage_address::{ - StorageAddressT, + StorageAddress, Yes, }; use crate::{ @@ -11,7 +11,7 @@ use crate::{ OfflineClientT, OnlineClientT, }, - error::BasicError, + error::Error, metadata::{ DecodeWithMetadata, Metadata, @@ -57,10 +57,10 @@ where /// if the address is valid (or if it's not possible to check since the address has no validation hash). /// Return an error if the address was not valid or something went wrong trying to validate it (ie /// the pallet or storage entry in question do not exist at all). - pub fn validate( + pub fn validate( &self, address: &Address, - ) -> Result<(), BasicError> { + ) -> Result<(), Error> { if let Some(hash) = address.validation_hash() { validate_storage( address.pallet_name(), @@ -83,7 +83,7 @@ where &self, key: &'a [u8], hash: Option, - ) -> impl Future>, BasicError>> + 'a { + ) -> impl Future>, Error>> + 'a { let client = self.client.clone(); // Ensure that the returned future doesn't have a lifetime tied to api.storage(), // which is a temporary thing we'll be throwing away quickly: @@ -125,13 +125,10 @@ where address: &'a Address, hash: Option, ) -> impl Future< - Output = Result< - Option<::Target>, - BasicError, - >, + Output = Result::Target>, Error>, > + 'a where - Address: StorageAddressT + 'a, + Address: StorageAddress + 'a, { let client = self.clone(); async move { @@ -168,11 +165,10 @@ where &self, address: &'a Address, hash: Option, - ) -> impl Future< - Output = Result<::Target, BasicError>, - > + 'a + ) -> impl Future::Target, Error>> + + 'a where - Address: StorageAddressT + 'a, + Address: StorageAddress + 'a, { let client = self.client.clone(); async move { @@ -210,7 +206,7 @@ where count: u32, start_key: Option<&'a [u8]>, hash: Option, - ) -> impl Future, BasicError>> + 'a { + ) -> impl Future, Error>> + 'a { let client = self.client.clone(); async move { let keys = client @@ -254,9 +250,9 @@ where address: Address, page_size: u32, hash: Option, - ) -> impl Future, BasicError>> + 'static + ) -> impl Future, Error>> + 'static where - Address: StorageAddressT + 'static, + Address: StorageAddress + 'static, { let client = self.clone(); async move { @@ -332,7 +328,7 @@ where /// Returns the next key value pair from a map. pub async fn next( &mut self, - ) -> Result, BasicError> { + ) -> Result, Error> { loop { if let Some((k, v)) = self.buffer.pop() { let val = ReturnTy::decode_with_metadata( @@ -384,7 +380,7 @@ fn validate_storage( storage_name: &str, hash: [u8; 32], metadata: &Metadata, -) -> Result<(), BasicError> { +) -> Result<(), Error> { let expected_hash = match metadata.storage_hash(pallet_name, storage_name) { Ok(hash) => hash, Err(e) => return Err(e.into()), @@ -400,7 +396,7 @@ fn lookup_storage_return_type( metadata: &Metadata, pallet: &str, entry: &str, -) -> Result { +) -> Result { let storage_entry_type = &metadata.pallet(pallet)?.storage(entry)?.ty; Ok(return_type_from_storage_entry_type(storage_entry_type)) diff --git a/subxt/src/extrinsic/mod.rs b/subxt/src/tx/mod.rs similarity index 88% rename from subxt/src/extrinsic/mod.rs rename to subxt/src/tx/mod.rs index 74549c5001..626733a9d3 100644 --- a/subxt/src/extrinsic/mod.rs +++ b/subxt/src/tx/mod.rs @@ -20,8 +20,9 @@ mod params; mod signer; -mod transaction; mod tx_client; +mod tx_payload; +mod tx_progress; pub use self::{ params::{ @@ -40,15 +41,18 @@ pub use self::{ PairSigner, Signer, }, - transaction::{ - TransactionEvents, - TransactionInBlock, - TransactionProgress, - TransactionStatus, - }, tx_client::{ SignedSubmittableExtrinsic, - SubmittableExtrinsic, TxClient, }, + tx_payload::{ + StaticTxPayload, + TxPayload, + }, + tx_progress::{ + TxEvents, + TxInBlock, + TxProgress, + TxStatus, + }, }; diff --git a/subxt/src/extrinsic/params.rs b/subxt/src/tx/params.rs similarity index 100% rename from subxt/src/extrinsic/params.rs rename to subxt/src/tx/params.rs diff --git a/subxt/src/extrinsic/signer.rs b/subxt/src/tx/signer.rs similarity index 100% rename from subxt/src/extrinsic/signer.rs rename to subxt/src/tx/signer.rs diff --git a/subxt/src/extrinsic/tx_client.rs b/subxt/src/tx/tx_client.rs similarity index 67% rename from subxt/src/extrinsic/tx_client.rs rename to subxt/src/tx/tx_client.rs index 4e3fc47b8c..0f98675322 100644 --- a/subxt/src/extrinsic/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -2,23 +2,17 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. +use super::TxPayload; use crate::{ client::{ OfflineClientT, OnlineClientT, }, - error::{ - BasicError, - HasModuleError, - }, - extrinsic::{ + error::Error, + tx::{ ExtrinsicParams, Signer, - TransactionProgress, - }, - metadata::{ - EncodeWithMetadata, - MetadataLocation, + TxProgress, }, utils::{ Encoded, @@ -28,7 +22,6 @@ use crate::{ }; use codec::{ Compact, - Decode, Encode, }; use derivative::Derivative; @@ -60,17 +53,14 @@ impl> TxClient { /// if the call is valid (or if it's not possible to check since the call has no validation hash). /// Return an error if the call was not valid or something went wrong trying to validate it (ie /// the pallet or call in question do not exist at all). - pub fn validate( - &self, - call: &SubmittableExtrinsic, - ) -> Result<(), BasicError> + pub fn validate(&self, call: &Call) -> Result<(), Error> where - Call: MetadataLocation, + Call: TxPayload, { - if let Some(actual_hash) = call.call_hash { + if let Some(actual_hash) = call.validation_hash() { let metadata = self.client.metadata(); let expected_hash = - metadata.call_hash(call.call_data.pallet(), call.call_data.item())?; + metadata.call_hash(call.pallet_name(), call.call_name())?; if actual_hash != expected_hash { return Err(crate::metadata::MetadataError::IncompatibleMetadata.into()) } @@ -79,25 +69,26 @@ impl> TxClient { } /// Return the SCALE encoded bytes representing the call data of the transaction. - pub fn call_data(&self, call: &Call) -> Result, BasicError> + pub fn call_data(&self, call: &Call) -> Result, Error> where - Call: EncodeWithMetadata, + Call: TxPayload, { let metadata = self.client.metadata(); - let bytes = call.encode_with_metadata(&metadata)?; + let mut bytes = Vec::new(); + call.encode_call_data(&metadata, &mut bytes)?; Ok(bytes) } /// Creates a returns a raw signed extrinsic, without submitting it. - pub async fn create_signed_with_nonce( + pub async fn create_signed_with_nonce( &self, - call: &SubmittableExtrinsic, + call: &Call, signer: &(dyn Signer + Send + Sync), account_nonce: T::Index, other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, Error> where - Call: EncodeWithMetadata + MetadataLocation, + Call: TxPayload, { // 1. Validate this call against the current node metadata if the call comes // with a hash allowing us to do so. @@ -179,15 +170,14 @@ impl> TxClient { impl> TxClient { /// Creates a returns a raw signed extrinsic, without submitting it. - pub async fn create_signed( + pub async fn create_signed( &self, - call: &SubmittableExtrinsic, + call: &Call, signer: &(dyn Signer + Send + Sync), other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, Error> where - Call: EncodeWithMetadata + MetadataLocation, - Err: Decode + HasModuleError, + Call: TxPayload, { // Get nonce from the node. let account_nonce = if let Some(nonce) = signer.nonce() { @@ -206,16 +196,15 @@ impl> TxClient { /// Creates and signs an extrinsic and submits it to the chain. Passes default parameters /// to construct the "signed extra" and "additional" payloads needed by the extrinsic. /// - /// Returns a [`TransactionProgress`], which can be used to track the status of the transaction + /// 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: &SubmittableExtrinsic, + call: &Call, signer: &(dyn Signer + Send + Sync), - ) -> Result, BasicError> + ) -> Result, Error> where - Call: EncodeWithMetadata + MetadataLocation, - Err: Decode + HasModuleError, + Call: TxPayload, >::OtherParams: Default, { self.sign_and_submit_then_watch(call, signer, Default::default()) @@ -224,17 +213,16 @@ impl> TxClient { /// Creates and signs an extrinsic and submits it to the chain. /// - /// Returns a [`TransactionProgress`], which can be used to track the status of the transaction + /// 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: &SubmittableExtrinsic, + call: &Call, signer: &(dyn Signer + Send + Sync), other_params: >::OtherParams, - ) -> Result, BasicError> + ) -> Result, Error> where - Call: EncodeWithMetadata + MetadataLocation, - Err: Decode + HasModuleError, + Call: TxPayload, { self.create_signed(call, signer, other_params) .await? @@ -252,14 +240,13 @@ impl> TxClient { /// /// 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: &SubmittableExtrinsic, + call: &Call, signer: &(dyn Signer + Send + Sync), - ) -> Result + ) -> Result where - Call: EncodeWithMetadata + MetadataLocation, - Err: Decode + HasModuleError, + Call: TxPayload, >::OtherParams: Default, { self.sign_and_submit(call, signer, Default::default()).await @@ -273,15 +260,14 @@ impl> TxClient { /// /// 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: &SubmittableExtrinsic, + call: &Call, signer: &(dyn Signer + Send + Sync), other_params: >::OtherParams, - ) -> Result + ) -> Result where - Call: EncodeWithMetadata + MetadataLocation, - Err: Decode + HasModuleError, + Call: TxPayload, { self.create_signed(call, signer, other_params) .await? @@ -290,87 +276,30 @@ impl> TxClient { } } -/// A constructed call ready to be signed and submitted. As well as the raw call -/// data (which ultimately is anything that can be SCALE encoded with the help of -/// [`crate::Metadata`]), this contains type information which can help us decode the -/// resulting events or error. -pub struct SubmittableExtrinsic { - call_data: Call, - // static calls come with a hash that allows us to validate them - // against metadata. Dynamic calls have no such info, but instead can be - // validated more comprehensively at runtime when we attempt to encode them. - call_hash: Option<[u8; 32]>, - marker: std::marker::PhantomData, -} - -impl SubmittableExtrinsic { - /// Create a new [`SubmittableExtrinsic`] that will not be validated - /// against node metadata. - pub fn new_unvalidated(call_data: Call) -> Self { - Self { - call_data, - call_hash: None, - marker: std::marker::PhantomData, - } - } - /// Create a new [`SubmittableExtrinsic`] that will be validated - /// against node metadata. - pub fn new_with_validation(call_data: Call, hash: [u8; 32]) -> Self { - Self { - call_data, - call_hash: Some(hash), - marker: std::marker::PhantomData, - } - } - /// Do not validate this call prior to submitting it. - pub fn unvalidated(self) -> Self { - Self { - call_data: self.call_data, - call_hash: None, - marker: self.marker, - } - } -} - -impl EncodeWithMetadata - for SubmittableExtrinsic -{ - fn encode_to_with_metadata( - &self, - metadata: &crate::Metadata, - out: &mut Vec, - ) -> Result<(), BasicError> { - self.call_data.encode_to_with_metadata(metadata, out) - } -} - /// This represents an extrinsic that has been signed and is ready to submit. -pub struct SignedSubmittableExtrinsic { +pub struct SignedSubmittableExtrinsic { client: C, encoded: Encoded, - marker: std::marker::PhantomData<(Err, T)>, + marker: std::marker::PhantomData, } -impl SignedSubmittableExtrinsic +impl SignedSubmittableExtrinsic where T: Config, C: OnlineClientT, - Err: Decode + HasModuleError, { /// Submits the extrinsic to the chain. /// - /// Returns a [`TransactionProgress`], which can be used to track the status of the transaction + /// 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 submit_and_watch( - &self, - ) -> Result, BasicError> { + 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); // Submit and watch for transaction progress. let sub = self.client.rpc().watch_extrinsic(&self.encoded).await?; - Ok(TransactionProgress::new(sub, self.client.clone(), ext_hash)) + Ok(TxProgress::new(sub, self.client.clone(), ext_hash)) } /// Submits the extrinsic to the chain for block inclusion. @@ -381,7 +310,7 @@ 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 submit(&self) -> Result { + pub async fn submit(&self) -> Result { self.client.rpc().submit_extrinsic(&self.encoded).await } @@ -391,7 +320,7 @@ where pub async fn dry_run( &self, at: Option, - ) -> Result { + ) -> Result { self.client.rpc().dry_run(self.encoded(), at).await } diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs new file mode 100644 index 0000000000..e26437337a --- /dev/null +++ b/subxt/src/tx/tx_payload.rs @@ -0,0 +1,98 @@ +// 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. + +//! This module contains the trait and types used to represent +//! transactions that can be submitted. + +use crate::{ + error::Error, + metadata::Metadata, +}; +use codec::Encode; + +/// This represents a transaction payload that can be submitted +/// to a node. +pub trait TxPayload { + /// The name of the pallet that the call lives under. + fn pallet_name(&self) -> &str; + + /// The name of the call. + fn call_name(&self) -> &str; + + /// Encode call data to the provided output. + fn encode_call_data( + &self, + metadata: &Metadata, + out: &mut Vec, + ) -> Result<(), Error>; + + /// An optional validation hash that can be provided + /// to verify that the shape of the call on the node + /// aligns with our expectations. + fn validation_hash(&self) -> Option<[u8; 32]> { + None + } +} + +/// This represents a statically generated transaction payload. +pub struct StaticTxPayload { + pallet_name: &'static str, + call_name: &'static str, + call_data: CallData, + validation_hash: Option<[u8; 32]>, +} + +impl StaticTxPayload { + /// Create a new [`StaticTxPayload`] from static data. + pub fn new( + pallet_name: &'static str, + call_name: &'static str, + call_data: CallData, + validation_hash: [u8; 32], + ) -> Self { + StaticTxPayload { + pallet_name, + call_name, + call_data, + validation_hash: Some(validation_hash), + } + } + + /// Do not validate this call prior to submitting it. + pub fn unvalidated(self) -> Self { + Self { + validation_hash: None, + ..self + } + } +} + +impl TxPayload for StaticTxPayload { + fn pallet_name(&self) -> &str { + self.pallet_name + } + + fn call_name(&self) -> &str { + self.call_name + } + + fn encode_call_data( + &self, + metadata: &Metadata, + out: &mut Vec, + ) -> Result<(), Error> { + let pallet = metadata.pallet(self.pallet_name)?; + let pallet_index = pallet.index(); + let call_index = pallet.call_index(self.call_name)?; + + pallet_index.encode_to(out); + call_index.encode_to(out); + self.call_data.encode_to(out); + Ok(()) + } + + fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash + } +} diff --git a/subxt/src/extrinsic/transaction.rs b/subxt/src/tx/tx_progress.rs similarity index 65% rename from subxt/src/extrinsic/transaction.rs rename to subxt/src/tx/tx_progress.rs index 19d4142c49..fa503e6970 100644 --- a/subxt/src/extrinsic/transaction.rs +++ b/subxt/src/tx/tx_progress.rs @@ -9,11 +9,10 @@ use std::task::Poll; use crate::{ client::OnlineClientT, error::{ - BasicError, + DispatchError, Error, - HasModuleError, ModuleError, - RuntimeError, + ModuleErrorData, TransactionError, }, events::{ @@ -24,8 +23,8 @@ use crate::{ Phase, StaticEvent, }, - rpc::SubstrateTransactionStatus, - utils::PhantomDataSendSync, + metadata::Metadata, + rpc::SubstrateTxStatus, Config, }; use codec::Decode; @@ -38,6 +37,7 @@ use jsonrpsee::core::{ client::Subscription as RpcSubscription, Error as RpcError, }; +use scale_info::TypeDef; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; @@ -45,24 +45,21 @@ pub use sp_runtime::traits::SignedExtension; /// This struct represents a subscription to the progress of some transaction. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] -pub struct TransactionProgress { - sub: Option>>, +pub struct TxProgress { + sub: Option>>, ext_hash: T::Hash, client: C, - _error: PhantomDataSendSync, } // The above type is not `Unpin` by default unless the generic param `T` is, // so we manually make it clear that Unpin is actually fine regardless of `T` // (we don't care if this moves around in memory while it's "pinned"). -impl Unpin for TransactionProgress {} +impl Unpin for TxProgress {} -impl, Err: Decode + HasModuleError> - TransactionProgress -{ - /// Instantiate a new [`TransactionProgress`] from a custom subscription. +impl TxProgress { + /// Instantiate a new [`TxProgress`] from a custom subscription. pub fn new( - sub: RpcSubscription>, + sub: RpcSubscription>, client: C, ext_hash: T::Hash, ) -> Self { @@ -70,41 +67,36 @@ impl, Err: Decode + HasModuleError> sub: Some(sub), client, ext_hash, - _error: PhantomDataSendSync::new(), } } +} +impl> TxProgress { /// Return the next transaction status when it's emitted. This just delegates to the - /// [`futures::Stream`] implementation for [`TransactionProgress`], but allows you to + /// [`futures::Stream`] implementation for [`TxProgress`], but allows you to /// avoid importing that trait if you don't otherwise need it. - pub async fn next_item( - &mut self, - ) -> Option, BasicError>> { + pub async fn next_item(&mut self) -> Option, Error>> { self.next().await } /// Wait for the transaction to be in a block (but not necessarily finalized), and return - /// an [`TransactionInBlock`] instance when this happens, or an error if there was a problem + /// an [`TxInBlock`] instance when this happens, or an error if there was a problem /// waiting for this to happen. /// /// **Note:** consumes `self`. If you'd like to perform multiple actions as the state of the - /// transaction progresses, use [`TransactionProgress::next_item()`] instead. + /// transaction progresses, use [`TxProgress::next_item()`] instead. /// /// **Note:** transaction statuses like `Invalid` and `Usurped` are ignored, because while they /// may well indicate with some probability that the transaction will not make it into a block, /// there is no guarantee that this is true. Thus, we prefer to "play it safe" here. Use the lower - /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. - pub async fn wait_for_in_block( - mut self, - ) -> Result, BasicError> { + /// level [`TxProgress::next_item()`] API if you'd like to handle these statuses yourself. + pub async fn wait_for_in_block(mut self) -> Result, Error> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. - TransactionStatus::InBlock(s) | TransactionStatus::Finalized(s) => { - return Ok(s) - } + TxStatus::InBlock(s) | TxStatus::Finalized(s) => return Ok(s), // Error scenarios; return the error. - TransactionStatus::FinalityTimeout(_) => { + TxStatus::FinalityTimeout(_) => { return Err(TransactionError::FinalitySubscriptionTimeout.into()) } // Ignore anything else and wait for next status event: @@ -114,25 +106,23 @@ impl, Err: Decode + HasModuleError> Err(RpcError::Custom("RPC subscription dropped".into()).into()) } - /// Wait for the transaction to be finalized, and return a [`TransactionInBlock`] + /// Wait for the transaction to be finalized, and return a [`TxInBlock`] /// instance when it is, or an error if there was a problem waiting for finalization. /// /// **Note:** consumes `self`. If you'd like to perform multiple actions as the state of the - /// transaction progresses, use [`TransactionProgress::next_item()`] instead. + /// transaction progresses, use [`TxProgress::next_item()`] instead. /// /// **Note:** transaction statuses like `Invalid` and `Usurped` are ignored, because while they /// may well indicate with some probability that the transaction will not make it into a block, /// there is no guarantee that this is true. Thus, we prefer to "play it safe" here. Use the lower - /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. - pub async fn wait_for_finalized( - mut self, - ) -> Result, BasicError> { + /// level [`TxProgress::next_item()`] API if you'd like to handle these statuses yourself. + pub async fn wait_for_finalized(mut self) -> Result, Error> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. - TransactionStatus::Finalized(s) => return Ok(s), + TxStatus::Finalized(s) => return Ok(s), // Error scenarios; return the error. - TransactionStatus::FinalityTimeout(_) => { + TxStatus::FinalityTimeout(_) => { return Err(TransactionError::FinalitySubscriptionTimeout.into()) } // Ignore and wait for next status event: @@ -147,24 +137,20 @@ impl, Err: Decode + HasModuleError> /// as well as a couple of other details (block hash and extrinsic hash). /// /// **Note:** consumes self. If you'd like to perform multiple actions as progress is made, - /// use [`TransactionProgress::next_item()`] instead. + /// use [`TxProgress::next_item()`] instead. /// /// **Note:** transaction statuses like `Invalid` and `Usurped` are ignored, because while they /// may well indicate with some probability that the transaction will not make it into a block, /// there is no guarantee that this is true. Thus, we prefer to "play it safe" here. Use the lower - /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. - pub async fn wait_for_finalized_success( - self, - ) -> Result, Error> { + /// level [`TxProgress::next_item()`] API if you'd like to handle these statuses yourself. + pub async fn wait_for_finalized_success(self) -> Result, Error> { let evs = self.wait_for_finalized().await?.wait_for_success().await?; Ok(evs) } } -impl, Err: Decode + HasModuleError> Stream - for TransactionProgress -{ - type Item = Result, BasicError>; +impl> Stream for TxProgress { + type Item = Result, Error>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -179,28 +165,22 @@ impl, Err: Decode + HasModuleError> Stream .map_err(|e| e.into()) .map_ok(|status| { match status { - SubstrateTransactionStatus::Future => TransactionStatus::Future, - SubstrateTransactionStatus::Ready => TransactionStatus::Ready, - SubstrateTransactionStatus::Broadcast(peers) => { - TransactionStatus::Broadcast(peers) - } - SubstrateTransactionStatus::InBlock(hash) => { - TransactionStatus::InBlock(TransactionInBlock::new( + SubstrateTxStatus::Future => TxStatus::Future, + SubstrateTxStatus::Ready => TxStatus::Ready, + SubstrateTxStatus::Broadcast(peers) => TxStatus::Broadcast(peers), + SubstrateTxStatus::InBlock(hash) => { + TxStatus::InBlock(TxInBlock::new( hash, self.ext_hash, self.client.clone(), )) } - SubstrateTransactionStatus::Retracted(hash) => { - TransactionStatus::Retracted(hash) - } - SubstrateTransactionStatus::Usurped(hash) => { - TransactionStatus::Usurped(hash) - } - SubstrateTransactionStatus::Dropped => TransactionStatus::Dropped, - SubstrateTransactionStatus::Invalid => TransactionStatus::Invalid, + SubstrateTxStatus::Retracted(hash) => TxStatus::Retracted(hash), + SubstrateTxStatus::Usurped(hash) => TxStatus::Usurped(hash), + SubstrateTxStatus::Dropped => TxStatus::Dropped, + SubstrateTxStatus::Invalid => TxStatus::Invalid, // Only the following statuses are actually considered "final" (see the substrate - // docs on `TransactionStatus`). Basically, either the transaction makes it into a + // docs on `TxStatus`). Basically, either the transaction makes it into a // block, or we eventually give up on waiting for it to make it into a block. // Even `Dropped`/`Invalid`/`Usurped` transactions might make it into a block eventually. // @@ -208,13 +188,13 @@ impl, Err: Decode + HasModuleError> Stream // nonce might still be valid on some fork on another node which ends up being finalized. // Equally, a transaction `Dropped` from one node may still be in the transaction pool, // and make it into a block, on another node. Likewise with `Usurped`. - SubstrateTransactionStatus::FinalityTimeout(hash) => { + SubstrateTxStatus::FinalityTimeout(hash) => { self.sub = None; - TransactionStatus::FinalityTimeout(hash) + TxStatus::FinalityTimeout(hash) } - SubstrateTransactionStatus::Finalized(hash) => { + SubstrateTxStatus::Finalized(hash) => { self.sub = None; - TransactionStatus::Finalized(TransactionInBlock::new( + TxStatus::Finalized(TxInBlock::new( hash, self.ext_hash, self.client.clone(), @@ -225,12 +205,12 @@ impl, Err: Decode + HasModuleError> Stream } } -//* Dev note: The below is adapted from the substrate docs on `TransactionStatus`, which this -//* enum was adapted from (and which is an exact copy of `SubstrateTransactionStatus` in this crate). +//* Dev note: The below is adapted from the substrate docs on `TxStatus`, which this +//* enum was adapted from (and which is an exact copy of `SubstrateTxStatus` in this crate). //* Note that the number of finality watchers is, at the time of writing, found in the constant //* `MAX_FINALITY_WATCHERS` in the `sc_transaction_pool` crate. //* -/// Possible transaction statuses returned from our [`TransactionProgress::next_item()`] call. +/// Possible transaction statuses returned from our [`TxProgress::next_item()`] call. /// /// These status events can be grouped based on their kinds as: /// @@ -273,7 +253,7 @@ impl, Err: Decode + HasModuleError> Stream /// or that finality gadget is lagging behind. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] -pub enum TransactionStatus { +pub enum TxStatus { /// The transaction is part of the "future" queue. Future, /// The transaction is part of the "ready" queue. @@ -281,7 +261,7 @@ pub enum TransactionStatus { /// The transaction has been broadcast to the given peers. Broadcast(Vec), /// The transaction has been included in a block with given hash. - InBlock(TransactionInBlock), + InBlock(TxInBlock), /// The block this transaction was included in has been retracted, /// probably because it did not make it onto the blocks which were /// finalized. @@ -290,7 +270,7 @@ pub enum TransactionStatus { /// blocks, and so the subscription has ended. FinalityTimeout(T::Hash), /// The transaction has been finalized by a finality-gadget, e.g GRANDPA. - Finalized(TransactionInBlock), + Finalized(TxInBlock), /// The transaction has been replaced in the pool by another transaction /// that provides the same tags. (e.g. same (sender, nonce)). Usurped(T::Hash), @@ -300,10 +280,10 @@ pub enum TransactionStatus { Invalid, } -impl TransactionStatus { +impl TxStatus { /// A convenience method to return the `Finalized` details. Returns - /// [`None`] if the enum variant is not [`TransactionStatus::Finalized`]. - pub fn as_finalized(&self) -> Option<&TransactionInBlock> { + /// [`None`] if the enum variant is not [`TxStatus::Finalized`]. + pub fn as_finalized(&self) -> Option<&TxInBlock> { match self { Self::Finalized(val) => Some(val), _ => None, @@ -311,8 +291,8 @@ impl TransactionStatus { } /// A convenience method to return the `InBlock` details. Returns - /// [`None`] if the enum variant is not [`TransactionStatus::InBlock`]. - pub fn as_in_block(&self) -> Option<&TransactionInBlock> { + /// [`None`] if the enum variant is not [`TxStatus::InBlock`]. + pub fn as_in_block(&self) -> Option<&TxInBlock> { match self { Self::InBlock(val) => Some(val), _ => None, @@ -323,22 +303,18 @@ impl TransactionStatus { /// This struct represents a transaction that has made it into a block. #[derive(Derivative)] #[derivative(Debug(bound = "C: std::fmt::Debug"))] -pub struct TransactionInBlock { +pub struct TxInBlock { block_hash: T::Hash, ext_hash: T::Hash, client: C, - _error: PhantomDataSendSync, } -impl, Err: Decode + HasModuleError> - TransactionInBlock -{ +impl> TxInBlock { pub(crate) fn new(block_hash: T::Hash, ext_hash: T::Hash, client: C) -> Self { Self { block_hash, ext_hash, client, - _error: PhantomDataSendSync::new(), } } @@ -360,33 +336,21 @@ impl, Err: Decode + HasModuleError> /// **Note:** If multiple `ExtrinsicFailed` errors are returned (for instance /// because a pallet chooses to emit one as an event, which is considered /// abnormal behaviour), it is not specified which of the errors is returned here. - /// You can use [`TransactionInBlock::fetch_events`] instead if you'd like to + /// You can use [`TxInBlock::fetch_events`] instead if you'd like to /// work with multiple "error" events. /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn wait_for_success(&self) -> Result, Error> { + pub async fn wait_for_success(&self) -> Result, Error> { let events = self.fetch_events().await?; // Try to find any errors; return the first one we encounter. for ev in events.iter() { let ev = ev?; if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { - let dispatch_error = Err::decode(&mut &*ev.bytes)?; - if let Some(error_data) = dispatch_error.module_error_data() { - // Error index is utilized as the first byte from the error array. - let metadata = self.client.metadata(); - let details = metadata - .error(error_data.pallet_index, error_data.error_index())?; - return Err(Error::Module(ModuleError { - pallet: details.pallet().to_string(), - error: details.error().to_string(), - description: details.description().to_vec(), - error_data, - })) - } else { - return Err(Error::Runtime(RuntimeError(dispatch_error))) - } + let dispatch_error = + decode_dispatch_error(&self.client.metadata(), &ev.bytes); + return Err(dispatch_error.into()) } } @@ -399,13 +363,13 @@ impl, Err: Decode + HasModuleError> /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn fetch_events(&self) -> Result, BasicError> { + pub async fn fetch_events(&self) -> Result, Error> { let block = self .client .rpc() .block(Some(self.block_hash)) .await? - .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; + .ok_or(Error::Transaction(TransactionError::BlockHashNotFound))?; let extrinsic_idx = block.block.extrinsics .iter() @@ -415,13 +379,13 @@ impl, Err: Decode + HasModuleError> }) // If we successfully obtain the block hash we think contains our // extrinsic, the extrinsic should be in there somewhere.. - .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; + .ok_or(Error::Transaction(TransactionError::BlockHashNotFound))?; let events = EventsClient::new(self.client.clone()) .at(self.block_hash) .await?; - Ok(TransactionEvents { + Ok(TxEvents { ext_hash: self.ext_hash, ext_idx: extrinsic_idx as u32, events, @@ -433,13 +397,13 @@ impl, Err: Decode + HasModuleError> /// We can iterate over the events, or look for a specific one. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionEvents { +pub struct TxEvents { ext_hash: T::Hash, ext_idx: u32, events: Events, } -impl TransactionEvents { +impl TxEvents { /// Return the hash of the block that the transaction has made it into. pub fn block_hash(&self) -> T::Hash { self.events.block_hash() @@ -459,7 +423,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::iter()`] does, with the /// exception that it filters out events not related to the submitted extrinsic. - pub fn iter(&self) -> impl Iterator> + '_ { + pub fn iter(&self) -> impl Iterator> + '_ { self.events.iter().filter(|ev| { ev.as_ref() .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) @@ -471,9 +435,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::find()`] does, with the /// exception that it filters out events not related to the submitted extrinsic. - pub fn find( - &self, - ) -> impl Iterator> + '_ { + pub fn find(&self) -> impl Iterator> + '_ { self.iter().filter_map(|ev| { ev.and_then(|ev| ev.as_event::().map_err(Into::into)) .transpose() @@ -485,7 +447,7 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::find_first()`] does, with the /// exception that it ignores events not related to the submitted extrinsic. - pub fn find_first(&self) -> Result, BasicError> { + pub fn find_first(&self) -> Result, Error> { self.find::().next().transpose() } @@ -493,7 +455,115 @@ impl TransactionEvents { /// /// This works in the same way that [`events::Events::has()`] does, with the /// exception that it ignores events not related to the submitted extrinsic. - pub fn has(&self) -> Result { + pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) } } + +// Attempt to decode a DispatchError, returning either the ModuleError it decodes to, +// along with additional details on the error, or returning the raw bytes to work with +// downstream if we couldn't decode it. +fn decode_dispatch_error(metadata: &Metadata, bytes: &[u8]) -> DispatchError { + let dispatch_error_ty_id = match metadata.dispatch_error_ty() { + Some(id) => id, + None => { + tracing::warn!( + "Can't decode error: sp_runtime::DispatchError was not found in Metadata" + ); + return DispatchError::Other(bytes.to_vec()) + } + }; + + let dispatch_error_ty = match metadata.types().resolve(dispatch_error_ty_id) { + Some(ty) => ty, + None => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError type ID doesn't resolve to a known type"); + return DispatchError::Other(bytes.to_vec()) + } + }; + + let variant = match dispatch_error_ty.type_def() { + TypeDef::Variant(var) => var, + _ => { + tracing::warn!( + "Can't decode error: sp_runtime::DispatchError type is not a Variant" + ); + return DispatchError::Other(bytes.to_vec()) + } + }; + + let module_variant_idx = variant + .variants() + .iter() + .find(|v| v.name() == "Module") + .map(|v| v.index()); + let module_variant_idx = match module_variant_idx { + Some(idx) => idx, + None => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError does not have a 'Module' variant"); + return DispatchError::Other(bytes.to_vec()) + } + }; + + // If the error bytes don't correspond to a ModuleError, just return the bytes. + // This is perfectly reasonable and expected, so no logging. + if bytes[0] != module_variant_idx { + return DispatchError::Other(bytes.to_vec()) + } + + // The remaining bytes are the module error, all being well: + let bytes = &bytes[1..]; + + // The oldest and second oldest type of error decode to this shape: + #[derive(Decode)] + struct LegacyModuleError { + index: u8, + error: u8, + } + + // The newer case expands the error for forward compat: + #[derive(Decode)] + struct CurrentModuleError { + index: u8, + error: [u8; 4], + } + + // try to decode into the new shape, or the old if that doesn't work + let err = match CurrentModuleError::decode(&mut &*bytes) { + Ok(e) => e, + Err(_) => { + let old_e = match LegacyModuleError::decode(&mut &*bytes) { + Ok(err) => err, + Err(_) => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError does not match known formats"); + return DispatchError::Other(bytes.to_vec()) + } + }; + CurrentModuleError { + index: old_e.index, + error: [old_e.error, 0, 0, 0], + } + } + }; + println!( + "ERROR: pallet {:?} err {:?}, bytes: {bytes:?}", + err.index, err.error + ); + let error_details = match metadata.error(err.index, err.error[0]) { + Ok(details) => details, + Err(_) => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError::Module details do not match known information"); + return DispatchError::Other(bytes.to_vec()) + } + }; + + DispatchError::Module(ModuleError { + pallet: error_details.pallet().to_string(), + error: error_details.error().to_string(), + description: error_details.docs().to_vec(), + error_data: ModuleErrorData { + pallet_index: err.index, + error: err.error, + }, + }) +} diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 27480af014..9e68c75af2 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -17,6 +17,7 @@ use sp_core::{ Pair, }; use sp_keyring::AccountKeyring; +use subxt::error::DispatchError; #[tokio::test] async fn insert_key() { @@ -206,7 +207,7 @@ async fn dry_run_fails() { .wait_for_finalized_success() .await; - if let Err(subxt::error::Error::Module(err)) = res { + if let Err(subxt::error::Error::Runtime(DispatchError::Module(err))) = res { assert_eq!(err.pallet, "Balances"); assert_eq!(err.error, "InsufficientBalance"); } else { diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 9505a69289..0bb705dd65 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -224,16 +224,11 @@ pub mod api { pub fn fill_block( &self, ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "fill_block", - data: FillBlock { ratio }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "fill_block", + FillBlock { ratio }, [ 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, 76u8, 167u8, 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, @@ -250,16 +245,11 @@ pub mod api { pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "remark", - data: Remark { remark }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "remark", + Remark { remark }, [ 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8, 101u8, 51u8, 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8, @@ -272,16 +262,11 @@ pub mod api { pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "set_heap_pages", - data: SetHeapPages { pages }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "set_heap_pages", + SetHeapPages { pages }, [ 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8, 6u8, 244u8, 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8, @@ -305,16 +290,11 @@ pub mod api { pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "set_code", - data: SetCode { code }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "set_code", + SetCode { code }, [ 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8, 120u8, 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8, @@ -335,16 +315,11 @@ pub mod api { pub fn set_code_without_checks( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "set_code_without_checks", - data: SetCodeWithoutChecks { code }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "set_code_without_checks", + SetCodeWithoutChecks { code }, [ 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8, 148u8, 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8, @@ -360,16 +335,11 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "set_storage", - data: SetStorage { items }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "set_storage", + SetStorage { items }, [ 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8, 90u8, 19u8, 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8, @@ -382,16 +352,11 @@ pub mod api { pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "kill_storage", - data: KillStorage { keys }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "kill_storage", + KillStorage { keys }, [ 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8, 216u8, 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8, @@ -408,16 +373,11 @@ pub mod api { &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "kill_prefix", - data: KillPrefix { prefix, subkeys }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "kill_prefix", + KillPrefix { prefix, subkeys }, [ 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8, 22u8, 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8, @@ -430,16 +390,11 @@ pub mod api { pub fn remark_with_event( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "System", - call: "remark_with_event", - data: RemarkWithEvent { remark }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "System", + "remark_with_event", + RemarkWithEvent { remark }, [ 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8, 75u8, 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8, @@ -1284,20 +1239,15 @@ pub mod api { runtime_types::polkadot_runtime::Call, ::subxt::ext::sp_core::H256, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Scheduler", - call: "schedule", - data: Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Scheduler", + "schedule", + Schedule { + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ 137u8, 178u8, 250u8, 136u8, 93u8, 23u8, 136u8, 247u8, 212u8, @@ -1312,16 +1262,11 @@ pub mod api { &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Scheduler", - call: "cancel", - data: Cancel { when, index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Scheduler", + "cancel", + Cancel { when, index }, [ 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8, 30u8, 89u8, 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8, @@ -1344,21 +1289,16 @@ pub mod api { runtime_types::polkadot_runtime::Call, ::subxt::ext::sp_core::H256, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Scheduler", - call: "schedule_named", - data: ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Scheduler", + "schedule_named", + ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ 1u8, 236u8, 205u8, 140u8, 220u8, 43u8, 237u8, 225u8, 189u8, @@ -1372,16 +1312,11 @@ pub mod api { pub fn cancel_named( &self, id: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Scheduler", - call: "cancel_named", - data: CancelNamed { id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Scheduler", + "cancel_named", + CancelNamed { id }, [ 42u8, 232u8, 92u8, 167u8, 113u8, 136u8, 7u8, 215u8, 88u8, 117u8, 74u8, 26u8, 225u8, 230u8, 244u8, 106u8, 150u8, 112u8, @@ -1407,20 +1342,15 @@ pub mod api { runtime_types::polkadot_runtime::Call, ::subxt::ext::sp_core::H256, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Scheduler", - call: "schedule_after", - data: ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Scheduler", + "schedule_after", + ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ 128u8, 226u8, 249u8, 226u8, 27u8, 178u8, 222u8, 22u8, 126u8, @@ -1448,21 +1378,16 @@ pub mod api { runtime_types::polkadot_runtime::Call, ::subxt::ext::sp_core::H256, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Scheduler", - call: "schedule_named_after", - data: ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Scheduler", + "schedule_named_after", + ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ 13u8, 12u8, 26u8, 103u8, 66u8, 180u8, 139u8, 149u8, 147u8, @@ -1719,16 +1644,11 @@ pub mod api { pub fn note_preimage( &self, bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Preimage", - call: "note_preimage", - data: NotePreimage { bytes }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Preimage", + "note_preimage", + NotePreimage { bytes }, [ 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, 89u8, 149u8, 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, @@ -1741,16 +1661,11 @@ pub mod api { pub fn unnote_preimage( &self, hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Preimage", - call: "unnote_preimage", - data: UnnotePreimage { hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Preimage", + "unnote_preimage", + UnnotePreimage { hash }, [ 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, @@ -1766,16 +1681,11 @@ pub mod api { pub fn request_preimage( &self, hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Preimage", - call: "request_preimage", - data: RequestPreimage { hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Preimage", + "request_preimage", + RequestPreimage { hash }, [ 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, @@ -1790,16 +1700,11 @@ pub mod api { pub fn unrequest_preimage( &self, hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Preimage", - call: "unrequest_preimage", - data: UnrequestPreimage { hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Preimage", + "unrequest_preimage", + UnrequestPreimage { hash }, [ 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, @@ -2032,20 +1937,15 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Babe", - call: "report_equivocation", - data: ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Babe", + "report_equivocation", + ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, }, [ 177u8, 237u8, 107u8, 138u8, 237u8, 233u8, 30u8, 195u8, 112u8, @@ -2067,20 +1967,16 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Babe", - call: "report_equivocation_unsigned", - data: ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Babe", + "report_equivocation_unsigned", + ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, }, [ 56u8, 103u8, 238u8, 118u8, 61u8, 192u8, 222u8, 87u8, 254u8, @@ -2097,16 +1993,11 @@ pub mod api { pub fn plan_config_change( &self, config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Babe", - call: "plan_config_change", - data: PlanConfigChange { config }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Babe", + "plan_config_change", + PlanConfigChange { config }, [ 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8, 20u8, 42u8, 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8, @@ -2632,16 +2523,11 @@ pub mod api { pub fn set( &self, now: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Timestamp", - call: "set", - data: Set { now }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Timestamp", + "set", + Set { now }, [ 6u8, 97u8, 172u8, 236u8, 118u8, 238u8, 228u8, 114u8, 15u8, 115u8, 102u8, 85u8, 66u8, 151u8, 16u8, 33u8, 187u8, 17u8, @@ -2805,16 +2691,11 @@ pub mod api { pub fn claim( &self, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Indices", - call: "claim", - data: Claim { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Indices", + "claim", + Claim { index }, [ 5u8, 24u8, 11u8, 173u8, 226u8, 170u8, 0u8, 30u8, 193u8, 102u8, 214u8, 59u8, 252u8, 32u8, 221u8, 88u8, 196u8, 189u8, @@ -2847,16 +2728,11 @@ pub mod api { &self, new: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Indices", - call: "transfer", - data: Transfer { new, index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Indices", + "transfer", + Transfer { new, index }, [ 229u8, 48u8, 45u8, 2u8, 206u8, 24u8, 60u8, 43u8, 202u8, 99u8, 80u8, 172u8, 62u8, 134u8, 224u8, 128u8, 107u8, 219u8, 57u8, @@ -2886,16 +2762,11 @@ pub mod api { pub fn free( &self, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Indices", - call: "free", - data: Free { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Indices", + "free", + Free { index }, [ 133u8, 202u8, 225u8, 127u8, 69u8, 145u8, 43u8, 13u8, 160u8, 248u8, 215u8, 243u8, 232u8, 166u8, 74u8, 203u8, 235u8, 138u8, @@ -2930,16 +2801,11 @@ pub mod api { new: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, freeze: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Indices", - call: "force_transfer", - data: ForceTransfer { new, index, freeze }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Indices", + "force_transfer", + ForceTransfer { new, index, freeze }, [ 2u8, 134u8, 200u8, 233u8, 224u8, 80u8, 237u8, 130u8, 28u8, 159u8, 130u8, 223u8, 124u8, 205u8, 248u8, 70u8, 246u8, 77u8, @@ -2969,16 +2835,11 @@ pub mod api { pub fn freeze( &self, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Indices", - call: "freeze", - data: Freeze { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Indices", + "freeze", + Freeze { index }, [ 121u8, 45u8, 118u8, 2u8, 72u8, 48u8, 38u8, 7u8, 234u8, 204u8, 68u8, 20u8, 76u8, 251u8, 205u8, 246u8, 149u8, 31u8, 168u8, @@ -3245,16 +3106,11 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Balances", - call: "transfer", - data: Transfer { dest, value }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Balances", + "transfer", + Transfer { dest, value }, [ 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, 155u8, 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, @@ -3279,19 +3135,14 @@ pub mod api { >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Balances", - call: "set_balance", - data: SetBalance { - who, - new_free, - new_reserved, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Balances", + "set_balance", + SetBalance { + who, + new_free, + new_reserved, }, [ 234u8, 215u8, 97u8, 98u8, 243u8, 199u8, 57u8, 76u8, 59u8, @@ -3318,19 +3169,14 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Balances", - call: "force_transfer", - data: ForceTransfer { - source, - dest, - value, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Balances", + "force_transfer", + ForceTransfer { + source, + dest, + value, }, [ 79u8, 174u8, 212u8, 108u8, 184u8, 33u8, 170u8, 29u8, 232u8, @@ -3353,16 +3199,11 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Balances", - call: "transfer_keep_alive", - data: TransferKeepAlive { dest, value }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Balances", + "transfer_keep_alive", + TransferKeepAlive { dest, value }, [ 112u8, 179u8, 75u8, 168u8, 193u8, 221u8, 9u8, 82u8, 190u8, 113u8, 253u8, 13u8, 130u8, 134u8, 170u8, 216u8, 136u8, 111u8, @@ -3395,16 +3236,11 @@ pub mod api { (), >, keep_alive: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Balances", - call: "transfer_all", - data: TransferAll { dest, keep_alive }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Balances", + "transfer_all", + TransferAll { dest, keep_alive }, [ 46u8, 129u8, 29u8, 177u8, 221u8, 107u8, 245u8, 69u8, 238u8, 126u8, 145u8, 26u8, 219u8, 208u8, 14u8, 80u8, 149u8, 1u8, @@ -3423,16 +3259,11 @@ pub mod api { (), >, amount: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Balances", - call: "force_unreserve", - data: ForceUnreserve { who, amount }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Balances", + "force_unreserve", + ForceUnreserve { who, amount }, [ 160u8, 146u8, 137u8, 76u8, 157u8, 187u8, 66u8, 148u8, 207u8, 76u8, 32u8, 254u8, 82u8, 215u8, 35u8, 161u8, 213u8, 52u8, @@ -4030,16 +3861,11 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Authorship", - call: "set_uncles", - data: SetUncles { new_uncles }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Authorship", + "set_uncles", + SetUncles { new_uncles }, [ 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, 228u8, 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, @@ -4453,19 +4279,14 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::ext::sp_core::crypto::AccountId32, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "bond", - data: Bond { - controller, - value, - payee, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "bond", + Bond { + controller, + value, + payee, }, [ 215u8, 211u8, 69u8, 215u8, 33u8, 158u8, 62u8, 3u8, 31u8, @@ -4493,16 +4314,11 @@ pub mod api { pub fn bond_extra( &self, max_additional: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "bond_extra", - data: BondExtra { max_additional }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "bond_extra", + BondExtra { max_additional }, [ 60u8, 45u8, 82u8, 223u8, 113u8, 95u8, 0u8, 71u8, 59u8, 108u8, 228u8, 9u8, 95u8, 210u8, 113u8, 106u8, 252u8, 15u8, 19u8, @@ -4533,16 +4349,11 @@ pub mod api { pub fn unbond( &self, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "unbond", - data: Unbond { value }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "unbond", + Unbond { value }, [ 85u8, 62u8, 34u8, 127u8, 60u8, 241u8, 134u8, 60u8, 125u8, 91u8, 31u8, 193u8, 50u8, 230u8, 237u8, 42u8, 114u8, 230u8, @@ -4569,16 +4380,11 @@ pub mod api { pub fn withdraw_unbonded( &self, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "withdraw_unbonded", - data: WithdrawUnbonded { num_slashing_spans }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "withdraw_unbonded", + WithdrawUnbonded { num_slashing_spans }, [ 95u8, 223u8, 122u8, 217u8, 76u8, 208u8, 86u8, 129u8, 31u8, 104u8, 70u8, 154u8, 23u8, 250u8, 165u8, 192u8, 149u8, 249u8, @@ -4595,16 +4401,11 @@ pub mod api { pub fn validate( &self, prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "validate", - data: Validate { prefs }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "validate", + Validate { prefs }, [ 191u8, 116u8, 139u8, 35u8, 250u8, 211u8, 86u8, 240u8, 35u8, 9u8, 19u8, 44u8, 148u8, 35u8, 91u8, 106u8, 200u8, 172u8, @@ -4632,16 +4433,11 @@ pub mod api { (), >, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "nominate", - data: Nominate { targets }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "nominate", + Nominate { targets }, [ 112u8, 162u8, 70u8, 26u8, 74u8, 7u8, 188u8, 193u8, 210u8, 247u8, 27u8, 189u8, 133u8, 137u8, 33u8, 155u8, 255u8, 171u8, @@ -4661,18 +4457,11 @@ pub mod api { #[doc = "- Contains one read."] #[doc = "- Writes are limited to the `origin` account key."] #[doc = "# "] - pub fn chill( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "chill", - data: Chill {}, - }, + pub fn chill(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "chill", + Chill {}, [ 94u8, 20u8, 196u8, 31u8, 220u8, 125u8, 115u8, 167u8, 140u8, 3u8, 20u8, 132u8, 81u8, 120u8, 215u8, 166u8, 230u8, 56u8, @@ -4702,16 +4491,11 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::ext::sp_core::crypto::AccountId32, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "set_payee", - data: SetPayee { payee }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "set_payee", + SetPayee { payee }, [ 96u8, 8u8, 254u8, 164u8, 87u8, 46u8, 120u8, 11u8, 197u8, 63u8, 20u8, 178u8, 167u8, 236u8, 149u8, 245u8, 14u8, 171u8, @@ -4742,16 +4526,11 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "set_controller", - data: SetController { controller }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "set_controller", + SetController { controller }, [ 165u8, 250u8, 213u8, 32u8, 179u8, 163u8, 15u8, 35u8, 14u8, 152u8, 56u8, 171u8, 43u8, 101u8, 7u8, 167u8, 178u8, 60u8, @@ -4771,16 +4550,11 @@ pub mod api { pub fn set_validator_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "set_validator_count", - data: SetValidatorCount { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "set_validator_count", + SetValidatorCount { new }, [ 55u8, 232u8, 95u8, 66u8, 228u8, 217u8, 11u8, 27u8, 3u8, 202u8, 199u8, 242u8, 70u8, 160u8, 250u8, 187u8, 194u8, 91u8, @@ -4799,16 +4573,12 @@ pub mod api { pub fn increase_validator_count( &self, additional: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "increase_validator_count", - data: IncreaseValidatorCount { additional }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "increase_validator_count", + IncreaseValidatorCount { additional }, [ 239u8, 184u8, 155u8, 213u8, 25u8, 22u8, 193u8, 13u8, 102u8, 192u8, 82u8, 153u8, 249u8, 192u8, 60u8, 158u8, 8u8, 78u8, @@ -4827,16 +4597,11 @@ pub mod api { pub fn scale_validator_count( &self, factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "scale_validator_count", - data: ScaleValidatorCount { factor }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "scale_validator_count", + ScaleValidatorCount { factor }, [ 198u8, 68u8, 227u8, 94u8, 110u8, 157u8, 209u8, 217u8, 112u8, 37u8, 78u8, 142u8, 12u8, 193u8, 219u8, 167u8, 149u8, 112u8, @@ -4860,18 +4625,11 @@ pub mod api { #[doc = "- Weight: O(1)"] #[doc = "- Write: ForceEra"] #[doc = "# "] - pub fn force_no_eras( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "force_no_eras", - data: ForceNoEras {}, - }, + pub fn force_no_eras(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "force_no_eras", + ForceNoEras {}, [ 16u8, 81u8, 207u8, 168u8, 23u8, 236u8, 11u8, 75u8, 141u8, 107u8, 92u8, 2u8, 53u8, 111u8, 252u8, 116u8, 91u8, 120u8, @@ -4896,18 +4654,11 @@ pub mod api { #[doc = "- Weight: O(1)"] #[doc = "- Write ForceEra"] #[doc = "# "] - pub fn force_new_era( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "force_new_era", - data: ForceNewEra {}, - }, + pub fn force_new_era(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "force_new_era", + ForceNewEra {}, [ 230u8, 242u8, 169u8, 196u8, 78u8, 145u8, 24u8, 191u8, 113u8, 68u8, 5u8, 138u8, 48u8, 51u8, 109u8, 126u8, 73u8, 136u8, @@ -4924,16 +4675,11 @@ pub mod api { invulnerables: ::std::vec::Vec< ::subxt::ext::sp_core::crypto::AccountId32, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "set_invulnerables", - data: SetInvulnerables { invulnerables }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "set_invulnerables", + SetInvulnerables { invulnerables }, [ 2u8, 148u8, 221u8, 111u8, 153u8, 48u8, 222u8, 36u8, 228u8, 84u8, 18u8, 35u8, 168u8, 239u8, 53u8, 245u8, 27u8, 76u8, @@ -4949,18 +4695,13 @@ pub mod api { &self, stash: ::subxt::ext::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "force_unstake", - data: ForceUnstake { - stash, - num_slashing_spans, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "force_unstake", + ForceUnstake { + stash, + num_slashing_spans, }, [ 94u8, 247u8, 238u8, 47u8, 250u8, 6u8, 96u8, 175u8, 173u8, @@ -4981,16 +4722,11 @@ pub mod api { #[doc = "have enough blocks to get a result."] pub fn force_new_era_always( &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "force_new_era_always", - data: ForceNewEraAlways {}, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "force_new_era_always", + ForceNewEraAlways {}, [ 179u8, 118u8, 189u8, 54u8, 248u8, 141u8, 207u8, 142u8, 80u8, 37u8, 241u8, 185u8, 138u8, 254u8, 117u8, 147u8, 225u8, 118u8, @@ -5008,16 +4744,11 @@ pub mod api { &self, era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "cancel_deferred_slash", - data: CancelDeferredSlash { era, slash_indices }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "cancel_deferred_slash", + CancelDeferredSlash { era, slash_indices }, [ 120u8, 57u8, 162u8, 105u8, 91u8, 250u8, 129u8, 240u8, 110u8, 234u8, 170u8, 98u8, 164u8, 65u8, 106u8, 101u8, 19u8, 88u8, @@ -5051,18 +4782,13 @@ pub mod api { &self, validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, era: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "payout_stakers", - data: PayoutStakers { - validator_stash, - era, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "payout_stakers", + PayoutStakers { + validator_stash, + era, }, [ 184u8, 194u8, 33u8, 118u8, 7u8, 203u8, 89u8, 119u8, 214u8, @@ -5084,16 +4810,11 @@ pub mod api { pub fn rebond( &self, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "rebond", - data: Rebond { value }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "rebond", + Rebond { value }, [ 25u8, 22u8, 191u8, 172u8, 133u8, 101u8, 139u8, 102u8, 134u8, 16u8, 136u8, 56u8, 137u8, 162u8, 4u8, 253u8, 196u8, 30u8, @@ -5128,18 +4849,13 @@ pub mod api { &self, new_history_depth: ::core::primitive::u32, era_items_deleted: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "set_history_depth", - data: SetHistoryDepth { - new_history_depth, - era_items_deleted, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "set_history_depth", + SetHistoryDepth { + new_history_depth, + era_items_deleted, }, [ 174u8, 55u8, 231u8, 132u8, 219u8, 215u8, 118u8, 202u8, 13u8, @@ -5165,18 +4881,13 @@ pub mod api { &self, stash: ::subxt::ext::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "reap_stash", - data: ReapStash { - stash, - num_slashing_spans, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "reap_stash", + ReapStash { + stash, + num_slashing_spans, }, [ 34u8, 168u8, 120u8, 161u8, 95u8, 199u8, 106u8, 233u8, 61u8, @@ -5205,16 +4916,11 @@ pub mod api { (), >, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "kick", - data: Kick { who }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "kick", + Kick { who }, [ 32u8, 26u8, 202u8, 6u8, 186u8, 180u8, 58u8, 121u8, 185u8, 208u8, 123u8, 10u8, 53u8, 179u8, 167u8, 203u8, 96u8, 229u8, @@ -5248,22 +4954,17 @@ pub mod api { max_validator_count : runtime_types :: pallet_staking :: pallet :: pallet :: ConfigOp < :: core :: primitive :: u32 >, chill_threshold : runtime_types :: pallet_staking :: pallet :: pallet :: ConfigOp < runtime_types :: sp_arithmetic :: per_things :: Percent >, min_commission : runtime_types :: pallet_staking :: pallet :: pallet :: ConfigOp < runtime_types :: sp_arithmetic :: per_things :: Perbill >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "set_staking_configs", - data: SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "set_staking_configs", + SetStakingConfigs { + min_nominator_bond, + min_validator_bond, + max_nominator_count, + max_validator_count, + chill_threshold, + min_commission, }, [ 176u8, 168u8, 155u8, 176u8, 27u8, 79u8, 223u8, 92u8, 88u8, @@ -5302,16 +5003,11 @@ pub mod api { pub fn chill_other( &self, controller: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "chill_other", - data: ChillOther { controller }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "chill_other", + ChillOther { controller }, [ 140u8, 98u8, 4u8, 203u8, 91u8, 131u8, 123u8, 119u8, 169u8, 47u8, 188u8, 23u8, 205u8, 170u8, 82u8, 220u8, 166u8, 170u8, @@ -5326,16 +5022,12 @@ pub mod api { pub fn force_apply_min_commission( &self, validator_stash: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Staking", - call: "force_apply_min_commission", - data: ForceApplyMinCommission { validator_stash }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Staking", + "force_apply_min_commission", + ForceApplyMinCommission { validator_stash }, [ 136u8, 163u8, 85u8, 134u8, 240u8, 247u8, 183u8, 227u8, 226u8, 202u8, 102u8, 186u8, 138u8, 119u8, 78u8, 123u8, 229u8, 135u8, @@ -7439,16 +7131,11 @@ pub mod api { &self, keys: runtime_types::polkadot_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Session", - call: "set_keys", - data: SetKeys { keys, proof }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Session", + "set_keys", + SetKeys { keys, proof }, [ 17u8, 127u8, 23u8, 71u8, 118u8, 133u8, 89u8, 105u8, 93u8, 52u8, 46u8, 201u8, 151u8, 19u8, 124u8, 195u8, 228u8, 229u8, @@ -7473,18 +7160,11 @@ pub mod api { #[doc = "- DbWrites: `NextKeys`, `origin account`"] #[doc = "- DbWrites per key id: `KeyOwner`"] #[doc = "# "] - pub fn purge_keys( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Session", - call: "purge_keys", - data: PurgeKeys {}, - }, + pub fn purge_keys(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Session", + "purge_keys", + PurgeKeys {}, [ 200u8, 255u8, 4u8, 213u8, 188u8, 92u8, 99u8, 116u8, 163u8, 152u8, 29u8, 35u8, 133u8, 119u8, 246u8, 44u8, 91u8, 31u8, @@ -7798,20 +7478,15 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Grandpa", - call: "report_equivocation", - data: ReportEquivocation { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Grandpa", + "report_equivocation", + ReportEquivocation { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, }, [ 156u8, 162u8, 189u8, 89u8, 60u8, 156u8, 129u8, 176u8, 62u8, @@ -7834,20 +7509,16 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: ext :: sp_core :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Grandpa", - call: "report_equivocation_unsigned", - data: ReportEquivocationUnsigned { - equivocation_proof: ::std::boxed::Box::new( - equivocation_proof, - ), - key_owner_proof, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Grandpa", + "report_equivocation_unsigned", + ReportEquivocationUnsigned { + equivocation_proof: ::std::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, }, [ 166u8, 26u8, 217u8, 185u8, 215u8, 37u8, 174u8, 170u8, 137u8, @@ -7873,18 +7544,13 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Grandpa", - call: "note_stalled", - data: NoteStalled { - delay, - best_finalized_block_number, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Grandpa", + "note_stalled", + NoteStalled { + delay, + best_finalized_block_number, }, [ 197u8, 236u8, 137u8, 32u8, 46u8, 200u8, 144u8, 13u8, 89u8, @@ -8175,18 +7841,13 @@ pub mod api { ::core::primitive::u32, >, signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ImOnline", - call: "heartbeat", - data: Heartbeat { - heartbeat, - signature, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ImOnline", + "heartbeat", + Heartbeat { + heartbeat, + signature, }, [ 212u8, 23u8, 174u8, 246u8, 60u8, 220u8, 178u8, 137u8, 53u8, @@ -8691,18 +8352,13 @@ pub mod api { &self, proposal_hash: ::subxt::ext::sp_core::H256, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "propose", - data: Propose { - proposal_hash, - value, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "propose", + Propose { + proposal_hash, + value, }, [ 151u8, 2u8, 117u8, 57u8, 201u8, 246u8, 181u8, 198u8, 83u8, @@ -8726,18 +8382,13 @@ pub mod api { &self, proposal: ::core::primitive::u32, seconds_upper_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "second", - data: Second { - proposal, - seconds_upper_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "second", + Second { + proposal, + seconds_upper_bound, }, [ 152u8, 56u8, 134u8, 181u8, 88u8, 224u8, 68u8, 238u8, 231u8, @@ -8762,16 +8413,11 @@ pub mod api { vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "vote", - data: Vote { ref_index, vote }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "vote", + Vote { ref_index, vote }, [ 138u8, 213u8, 229u8, 111u8, 1u8, 191u8, 73u8, 3u8, 145u8, 28u8, 44u8, 88u8, 163u8, 188u8, 129u8, 188u8, 64u8, 15u8, @@ -8791,16 +8437,11 @@ pub mod api { pub fn emergency_cancel( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "emergency_cancel", - data: EmergencyCancel { ref_index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "emergency_cancel", + EmergencyCancel { ref_index }, [ 139u8, 213u8, 133u8, 75u8, 34u8, 206u8, 124u8, 245u8, 35u8, 237u8, 132u8, 92u8, 49u8, 167u8, 117u8, 80u8, 188u8, 93u8, @@ -8821,16 +8462,11 @@ pub mod api { pub fn external_propose( &self, proposal_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "external_propose", - data: ExternalPropose { proposal_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "external_propose", + ExternalPropose { proposal_hash }, [ 8u8, 206u8, 229u8, 218u8, 203u8, 208u8, 253u8, 113u8, 43u8, 62u8, 110u8, 155u8, 123u8, 35u8, 187u8, 211u8, 180u8, 225u8, @@ -8853,16 +8489,12 @@ pub mod api { pub fn external_propose_majority( &self, proposal_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "external_propose_majority", - data: ExternalProposeMajority { proposal_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "external_propose_majority", + ExternalProposeMajority { proposal_hash }, [ 36u8, 47u8, 192u8, 177u8, 164u8, 82u8, 109u8, 215u8, 98u8, 28u8, 47u8, 237u8, 159u8, 233u8, 53u8, 9u8, 158u8, 134u8, @@ -8885,16 +8517,12 @@ pub mod api { pub fn external_propose_default( &self, proposal_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "external_propose_default", - data: ExternalProposeDefault { proposal_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "external_propose_default", + ExternalProposeDefault { proposal_hash }, [ 32u8, 100u8, 249u8, 175u8, 187u8, 77u8, 30u8, 65u8, 90u8, 103u8, 251u8, 21u8, 21u8, 220u8, 8u8, 118u8, 97u8, 160u8, @@ -8923,19 +8551,14 @@ pub mod api { proposal_hash: ::subxt::ext::sp_core::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "fast_track", - data: FastTrack { - proposal_hash, - voting_period, - delay, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "fast_track", + FastTrack { + proposal_hash, + voting_period, + delay, }, [ 125u8, 209u8, 107u8, 120u8, 93u8, 205u8, 129u8, 147u8, 254u8, @@ -8957,16 +8580,11 @@ pub mod api { pub fn veto_external( &self, proposal_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "veto_external", - data: VetoExternal { proposal_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "veto_external", + VetoExternal { proposal_hash }, [ 209u8, 18u8, 18u8, 103u8, 186u8, 160u8, 214u8, 124u8, 150u8, 207u8, 112u8, 90u8, 84u8, 197u8, 95u8, 157u8, 165u8, 65u8, @@ -8985,16 +8603,11 @@ pub mod api { pub fn cancel_referendum( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "cancel_referendum", - data: CancelReferendum { ref_index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "cancel_referendum", + CancelReferendum { ref_index }, [ 51u8, 25u8, 25u8, 251u8, 236u8, 115u8, 130u8, 230u8, 72u8, 186u8, 119u8, 71u8, 165u8, 137u8, 55u8, 167u8, 187u8, 128u8, @@ -9013,16 +8626,11 @@ pub mod api { pub fn cancel_queued( &self, which: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "cancel_queued", - data: CancelQueued { which }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "cancel_queued", + CancelQueued { which }, [ 6u8, 97u8, 182u8, 142u8, 165u8, 206u8, 218u8, 245u8, 206u8, 224u8, 143u8, 164u8, 232u8, 129u8, 202u8, 141u8, 78u8, 65u8, @@ -9056,19 +8664,14 @@ pub mod api { to: ::subxt::ext::sp_core::crypto::AccountId32, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "delegate", - data: Delegate { - to, - conviction, - balance, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "delegate", + Delegate { + to, + conviction, + balance, }, [ 190u8, 241u8, 243u8, 105u8, 114u8, 112u8, 169u8, 52u8, 119u8, @@ -9090,18 +8693,11 @@ pub mod api { #[doc = ""] #[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."] - pub fn undelegate( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "undelegate", - data: Undelegate {}, - }, + pub fn undelegate(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "undelegate", + Undelegate {}, [ 165u8, 40u8, 183u8, 209u8, 57u8, 153u8, 111u8, 29u8, 114u8, 109u8, 107u8, 235u8, 97u8, 61u8, 53u8, 155u8, 44u8, 245u8, @@ -9117,16 +8713,11 @@ pub mod api { #[doc = "Weight: `O(1)`."] pub fn clear_public_proposals( &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "clear_public_proposals", - data: ClearPublicProposals {}, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "clear_public_proposals", + ClearPublicProposals {}, [ 59u8, 126u8, 254u8, 223u8, 252u8, 225u8, 75u8, 185u8, 188u8, 181u8, 42u8, 179u8, 211u8, 73u8, 12u8, 141u8, 243u8, 197u8, @@ -9148,16 +8739,11 @@ pub mod api { pub fn note_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "note_preimage", - data: NotePreimage { encoded_proposal }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "note_preimage", + NotePreimage { encoded_proposal }, [ 31u8, 252u8, 248u8, 238u8, 103u8, 1u8, 82u8, 84u8, 135u8, 152u8, 246u8, 234u8, 251u8, 124u8, 193u8, 73u8, 52u8, 255u8, @@ -9170,16 +8756,12 @@ pub mod api { pub fn note_preimage_operational( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "note_preimage_operational", - data: NotePreimageOperational { encoded_proposal }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "note_preimage_operational", + NotePreimageOperational { encoded_proposal }, [ 184u8, 81u8, 31u8, 172u8, 81u8, 113u8, 84u8, 246u8, 189u8, 219u8, 167u8, 32u8, 191u8, 126u8, 165u8, 250u8, 147u8, 199u8, @@ -9203,16 +8785,11 @@ pub mod api { pub fn note_imminent_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "note_imminent_preimage", - data: NoteImminentPreimage { encoded_proposal }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "note_imminent_preimage", + NoteImminentPreimage { encoded_proposal }, [ 32u8, 188u8, 10u8, 215u8, 245u8, 132u8, 234u8, 124u8, 19u8, 90u8, 225u8, 216u8, 169u8, 105u8, 95u8, 231u8, 12u8, 109u8, @@ -9225,16 +8802,12 @@ pub mod api { pub fn note_imminent_preimage_operational( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "note_imminent_preimage_operational", - data: NoteImminentPreimageOperational { encoded_proposal }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "note_imminent_preimage_operational", + NoteImminentPreimageOperational { encoded_proposal }, [ 7u8, 31u8, 49u8, 238u8, 155u8, 234u8, 187u8, 147u8, 123u8, 84u8, 50u8, 98u8, 221u8, 39u8, 218u8, 204u8, 175u8, 136u8, @@ -9262,18 +8835,13 @@ pub mod api { &self, proposal_hash: ::subxt::ext::sp_core::H256, proposal_len_upper_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "reap_preimage", - data: ReapPreimage { - proposal_hash, - proposal_len_upper_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "reap_preimage", + ReapPreimage { + proposal_hash, + proposal_len_upper_bound, }, [ 135u8, 43u8, 115u8, 154u8, 93u8, 121u8, 112u8, 65u8, 145u8, @@ -9293,16 +8861,11 @@ pub mod api { pub fn unlock( &self, target: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "unlock", - data: Unlock { target }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "unlock", + Unlock { target }, [ 137u8, 93u8, 240u8, 75u8, 142u8, 148u8, 51u8, 55u8, 88u8, 159u8, 2u8, 57u8, 24u8, 169u8, 120u8, 121u8, 115u8, 53u8, @@ -9341,16 +8904,11 @@ pub mod api { pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "remove_vote", - data: RemoveVote { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "remove_vote", + RemoveVote { index }, [ 148u8, 120u8, 14u8, 172u8, 81u8, 152u8, 159u8, 178u8, 106u8, 244u8, 36u8, 98u8, 120u8, 189u8, 213u8, 93u8, 119u8, 156u8, @@ -9378,16 +8936,11 @@ pub mod api { &self, target: ::subxt::ext::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "remove_other_vote", - data: RemoveOtherVote { target, index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "remove_other_vote", + RemoveOtherVote { target, index }, [ 137u8, 59u8, 51u8, 72u8, 97u8, 181u8, 74u8, 123u8, 65u8, 147u8, 63u8, 23u8, 14u8, 6u8, 66u8, 186u8, 105u8, 72u8, @@ -9401,18 +8954,13 @@ pub mod api { &self, proposal_hash: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "enact_proposal", - data: EnactProposal { - proposal_hash, - index, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "enact_proposal", + EnactProposal { + proposal_hash, + index, }, [ 191u8, 244u8, 244u8, 174u8, 95u8, 86u8, 132u8, 63u8, 2u8, @@ -9441,18 +8989,13 @@ pub mod api { &self, proposal_hash: ::subxt::ext::sp_core::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "blacklist", - data: Blacklist { - proposal_hash, - maybe_ref_index, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "blacklist", + Blacklist { + proposal_hash, + maybe_ref_index, }, [ 48u8, 144u8, 81u8, 164u8, 54u8, 111u8, 197u8, 134u8, 6u8, @@ -9472,16 +9015,11 @@ pub mod api { pub fn cancel_proposal( &self, prop_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Democracy", - call: "cancel_proposal", - data: CancelProposal { prop_index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Democracy", + "cancel_proposal", + CancelProposal { prop_index }, [ 179u8, 3u8, 198u8, 244u8, 241u8, 124u8, 205u8, 58u8, 100u8, 80u8, 177u8, 254u8, 98u8, 220u8, 189u8, 63u8, 229u8, 60u8, @@ -10632,19 +10170,14 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, >, old_count: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Council", - call: "set_members", - data: SetMembers { - new_members, - prime, - old_count, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Council", + "set_members", + SetMembers { + new_members, + prime, + old_count, }, [ 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, @@ -10669,18 +10202,13 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Council", - call: "execute", - data: Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Council", + "execute", + Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, [ 33u8, 251u8, 197u8, 226u8, 205u8, 157u8, 230u8, 48u8, 209u8, @@ -10722,19 +10250,14 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Council", - call: "propose", - data: Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Council", + "propose", + Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, [ 247u8, 17u8, 193u8, 12u8, 110u8, 242u8, 5u8, 205u8, 136u8, @@ -10764,19 +10287,14 @@ pub mod api { proposal: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Council", - call: "vote", - data: Vote { - proposal, - index, - approve, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Council", + "vote", + Vote { + proposal, + index, + approve, }, [ 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, @@ -10824,20 +10342,15 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Council", - call: "close", - data: Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Council", + "close", + Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, }, [ 88u8, 8u8, 33u8, 184u8, 4u8, 97u8, 120u8, 237u8, 43u8, 183u8, @@ -10864,16 +10377,11 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Council", - call: "disapprove_proposal", - data: DisapproveProposal { proposal_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Council", + "disapprove_proposal", + DisapproveProposal { proposal_hash }, [ 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, @@ -11318,19 +10826,14 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, >, old_count: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalCommittee", - call: "set_members", - data: SetMembers { - new_members, - prime, - old_count, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalCommittee", + "set_members", + SetMembers { + new_members, + prime, + old_count, }, [ 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, @@ -11355,18 +10858,13 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalCommittee", - call: "execute", - data: Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalCommittee", + "execute", + Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, [ 33u8, 251u8, 197u8, 226u8, 205u8, 157u8, 230u8, 48u8, 209u8, @@ -11408,19 +10906,14 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalCommittee", - call: "propose", - data: Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalCommittee", + "propose", + Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, [ 247u8, 17u8, 193u8, 12u8, 110u8, 242u8, 5u8, 205u8, 136u8, @@ -11450,19 +10943,14 @@ pub mod api { proposal: ::subxt::ext::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalCommittee", - call: "vote", - data: Vote { - proposal, - index, - approve, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalCommittee", + "vote", + Vote { + proposal, + index, + approve, }, [ 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8, @@ -11510,20 +10998,15 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalCommittee", - call: "close", - data: Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalCommittee", + "close", + Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, }, [ 88u8, 8u8, 33u8, 184u8, 4u8, 97u8, 120u8, 237u8, 43u8, 183u8, @@ -11550,16 +11033,11 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalCommittee", - call: "disapprove_proposal", - data: DisapproveProposal { proposal_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalCommittee", + "disapprove_proposal", + DisapproveProposal { proposal_hash }, [ 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, @@ -11977,16 +11455,11 @@ pub mod api { &self, votes: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "PhragmenElection", - call: "vote", - data: Vote { votes, value }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "PhragmenElection", + "vote", + Vote { votes, value }, [ 71u8, 90u8, 175u8, 225u8, 51u8, 202u8, 197u8, 252u8, 183u8, 92u8, 239u8, 83u8, 112u8, 144u8, 128u8, 211u8, 109u8, 33u8, @@ -12000,18 +11473,11 @@ pub mod api { #[doc = "This removes the lock and returns the deposit."] #[doc = ""] #[doc = "The dispatch origin of this call must be signed and be a voter."] - pub fn remove_voter( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "PhragmenElection", - call: "remove_voter", - data: RemoveVoter {}, - }, + pub fn remove_voter(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "PhragmenElection", + "remove_voter", + RemoveVoter {}, [ 254u8, 46u8, 140u8, 4u8, 218u8, 45u8, 150u8, 72u8, 67u8, 131u8, 108u8, 201u8, 46u8, 157u8, 104u8, 161u8, 53u8, 155u8, @@ -12038,16 +11504,11 @@ pub mod api { pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "PhragmenElection", - call: "submit_candidacy", - data: SubmitCandidacy { candidate_count }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "PhragmenElection", + "submit_candidacy", + SubmitCandidacy { candidate_count }, [ 228u8, 63u8, 217u8, 99u8, 128u8, 104u8, 175u8, 10u8, 30u8, 35u8, 47u8, 14u8, 254u8, 122u8, 146u8, 239u8, 61u8, 145u8, @@ -12077,16 +11538,11 @@ pub mod api { pub fn renounce_candidacy( &self, renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "PhragmenElection", - call: "renounce_candidacy", - data: RenounceCandidacy { renouncing }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "PhragmenElection", + "renounce_candidacy", + RenounceCandidacy { renouncing }, [ 70u8, 72u8, 208u8, 36u8, 80u8, 245u8, 224u8, 75u8, 60u8, 142u8, 19u8, 49u8, 142u8, 90u8, 14u8, 69u8, 15u8, 61u8, @@ -12116,18 +11572,13 @@ pub mod api { (), >, has_replacement: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "PhragmenElection", - call: "remove_member", - data: RemoveMember { - who, - has_replacement, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "PhragmenElection", + "remove_member", + RemoveMember { + who, + has_replacement, }, [ 174u8, 77u8, 175u8, 88u8, 205u8, 45u8, 109u8, 227u8, 27u8, @@ -12151,18 +11602,13 @@ pub mod api { &self, num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "PhragmenElection", - call: "clean_defunct_voters", - data: CleanDefunctVoters { - num_voters, - num_defunct, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "PhragmenElection", + "clean_defunct_voters", + CleanDefunctVoters { + num_voters, + num_defunct, }, [ 198u8, 162u8, 30u8, 249u8, 191u8, 38u8, 141u8, 123u8, 230u8, @@ -12668,16 +12114,11 @@ pub mod api { pub fn add_member( &self, who: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "add_member", - data: AddMember { who }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "add_member", + AddMember { who }, [ 106u8, 33u8, 171u8, 114u8, 223u8, 105u8, 71u8, 15u8, 77u8, 253u8, 40u8, 204u8, 244u8, 142u8, 103u8, 177u8, 200u8, 243u8, @@ -12692,16 +12133,11 @@ pub mod api { pub fn remove_member( &self, who: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "remove_member", - data: RemoveMember { who }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "remove_member", + RemoveMember { who }, [ 100u8, 17u8, 75u8, 92u8, 58u8, 100u8, 34u8, 187u8, 41u8, 160u8, 137u8, 58u8, 78u8, 166u8, 161u8, 116u8, 1u8, 67u8, @@ -12719,16 +12155,11 @@ pub mod api { &self, remove: ::subxt::ext::sp_core::crypto::AccountId32, add: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "swap_member", - data: SwapMember { remove, add }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "swap_member", + SwapMember { remove, add }, [ 66u8, 84u8, 183u8, 29u8, 104u8, 163u8, 220u8, 217u8, 103u8, 234u8, 233u8, 138u8, 191u8, 147u8, 51u8, 98u8, 46u8, 51u8, @@ -12744,16 +12175,11 @@ pub mod api { pub fn reset_members( &self, members: ::std::vec::Vec<::subxt::ext::sp_core::crypto::AccountId32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "reset_members", - data: ResetMembers { members }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "reset_members", + ResetMembers { members }, [ 9u8, 35u8, 28u8, 59u8, 158u8, 232u8, 89u8, 78u8, 101u8, 53u8, 240u8, 98u8, 13u8, 104u8, 235u8, 161u8, 201u8, 150u8, 117u8, @@ -12770,16 +12196,11 @@ pub mod api { pub fn change_key( &self, new: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "change_key", - data: ChangeKey { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "change_key", + ChangeKey { new }, [ 53u8, 60u8, 54u8, 231u8, 151u8, 0u8, 27u8, 175u8, 250u8, 80u8, 74u8, 184u8, 184u8, 63u8, 90u8, 216u8, 186u8, 136u8, @@ -12794,16 +12215,11 @@ pub mod api { pub fn set_prime( &self, who: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "set_prime", - data: SetPrime { who }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "set_prime", + SetPrime { who }, [ 123u8, 95u8, 75u8, 129u8, 19u8, 34u8, 192u8, 65u8, 169u8, 47u8, 184u8, 246u8, 55u8, 250u8, 31u8, 158u8, 57u8, 197u8, @@ -12815,18 +12231,11 @@ pub mod api { #[doc = "Remove the prime member if it exists."] #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] - pub fn clear_prime( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "TechnicalMembership", - call: "clear_prime", - data: ClearPrime {}, - }, + pub fn clear_prime(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TechnicalMembership", + "clear_prime", + ClearPrime {}, [ 186u8, 182u8, 225u8, 90u8, 71u8, 124u8, 69u8, 100u8, 234u8, 25u8, 53u8, 23u8, 182u8, 32u8, 176u8, 81u8, 54u8, 140u8, @@ -13042,16 +12451,11 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Treasury", - call: "propose_spend", - data: ProposeSpend { value, beneficiary }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Treasury", + "propose_spend", + ProposeSpend { value, beneficiary }, [ 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, 244u8, 78u8, 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, @@ -13072,16 +12476,11 @@ pub mod api { pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Treasury", - call: "reject_proposal", - data: RejectProposal { proposal_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Treasury", + "reject_proposal", + RejectProposal { proposal_id }, [ 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8, 140u8, 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8, @@ -13103,16 +12502,11 @@ pub mod api { pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Treasury", - call: "approve_proposal", - data: ApproveProposal { proposal_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Treasury", + "approve_proposal", + ApproveProposal { proposal_id }, [ 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8, 108u8, 33u8, 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8, @@ -13136,18 +12530,13 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Treasury", - call: "spend", - data: Spend { - amount, - beneficiary, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Treasury", + "spend", + Spend { + amount, + beneficiary, }, [ 177u8, 178u8, 242u8, 136u8, 135u8, 237u8, 114u8, 71u8, 233u8, @@ -13175,16 +12564,11 @@ pub mod api { pub fn remove_approval( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Treasury", - call: "remove_approval", - data: RemoveApproval { proposal_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Treasury", + "remove_approval", + RemoveApproval { proposal_id }, [ 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8, 251u8, 154u8, 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8, @@ -13661,18 +13045,13 @@ pub mod api { &self, dest: ::subxt::ext::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Claims", - call: "claim", - data: Claim { - dest, - ethereum_signature, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Claims", + "claim", + Claim { + dest, + ethereum_signature, }, [ 33u8, 63u8, 71u8, 104u8, 200u8, 179u8, 248u8, 38u8, 193u8, @@ -13709,20 +13088,15 @@ pub mod api { statement: ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Claims", - call: "mint_claim", - data: MintClaim { - who, - value, - vesting_schedule, - statement, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Claims", + "mint_claim", + MintClaim { + who, + value, + vesting_schedule, + statement, }, [ 213u8, 79u8, 204u8, 40u8, 104u8, 84u8, 82u8, 62u8, 193u8, @@ -13763,19 +13137,14 @@ pub mod api { dest: ::subxt::ext::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Claims", - call: "claim_attest", - data: ClaimAttest { - dest, - ethereum_signature, - statement, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Claims", + "claim_attest", + ClaimAttest { + dest, + ethereum_signature, + statement, }, [ 255u8, 10u8, 87u8, 106u8, 101u8, 195u8, 249u8, 25u8, 109u8, @@ -13805,16 +13174,11 @@ pub mod api { pub fn attest( &self, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Claims", - call: "attest", - data: Attest { statement }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Claims", + "attest", + Attest { statement }, [ 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, 244u8, 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, @@ -13830,19 +13194,14 @@ pub mod api { maybe_preclaim: ::core::option::Option< ::subxt::ext::sp_core::crypto::AccountId32, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Claims", - call: "move_claim", - data: MoveClaim { - old, - new, - maybe_preclaim, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Claims", + "move_claim", + MoveClaim { + old, + new, + maybe_preclaim, }, [ 63u8, 48u8, 217u8, 16u8, 161u8, 102u8, 165u8, 241u8, 57u8, @@ -14220,18 +13579,11 @@ pub mod api { #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] #[doc = "# "] - pub fn vest( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Vesting", - call: "vest", - data: Vest {}, - }, + pub fn vest(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Vesting", + "vest", + Vest {}, [ 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, @@ -14261,16 +13613,11 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Vesting", - call: "vest_other", - data: VestOther { target }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Vesting", + "vest_other", + VestOther { target }, [ 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, 81u8, 243u8, 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, @@ -14306,16 +13653,11 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Vesting", - call: "vested_transfer", - data: VestedTransfer { target, schedule }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Vesting", + "vested_transfer", + VestedTransfer { target, schedule }, [ 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, 252u8, 75u8, 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, @@ -14356,19 +13698,14 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Vesting", - call: "force_vested_transfer", - data: ForceVestedTransfer { - source, - target, - schedule, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Vesting", + "force_vested_transfer", + ForceVestedTransfer { + source, + target, + schedule, }, [ 110u8, 142u8, 63u8, 148u8, 90u8, 229u8, 237u8, 183u8, 240u8, @@ -14403,18 +13740,13 @@ pub mod api { &self, schedule1_index: ::core::primitive::u32, schedule2_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Vesting", - call: "merge_schedules", - data: MergeSchedules { - schedule1_index, - schedule2_index, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Vesting", + "merge_schedules", + MergeSchedules { + schedule1_index, + schedule2_index, }, [ 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, @@ -14667,16 +13999,11 @@ pub mod api { pub fn batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Utility", - call: "batch", - data: Batch { calls }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Utility", + "batch", + Batch { calls }, [ 230u8, 242u8, 253u8, 157u8, 0u8, 86u8, 104u8, 163u8, 42u8, 162u8, 114u8, 169u8, 67u8, 132u8, 54u8, 68u8, 32u8, 42u8, @@ -14702,18 +14029,13 @@ pub mod api { &self, index: ::core::primitive::u16, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Utility", - call: "as_derivative", - data: AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Utility", + "as_derivative", + AsDerivative { + index, + call: ::std::boxed::Box::new(call), }, [ 209u8, 64u8, 30u8, 168u8, 146u8, 109u8, 20u8, 238u8, 158u8, @@ -14740,16 +14062,11 @@ pub mod api { pub fn batch_all( &self, calls: ::std::vec::Vec, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Utility", - call: "batch_all", - data: BatchAll { calls }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Utility", + "batch_all", + BatchAll { calls }, [ 169u8, 101u8, 230u8, 159u8, 101u8, 77u8, 48u8, 75u8, 209u8, 42u8, 1u8, 95u8, 117u8, 254u8, 136u8, 162u8, 194u8, 255u8, @@ -14772,18 +14089,13 @@ pub mod api { &self, as_origin: runtime_types::polkadot_runtime::OriginCaller, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Utility", - call: "dispatch_as", - data: DispatchAs { - as_origin: ::std::boxed::Box::new(as_origin), - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Utility", + "dispatch_as", + DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), }, [ 21u8, 250u8, 30u8, 78u8, 60u8, 151u8, 157u8, 90u8, 167u8, @@ -14810,16 +14122,11 @@ pub mod api { pub fn force_batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Utility", - call: "force_batch", - data: ForceBatch { calls }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Utility", + "force_batch", + ForceBatch { calls }, [ 195u8, 179u8, 12u8, 198u8, 131u8, 78u8, 95u8, 171u8, 209u8, 198u8, 177u8, 95u8, 116u8, 196u8, 112u8, 71u8, 41u8, 13u8, @@ -15117,16 +14424,11 @@ pub mod api { pub fn add_registrar( &self, account: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "add_registrar", - data: AddRegistrar { account }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "add_registrar", + AddRegistrar { account }, [ 231u8, 221u8, 79u8, 233u8, 107u8, 34u8, 195u8, 186u8, 192u8, 129u8, 103u8, 159u8, 159u8, 83u8, 151u8, 161u8, 137u8, 164u8, @@ -15157,17 +14459,12 @@ pub mod api { pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "set_identity", - data: SetIdentity { - info: ::std::boxed::Box::new(info), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "set_identity", + SetIdentity { + info: ::std::boxed::Box::new(info), }, [ 130u8, 89u8, 118u8, 6u8, 134u8, 166u8, 35u8, 192u8, 73u8, @@ -15204,16 +14501,11 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "set_subs", - data: SetSubs { subs }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "set_subs", + SetSubs { subs }, [ 177u8, 219u8, 84u8, 183u8, 5u8, 32u8, 192u8, 82u8, 174u8, 68u8, 198u8, 224u8, 56u8, 85u8, 134u8, 171u8, 30u8, 132u8, @@ -15242,16 +14534,11 @@ pub mod api { #[doc = "# "] pub fn clear_identity( &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "clear_identity", - data: ClearIdentity {}, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "clear_identity", + ClearIdentity {}, [ 75u8, 44u8, 74u8, 122u8, 149u8, 202u8, 114u8, 230u8, 0u8, 255u8, 140u8, 122u8, 14u8, 196u8, 205u8, 249u8, 220u8, 94u8, @@ -15287,16 +14574,11 @@ pub mod api { &self, reg_index: ::core::primitive::u32, max_fee: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "request_judgement", - data: RequestJudgement { reg_index, max_fee }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "request_judgement", + RequestJudgement { reg_index, max_fee }, [ 186u8, 149u8, 61u8, 54u8, 159u8, 194u8, 77u8, 161u8, 220u8, 157u8, 3u8, 216u8, 23u8, 105u8, 119u8, 76u8, 144u8, 198u8, @@ -15325,16 +14607,11 @@ pub mod api { pub fn cancel_request( &self, reg_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "cancel_request", - data: CancelRequest { reg_index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "cancel_request", + CancelRequest { reg_index }, [ 83u8, 180u8, 239u8, 126u8, 32u8, 51u8, 17u8, 20u8, 180u8, 3u8, 59u8, 96u8, 24u8, 32u8, 136u8, 92u8, 58u8, 254u8, 68u8, @@ -15360,16 +14637,11 @@ pub mod api { &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "set_fee", - data: SetFee { index, fee }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "set_fee", + SetFee { index, fee }, [ 21u8, 157u8, 123u8, 182u8, 160u8, 190u8, 117u8, 37u8, 136u8, 133u8, 104u8, 234u8, 31u8, 145u8, 115u8, 154u8, 125u8, 40u8, @@ -15395,16 +14667,11 @@ pub mod api { &self, index: ::core::primitive::u32, new: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "set_account_id", - data: SetAccountId { index, new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "set_account_id", + SetAccountId { index, new }, [ 245u8, 76u8, 110u8, 237u8, 219u8, 246u8, 219u8, 136u8, 146u8, 42u8, 139u8, 60u8, 30u8, 188u8, 87u8, 10u8, 231u8, 89u8, @@ -15432,16 +14699,11 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "set_fields", - data: SetFields { index, fields }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "set_fields", + SetFields { index, fields }, [ 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8, 81u8, 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8, @@ -15479,19 +14741,14 @@ pub mod api { judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "provide_judgement", - data: ProvideJudgement { - reg_index, - target, - judgement, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "provide_judgement", + ProvideJudgement { + reg_index, + target, + judgement, }, [ 221u8, 244u8, 12u8, 17u8, 197u8, 130u8, 189u8, 136u8, 253u8, @@ -15526,16 +14783,11 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "kill_identity", - data: KillIdentity { target }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "kill_identity", + KillIdentity { target }, [ 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, 136u8, 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, @@ -15558,16 +14810,11 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "add_sub", - data: AddSub { sub, data }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "add_sub", + AddSub { sub, data }, [ 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, 147u8, 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, @@ -15587,16 +14834,11 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "rename_sub", - data: RenameSub { sub, data }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "rename_sub", + RenameSub { sub, data }, [ 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, 85u8, 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, @@ -15618,16 +14860,11 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "remove_sub", - data: RemoveSub { sub }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "remove_sub", + RemoveSub { sub }, [ 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, 46u8, 157u8, 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, @@ -15646,18 +14883,11 @@ pub mod api { #[doc = ""] #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] #[doc = "controller of an account is maliciously registered as a sub-account."] - pub fn quit_sub( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Identity", - call: "quit_sub", - data: QuitSub {}, - }, + pub fn quit_sub(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Identity", + "quit_sub", + QuitSub {}, [ 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8, 169u8, 157u8, 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8, @@ -16282,19 +15512,14 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "proxy", - data: Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "proxy", + Proxy { + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), }, [ 228u8, 178u8, 79u8, 159u8, 147u8, 71u8, 47u8, 204u8, 220u8, @@ -16322,19 +15547,14 @@ pub mod api { delegate: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "add_proxy", - data: AddProxy { - delegate, - proxy_type, - delay, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "add_proxy", + AddProxy { + delegate, + proxy_type, + delay, }, [ 25u8, 189u8, 96u8, 67u8, 195u8, 60u8, 158u8, 251u8, 72u8, @@ -16360,19 +15580,14 @@ pub mod api { delegate: ::subxt::ext::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "remove_proxy", - data: RemoveProxy { - delegate, - proxy_type, - delay, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "remove_proxy", + RemoveProxy { + delegate, + proxy_type, + delay, }, [ 40u8, 172u8, 127u8, 108u8, 114u8, 22u8, 17u8, 90u8, 153u8, @@ -16394,16 +15609,11 @@ pub mod api { #[doc = "# "] pub fn remove_proxies( &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "remove_proxies", - data: RemoveProxies {}, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "remove_proxies", + RemoveProxies {}, [ 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, @@ -16440,19 +15650,14 @@ pub mod api { proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "anonymous", - data: Anonymous { - proxy_type, - delay, - index, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "anonymous", + Anonymous { + proxy_type, + delay, + index, }, [ 181u8, 76u8, 106u8, 208u8, 138u8, 11u8, 212u8, 10u8, 87u8, @@ -16489,21 +15694,16 @@ pub mod api { index: ::core::primitive::u16, height: ::core::primitive::u32, ext_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "kill_anonymous", - data: KillAnonymous { - spawner, - proxy_type, - index, - height, - ext_index, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "kill_anonymous", + KillAnonymous { + spawner, + proxy_type, + index, + height, + ext_index, }, [ 216u8, 42u8, 41u8, 194u8, 47u8, 221u8, 65u8, 109u8, 144u8, @@ -16538,16 +15738,11 @@ pub mod api { &self, real: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "announce", - data: Announce { real, call_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "announce", + Announce { real, call_hash }, [ 99u8, 237u8, 158u8, 131u8, 185u8, 119u8, 88u8, 167u8, 253u8, 29u8, 82u8, 216u8, 225u8, 33u8, 181u8, 244u8, 85u8, 176u8, @@ -16576,16 +15771,11 @@ pub mod api { &self, real: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "remove_announcement", - data: RemoveAnnouncement { real, call_hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "remove_announcement", + RemoveAnnouncement { real, call_hash }, [ 197u8, 54u8, 240u8, 51u8, 65u8, 218u8, 154u8, 165u8, 24u8, 54u8, 157u8, 30u8, 144u8, 22u8, 247u8, 177u8, 105u8, 38u8, @@ -16614,18 +15804,13 @@ pub mod api { &self, delegate: ::subxt::ext::sp_core::crypto::AccountId32, call_hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "reject_announcement", - data: RejectAnnouncement { - delegate, - call_hash, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "reject_announcement", + RejectAnnouncement { + delegate, + call_hash, }, [ 205u8, 123u8, 102u8, 30u8, 196u8, 250u8, 247u8, 50u8, 243u8, @@ -16660,20 +15845,15 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Proxy", - call: "proxy_announced", - data: ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "proxy_announced", + ProxyAnnounced { + delegate, + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), }, [ 11u8, 45u8, 62u8, 39u8, 183u8, 91u8, 202u8, 137u8, 241u8, @@ -17120,18 +16300,13 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Multisig", - call: "as_multi_threshold_1", - data: AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Multisig", + "as_multi_threshold_1", + AsMultiThreshold1 { + other_signatories, + call: ::std::boxed::Box::new(call), }, [ 246u8, 222u8, 148u8, 4u8, 239u8, 222u8, 193u8, 79u8, 53u8, @@ -17200,22 +16375,17 @@ pub mod api { >, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Multisig", - call: "as_multi", - data: AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call, - store_call, - max_weight, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Multisig", + "as_multi", + AsMulti { + threshold, + other_signatories, + maybe_timepoint, + call, + store_call, + max_weight, }, [ 145u8, 219u8, 104u8, 65u8, 73u8, 34u8, 65u8, 60u8, 105u8, @@ -17271,21 +16441,16 @@ pub mod api { >, call_hash: [::core::primitive::u8; 32usize], max_weight: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Multisig", - call: "approve_as_multi", - data: ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Multisig", + "approve_as_multi", + ApproveAsMulti { + threshold, + other_signatories, + maybe_timepoint, + call_hash, + max_weight, }, [ 55u8, 94u8, 230u8, 217u8, 37u8, 143u8, 44u8, 108u8, 123u8, @@ -17331,20 +16496,15 @@ pub mod api { ::core::primitive::u32, >, call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Multisig", - call: "cancel_as_multi", - data: CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Multisig", + "cancel_as_multi", + CancelAsMulti { + threshold, + other_signatories, + timepoint, + call_hash, }, [ 30u8, 25u8, 186u8, 142u8, 168u8, 81u8, 235u8, 164u8, 82u8, @@ -17724,16 +16884,11 @@ pub mod api { &self, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "propose_bounty", - data: ProposeBounty { value, description }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "propose_bounty", + ProposeBounty { value, description }, [ 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, @@ -17753,16 +16908,11 @@ pub mod api { pub fn approve_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "approve_bounty", - data: ApproveBounty { bounty_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "approve_bounty", + ApproveBounty { bounty_id }, [ 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, @@ -17786,19 +16936,14 @@ pub mod api { (), >, fee: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "propose_curator", - data: ProposeCurator { - bounty_id, - curator, - fee, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "propose_curator", + ProposeCurator { + bounty_id, + curator, + fee, }, [ 123u8, 148u8, 21u8, 204u8, 216u8, 6u8, 47u8, 83u8, 182u8, @@ -17829,16 +16974,11 @@ pub mod api { pub fn unassign_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "unassign_curator", - data: UnassignCurator { bounty_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "unassign_curator", + UnassignCurator { bounty_id }, [ 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, 114u8, 158u8, 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, @@ -17858,16 +16998,11 @@ pub mod api { pub fn accept_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "accept_curator", - data: AcceptCurator { bounty_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "accept_curator", + AcceptCurator { bounty_id }, [ 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, 253u8, 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, @@ -17894,18 +17029,13 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "award_bounty", - data: AwardBounty { - bounty_id, - beneficiary, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "award_bounty", + AwardBounty { + bounty_id, + beneficiary, }, [ 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, @@ -17927,16 +17057,11 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "claim_bounty", - data: ClaimBounty { bounty_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "claim_bounty", + ClaimBounty { bounty_id }, [ 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, @@ -17958,16 +17083,11 @@ pub mod api { pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "close_bounty", - data: CloseBounty { bounty_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "close_bounty", + CloseBounty { bounty_id }, [ 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, 211u8, 119u8, 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, @@ -17990,16 +17110,11 @@ pub mod api { &self, bounty_id: ::core::primitive::u32, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Bounties", - call: "extend_bounty_expiry", - data: ExtendBountyExpiry { bounty_id, remark }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Bounties", + "extend_bounty_expiry", + ExtendBountyExpiry { bounty_id, remark }, [ 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, @@ -18580,19 +17695,14 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "add_child_bounty", - data: AddChildBounty { - parent_bounty_id, - value, - description, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "add_child_bounty", + AddChildBounty { + parent_bounty_id, + value, + description, }, [ 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, @@ -18626,20 +17736,15 @@ pub mod api { (), >, fee: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "propose_curator", - data: ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "propose_curator", + ProposeCurator { + parent_bounty_id, + child_bounty_id, + curator, + fee, }, [ 37u8, 101u8, 96u8, 75u8, 254u8, 212u8, 42u8, 140u8, 72u8, @@ -18672,18 +17777,13 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "accept_curator", - data: AcceptCurator { - parent_bounty_id, - child_bounty_id, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "accept_curator", + AcceptCurator { + parent_bounty_id, + child_bounty_id, }, [ 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, @@ -18731,18 +17831,13 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "unassign_curator", - data: UnassignCurator { - parent_bounty_id, - child_bounty_id, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "unassign_curator", + UnassignCurator { + parent_bounty_id, + child_bounty_id, }, [ 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, @@ -18777,19 +17872,14 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "award_child_bounty", - data: AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "award_child_bounty", + AwardChildBounty { + parent_bounty_id, + child_bounty_id, + beneficiary, }, [ 231u8, 185u8, 73u8, 232u8, 92u8, 116u8, 204u8, 165u8, 216u8, @@ -18819,18 +17909,13 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "claim_child_bounty", - data: ClaimChildBounty { - parent_bounty_id, - child_bounty_id, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "claim_child_bounty", + ClaimChildBounty { + parent_bounty_id, + child_bounty_id, }, [ 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, @@ -18866,18 +17951,13 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ChildBounties", - call: "close_child_bounty", - data: CloseChildBounty { - parent_bounty_id, - child_bounty_id, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "close_child_bounty", + CloseChildBounty { + parent_bounty_id, + child_bounty_id, }, [ 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, @@ -19323,16 +18403,11 @@ pub mod api { &self, reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Tips", - call: "report_awesome", - data: ReportAwesome { reason, who }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "report_awesome", + ReportAwesome { reason, who }, [ 43u8, 6u8, 185u8, 209u8, 110u8, 99u8, 94u8, 100u8, 33u8, 5u8, 27u8, 199u8, 67u8, 255u8, 252u8, 26u8, 104u8, 192u8, 55u8, @@ -19363,16 +18438,11 @@ pub mod api { pub fn retract_tip( &self, hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Tips", - call: "retract_tip", - data: RetractTip { hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "retract_tip", + RetractTip { hash }, [ 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, 142u8, 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, @@ -19408,19 +18478,14 @@ pub mod api { reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::ext::sp_core::crypto::AccountId32, tip_value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Tips", - call: "tip_new", - data: TipNew { - reason, - who, - tip_value, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "tip_new", + TipNew { + reason, + who, + tip_value, }, [ 146u8, 216u8, 159u8, 132u8, 163u8, 180u8, 42u8, 203u8, 181u8, @@ -19458,16 +18523,11 @@ pub mod api { &self, hash: ::subxt::ext::sp_core::H256, tip_value: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Tips", - call: "tip", - data: Tip { hash, tip_value }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "tip", + Tip { hash, tip_value }, [ 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8, 206u8, 50u8, 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8, @@ -19495,16 +18555,11 @@ pub mod api { pub fn close_tip( &self, hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Tips", - call: "close_tip", - data: CloseTip { hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "close_tip", + CloseTip { hash }, [ 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, 50u8, 81u8, 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, @@ -19528,16 +18583,11 @@ pub mod api { pub fn slash_tip( &self, hash: ::subxt::ext::sp_core::H256, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Tips", - call: "slash_tip", - data: SlashTip { hash }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "slash_tip", + SlashTip { hash }, [ 222u8, 209u8, 22u8, 47u8, 114u8, 230u8, 81u8, 200u8, 131u8, 0u8, 209u8, 54u8, 17u8, 200u8, 175u8, 125u8, 100u8, 254u8, @@ -19923,18 +18973,13 @@ pub mod api { &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ElectionProviderMultiPhase", - call: "submit_unsigned", - data: SubmitUnsigned { - raw_solution: ::std::boxed::Box::new(raw_solution), - witness, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "submit_unsigned", + SubmitUnsigned { + raw_solution: ::std::boxed::Box::new(raw_solution), + witness, }, [ 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8, @@ -19954,16 +18999,12 @@ pub mod api { maybe_next_score: ::core::option::Option< runtime_types::sp_npos_elections::ElectionScore, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ElectionProviderMultiPhase", - call: "set_minimum_untrusted_score", - data: SetMinimumUntrustedScore { maybe_next_score }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "set_minimum_untrusted_score", + SetMinimumUntrustedScore { maybe_next_score }, [ 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, @@ -19988,16 +19029,12 @@ pub mod api { ::subxt::ext::sp_core::crypto::AccountId32, >, )>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ElectionProviderMultiPhase", - call: "set_emergency_election_result", - data: SetEmergencyElectionResult { supports }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "set_emergency_election_result", + SetEmergencyElectionResult { supports }, [ 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, @@ -20018,17 +19055,12 @@ pub mod api { pub fn submit( &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ElectionProviderMultiPhase", - call: "submit", - data: Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "submit", + Submit { + raw_solution: ::std::boxed::Box::new(raw_solution), }, [ 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, @@ -20046,18 +19078,13 @@ pub mod api { &self, maybe_max_voters: ::core::option::Option<::core::primitive::u32>, maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ElectionProviderMultiPhase", - call: "governance_fallback", - data: GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "governance_fallback", + GovernanceFallback { + maybe_max_voters, + maybe_max_targets, }, [ 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, @@ -20741,16 +19768,11 @@ pub mod api { pub fn rebag( &self, dislocated: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "VoterList", - call: "rebag", - data: Rebag { dislocated }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "VoterList", + "rebag", + Rebag { dislocated }, [ 8u8, 182u8, 221u8, 221u8, 242u8, 48u8, 178u8, 182u8, 236u8, 54u8, 188u8, 107u8, 32u8, 24u8, 90u8, 76u8, 28u8, 67u8, 8u8, @@ -20770,16 +19792,11 @@ pub mod api { pub fn put_in_front_of( &self, lighter: ::subxt::ext::sp_core::crypto::AccountId32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "VoterList", - call: "put_in_front_of", - data: PutInFrontOf { lighter }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "VoterList", + "put_in_front_of", + PutInFrontOf { lighter }, [ 247u8, 154u8, 37u8, 142u8, 28u8, 130u8, 53u8, 223u8, 255u8, 154u8, 21u8, 149u8, 244u8, 21u8, 105u8, 77u8, 189u8, 74u8, @@ -21447,16 +20464,12 @@ pub mod api { pub fn set_validation_upgrade_cooldown( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_validation_upgrade_cooldown", - data: SetValidationUpgradeCooldown { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_validation_upgrade_cooldown", + SetValidationUpgradeCooldown { new }, [ 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, 190u8, 56u8, 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, @@ -21469,16 +20482,12 @@ pub mod api { pub fn set_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_validation_upgrade_delay", - data: SetValidationUpgradeDelay { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_validation_upgrade_delay", + SetValidationUpgradeDelay { new }, [ 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, 68u8, 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, @@ -21491,16 +20500,12 @@ pub mod api { pub fn set_code_retention_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_code_retention_period", - data: SetCodeRetentionPeriod { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_code_retention_period", + SetCodeRetentionPeriod { new }, [ 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, 245u8, 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, @@ -21513,16 +20518,11 @@ pub mod api { pub fn set_max_code_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_code_size", - data: SetMaxCodeSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_code_size", + SetMaxCodeSize { new }, [ 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, 13u8, 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, @@ -21535,16 +20535,11 @@ pub mod api { pub fn set_max_pov_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_pov_size", - data: SetMaxPovSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_pov_size", + SetMaxPovSize { new }, [ 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, 194u8, 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, @@ -21557,16 +20552,11 @@ pub mod api { pub fn set_max_head_data_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_head_data_size", - data: SetMaxHeadDataSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_head_data_size", + SetMaxHeadDataSize { new }, [ 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, 112u8, 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, @@ -21579,16 +20569,11 @@ pub mod api { pub fn set_parathread_cores( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_parathread_cores", - data: SetParathreadCores { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_parathread_cores", + SetParathreadCores { new }, [ 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, 99u8, 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, @@ -21601,16 +20586,11 @@ pub mod api { pub fn set_parathread_retries( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_parathread_retries", - data: SetParathreadRetries { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_parathread_retries", + SetParathreadRetries { new }, [ 192u8, 81u8, 152u8, 41u8, 40u8, 3u8, 251u8, 205u8, 244u8, 133u8, 42u8, 197u8, 21u8, 221u8, 80u8, 196u8, 222u8, 69u8, @@ -21623,16 +20603,12 @@ pub mod api { pub fn set_group_rotation_frequency( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_group_rotation_frequency", - data: SetGroupRotationFrequency { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_group_rotation_frequency", + SetGroupRotationFrequency { new }, [ 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, 22u8, 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, @@ -21645,16 +20621,12 @@ pub mod api { pub fn set_chain_availability_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_chain_availability_period", - data: SetChainAvailabilityPeriod { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_chain_availability_period", + SetChainAvailabilityPeriod { new }, [ 171u8, 21u8, 54u8, 241u8, 19u8, 100u8, 54u8, 143u8, 97u8, 191u8, 193u8, 96u8, 7u8, 86u8, 255u8, 109u8, 255u8, 93u8, @@ -21667,16 +20639,12 @@ pub mod api { pub fn set_thread_availability_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_thread_availability_period", - data: SetThreadAvailabilityPeriod { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_thread_availability_period", + SetThreadAvailabilityPeriod { new }, [ 208u8, 27u8, 246u8, 33u8, 90u8, 200u8, 75u8, 177u8, 19u8, 107u8, 236u8, 43u8, 159u8, 156u8, 184u8, 10u8, 146u8, 71u8, @@ -21689,16 +20657,12 @@ pub mod api { pub fn set_scheduling_lookahead( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_scheduling_lookahead", - data: SetSchedulingLookahead { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_scheduling_lookahead", + SetSchedulingLookahead { new }, [ 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, 119u8, 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, @@ -21711,16 +20675,12 @@ pub mod api { pub fn set_max_validators_per_core( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_validators_per_core", - data: SetMaxValidatorsPerCore { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_validators_per_core", + SetMaxValidatorsPerCore { new }, [ 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, 117u8, 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, @@ -21733,16 +20693,11 @@ pub mod api { pub fn set_max_validators( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_validators", - data: SetMaxValidators { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_validators", + SetMaxValidators { new }, [ 143u8, 212u8, 59u8, 147u8, 4u8, 55u8, 142u8, 209u8, 237u8, 76u8, 7u8, 178u8, 41u8, 81u8, 4u8, 203u8, 184u8, 149u8, 32u8, @@ -21755,16 +20710,11 @@ pub mod api { pub fn set_dispute_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_dispute_period", - data: SetDisputePeriod { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_dispute_period", + SetDisputePeriod { new }, [ 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, 125u8, 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, @@ -21777,18 +20727,12 @@ pub mod api { pub fn set_dispute_post_conclusion_acceptance_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetDisputePostConclusionAcceptancePeriod, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_dispute_post_conclusion_acceptance_period", - data: SetDisputePostConclusionAcceptancePeriod { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_dispute_post_conclusion_acceptance_period", + SetDisputePostConclusionAcceptancePeriod { new }, [ 66u8, 56u8, 45u8, 87u8, 51u8, 49u8, 91u8, 95u8, 255u8, 185u8, 54u8, 165u8, 85u8, 142u8, 238u8, 251u8, 174u8, 81u8, 3u8, @@ -21801,16 +20745,12 @@ pub mod api { pub fn set_dispute_max_spam_slots( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_dispute_max_spam_slots", - data: SetDisputeMaxSpamSlots { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_dispute_max_spam_slots", + SetDisputeMaxSpamSlots { new }, [ 177u8, 58u8, 3u8, 205u8, 145u8, 85u8, 160u8, 162u8, 13u8, 171u8, 124u8, 54u8, 58u8, 209u8, 88u8, 131u8, 230u8, 248u8, @@ -21823,18 +20763,12 @@ pub mod api { pub fn set_dispute_conclusion_by_time_out_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetDisputeConclusionByTimeOutPeriod, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_dispute_conclusion_by_time_out_period", - data: SetDisputeConclusionByTimeOutPeriod { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_dispute_conclusion_by_time_out_period", + SetDisputeConclusionByTimeOutPeriod { new }, [ 238u8, 102u8, 27u8, 169u8, 68u8, 116u8, 198u8, 64u8, 190u8, 33u8, 36u8, 98u8, 176u8, 157u8, 123u8, 148u8, 126u8, 85u8, @@ -21848,16 +20782,11 @@ pub mod api { pub fn set_no_show_slots( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_no_show_slots", - data: SetNoShowSlots { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_no_show_slots", + SetNoShowSlots { new }, [ 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, 16u8, 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, @@ -21870,16 +20799,11 @@ pub mod api { pub fn set_n_delay_tranches( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_n_delay_tranches", - data: SetNDelayTranches { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_n_delay_tranches", + SetNDelayTranches { new }, [ 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, 30u8, 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, @@ -21892,16 +20816,12 @@ pub mod api { pub fn set_zeroth_delay_tranche_width( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_zeroth_delay_tranche_width", - data: SetZerothDelayTrancheWidth { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_zeroth_delay_tranche_width", + SetZerothDelayTrancheWidth { new }, [ 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, 107u8, 91u8, 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, @@ -21914,16 +20834,11 @@ pub mod api { pub fn set_needed_approvals( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_needed_approvals", - data: SetNeededApprovals { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_needed_approvals", + SetNeededApprovals { new }, [ 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, 227u8, 185u8, 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, @@ -21936,16 +20851,12 @@ pub mod api { pub fn set_relay_vrf_modulo_samples( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_relay_vrf_modulo_samples", - data: SetRelayVrfModuloSamples { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_relay_vrf_modulo_samples", + SetRelayVrfModuloSamples { new }, [ 76u8, 101u8, 207u8, 184u8, 211u8, 8u8, 43u8, 4u8, 165u8, 147u8, 166u8, 3u8, 189u8, 42u8, 125u8, 130u8, 21u8, 43u8, @@ -21958,16 +20869,12 @@ pub mod api { pub fn set_max_upward_queue_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_upward_queue_count", - data: SetMaxUpwardQueueCount { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_upward_queue_count", + SetMaxUpwardQueueCount { new }, [ 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, 122u8, 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, @@ -21980,16 +20887,11 @@ pub mod api { pub fn set_max_upward_queue_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_upward_queue_size", - data: SetMaxUpwardQueueSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_upward_queue_size", + SetMaxUpwardQueueSize { new }, [ 18u8, 60u8, 141u8, 57u8, 134u8, 96u8, 140u8, 85u8, 137u8, 9u8, 209u8, 123u8, 10u8, 165u8, 33u8, 184u8, 34u8, 82u8, @@ -22002,16 +20904,12 @@ pub mod api { pub fn set_max_downward_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_downward_message_size", - data: SetMaxDownwardMessageSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_downward_message_size", + SetMaxDownwardMessageSize { new }, [ 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, 156u8, 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, @@ -22024,16 +20922,12 @@ pub mod api { pub fn set_ump_service_total_weight( &self, new: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_ump_service_total_weight", - data: SetUmpServiceTotalWeight { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_ump_service_total_weight", + SetUmpServiceTotalWeight { new }, [ 253u8, 228u8, 226u8, 127u8, 202u8, 30u8, 148u8, 254u8, 133u8, 38u8, 2u8, 83u8, 173u8, 147u8, 113u8, 224u8, 16u8, 160u8, @@ -22046,16 +20940,12 @@ pub mod api { pub fn set_max_upward_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_upward_message_size", - data: SetMaxUpwardMessageSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_upward_message_size", + SetMaxUpwardMessageSize { new }, [ 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, 115u8, 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, @@ -22068,18 +20958,12 @@ pub mod api { pub fn set_max_upward_message_num_per_candidate( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetMaxUpwardMessageNumPerCandidate, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_max_upward_message_num_per_candidate", - data: SetMaxUpwardMessageNumPerCandidate { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_max_upward_message_num_per_candidate", + SetMaxUpwardMessageNumPerCandidate { new }, [ 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, 196u8, 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, @@ -22092,16 +20976,11 @@ pub mod api { pub fn set_hrmp_open_request_ttl( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_open_request_ttl", - data: SetHrmpOpenRequestTtl { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_open_request_ttl", + SetHrmpOpenRequestTtl { new }, [ 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, 207u8, 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, @@ -22114,16 +20993,11 @@ pub mod api { pub fn set_hrmp_sender_deposit( &self, new: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_sender_deposit", - data: SetHrmpSenderDeposit { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_sender_deposit", + SetHrmpSenderDeposit { new }, [ 49u8, 38u8, 173u8, 114u8, 66u8, 140u8, 15u8, 151u8, 193u8, 54u8, 128u8, 108u8, 72u8, 71u8, 28u8, 65u8, 129u8, 199u8, @@ -22137,16 +21011,12 @@ pub mod api { pub fn set_hrmp_recipient_deposit( &self, new: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_recipient_deposit", - data: SetHrmpRecipientDeposit { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_recipient_deposit", + SetHrmpRecipientDeposit { new }, [ 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, 150u8, 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, @@ -22159,16 +21029,12 @@ pub mod api { pub fn set_hrmp_channel_max_capacity( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_channel_max_capacity", - data: SetHrmpChannelMaxCapacity { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_channel_max_capacity", + SetHrmpChannelMaxCapacity { new }, [ 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, 190u8, 60u8, 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, @@ -22181,16 +21047,12 @@ pub mod api { pub fn set_hrmp_channel_max_total_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_channel_max_total_size", - data: SetHrmpChannelMaxTotalSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_channel_max_total_size", + SetHrmpChannelMaxTotalSize { new }, [ 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, 34u8, 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, @@ -22203,18 +21065,12 @@ pub mod api { pub fn set_hrmp_max_parachain_inbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetHrmpMaxParachainInboundChannels, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_max_parachain_inbound_channels", - data: SetHrmpMaxParachainInboundChannels { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_max_parachain_inbound_channels", + SetHrmpMaxParachainInboundChannels { new }, [ 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, 121u8, 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, @@ -22227,18 +21083,12 @@ pub mod api { pub fn set_hrmp_max_parathread_inbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetHrmpMaxParathreadInboundChannels, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_max_parathread_inbound_channels", - data: SetHrmpMaxParathreadInboundChannels { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_max_parathread_inbound_channels", + SetHrmpMaxParathreadInboundChannels { new }, [ 209u8, 66u8, 180u8, 20u8, 87u8, 242u8, 219u8, 71u8, 22u8, 145u8, 220u8, 48u8, 44u8, 42u8, 77u8, 69u8, 255u8, 82u8, @@ -22251,16 +21101,12 @@ pub mod api { pub fn set_hrmp_channel_max_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_channel_max_message_size", - data: SetHrmpChannelMaxMessageSize { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_channel_max_message_size", + SetHrmpChannelMaxMessageSize { new }, [ 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, 151u8, 27u8, 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, @@ -22273,18 +21119,12 @@ pub mod api { pub fn set_hrmp_max_parachain_outbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetHrmpMaxParachainOutboundChannels, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_max_parachain_outbound_channels", - data: SetHrmpMaxParachainOutboundChannels { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_max_parachain_outbound_channels", + SetHrmpMaxParachainOutboundChannels { new }, [ 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, 11u8, 20u8, 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, @@ -22297,18 +21137,12 @@ pub mod api { pub fn set_hrmp_max_parathread_outbound_channels( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall< - SetHrmpMaxParathreadOutboundChannels, - >, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_max_parathread_outbound_channels", - data: SetHrmpMaxParathreadOutboundChannels { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_max_parathread_outbound_channels", + SetHrmpMaxParathreadOutboundChannels { new }, [ 31u8, 72u8, 93u8, 21u8, 180u8, 156u8, 101u8, 24u8, 145u8, 220u8, 194u8, 93u8, 176u8, 164u8, 53u8, 123u8, 36u8, 113u8, @@ -22321,16 +21155,12 @@ pub mod api { pub fn set_hrmp_max_message_num_per_candidate( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_hrmp_max_message_num_per_candidate", - data: SetHrmpMaxMessageNumPerCandidate { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_hrmp_max_message_num_per_candidate", + SetHrmpMaxMessageNumPerCandidate { new }, [ 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, 57u8, 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, @@ -22343,16 +21173,12 @@ pub mod api { pub fn set_ump_max_individual_weight( &self, new: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_ump_max_individual_weight", - data: SetUmpMaxIndividualWeight { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_ump_max_individual_weight", + SetUmpMaxIndividualWeight { new }, [ 122u8, 12u8, 77u8, 188u8, 26u8, 100u8, 16u8, 182u8, 66u8, 159u8, 127u8, 111u8, 193u8, 204u8, 119u8, 102u8, 186u8, 12u8, @@ -22365,16 +21191,11 @@ pub mod api { pub fn set_pvf_checking_enabled( &self, new: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_pvf_checking_enabled", - data: SetPvfCheckingEnabled { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_pvf_checking_enabled", + SetPvfCheckingEnabled { new }, [ 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, 29u8, 219u8, 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, @@ -22387,16 +21208,11 @@ pub mod api { pub fn set_pvf_voting_ttl( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_pvf_voting_ttl", - data: SetPvfVotingTtl { new }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_pvf_voting_ttl", + SetPvfVotingTtl { new }, [ 17u8, 11u8, 98u8, 217u8, 208u8, 102u8, 238u8, 83u8, 118u8, 123u8, 20u8, 18u8, 46u8, 212u8, 21u8, 164u8, 61u8, 104u8, @@ -22412,16 +21228,12 @@ pub mod api { pub fn set_minimum_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_minimum_validation_upgrade_delay", - data: SetMinimumValidationUpgradeDelay { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_minimum_validation_upgrade_delay", + SetMinimumValidationUpgradeDelay { new }, [ 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, 37u8, 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, @@ -22435,16 +21247,12 @@ pub mod api { pub fn set_bypass_consistency_check( &self, new: ::core::primitive::bool, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Configuration", - call: "set_bypass_consistency_check", - data: SetBypassConsistencyCheck { new }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Configuration", + "set_bypass_consistency_check", + SetBypassConsistencyCheck { new }, [ 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, 121u8, 26u8, 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, @@ -22830,16 +21638,11 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ParaInherent", - call: "enter", - data: Enter { data }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ParaInherent", + "enter", + Enter { data }, [ 92u8, 247u8, 59u8, 6u8, 2u8, 102u8, 76u8, 147u8, 46u8, 232u8, 38u8, 191u8, 145u8, 155u8, 23u8, 39u8, 228u8, 95u8, 57u8, @@ -23162,16 +21965,11 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "force_set_current_code", - data: ForceSetCurrentCode { para, new_code }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "force_set_current_code", + ForceSetCurrentCode { para, new_code }, [ 56u8, 59u8, 48u8, 185u8, 106u8, 99u8, 250u8, 32u8, 207u8, 2u8, 4u8, 110u8, 165u8, 131u8, 22u8, 33u8, 248u8, 175u8, @@ -23185,16 +21983,11 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "force_set_current_head", - data: ForceSetCurrentHead { para, new_head }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "force_set_current_head", + ForceSetCurrentHead { para, new_head }, [ 203u8, 70u8, 33u8, 168u8, 133u8, 64u8, 146u8, 137u8, 156u8, 104u8, 183u8, 26u8, 74u8, 227u8, 154u8, 224u8, 75u8, 85u8, @@ -23209,19 +22002,15 @@ pub mod api { para: runtime_types::polkadot_parachain::primitives::Id, new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, relay_parent_number: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "force_schedule_code_upgrade", - data: ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "force_schedule_code_upgrade", + ForceScheduleCodeUpgrade { + para, + new_code, + relay_parent_number, }, [ 30u8, 210u8, 178u8, 31u8, 48u8, 144u8, 167u8, 117u8, 220u8, @@ -23236,16 +22025,11 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "force_note_new_head", - data: ForceNoteNewHead { para, new_head }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "force_note_new_head", + ForceNoteNewHead { para, new_head }, [ 83u8, 93u8, 166u8, 142u8, 213u8, 1u8, 243u8, 73u8, 192u8, 164u8, 104u8, 206u8, 99u8, 250u8, 31u8, 222u8, 231u8, 54u8, @@ -23260,16 +22044,11 @@ pub mod api { pub fn force_queue_action( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "force_queue_action", - data: ForceQueueAction { para }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "force_queue_action", + ForceQueueAction { para }, [ 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, 137u8, 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, @@ -23294,16 +22073,12 @@ pub mod api { pub fn add_trusted_validation_code( &self, validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "add_trusted_validation_code", - data: AddTrustedValidationCode { validation_code }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "add_trusted_validation_code", + AddTrustedValidationCode { validation_code }, [ 160u8, 199u8, 245u8, 178u8, 58u8, 65u8, 79u8, 199u8, 53u8, 60u8, 84u8, 225u8, 2u8, 145u8, 154u8, 204u8, 165u8, 171u8, @@ -23320,17 +22095,13 @@ pub mod api { pub fn poke_unused_validation_code( &self, validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "poke_unused_validation_code", - data: PokeUnusedValidationCode { - validation_code_hash, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "poke_unused_validation_code", + PokeUnusedValidationCode { + validation_code_hash, }, [ 98u8, 9u8, 24u8, 180u8, 8u8, 144u8, 36u8, 28u8, 111u8, 83u8, @@ -23346,16 +22117,12 @@ pub mod api { &self, stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Paras", - call: "include_pvf_check_statement", - data: IncludePvfCheckStatement { stmt, signature }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Paras", + "include_pvf_check_statement", + IncludePvfCheckStatement { stmt, signature }, [ 22u8, 136u8, 241u8, 59u8, 36u8, 249u8, 239u8, 255u8, 169u8, 117u8, 19u8, 58u8, 214u8, 16u8, 135u8, 65u8, 13u8, 250u8, @@ -24391,16 +23158,11 @@ pub mod api { pub fn force_approve( &self, up_to: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Initializer", - call: "force_approve", - data: ForceApprove { up_to }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Initializer", + "force_approve", + ForceApprove { up_to }, [ 28u8, 117u8, 86u8, 182u8, 19u8, 127u8, 43u8, 17u8, 153u8, 80u8, 193u8, 53u8, 120u8, 41u8, 205u8, 23u8, 252u8, 148u8, @@ -24607,18 +23369,13 @@ pub mod api { &self, index: ::core::primitive::u64, weight_limit: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Ump", - call: "service_overweight", - data: ServiceOverweight { - index, - weight_limit, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Ump", + "service_overweight", + ServiceOverweight { + index, + weight_limit, }, [ 225u8, 41u8, 132u8, 91u8, 28u8, 116u8, 89u8, 197u8, 194u8, @@ -25111,19 +23868,14 @@ pub mod api { recipient: runtime_types::polkadot_parachain::primitives::Id, proposed_max_capacity: ::core::primitive::u32, proposed_max_message_size: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "hrmp_init_open_channel", - data: HrmpInitOpenChannel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "hrmp_init_open_channel", + HrmpInitOpenChannel { + recipient, + proposed_max_capacity, + proposed_max_message_size, }, [ 170u8, 72u8, 58u8, 42u8, 38u8, 11u8, 110u8, 229u8, 239u8, @@ -25139,16 +23891,11 @@ pub mod api { pub fn hrmp_accept_open_channel( &self, sender: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "hrmp_accept_open_channel", - data: HrmpAcceptOpenChannel { sender }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "hrmp_accept_open_channel", + HrmpAcceptOpenChannel { sender }, [ 75u8, 111u8, 52u8, 164u8, 204u8, 100u8, 204u8, 111u8, 127u8, 84u8, 60u8, 136u8, 95u8, 255u8, 48u8, 157u8, 189u8, 76u8, @@ -25164,16 +23911,11 @@ pub mod api { pub fn hrmp_close_channel( &self, channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "hrmp_close_channel", - data: HrmpCloseChannel { channel_id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "hrmp_close_channel", + HrmpCloseChannel { channel_id }, [ 11u8, 202u8, 76u8, 107u8, 213u8, 21u8, 191u8, 190u8, 40u8, 229u8, 60u8, 115u8, 232u8, 136u8, 41u8, 114u8, 21u8, 19u8, @@ -25194,19 +23936,14 @@ pub mod api { para: runtime_types::polkadot_parachain::primitives::Id, inbound: ::core::primitive::u32, outbound: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "force_clean_hrmp", - data: ForceCleanHrmp { - para, - inbound, - outbound, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "force_clean_hrmp", + ForceCleanHrmp { + para, + inbound, + outbound, }, [ 171u8, 109u8, 147u8, 49u8, 163u8, 107u8, 36u8, 169u8, 117u8, @@ -25225,16 +23962,11 @@ pub mod api { pub fn force_process_hrmp_open( &self, channels: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "force_process_hrmp_open", - data: ForceProcessHrmpOpen { channels }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "force_process_hrmp_open", + ForceProcessHrmpOpen { channels }, [ 231u8, 80u8, 233u8, 15u8, 131u8, 167u8, 223u8, 28u8, 182u8, 185u8, 213u8, 24u8, 154u8, 160u8, 68u8, 94u8, 160u8, 59u8, @@ -25252,16 +23984,11 @@ pub mod api { pub fn force_process_hrmp_close( &self, channels: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "force_process_hrmp_close", - data: ForceProcessHrmpClose { channels }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "force_process_hrmp_close", + ForceProcessHrmpClose { channels }, [ 248u8, 138u8, 30u8, 151u8, 53u8, 16u8, 44u8, 116u8, 51u8, 194u8, 173u8, 252u8, 143u8, 53u8, 184u8, 129u8, 80u8, 80u8, @@ -25282,18 +24009,13 @@ pub mod api { &self, channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, open_requests: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Hrmp", - call: "hrmp_cancel_open_request", - data: HrmpCancelOpenRequest { - channel_id, - open_requests, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Hrmp", + "hrmp_cancel_open_request", + HrmpCancelOpenRequest { + channel_id, + open_requests, }, [ 136u8, 217u8, 56u8, 138u8, 227u8, 37u8, 120u8, 83u8, 116u8, @@ -26172,16 +24894,11 @@ pub mod api { impl TransactionApi { pub fn force_unfreeze( &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "ParasDisputes", - call: "force_unfreeze", - data: ForceUnfreeze {}, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ParasDisputes", + "force_unfreeze", + ForceUnfreeze {}, [ 212u8, 211u8, 58u8, 159u8, 23u8, 220u8, 64u8, 175u8, 65u8, 50u8, 192u8, 122u8, 113u8, 189u8, 74u8, 191u8, 48u8, 93u8, @@ -26535,19 +25252,14 @@ pub mod api { id: runtime_types::polkadot_parachain::primitives::Id, genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Registrar", - call: "register", - data: Register { - id, - genesis_head, - validation_code, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Registrar", + "register", + Register { + id, + genesis_head, + validation_code, }, [ 154u8, 84u8, 201u8, 125u8, 72u8, 69u8, 188u8, 42u8, 225u8, @@ -26570,21 +25282,16 @@ pub mod api { id: runtime_types::polkadot_parachain::primitives::Id, genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Registrar", - call: "force_register", - data: ForceRegister { - who, - deposit, - id, - genesis_head, - validation_code, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Registrar", + "force_register", + ForceRegister { + who, + deposit, + id, + genesis_head, + validation_code, }, [ 59u8, 24u8, 236u8, 163u8, 53u8, 49u8, 92u8, 199u8, 38u8, @@ -26600,16 +25307,11 @@ pub mod api { pub fn deregister( &self, id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Registrar", - call: "deregister", - data: Deregister { id }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Registrar", + "deregister", + Deregister { id }, [ 137u8, 9u8, 146u8, 11u8, 126u8, 125u8, 186u8, 222u8, 246u8, 199u8, 94u8, 229u8, 147u8, 245u8, 213u8, 51u8, 203u8, 181u8, @@ -26633,16 +25335,11 @@ pub mod api { &self, id: runtime_types::polkadot_parachain::primitives::Id, other: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Registrar", - call: "swap", - data: Swap { id, other }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Registrar", + "swap", + Swap { id, other }, [ 238u8, 154u8, 249u8, 250u8, 57u8, 242u8, 47u8, 17u8, 50u8, 70u8, 124u8, 189u8, 193u8, 137u8, 107u8, 138u8, 216u8, 137u8, @@ -26658,16 +25355,11 @@ pub mod api { pub fn force_remove_lock( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Registrar", - call: "force_remove_lock", - data: ForceRemoveLock { para }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Registrar", + "force_remove_lock", + ForceRemoveLock { para }, [ 161u8, 77u8, 236u8, 143u8, 243u8, 159u8, 88u8, 61u8, 217u8, 140u8, 161u8, 61u8, 20u8, 76u8, 130u8, 59u8, 85u8, 219u8, @@ -26690,18 +25382,11 @@ pub mod api { #[doc = ""] #[doc = "## Events"] #[doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] - pub fn reserve( - &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Registrar", - call: "reserve", - data: Reserve {}, - }, + pub fn reserve(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Registrar", + "reserve", + Reserve {}, [ 22u8, 210u8, 13u8, 54u8, 253u8, 13u8, 89u8, 174u8, 232u8, 119u8, 148u8, 206u8, 130u8, 133u8, 199u8, 127u8, 201u8, @@ -26994,21 +25679,16 @@ pub mod api { amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Slots", - call: "force_lease", - data: ForceLease { - para, - leaser, - amount, - period_begin, - period_count, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Slots", + "force_lease", + ForceLease { + para, + leaser, + amount, + period_begin, + period_count, }, [ 196u8, 2u8, 63u8, 229u8, 18u8, 134u8, 48u8, 4u8, 165u8, 46u8, @@ -27024,16 +25704,11 @@ pub mod api { pub fn clear_all_leases( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Slots", - call: "clear_all_leases", - data: ClearAllLeases { para }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Slots", + "clear_all_leases", + ClearAllLeases { para }, [ 16u8, 14u8, 185u8, 45u8, 149u8, 70u8, 177u8, 133u8, 130u8, 173u8, 196u8, 244u8, 77u8, 63u8, 218u8, 64u8, 108u8, 83u8, @@ -27052,16 +25727,11 @@ pub mod api { pub fn trigger_onboard( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Slots", - call: "trigger_onboard", - data: TriggerOnboard { para }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Slots", + "trigger_onboard", + TriggerOnboard { para }, [ 74u8, 158u8, 122u8, 37u8, 34u8, 62u8, 61u8, 218u8, 94u8, 222u8, 1u8, 153u8, 131u8, 215u8, 157u8, 180u8, 98u8, 130u8, @@ -27305,18 +25975,13 @@ pub mod api { &self, duration: ::core::primitive::u32, lease_period_index: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Auctions", - call: "new_auction", - data: NewAuction { - duration, - lease_period_index, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Auctions", + "new_auction", + NewAuction { + duration, + lease_period_index, }, [ 171u8, 40u8, 200u8, 164u8, 213u8, 10u8, 145u8, 164u8, 212u8, @@ -27349,21 +26014,16 @@ pub mod api { first_slot: ::core::primitive::u32, last_slot: ::core::primitive::u32, amount: ::core::primitive::u128, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Auctions", - call: "bid", - data: Bid { - para, - auction_index, - first_slot, - last_slot, - amount, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Auctions", + "bid", + Bid { + para, + auction_index, + first_slot, + last_slot, + amount, }, [ 243u8, 233u8, 248u8, 221u8, 239u8, 59u8, 65u8, 63u8, 125u8, @@ -27378,16 +26038,11 @@ pub mod api { #[doc = "Can only be called by Root origin."] pub fn cancel_auction( &self, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Auctions", - call: "cancel_auction", - data: CancelAuction {}, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Auctions", + "cancel_auction", + CancelAuction {}, [ 182u8, 223u8, 178u8, 136u8, 1u8, 115u8, 229u8, 78u8, 166u8, 128u8, 28u8, 106u8, 6u8, 248u8, 46u8, 55u8, 110u8, 120u8, @@ -27888,22 +26543,17 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "create", - data: Create { - index, - cap, - first_period, - last_period, - end, - verifier, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "create", + Create { + index, + cap, + first_period, + last_period, + end, + verifier, }, [ 78u8, 52u8, 156u8, 23u8, 104u8, 251u8, 20u8, 233u8, 42u8, @@ -27922,19 +26572,14 @@ pub mod api { signature: ::core::option::Option< runtime_types::sp_runtime::MultiSignature, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "contribute", - data: Contribute { - index, - value, - signature, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "contribute", + Contribute { + index, + value, + signature, }, [ 159u8, 180u8, 248u8, 203u8, 128u8, 231u8, 28u8, 84u8, 14u8, @@ -27965,16 +26610,11 @@ pub mod api { &self, who: ::subxt::ext::sp_core::crypto::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "withdraw", - data: Withdraw { who, index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "withdraw", + Withdraw { who, index }, [ 147u8, 177u8, 116u8, 152u8, 9u8, 102u8, 4u8, 201u8, 204u8, 145u8, 104u8, 226u8, 86u8, 211u8, 66u8, 109u8, 109u8, 139u8, @@ -27991,16 +26631,11 @@ pub mod api { pub fn refund( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "refund", - data: Refund { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "refund", + Refund { index }, [ 223u8, 64u8, 5u8, 135u8, 15u8, 234u8, 60u8, 114u8, 199u8, 216u8, 73u8, 165u8, 198u8, 34u8, 140u8, 142u8, 214u8, 254u8, @@ -28013,16 +26648,11 @@ pub mod api { pub fn dissolve( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "dissolve", - data: Dissolve { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "dissolve", + Dissolve { index }, [ 100u8, 67u8, 105u8, 3u8, 213u8, 149u8, 201u8, 146u8, 241u8, 62u8, 31u8, 108u8, 58u8, 30u8, 241u8, 141u8, 134u8, 115u8, @@ -28044,22 +26674,17 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "edit", - data: Edit { - index, - cap, - first_period, - last_period, - end, - verifier, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "edit", + Edit { + index, + cap, + first_period, + last_period, + end, + verifier, }, [ 222u8, 124u8, 94u8, 221u8, 36u8, 183u8, 67u8, 114u8, 198u8, @@ -28076,16 +26701,11 @@ pub mod api { &self, index: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "add_memo", - data: AddMemo { index, memo }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "add_memo", + AddMemo { index, memo }, [ 104u8, 199u8, 143u8, 251u8, 28u8, 49u8, 144u8, 186u8, 83u8, 108u8, 26u8, 127u8, 22u8, 141u8, 48u8, 62u8, 194u8, 193u8, @@ -28100,16 +26720,11 @@ pub mod api { pub fn poke( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "poke", - data: Poke { index }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "poke", + Poke { index }, [ 118u8, 60u8, 131u8, 17u8, 27u8, 153u8, 57u8, 24u8, 191u8, 211u8, 101u8, 123u8, 34u8, 145u8, 193u8, 113u8, 244u8, 162u8, @@ -28126,16 +26741,11 @@ pub mod api { signature: ::core::option::Option< runtime_types::sp_runtime::MultiSignature, >, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "Crowdloan", - call: "contribute_all", - data: ContributeAll { index, signature }, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Crowdloan", + "contribute_all", + ContributeAll { index, signature }, [ 94u8, 61u8, 105u8, 107u8, 204u8, 18u8, 223u8, 242u8, 19u8, 162u8, 205u8, 130u8, 203u8, 73u8, 42u8, 85u8, 208u8, 157u8, @@ -28609,18 +27219,13 @@ pub mod api { &self, dest: runtime_types::xcm::VersionedMultiLocation, message: runtime_types::xcm::VersionedXcm, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "send", - data: Send { - dest: ::std::boxed::Box::new(dest), - message: ::std::boxed::Box::new(message), - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "send", + Send { + dest: ::std::boxed::Box::new(dest), + message: ::std::boxed::Box::new(message), }, [ 62u8, 5u8, 58u8, 216u8, 236u8, 6u8, 23u8, 64u8, 52u8, 141u8, @@ -28651,20 +27256,15 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "teleport_assets", - data: TeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "teleport_assets", + TeleportAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, }, [ 10u8, 218u8, 192u8, 242u8, 222u8, 140u8, 137u8, 249u8, 15u8, @@ -28696,20 +27296,15 @@ pub mod api { beneficiary: runtime_types::xcm::VersionedMultiLocation, assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "reserve_transfer_assets", - data: ReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "reserve_transfer_assets", + ReserveTransferAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, }, [ 99u8, 57u8, 160u8, 112u8, 160u8, 82u8, 240u8, 74u8, 105u8, @@ -28734,18 +27329,13 @@ pub mod api { &self, message: runtime_types::xcm::VersionedXcm, max_weight: ::core::primitive::u64, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "execute", - data: Execute { - message: ::std::boxed::Box::new(message), - max_weight, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "execute", + Execute { + message: ::std::boxed::Box::new(message), + max_weight, }, [ 234u8, 145u8, 40u8, 18u8, 224u8, 25u8, 249u8, 87u8, 214u8, @@ -28765,18 +27355,13 @@ pub mod api { &self, location: runtime_types::xcm::v1::multilocation::MultiLocation, xcm_version: ::core::primitive::u32, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "force_xcm_version", - data: ForceXcmVersion { - location: ::std::boxed::Box::new(location), - xcm_version, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "force_xcm_version", + ForceXcmVersion { + location: ::std::boxed::Box::new(location), + xcm_version, }, [ 222u8, 53u8, 133u8, 159u8, 195u8, 147u8, 113u8, 8u8, 157u8, @@ -28794,16 +27379,12 @@ pub mod api { pub fn force_default_xcm_version( &self, maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "force_default_xcm_version", - data: ForceDefaultXcmVersion { maybe_xcm_version }, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "force_default_xcm_version", + ForceDefaultXcmVersion { maybe_xcm_version }, [ 38u8, 36u8, 59u8, 231u8, 18u8, 79u8, 76u8, 9u8, 200u8, 125u8, 214u8, 166u8, 37u8, 99u8, 111u8, 161u8, 135u8, 2u8, 133u8, @@ -28819,17 +27400,13 @@ pub mod api { pub fn force_subscribe_version_notify( &self, location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "force_subscribe_version_notify", - data: ForceSubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "force_subscribe_version_notify", + ForceSubscribeVersionNotify { + location: ::std::boxed::Box::new(location), }, [ 248u8, 225u8, 152u8, 123u8, 25u8, 248u8, 170u8, 97u8, 88u8, @@ -28848,17 +27425,13 @@ pub mod api { pub fn force_unsubscribe_version_notify( &self, location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "force_unsubscribe_version_notify", - data: ForceUnsubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "force_unsubscribe_version_notify", + ForceUnsubscribeVersionNotify { + location: ::std::boxed::Box::new(location), }, [ 136u8, 187u8, 225u8, 130u8, 146u8, 74u8, 93u8, 240u8, 184u8, @@ -28893,21 +27466,17 @@ pub mod api { assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "limited_reserve_transfer_assets", - data: LimitedReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "limited_reserve_transfer_assets", + LimitedReserveTransferAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, }, [ 221u8, 220u8, 116u8, 79u8, 10u8, 95u8, 250u8, 251u8, 252u8, @@ -28941,21 +27510,16 @@ pub mod api { assets: runtime_types::xcm::VersionedMultiAssets, fee_asset_item: ::core::primitive::u32, weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::extrinsic::SubmittableExtrinsic< - ::subxt::metadata::EncodeStaticCall, - DispatchError, - > { - ::subxt::extrinsic::SubmittableExtrinsic::new_with_validation( - ::subxt::metadata::EncodeStaticCall { - pallet: "XcmPallet", - call: "limited_teleport_assets", - data: LimitedTeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "XcmPallet", + "limited_teleport_assets", + LimitedTeleportAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, }, [ 82u8, 234u8, 41u8, 231u8, 90u8, 49u8, 150u8, 217u8, 51u8, @@ -41559,20 +40123,9 @@ pub mod api { } } } - #[doc = r" The default error type returned when there is a runtime issue."] + #[doc = r" The default error type returned when there is a runtime issue,"] + #[doc = r" exposed here for ease of use."] pub type DispatchError = runtime_types::sp_runtime::DispatchError; - impl ::subxt::error::HasModuleError for runtime_types::sp_runtime::DispatchError { - fn module_error_data(&self) -> Option<::subxt::error::ModuleErrorData> { - if let Self::Module(module_error) = self { - Some(::subxt::error::ModuleErrorData { - pallet_index: module_error.index, - error: module_error.error, - }) - } else { - None - } - } - } pub fn constants() -> ConstantsApi { ConstantsApi } diff --git a/testing/integration-tests/src/events/mod.rs b/testing/integration-tests/src/events/mod.rs index 74219f1a73..3abfffffe7 100644 --- a/testing/integration-tests/src/events/mod.rs +++ b/testing/integration-tests/src/events/mod.rs @@ -17,7 +17,7 @@ use sp_keyring::AccountKeyring; // Check that we can subscribe to non-finalized block events. #[tokio::test] -async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { +async fn non_finalized_block_subscription() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -35,7 +35,7 @@ async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { // Check that we can subscribe to finalized block events. #[tokio::test] -async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { +async fn finalized_block_subscription() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -55,7 +55,7 @@ async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { // Check that our subscription actually keeps producing events for // a few blocks. #[tokio::test] -async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicError> { +async fn subscription_produces_events_each_block() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -85,7 +85,7 @@ async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicErr // Check that our subscription receives events, and we can filter them based on // it's Stream impl, and ultimately see the event we expect. #[tokio::test] -async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { +async fn balance_transfer_subscription() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -127,7 +127,7 @@ async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { } #[tokio::test] -async fn missing_block_headers_will_be_filled_in() -> Result<(), subxt::BasicError> { +async fn missing_block_headers_will_be_filled_in() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -195,7 +195,7 @@ async fn check_events_are_sendable() { // requires Send. This will lead to a compile error. } - Ok::<_, subxt::BasicError>(()) + Ok::<_, subxt::Error>(()) }); // Check that FilterEvents can be used across await points. @@ -215,6 +215,6 @@ async fn check_events_are_sendable() { // requires Send; This will lead to a compile error. } - Ok::<_, subxt::BasicError>(()) + Ok::<_, subxt::Error>(()) }); } diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index c90c776503..f79e6603a9 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -8,7 +8,6 @@ use crate::{ balances, runtime_types, system, - DispatchError, }, pair_signer, test_context, @@ -23,10 +22,13 @@ use sp_runtime::{ AccountId32, MultiAddress, }; -use subxt::Error; +use subxt::error::{ + DispatchError, + Error, +}; #[tokio::test] -async fn tx_basic_transfer() -> Result<(), subxt::Error> { +async fn tx_basic_transfer() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = pair_signer(AccountKeyring::Bob.pair()); let bob_address = bob.account_id().clone().into(); @@ -84,8 +86,7 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { } #[tokio::test] -async fn multiple_transfers_work_nonce_incremented( -) -> Result<(), subxt::Error> { +async fn multiple_transfers_work_nonce_incremented() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = pair_signer(AccountKeyring::Bob.pair()); let bob_address: MultiAddress = bob.account_id().clone().into(); @@ -133,7 +134,7 @@ async fn storage_total_issuance() { } #[tokio::test] -async fn storage_balance_lock() -> Result<(), subxt::Error> { +async fn storage_balance_lock() -> Result<(), subxt::Error> { let bob = pair_signer(AccountKeyring::Bob.pair()); let charlie = AccountKeyring::Charlie.to_account_id(); let ctx = test_context().await; @@ -203,7 +204,7 @@ async fn transfer_error() { .wait_for_finalized_success() .await; - if let Err(Error::Module(err)) = res { + if let Err(Error::Runtime(DispatchError::Module(err))) = res { assert_eq!(err.pallet, "Balances"); assert_eq!(err.error, "InsufficientBalance"); } else { diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 5b2e9613a0..bc8ec88b27 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -9,7 +9,6 @@ use crate::{ self, contracts::events, system, - DispatchError, }, test_context, TestContext, @@ -17,9 +16,9 @@ use crate::{ use sp_core::sr25519::Pair; use sp_runtime::MultiAddress; use subxt::{ - extrinsic::{ + tx::{ PairSigner, - TransactionProgress, + TxProgress, }, Config, Error, @@ -47,9 +46,7 @@ impl ContractsTestContext { self.cxt.client() } - async fn instantiate_with_code( - &self, - ) -> Result<(Hash, AccountId), Error> { + async fn instantiate_with_code(&self) -> Result<(Hash, AccountId), Error> { tracing::info!("instantiate_with_code:"); const CONTRACT: &str = r#" (module @@ -99,7 +96,7 @@ impl ContractsTestContext { code_hash: Hash, data: Vec, salt: Vec, - ) -> Result> { + ) -> Result { // call instantiate extrinsic let instantiate_tx = node_runtime::tx().contracts().instantiate( 100_000_000_000_000_000, // endowment @@ -130,14 +127,7 @@ impl ContractsTestContext { &self, contract: AccountId, input_data: Vec, - ) -> Result< - TransactionProgress< - SubstrateConfig, - OnlineClient, - DispatchError, - >, - Error, - > { + ) -> Result>, Error> { tracing::info!("call: {:?}", contract); let call_tx = node_runtime::tx().contracts().call( MultiAddress::Id(contract), diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index 1b1a62bc27..6e9abf81d2 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -10,7 +10,6 @@ use crate::{ ValidatorPrefs, }, staking, - DispatchError, }, pair_signer, test_context, @@ -21,7 +20,10 @@ use sp_core::{ Pair, }; use sp_keyring::AccountKeyring; -use subxt::Error; +use subxt::error::{ + DispatchError, + Error, +}; /// Helper function to generate a crypto pair from seed fn get_from_seed(seed: &str) -> sr25519::Pair { @@ -57,7 +59,7 @@ async fn validate_with_controller_account() { } #[tokio::test] -async fn validate_not_possible_for_stash_account() -> Result<(), Error> { +async fn validate_not_possible_for_stash_account() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); @@ -73,7 +75,7 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error { + assert_matches!(announce_validator, Err(Error::Runtime(DispatchError::Module(err))) => { assert_eq!(err.pallet, "Staking"); assert_eq!(err.error, "NotController"); }); @@ -102,7 +104,7 @@ async fn nominate_with_controller_account() { } #[tokio::test] -async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { +async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); @@ -121,7 +123,7 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error { + assert_matches!(nomination, Err(Error::Runtime(DispatchError::Module(err))) => { assert_eq!(err.pallet, "Staking"); assert_eq!(err.error, "NotController"); }); @@ -129,7 +131,7 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error Result<(), Error> { +async fn chill_works_for_controller_only() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); @@ -160,7 +162,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(chill, Err(Error::Module(err)) => { + assert_matches!(chill, Err(Error::Runtime(DispatchError::Module(err))) => { assert_eq!(err.pallet, "Staking"); assert_eq!(err.error, "NotController"); }); @@ -178,7 +180,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { } #[tokio::test] -async fn tx_bond() -> Result<(), Error> { +async fn tx_bond() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); @@ -206,7 +208,7 @@ async fn tx_bond() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(bond_again, Err(Error::Module(err)) => { + assert_matches!(bond_again, Err(Error::Runtime(DispatchError::Module(err))) => { assert_eq!(err.pallet, "Staking"); assert_eq!(err.error, "AlreadyBonded"); }); @@ -214,7 +216,7 @@ async fn tx_bond() -> Result<(), Error> { } #[tokio::test] -async fn storage_history_depth() -> Result<(), Error> { +async fn storage_history_depth() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); let history_depth_addr = node_runtime::storage().staking().history_depth(); @@ -227,7 +229,7 @@ async fn storage_history_depth() -> Result<(), Error> { } #[tokio::test] -async fn storage_current_era() -> Result<(), Error> { +async fn storage_current_era() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); let current_era_addr = node_runtime::storage().staking().current_era(); @@ -240,7 +242,7 @@ async fn storage_current_era() -> Result<(), Error> { } #[tokio::test] -async fn storage_era_reward_points() -> Result<(), Error> { +async fn storage_era_reward_points() -> Result<(), Error> { let ctx = test_context().await; let api = ctx.client(); let reward_points_addr = node_runtime::storage().staking().eras_reward_points(&0); diff --git a/testing/integration-tests/src/frame/sudo.rs b/testing/integration-tests/src/frame/sudo.rs index e02d862bd3..de67d111cd 100644 --- a/testing/integration-tests/src/frame/sudo.rs +++ b/testing/integration-tests/src/frame/sudo.rs @@ -7,7 +7,6 @@ use crate::{ self, runtime_types, sudo, - DispatchError, }, pair_signer, test_context, @@ -18,7 +17,7 @@ type Call = runtime_types::node_runtime::Call; type BalancesCall = runtime_types::pallet_balances::pallet::Call; #[tokio::test] -async fn test_sudo() -> Result<(), subxt::Error> { +async fn test_sudo() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -44,7 +43,7 @@ async fn test_sudo() -> Result<(), subxt::Error> { } #[tokio::test] -async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> { +async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); diff --git a/testing/integration-tests/src/frame/system.rs b/testing/integration-tests/src/frame/system.rs index 76e6214486..e2e8610586 100644 --- a/testing/integration-tests/src/frame/system.rs +++ b/testing/integration-tests/src/frame/system.rs @@ -6,7 +6,6 @@ use crate::{ node_runtime::{ self, system, - DispatchError, }, pair_signer, test_context, @@ -15,7 +14,7 @@ use assert_matches::assert_matches; use sp_keyring::AccountKeyring; #[tokio::test] -async fn storage_account() -> Result<(), subxt::Error> { +async fn storage_account() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -33,7 +32,7 @@ async fn storage_account() -> Result<(), subxt::Error> { } #[tokio::test] -async fn tx_remark_with_event() -> Result<(), subxt::Error> { +async fn tx_remark_with_event() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); diff --git a/testing/integration-tests/src/lib.rs b/testing/integration-tests/src/lib.rs index dbda88f274..1c8722c31d 100644 --- a/testing/integration-tests/src/lib.rs +++ b/testing/integration-tests/src/lib.rs @@ -26,6 +26,9 @@ use test_runtime::node_runtime; use utils::*; // We don't use this dependency, but it's here so that we -// can enable logging easily if need be. +// can enable logging easily if need be. Add this to a test +// to enable tracing for it: +// +// tracing_subscriber::fmt::init(); #[cfg(test)] use tracing_subscriber as _; diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index 1d034af99b..f56ad8885a 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -3,10 +3,7 @@ // see LICENSE for license details. use crate::{ - node_runtime::{ - self, - DispatchError, - }, + node_runtime, pair_signer, test_context, utils::wait_for_blocks, @@ -14,7 +11,7 @@ use crate::{ use sp_keyring::AccountKeyring; #[tokio::test] -async fn storage_plain_lookup() -> Result<(), subxt::Error> { +async fn storage_plain_lookup() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -30,7 +27,7 @@ async fn storage_plain_lookup() -> Result<(), subxt::Error> { } #[tokio::test] -async fn storage_map_lookup() -> Result<(), subxt::Error> { +async fn storage_map_lookup() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); @@ -58,8 +55,7 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { // treated as a StorageKey (ie we should hash both values together with one hasher, rather // than hash both values separately, or ignore the second value). #[tokio::test] -async fn storage_n_mapish_key_is_properly_created( -) -> Result<(), subxt::Error> { +async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error> { use codec::Encode; use node_runtime::runtime_types::sp_core::crypto::KeyTypeId; @@ -86,7 +82,7 @@ async fn storage_n_mapish_key_is_properly_created( } #[tokio::test] -async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error> { +async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error> { let ctx = test_context().await; let api = ctx.client(); diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index 8432a68fdd..6012c5e8b4 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -10,7 +10,7 @@ pub(crate) use crate::{ use sp_core::sr25519::Pair; use sp_keyring::AccountKeyring; use subxt::{ - extrinsic::PairSigner, + tx::PairSigner, SubstrateConfig, }; From 3a1a766b94f42824fb32b9a43219204e1128cf91 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 15:03:43 +0100 Subject: [PATCH 48/75] clippy fixes --- subxt/src/metadata/metadata_type.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 6543310898..1f80d5ebca 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -307,7 +307,7 @@ impl EventMetadata { /// Get the name of the pallet event which was emitted. pub fn event(&self) -> &str { - &self.variant.name() + self.variant.name() } /// Get the type def variant for the pallet event. @@ -465,7 +465,7 @@ impl TryFrom for Metadata { .types .types() .iter() - .find(|ty| ty.ty().path().segments() == &["sp_runtime", "DispatchError"]) + .find(|ty| ty.ty().path().segments() == ["sp_runtime", "DispatchError"]) .map(|ty| ty.id()); Ok(Metadata { From 6d03b3fa355e978b4aad4c85b0a24348ebf5974f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 15:14:28 +0100 Subject: [PATCH 49/75] fix doc links --- subxt/src/storage/storage_address.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 29ae43c1b2..454bbdb713 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -47,8 +47,8 @@ pub trait StorageAddress { bytes.extend(&sp_core::twox_128(self.entry_name().as_bytes())); } - /// This is a helper which combines [`StorageAddressT::append_root_bytes()`] - /// and [`StorageAddressT::append_entry_bytes`] and gives back all of the bytes + /// This is a helper which combines [`StorageAddress::append_root_bytes()`] + /// and [`StorageAddress::append_entry_bytes`] and gives back all of the bytes /// that represent this storage address. /// /// There should be no need to override this. @@ -70,7 +70,7 @@ pub trait StorageAddress { } } -/// Used to signal whether a [`StorageAddressT`] can be iterated, +/// Used to signal whether a [`StorageAddress`] can be iterated, /// fetched and returned with a default value in the type system. pub struct Yes; From 00c4d7a66fa3f7efb1f6788e988339cd855034cf Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 15:25:40 +0100 Subject: [PATCH 50/75] fix doc example --- subxt/src/rpc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index fa13557b4b..5265608422 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -29,7 +29,7 @@ //! // Fetch up to 10 keys. //! let keys = api //! .rpc() -//! .storage_keys_paged(StorageKey(key), 10, None, None) +//! .storage_keys_paged(&key, 10, None, None) //! .await //! .unwrap(); //! From be89c65e8aef4582f49ae7b47a9c74789c2ae1b3 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 15:45:03 +0100 Subject: [PATCH 51/75] constant address trait for consistency --- codegen/src/api/constants.rs | 4 +- subxt/src/constants/constant_address.rs | 55 +- subxt/src/constants/constants_client.rs | 12 +- subxt/src/constants/mod.rs | 5 +- subxt/src/storage/storage_address.rs | 2 +- .../integration-tests/src/codegen/polkadot.rs | 570 +++++++----------- 6 files changed, 279 insertions(+), 369 deletions(-) diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index cda9312e84..6925570ec9 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -63,8 +63,8 @@ pub fn generate_constants( quote! { #( #[doc = #docs ] )* - pub fn #fn_name(&self) -> ::subxt::constants::ConstantAddress<'static, ::subxt::metadata::DecodeStaticType<#return_ty>> { - ::subxt::constants::ConstantAddress::new_with_validation( + pub fn #fn_name(&self) -> ::subxt::constants::StaticConstantAddress<::subxt::metadata::DecodeStaticType<#return_ty>> { + ::subxt::constants::StaticConstantAddress::new( #pallet_name, #constant_name, [#(#constant_hash,)*] diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index c2f1cbd75f..bcfc83c293 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -2,22 +2,42 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -/// This is returned from constant accesses in the statically generated -/// code, and contains the information needed to find, validate and decode -/// the constant. -pub struct ConstantAddress<'a, ReturnTy> { - pallet_name: &'a str, - constant_name: &'a str, +use crate::metadata::DecodeWithMetadata; + +/// This represents a constant address. Anything implementing this trait +/// can be used to fetch constants. +pub trait ConstantAddress { + /// Thye target type of the value that lives at this address. + type Target: DecodeWithMetadata; + + /// The name of the pallet that the constant lives under. + fn pallet_name(&self) -> &str; + + /// The name of the constant in a given pallet. + fn constant_name(&self) -> &str; + + /// An optional hash which, if present, will be checked against + /// the node metadata to confirm that the return type matches what + /// we are expecting. + fn validation_hash(&self) -> Option<[u8; 32]> { + None + } +} + +/// This represents a statically generated constant lookup address. +pub struct StaticConstantAddress { + pallet_name: &'static str, + constant_name: &'static str, constant_hash: Option<[u8; 32]>, _marker: std::marker::PhantomData, } -impl<'a, ReturnTy> ConstantAddress<'a, ReturnTy> { - /// Create a new [`ConstantAddress`] that will be validated +impl StaticConstantAddress { + /// Create a new [`StaticConstantAddress`] that will be validated /// against node metadata using the hash given. - pub fn new_with_validation( - pallet_name: &'a str, - constant_name: &'a str, + pub fn new( + pallet_name: &'static str, + constant_name: &'static str, hash: [u8; 32], ) -> Self { Self { @@ -37,19 +57,20 @@ impl<'a, ReturnTy> ConstantAddress<'a, ReturnTy> { _marker: self._marker, } } +} + +impl ConstantAddress for StaticConstantAddress { + type Target = ReturnTy; - /// The pallet name. - pub fn pallet_name(&self) -> &'a str { + fn pallet_name(&self) -> &str { self.pallet_name } - /// The constant name. - pub fn constant_name(&self) -> &'a str { + fn constant_name(&self) -> &str { self.constant_name } - /// A hash used for metadata validation. - pub(super) fn validation_hash(&self) -> Option<[u8; 32]> { + fn validation_hash(&self) -> Option<[u8; 32]> { self.constant_hash } } diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index ea612b2604..5a12889b2c 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -37,9 +37,9 @@ impl> ConstantsClient { /// if the address is valid (or if it's not possible to check since the address has no validation hash). /// Return an error if the address was not valid or something went wrong trying to validate it (ie /// the pallet or constant in question do not exist at all). - pub fn validate( + pub fn validate( &self, - address: &ConstantAddress<'_, ReturnTy>, + address: &Address, ) -> Result<(), Error> { if let Some(actual_hash) = address.validation_hash() { let expected_hash = self @@ -56,10 +56,10 @@ impl> ConstantsClient { /// Access the constant at the address given, returning the type defined by this address. /// This is probably used with addresses given from static codegen, although you can manually /// construct your own, too. - pub fn at( + pub fn at( &self, - address: &ConstantAddress<'_, ReturnTy>, - ) -> Result { + address: &Address, + ) -> Result<::Target, Error> { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: @@ -68,7 +68,7 @@ impl> ConstantsClient { // 2. Attempt to decode the constant into the type given: let pallet = metadata.pallet(address.pallet_name())?; let constant = pallet.constant(address.constant_name())?; - let value = ReturnTy::decode_with_metadata( + let value = Address::Target::decode_with_metadata( &mut &*constant.value, constant.ty.id(), &metadata, diff --git a/subxt/src/constants/mod.rs b/subxt/src/constants/mod.rs index 96daf8dd5d..5043e07f1e 100644 --- a/subxt/src/constants/mod.rs +++ b/subxt/src/constants/mod.rs @@ -7,5 +7,8 @@ mod constant_address; mod constants_client; -pub use constant_address::ConstantAddress; +pub use constant_address::{ + ConstantAddress, + StaticConstantAddress, +}; pub use constants_client::ConstantsClient; diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 454bbdb713..99f3fb0474 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -12,7 +12,7 @@ pub use frame_metadata::StorageHasher; /// This represents a storage address. Anything implementing this trait /// can be used to fetch and iterate over storage entries. pub trait StorageAddress { - /// Thye target type of the value that lives at this address? + /// The target type of the value that lives at this address. type Target: DecodeWithMetadata; /// Can an entry be fetched from this address? type IsFetchable; diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 0bb705dd65..1e62450680 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -1001,13 +1001,12 @@ pub mod api { #[doc = " Block & extrinsics weights: base values and limits."] pub fn block_weights( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_system::limits::BlockWeights, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "System", "BlockWeights", [ @@ -1021,13 +1020,12 @@ pub mod api { #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_system::limits::BlockLength, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "System", "BlockLength", [ @@ -1041,11 +1039,10 @@ pub mod api { #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] pub fn block_hash_count( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "System", "BlockHashCount", [ @@ -1059,13 +1056,12 @@ pub mod api { #[doc = " The weight of runtime database operations the runtime can invoke."] pub fn db_weight( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_support::weights::RuntimeDbWeight, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "System", "DbWeight", [ @@ -1079,13 +1075,12 @@ pub mod api { #[doc = " Get the chain's current version."] pub fn version( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_version::RuntimeVersion, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "System", "Version", [ @@ -1103,11 +1098,10 @@ pub mod api { #[doc = " an identifier of the chain."] pub fn ss58_prefix( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "System", "SS58Prefix", [ @@ -1558,11 +1552,10 @@ pub mod api { #[doc = " priority than `schedule::HARD_DEADLINE`."] pub fn maximum_weight( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Scheduler", "MaximumWeight", [ @@ -1577,11 +1570,10 @@ pub mod api { #[doc = " Not strictly enforced, but used for weight estimation."] pub fn max_scheduled_per_block( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Scheduler", "MaxScheduledPerBlock", [ @@ -2427,11 +2419,10 @@ pub mod api { #[doc = " the chain has started. Attempting to do so will brick block production."] pub fn epoch_duration( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Babe", "EpochDuration", [ @@ -2449,11 +2440,10 @@ pub mod api { #[doc = " the probability of a slot being empty)."] pub fn expected_block_time( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Babe", "ExpectedBlockTime", [ @@ -2467,11 +2457,10 @@ pub mod api { #[doc = " Max number of authorities allowed"] pub fn max_authorities( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Babe", "MaxAuthorities", [ @@ -2596,11 +2585,10 @@ pub mod api { #[doc = " double this period on default settings."] pub fn minimum_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Timestamp", "MinimumPeriod", [ @@ -2964,11 +2952,10 @@ pub mod api { #[doc = " The deposit needed for reserving an index."] pub fn deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Indices", "Deposit", [ @@ -3676,11 +3663,10 @@ pub mod api { #[doc = " The minimum amount required to keep an account open."] pub fn existential_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Balances", "ExistentialDeposit", [ @@ -3695,11 +3681,10 @@ pub mod api { #[doc = " Not strictly enforced, but used for weight estimation."] pub fn max_locks( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Balances", "MaxLocks", [ @@ -3713,11 +3698,10 @@ pub mod api { #[doc = " The maximum number of named reserves that can exist on an account."] pub fn max_reserves( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Balances", "MaxReserves", [ @@ -3811,11 +3795,10 @@ pub mod api { #[doc = " transactions."] pub fn operational_fee_multiplier( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "TransactionPayment", "OperationalFeeMultiplier", [ @@ -3964,11 +3947,10 @@ pub mod api { #[doc = " `UncleGenerations + 1` before `now`."] pub fn uncle_generations( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Authorship", "UncleGenerations", [ @@ -6753,11 +6735,10 @@ pub mod api { #[doc = " Maximum number of nominations per nominator."] pub fn max_nominations( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Staking", "MaxNominations", [ @@ -6771,11 +6752,10 @@ pub mod api { #[doc = " Number of sessions per era."] pub fn sessions_per_era( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Staking", "SessionsPerEra", [ @@ -6789,11 +6769,10 @@ pub mod api { #[doc = " Number of eras that staked funds must remain bonded for."] pub fn bonding_duration( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Staking", "BondingDuration", [ @@ -6810,11 +6789,10 @@ pub mod api { #[doc = " should be applied immediately, without opportunity for intervention."] pub fn slash_defer_duration( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Staking", "SlashDeferDuration", [ @@ -6831,11 +6809,10 @@ pub mod api { #[doc = " claim their reward. This used to limit the i/o cost for the nominator payout."] pub fn max_nominator_rewarded_per_validator( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Staking", "MaxNominatorRewardedPerValidator", [ @@ -6850,11 +6827,10 @@ pub mod api { #[doc = " determines how many unique eras a staker may be unbonding in."] pub fn max_unlocking_chunks( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Staking", "MaxUnlockingChunks", [ @@ -7787,11 +7763,10 @@ pub mod api { #[doc = " Max Authorities in use"] pub fn max_authorities( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Grandpa", "MaxAuthorities", [ @@ -8086,11 +8061,10 @@ pub mod api { #[doc = " multiple pallets send unsigned transactions."] pub fn unsigned_priority( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ImOnline", "UnsignedPriority", [ @@ -9846,11 +9820,10 @@ pub mod api { #[doc = " where they are on the losing side of a vote."] pub fn enactment_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "EnactmentPeriod", [ @@ -9864,11 +9837,10 @@ pub mod api { #[doc = " How often (in blocks) new public referenda are launched."] pub fn launch_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "LaunchPeriod", [ @@ -9882,11 +9854,10 @@ pub mod api { #[doc = " How often (in blocks) to check for new votes."] pub fn voting_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "VotingPeriod", [ @@ -9903,11 +9874,10 @@ pub mod api { #[doc = " those successful voters are locked into the consequences that their votes entail."] pub fn vote_locking_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "VoteLockingPeriod", [ @@ -9921,11 +9891,10 @@ pub mod api { #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] pub fn minimum_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "MinimumDeposit", [ @@ -9941,11 +9910,10 @@ pub mod api { #[doc = " as an upgrade having happened recently."] pub fn instant_allowed( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "InstantAllowed", [ @@ -9959,11 +9927,10 @@ pub mod api { #[doc = " Minimum voting period allowed for a fast-track referendum."] pub fn fast_track_voting_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "FastTrackVotingPeriod", [ @@ -9977,11 +9944,10 @@ pub mod api { #[doc = " Period in blocks where an external proposal may not be re-submitted after being vetoed."] pub fn cooloff_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "CooloffPeriod", [ @@ -9995,11 +9961,10 @@ pub mod api { #[doc = " The amount of balance that must be deposited per byte of preimage stored."] pub fn preimage_byte_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "PreimageByteDeposit", [ @@ -10016,11 +9981,10 @@ pub mod api { #[doc = " lead to extrinsic with very big weight: see `delegate` for instance."] pub fn max_votes( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "MaxVotes", [ @@ -10034,11 +9998,10 @@ pub mod api { #[doc = " The maximum number of public proposals that can exist at any time."] pub fn max_proposals( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Democracy", "MaxProposals", [ @@ -11912,11 +11875,10 @@ pub mod api { #[doc = " Identifier for the elections-phragmen pallet's lock"] pub fn pallet_id( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 8usize]>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "PalletId", [ @@ -11930,11 +11892,10 @@ pub mod api { #[doc = " How much should be locked up in order to submit one's candidacy."] pub fn candidacy_bond( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "CandidacyBond", [ @@ -11951,11 +11912,10 @@ pub mod api { #[doc = " creating a gigantic number of votes."] pub fn voting_bond_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "VotingBondBase", [ @@ -11969,11 +11929,10 @@ pub mod api { #[doc = " The amount of bond that need to be locked for each vote (32 bytes)."] pub fn voting_bond_factor( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "VotingBondFactor", [ @@ -11987,11 +11946,10 @@ pub mod api { #[doc = " Number of members to elect."] pub fn desired_members( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "DesiredMembers", [ @@ -12005,11 +11963,10 @@ pub mod api { #[doc = " Number of runners_up to keep."] pub fn desired_runners_up( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "DesiredRunnersUp", [ @@ -12025,11 +11982,10 @@ pub mod api { #[doc = " be in passive mode."] pub fn term_duration( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "PhragmenElection", "TermDuration", [ @@ -12814,13 +12770,12 @@ pub mod api { #[doc = " An accepted proposal gets these back. A rejected proposal does not."] pub fn proposal_bond( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_arithmetic::per_things::Permill, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "ProposalBond", [ @@ -12834,11 +12789,10 @@ pub mod api { #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] pub fn proposal_bond_minimum( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "ProposalBondMinimum", [ @@ -12852,13 +12806,12 @@ pub mod api { #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn proposal_bond_maximum( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< ::core::option::Option<::core::primitive::u128>, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "ProposalBondMaximum", [ @@ -12872,11 +12825,10 @@ pub mod api { #[doc = " Period between successive spends."] pub fn spend_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "SpendPeriod", [ @@ -12890,13 +12842,12 @@ pub mod api { #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] pub fn burn( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_arithmetic::per_things::Permill, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "Burn", [ @@ -12910,13 +12861,12 @@ pub mod api { #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] pub fn pallet_id( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_support::PalletId, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "PalletId", [ @@ -12932,11 +12882,10 @@ pub mod api { #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] pub fn max_approvals( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Treasury", "MaxApprovals", [ @@ -13476,13 +13425,12 @@ pub mod api { impl ConstantsApi { pub fn prefix( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<::core::primitive::u8>, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Claims", "Prefix", [ @@ -13889,11 +13837,10 @@ pub mod api { #[doc = " The minimum amount transferred to call `vested_transfer`."] pub fn min_vested_transfer( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Vesting", "MinVestedTransfer", [ @@ -13906,11 +13853,10 @@ pub mod api { } pub fn max_vesting_schedules( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Vesting", "MaxVestingSchedules", [ @@ -14224,11 +14170,10 @@ pub mod api { #[doc = " The limit on the number of batched calls."] pub fn batched_calls_limit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Utility", "batched_calls_limit", [ @@ -15268,11 +15213,10 @@ pub mod api { #[doc = " The amount held on deposit for a registered identity"] pub fn basic_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Identity", "BasicDeposit", [ @@ -15286,11 +15230,10 @@ pub mod api { #[doc = " The amount held on deposit per additional field for a registered identity."] pub fn field_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Identity", "FieldDeposit", [ @@ -15306,11 +15249,10 @@ pub mod api { #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] pub fn sub_account_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Identity", "SubAccountDeposit", [ @@ -15324,11 +15266,10 @@ pub mod api { #[doc = " The maximum number of sub-accounts allowed per identified account."] pub fn max_sub_accounts( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Identity", "MaxSubAccounts", [ @@ -15343,11 +15284,10 @@ pub mod api { #[doc = " required to access an identity, but can be pretty high."] pub fn max_additional_fields( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Identity", "MaxAdditionalFields", [ @@ -15362,11 +15302,10 @@ pub mod api { #[doc = " of, e.g., updating judgements."] pub fn max_registrars( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Identity", "MaxRegistrars", [ @@ -16094,11 +16033,10 @@ pub mod api { #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] pub fn proxy_deposit_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Proxy", "ProxyDepositBase", [ @@ -16116,11 +16054,10 @@ pub mod api { #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] pub fn proxy_deposit_factor( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Proxy", "ProxyDepositFactor", [ @@ -16134,11 +16071,10 @@ pub mod api { #[doc = " The maximum amount of proxies allowed for a single account."] pub fn max_proxies( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Proxy", "MaxProxies", [ @@ -16152,11 +16088,10 @@ pub mod api { #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] pub fn max_pending( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Proxy", "MaxPending", [ @@ -16173,11 +16108,10 @@ pub mod api { #[doc = " bytes)."] pub fn announcement_deposit_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Proxy", "AnnouncementDepositBase", [ @@ -16194,11 +16128,10 @@ pub mod api { #[doc = " into a pre-existing storage value."] pub fn announcement_deposit_factor( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Proxy", "AnnouncementDepositFactor", [ @@ -16709,11 +16642,10 @@ pub mod api { #[doc = " `32 + sizeof(AccountId)` bytes."] pub fn deposit_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Multisig", "DepositBase", [ @@ -16729,11 +16661,10 @@ pub mod api { #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] pub fn deposit_factor( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Multisig", "DepositFactor", [ @@ -16747,11 +16678,10 @@ pub mod api { #[doc = " The maximum amount of signatories allowed in the multisig."] pub fn max_signatories( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Multisig", "MaxSignatories", [ @@ -17400,11 +17330,10 @@ pub mod api { #[doc = " The amount held on deposit for placing a bounty proposal."] pub fn bounty_deposit_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "BountyDepositBase", [ @@ -17418,11 +17347,10 @@ pub mod api { #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] pub fn bounty_deposit_payout_delay( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "BountyDepositPayoutDelay", [ @@ -17436,11 +17364,10 @@ pub mod api { #[doc = " Bounty duration in blocks."] pub fn bounty_update_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "BountyUpdatePeriod", [ @@ -17457,13 +17384,12 @@ pub mod api { #[doc = " `CuratorDepositMin`."] pub fn curator_deposit_multiplier( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_arithmetic::per_things::Permill, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "CuratorDepositMultiplier", [ @@ -17477,13 +17403,12 @@ pub mod api { #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_max( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< ::core::option::Option<::core::primitive::u128>, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "CuratorDepositMax", [ @@ -17497,13 +17422,12 @@ pub mod api { #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] pub fn curator_deposit_min( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< ::core::option::Option<::core::primitive::u128>, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "CuratorDepositMin", [ @@ -17517,11 +17441,10 @@ pub mod api { #[doc = " Minimum value for a bounty."] pub fn bounty_value_minimum( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "BountyValueMinimum", [ @@ -17535,11 +17458,10 @@ pub mod api { #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] pub fn data_deposit_per_byte( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "DataDepositPerByte", [ @@ -17555,11 +17477,10 @@ pub mod api { #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] pub fn maximum_reason_length( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Bounties", "MaximumReasonLength", [ @@ -18280,11 +18201,10 @@ pub mod api { #[doc = " Maximum number of child bounties that can be added to a parent bounty."] pub fn max_active_child_bounty_count( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ChildBounties", "MaxActiveChildBountyCount", [ @@ -18298,11 +18218,10 @@ pub mod api { #[doc = " Minimum value for a child-bounty."] pub fn child_bounty_value_minimum( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ChildBounties", "ChildBountyValueMinimum", [ @@ -18803,11 +18722,10 @@ pub mod api { #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] pub fn maximum_reason_length( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Tips", "MaximumReasonLength", [ @@ -18821,11 +18739,10 @@ pub mod api { #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] pub fn data_deposit_per_byte( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Tips", "DataDepositPerByte", [ @@ -18839,11 +18756,10 @@ pub mod api { #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] pub fn tip_countdown( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Tips", "TipCountdown", [ @@ -18857,13 +18773,12 @@ pub mod api { #[doc = " The percent of the final tip which goes to the original reporter of the tip."] pub fn tip_finders_fee( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_arithmetic::per_things::Percent, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Tips", "TipFindersFee", [ @@ -18877,11 +18792,10 @@ pub mod api { #[doc = " The amount held on deposit for placing a tip report."] pub fn tip_report_deposit_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Tips", "TipReportDepositBase", [ @@ -19438,11 +19352,10 @@ pub mod api { #[doc = " Duration of the unsigned phase."] pub fn unsigned_phase( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "UnsignedPhase", [ @@ -19456,11 +19369,10 @@ pub mod api { #[doc = " Duration of the signed phase."] pub fn signed_phase( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedPhase", [ @@ -19475,13 +19387,12 @@ pub mod api { #[doc = " \"better\" in the Signed phase."] pub fn better_signed_threshold( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_arithmetic::per_things::Perbill, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "BetterSignedThreshold", [ @@ -19496,13 +19407,12 @@ pub mod api { #[doc = " \"better\" in the Unsigned phase."] pub fn better_unsigned_threshold( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_arithmetic::per_things::Perbill, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "BetterUnsignedThreshold", [ @@ -19519,11 +19429,10 @@ pub mod api { #[doc = " to submit the worker's solution."] pub fn offchain_repeat( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "OffchainRepeat", [ @@ -19537,11 +19446,10 @@ pub mod api { #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] pub fn miner_tx_priority( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "MinerTxPriority", [ @@ -19561,11 +19469,10 @@ pub mod api { #[doc = " attempts to submit new solutions may cause a runtime panic."] pub fn signed_max_submissions( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedMaxSubmissions", [ @@ -19583,11 +19490,10 @@ pub mod api { #[doc = " this value."] pub fn signed_max_weight( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedMaxWeight", [ @@ -19601,11 +19507,10 @@ pub mod api { #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] pub fn signed_max_refunds( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedMaxRefunds", [ @@ -19619,11 +19524,10 @@ pub mod api { #[doc = " Base reward for a signed solution"] pub fn signed_reward_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedRewardBase", [ @@ -19637,11 +19541,10 @@ pub mod api { #[doc = " Base deposit for a signed solution."] pub fn signed_deposit_base( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedDepositBase", [ @@ -19655,11 +19558,10 @@ pub mod api { #[doc = " Per-byte deposit for a signed solution."] pub fn signed_deposit_byte( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedDepositByte", [ @@ -19673,11 +19575,10 @@ pub mod api { #[doc = " Per-weight deposit for a signed solution."] pub fn signed_deposit_weight( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "SignedDepositWeight", [ @@ -19693,11 +19594,10 @@ pub mod api { #[doc = " take place over multiple blocks."] pub fn max_electing_voters( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "MaxElectingVoters", [ @@ -19711,11 +19611,10 @@ pub mod api { #[doc = " The maximum number of electable targets to put in the snapshot."] pub fn max_electable_targets( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "ElectionProviderMultiPhase", "MaxElectableTargets", [ @@ -20025,13 +19924,12 @@ pub mod api { #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] pub fn bag_thresholds( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<::core::primitive::u64>, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "VoterList", "BagThresholds", [ @@ -23115,11 +23013,10 @@ pub mod api { impl ConstantsApi { pub fn unsigned_priority( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Paras", "UnsignedPriority", [ @@ -25594,11 +25491,10 @@ pub mod api { #[doc = " This should include the cost for storing the genesis head and validation code."] pub fn para_deposit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Registrar", "ParaDeposit", [ @@ -25612,11 +25508,10 @@ pub mod api { #[doc = " The deposit to be paid per byte stored on chain."] pub fn data_deposit_per_byte( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Registrar", "DataDepositPerByte", [ @@ -25886,11 +25781,10 @@ pub mod api { #[doc = " The number of blocks over which a single period lasts."] pub fn lease_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Slots", "LeasePeriod", [ @@ -25904,11 +25798,10 @@ pub mod api { #[doc = " The number of blocks to offset each lease period by."] pub fn lease_offset( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Slots", "LeaseOffset", [ @@ -26340,11 +26233,10 @@ pub mod api { #[doc = " The number of blocks over which an auction may be retroactively ended."] pub fn ending_period( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Auctions", "EndingPeriod", [ @@ -26360,11 +26252,10 @@ pub mod api { #[doc = " `EndingPeriod` / `SampleLength` = Total # of Samples"] pub fn sample_length( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Auctions", "SampleLength", [ @@ -26377,11 +26268,10 @@ pub mod api { } pub fn slot_range_count( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Auctions", "SlotRangeCount", [ @@ -26394,11 +26284,10 @@ pub mod api { } pub fn lease_periods_per_slot( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Auctions", "LeasePeriodsPerSlot", [ @@ -27043,13 +26932,12 @@ pub mod api { #[doc = " `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b\"py/cfund\")`"] pub fn pallet_id( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_support::PalletId, >, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Crowdloan", "PalletId", [ @@ -27064,11 +26952,10 @@ pub mod api { #[doc = " least `ExistentialDeposit`."] pub fn min_contribution( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Crowdloan", "MinContribution", [ @@ -27082,11 +26969,10 @@ pub mod api { #[doc = " Max number of storage keys to remove per extrinsic call."] pub fn remove_keys_limit( &self, - ) -> ::subxt::constants::ConstantAddress< - 'static, + ) -> ::subxt::constants::StaticConstantAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, > { - ::subxt::constants::ConstantAddress::new_with_validation( + ::subxt::constants::StaticConstantAddress::new( "Crowdloan", "RemoveKeysLimit", [ From fb461e6267bc8601fcb76e8fabec1d38c20e982e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 16:30:42 +0100 Subject: [PATCH 52/75] fix a typo and remove EncodeWithMetadata stuff --- subxt/src/constants/constant_address.rs | 6 +- subxt/src/metadata/encode_with_metadata.rs | 120 --------------------- subxt/src/metadata/mod.rs | 7 -- 3 files changed, 3 insertions(+), 130 deletions(-) delete mode 100644 subxt/src/metadata/encode_with_metadata.rs diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index bcfc83c293..529af19b91 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -7,7 +7,7 @@ use crate::metadata::DecodeWithMetadata; /// This represents a constant address. Anything implementing this trait /// can be used to fetch constants. pub trait ConstantAddress { - /// Thye target type of the value that lives at this address. + /// The target type of the value that lives at this address. type Target: DecodeWithMetadata; /// The name of the pallet that the constant lives under. @@ -59,7 +59,7 @@ impl StaticConstantAddress { } } -impl ConstantAddress for StaticConstantAddress { +impl ConstantAddress for StaticConstantAddress { type Target = ReturnTy; fn pallet_name(&self) -> &str { @@ -73,4 +73,4 @@ impl ConstantAddress for StaticConstantAddress Option<[u8; 32]> { self.constant_hash } -} +} \ No newline at end of file diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs deleted file mode 100644 index 130b79844a..0000000000 --- a/subxt/src/metadata/encode_with_metadata.rs +++ /dev/null @@ -1,120 +0,0 @@ -// 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. - -use super::{ - Metadata, - MetadataError, - MetadataLocation, -}; -use crate::error::Error; -use codec::Encode; -use std::borrow::Cow; - -/// This trait represents any type that can be encoded to bytes with the support of [`Metadata`]. -pub trait EncodeWithMetadata { - /// Given some metadata, attempt to SCALE encode `Self` to the provided bytes. - fn encode_to_with_metadata( - &self, - metadata: &Metadata, - out: &mut Vec, - ) -> Result<(), Error>; - - /// Given some metadata, attempt to SCALE encode `Self` and return the resulting bytes. - fn encode_with_metadata(&self, metadata: &Metadata) -> Result, Error> { - let mut out = Vec::new(); - self.encode_to_with_metadata(metadata, &mut out)?; - Ok(out) - } -} - -/// A wrapper which implements [`EncodeWithMetadata`] if the data provided implements [`Encode`]. -pub struct EncodeStaticCall { - /// The pallet name - pub pallet: &'static str, - /// The call/fucntion name within the pallet - pub call: &'static str, - /// Data representing the arguments to pass to the call. - pub data: T, -} - -impl EncodeWithMetadata for EncodeStaticCall { - fn encode_to_with_metadata( - &self, - metadata: &Metadata, - out: &mut Vec, - ) -> Result<(), Error> { - let pallet = metadata.pallet(self.pallet)?; - let pallet_index = pallet.index(); - let call_index = pallet.call_index(self.call)?; - - pallet_index.encode_to(out); - call_index.encode_to(out); - self.data.encode_to(out); - Ok(()) - } -} - -impl MetadataLocation for EncodeStaticCall { - fn pallet(&self) -> &str { - self.pallet - } - fn item(&self) -> &str { - self.call - } -} - -/// A wrapper which allows dynamic Value types to be SCALE encoded via [`EncodeWithMetadata`]. -pub struct EncodeDynamicCall<'a> { - pallet: Cow<'a, str>, - call: Cow<'a, str>, - data: Vec, -} - -impl<'a> EncodeDynamicCall<'a> { - /// Construct a new [`EncodeDynamicCall`], which can be SCALE encoded to call data. - pub fn new( - pallet: impl Into>, - call: impl Into>, - data: Vec, - ) -> Self { - Self { - pallet: pallet.into(), - call: call.into(), - data, - } - } -} - -impl<'a> MetadataLocation for EncodeDynamicCall<'a> { - fn pallet(&self) -> &str { - self.pallet.as_ref() - } - fn item(&self) -> &str { - self.call.as_ref() - } -} - -impl<'a> EncodeWithMetadata for EncodeDynamicCall<'a> { - fn encode_to_with_metadata( - &self, - metadata: &Metadata, - out: &mut Vec, - ) -> Result<(), Error> { - let pallet = metadata.pallet(&self.pallet)?; - let pallet_index = pallet.index(); - let call_ty = pallet.call_ty_id().ok_or(MetadataError::CallNotFound)?; - - // Assemble the variant representing the specific call within the pallet. - // (we could do this ourselves a little more efficiently but it's easier - // reusing scale_value logic). - let composite = scale_value::Composite::Unnamed(self.data.clone()); - let variant = scale_value::Value::variant(self.call.to_owned(), composite); - - // Encode the pallet index and call variant+data: - pallet_index.encode_to(out); - scale_value::scale::encode_as_type(variant, call_ty, metadata.types(), out) - .map_err(|e| e.to_string())?; - Ok(()) - } -} diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index 61685b6127..68a596ec53 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -5,7 +5,6 @@ //! Types representing the metadata obtained from a node. mod decode_with_metadata; -mod encode_with_metadata; mod hash_cache; mod metadata_location; mod metadata_type; @@ -21,12 +20,6 @@ pub use metadata_type::{ PalletMetadata, }; -pub use encode_with_metadata::{ - EncodeDynamicCall, - EncodeStaticCall, - EncodeWithMetadata, -}; - pub use decode_with_metadata::{ DecodeStaticType, DecodeWithMetadata, From 01847fe05bb8abcc0d5b47799ddfeff0b3f48004 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 16:53:42 +0100 Subject: [PATCH 53/75] Put EventDetails behind a proper interface and allow decoding into top level event, too --- examples/examples/subscribe_all_events.rs | 4 +- subxt/src/constants/constant_address.rs | 4 +- subxt/src/events/events_type.rs | 111 ++++++++++++++++------ subxt/src/events/filter_events.rs | 4 +- subxt/src/events/mod.rs | 3 +- subxt/src/tx/tx_progress.rs | 6 +- 6 files changed, 90 insertions(+), 42 deletions(-) diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs index efbb446ca3..dcdffa2717 100644 --- a/examples/examples/subscribe_all_events.rs +++ b/examples/examples/subscribe_all_events.rs @@ -70,8 +70,8 @@ async fn main() -> Result<(), Box> { let is_balance_transfer = event .as_event::()? .is_some(); - let pallet = event.pallet; - let variant = event.variant; + let pallet = event.pallet_name(); + let variant = event.variant_name(); println!( " {pallet}::{variant} (is balance transfer? {is_balance_transfer})" ); diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index 529af19b91..7efe9992a8 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -59,7 +59,7 @@ impl StaticConstantAddress { } } -impl ConstantAddress for StaticConstantAddress { +impl ConstantAddress for StaticConstantAddress { type Target = ReturnTy; fn pallet_name(&self) -> &str { @@ -73,4 +73,4 @@ impl ConstantAddress for StaticConstantAddress Option<[u8; 32]> { self.constant_hash } -} \ No newline at end of file +} diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index cc99114761..6960db618a 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -140,40 +140,89 @@ impl Events { } } -/// A Value which has been decoded from some raw bytes. -pub type DecodedValue = scale_value::Value; - /// The raw bytes for an event with associated details about /// where and when it was emitted. #[derive(Debug, Clone, PartialEq)] pub struct EventDetails { + phase: Phase, + index: u32, + pallet: String, + variant: String, + bytes: Vec, + fields: Vec>, +} + +impl EventDetails { /// When was the event produced? - pub phase: Phase, + pub fn phase(&self) -> Phase { + self.phase + } + /// What index is this event in the stored events for this block. - pub index: u32, + pub fn index(&self) -> u32 { + self.index + } + + /// The index of the pallet that the event originated from. + pub fn pallet_index(&self) -> u8 { + self.bytes[0] + } + + /// The index of the event variant that the event originated from. + pub fn variant_index(&self) -> u8 { + self.bytes[1] + } + /// The name of the pallet from whence the Event originated. - pub pallet: String, - /// The index of the pallet from whence the Event originated. - pub pallet_index: u8, - /// The name of the pallet Event variant. - pub variant: String, - /// The index of the pallet Event variant. - pub variant_index: u8, - /// The bytes representing the fields contained within the event. - pub bytes: Vec, - /// Generic values representing each field of the event. - pub fields: Vec, -} + pub fn pallet_name(&self) -> &str { + &self.pallet + } -impl EventDetails { - /// Attempt to decode these [`EventDetails`] into a specific event. + /// The name of the pallet's Event variant. + pub fn variant_name(&self) -> &str { + &self.variant + } + + /// Return the bytes representing this event, which include the pallet + /// and variant index that the event originated from. + pub fn bytes(&self) -> &[u8] { + &self.bytes + } + + /// Return the bytes representing the fields stored in this event. + pub fn field_bytes(&self) -> &[u8] { + &self.bytes[2..] + } + + /// Decode and provide the event fields back in the form of a + /// list of [`Value`]s. + // Dev note: if we can optimise Value decoding to avoid allocating + // while working through events, or if the event structure changes + // to allow us to skip over them, we'll no longer keep a copy of the + // decoded events in the event, and the actual decoding will happen + // when this method is called. + pub fn field_values(&self) -> Vec> { + self.fields.clone() + } + + /// Attempt to decode these [`EventDetails`] into a specific static event. + /// This targets the fields within the event directly. You can also attempt to + /// decode the entirety of the event type (including the pallet and event + /// variants) using [`EventDetails::as_root_event()`]. pub fn as_event(&self) -> Result, CodecError> { if self.pallet == E::PALLET && self.variant == E::EVENT { - Ok(Some(E::decode(&mut &self.bytes[..])?)) + Ok(Some(E::decode(&mut &self.bytes[2..])?)) } else { Ok(None) } } + + /// Attempt to decode these [`EventDetails`] into a root event type (which includes + /// the pallet and event enum variants as well as the event fields). A compatible + /// type for this is exposed via static codegen as a root level `Event` type. + pub fn as_root_event(&self) -> Result { + Ok(E::decode(&mut &self.bytes[..])?) + } } // Attempt to dynamically decode a single event from our events input. @@ -202,8 +251,10 @@ fn decode_raw_event_details( event_metadata.event() ); - // Use metadata to figure out which bytes belong to this event: - let mut event_bytes = Vec::new(); + // Use metadata to figure out which bytes belong to this event. + // the event bytes also include the pallet/variant index so that, if we + // like, we can decode them quite easily into a top level event type. + let mut event_bytes = vec![pallet_index, variant_index]; let mut event_fields = Vec::new(); for arg in event_metadata.variant().fields() { let type_id = arg.ty().id(); @@ -229,9 +280,7 @@ fn decode_raw_event_details( Ok(EventDetails { phase, index, - pallet_index, pallet: event_metadata.pallet().to_string(), - variant_index, variant: event_metadata.event().to_string(), bytes: event_bytes, fields: event_fields, @@ -403,18 +452,18 @@ mod tests { assert_eq!(actual_bytes, actual.bytes); let actual_fields_no_context: Vec<_> = actual - .fields + .field_values() .into_iter() .map(|f| f.remove_context()) .collect(); // Check each of the other fields: - assert_eq!(actual.phase, expected.phase); - assert_eq!(actual.index, expected.index); - assert_eq!(actual.pallet, expected.pallet); - assert_eq!(actual.pallet_index, expected.pallet_index); - assert_eq!(actual.variant, expected.variant); - assert_eq!(actual.variant_index, expected.variant_index); + assert_eq!(actual.phase(), expected.phase); + assert_eq!(actual.index(), expected.index); + assert_eq!(actual.pallet_name(), expected.pallet); + assert_eq!(actual.pallet_index(), expected.pallet_index); + assert_eq!(actual.variant_name(), expected.variant); + assert_eq!(actual.variant_index(), expected.variant_index); assert_eq!(actual_fields_no_context, expected.fields); } diff --git a/subxt/src/events/filter_events.rs b/subxt/src/events/filter_events.rs index 50257ee164..718d168048 100644 --- a/subxt/src/events/filter_events.rs +++ b/subxt/src/events/filter_events.rs @@ -153,7 +153,7 @@ impl EventFilter for (Ev,) { if let Ok(Some(event)) = ev { // We found a match; return our tuple. return Some(Ok(FilteredEventDetails { - phase: raw_event.phase, + phase: raw_event.phase(), block_hash, event, })) @@ -194,7 +194,7 @@ macro_rules! impl_event_filter { // We found a match; return our tuple. out.$idx = Some(ev); return Some(Ok(FilteredEventDetails { - phase: raw_event.phase, + phase: raw_event.phase(), block_hash, event: out })) diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index cf3473608a..d0c9ba0f5b 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -22,7 +22,6 @@ pub use events_client::{ EventsClient, }; pub use events_type::{ - DecodedValue, EventDetails, Events, }; @@ -56,7 +55,7 @@ pub trait StaticEvent: Decode { } /// A phase of a block's execution. -#[derive(Clone, Debug, Eq, PartialEq, Decode, Encode)] +#[derive(Copy, Clone, Debug, Eq, PartialEq, Decode, Encode)] pub enum Phase { /// Applying an extrinsic. ApplyExtrinsic(u32), diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index fa503e6970..a027aa8d7a 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -347,9 +347,9 @@ impl> TxInBlock { // Try to find any errors; return the first one we encounter. for ev in events.iter() { let ev = ev?; - if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { + if ev.pallet_name() == "System" && ev.variant_name() == "ExtrinsicFailed" { let dispatch_error = - decode_dispatch_error(&self.client.metadata(), &ev.bytes); + decode_dispatch_error(&self.client.metadata(), ev.field_bytes()); return Err(dispatch_error.into()) } } @@ -426,7 +426,7 @@ impl TxEvents { pub fn iter(&self) -> impl Iterator> + '_ { self.events.iter().filter(|ev| { ev.as_ref() - .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) + .map(|ev| ev.phase() == Phase::ApplyExtrinsic(self.ext_idx)) .unwrap_or(true) // Keep any errors. }) } From 4b818f0c1cc5ff4e5587f34f84d9a29ad278fe35 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 16:58:17 +0100 Subject: [PATCH 54/75] fix docs --- subxt/src/events/events_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 6960db618a..fa69ad7b34 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -195,7 +195,7 @@ impl EventDetails { } /// Decode and provide the event fields back in the form of a - /// list of [`Value`]s. + /// list of [`scale_value::Value`]s. // Dev note: if we can optimise Value decoding to avoid allocating // while working through events, or if the event structure changes // to allow us to skip over them, we'll no longer keep a copy of the From 1b7d0232a03f1ef75ce0b2663e12fc700f0feae7 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 16:59:57 +0100 Subject: [PATCH 55/75] tweak StorageAddress docs --- subxt/src/storage/storage_address.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 99f3fb0474..0c5f8fac78 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -15,10 +15,13 @@ pub trait StorageAddress { /// The target type of the value that lives at this address. type Target: DecodeWithMetadata; /// Can an entry be fetched from this address? + /// Set this type to [`Yes`] to enable the corresponding calls to be made. type IsFetchable; /// Can a default entry be obtained from this address? + /// Set this type to [`Yes`] to enable the corresponding calls to be made. type IsDefaultable; /// Can this address be iterated over? + /// Set this type to [`Yes`] to enable the corresponding calls to be made. type IsIterable; /// The name of the pallet that the entry lives under. From ff5f20ad2992a3dc04d58741c153d574c6e6b92f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 17:01:31 +0100 Subject: [PATCH 56/75] re-export StorageAddress at root for consistency --- subxt/src/storage/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index 7cd77dd2ac..c743f25ff7 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -26,3 +26,10 @@ pub mod address { Yes, }; } + +// For consistency with other modules, also expose +// the basic address stuff at the root of the module. +pub use storage_address::{ + StaticStorageAddress, + StorageAddress, +}; From 116f7f46a4c29941427e8ba853922dbab2132cc0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 18 Jul 2022 17:07:18 +0100 Subject: [PATCH 57/75] fix clippy things --- subxt/src/events/events_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index fa69ad7b34..80d08c5892 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -221,7 +221,7 @@ impl EventDetails { /// the pallet and event enum variants as well as the event fields). A compatible /// type for this is exposed via static codegen as a root level `Event` type. pub fn as_root_event(&self) -> Result { - Ok(E::decode(&mut &self.bytes[..])?) + E::decode(&mut &self.bytes[..]) } } From ce0148d0bfc9ee0ce08e0cb58761bef8929cd2de Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 19 Jul 2022 18:02:04 +0100 Subject: [PATCH 58/75] Add support for dynamic values --- ...{storage_query.rs => storage_iterating.rs} | 73 +++--- subxt/src/constants/constant_address.rs | 35 ++- subxt/src/constants/mod.rs | 2 + subxt/src/dynamic.rs | 23 ++ subxt/src/error.rs | 48 +++- subxt/src/events/events_type.rs | 7 +- subxt/src/lib.rs | 1 + subxt/src/metadata/decode_with_metadata.rs | 9 +- subxt/src/metadata/encode_with_metadata.rs | 67 ++++++ subxt/src/metadata/mod.rs | 6 + subxt/src/storage/mod.rs | 23 +- subxt/src/storage/storage_address.rs | 214 ++++++++++++------ subxt/src/storage/storage_client.rs | 7 +- subxt/src/storage/storage_map_key.rs | 53 +++++ subxt/src/storage/utils.rs | 42 ++++ subxt/src/tx/mod.rs | 2 + subxt/src/tx/tx_payload.rs | 51 ++++- 17 files changed, 522 insertions(+), 141 deletions(-) rename examples/examples/{storage_query.rs => storage_iterating.rs} (68%) create mode 100644 subxt/src/dynamic.rs create mode 100644 subxt/src/metadata/encode_with_metadata.rs create mode 100644 subxt/src/storage/storage_map_key.rs create mode 100644 subxt/src/storage/utils.rs diff --git a/examples/examples/storage_query.rs b/examples/examples/storage_iterating.rs similarity index 68% rename from examples/examples/storage_query.rs rename to examples/examples/storage_iterating.rs index 1ff658e126..6f5ec30c3e 100644 --- a/examples/examples/storage_query.rs +++ b/examples/examples/storage_iterating.rs @@ -30,23 +30,22 @@ async fn main() -> Result<(), Box> { // Create a client to use: let api = OnlineClient::::new().await?; - // The VersionNotifiers type of the XcmPallet is defined as: - // - // ``` - // All locations that we have requested version notifications from. - // #[pallet::storage] - // pub(super) type VersionNotifiers = StorageDoubleMap< - // _, - // Twox64Concat, - // XcmVersion, - // Blake2_128Concat, - // VersionedMultiLocation, - // QueryId, - // OptionQuery, - // >; - // ``` - - // Example 1. Iterate over fetched keys manually. + // Example 1. Iterate over (keys, value) using the storage client. + // This is the standard and most ergonomic approach. + { + let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); + + let mut iter = api.storage().iter(key_addr, 10, None).await?; + + println!("\nExample 1. Obtained keys:"); + while let Some((key, value)) = iter.next().await? { + println!("Key: 0x{}", hex::encode(&key)); + println!(" Value: {}", value); + } + } + + // Example 2. Iterate over fetched keys manually. Here, you forgo any static type + // safety and work directly with the bytes on either side. { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); @@ -56,7 +55,7 @@ async fn main() -> Result<(), Box> { .fetch_keys(&key_addr.to_root_bytes(), 10, None, None) .await?; - println!("Example 1. Obtained keys:"); + println!("Example 2. Obtained keys:"); for key in keys.iter() { println!("Key: 0x{}", hex::encode(&key)); @@ -71,43 +70,23 @@ async fn main() -> Result<(), Box> { } } - // Example 2. Iterate over (keys, value) using the storage client. + // Example 3. Custom iteration over double maps. Here, we manually append one lookup + // key to the root and just iterate over the values underneath that. { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); - let mut iter = api.storage().iter(key_addr, 10, None).await?; - - println!("\nExample 2. Obtained keys:"); - while let Some((key, value)) = iter.next().await? { - println!("Key: 0x{}", hex::encode(&key)); - println!(" Value: {}", value); - } - } - - // Example 4. Custom iteration over double maps. - { - // Obtain the inner RPC from the API. - let rpc = api.rpc(); - - let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); - - // Obtain the prefixed `twox_128("XcmPallet") ++ twox_128("VersionNotifiers")` - let mut query_key = key_addr.to_bytes(); + // Obtain the root bytes (`twox_128("XcmPallet") ++ twox_128("VersionNotifiers")`). + let mut query_key = key_addr.to_root_bytes(); - // From the VersionNotifiers definition above, the first key is represented by - // ``` - // Twox64Concat, - // XcmVersion, - // ``` - // while `XcmVersion` is `u32`. - // Pass `2` as `XcmVersion` and concatenate the key to the prefix. + // We know that the first key is a u32 (the `XcmVersion`) and is hashed by twox64_concat. + // We can build a `StorageMapKey` that replicates that, and append those bytes to the above. StorageMapKey::new(&2u32, StorageHasher::Twox64Concat).to_bytes(&mut query_key); - // The final query key is: + // The final query key is essentially the result of: // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(2u32) ++ 2u32` - println!("\nExample 4\nQuery key: 0x{}", hex::encode(&query_key)); + println!("\nExample 3\nQuery key: 0x{}", hex::encode(&query_key)); - let keys = rpc.storage_keys_paged(&query_key, 10, None, None).await?; + let keys = api.storage().fetch_keys(&query_key, 10, None, None).await?; println!("Obtained keys:"); for key in keys.iter() { diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index 7efe9992a8..545c25afc7 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -2,7 +2,11 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::metadata::DecodeWithMetadata; +use crate::{ + dynamic::DecodedValue, + metadata::DecodeWithMetadata, +}; +use std::borrow::Cow; /// This represents a constant address. Anything implementing this trait /// can be used to fetch constants. @@ -74,3 +78,32 @@ impl ConstantAddress for StaticConstantAddress { + pallet_name: Cow<'a, str>, + constant_name: Cow<'a, str>, +} + +/// Construct a new dynamic constant lookup. +pub fn dynamic<'a>( + pallet_name: impl Into>, + constant_name: impl Into>, +) -> DynamicConstantAddress<'a> { + DynamicConstantAddress { + pallet_name: pallet_name.into(), + constant_name: constant_name.into(), + } +} + +impl<'a> ConstantAddress for DynamicConstantAddress<'a> { + type Target = DecodedValue; + + fn pallet_name(&self) -> &str { + &self.pallet_name + } + + fn constant_name(&self) -> &str { + &self.constant_name + } +} diff --git a/subxt/src/constants/mod.rs b/subxt/src/constants/mod.rs index 5043e07f1e..e4b3ec98b3 100644 --- a/subxt/src/constants/mod.rs +++ b/subxt/src/constants/mod.rs @@ -8,7 +8,9 @@ mod constant_address; mod constants_client; pub use constant_address::{ + dynamic, ConstantAddress, + DynamicConstantAddress, StaticConstantAddress, }; pub use constants_client::ConstantsClient; diff --git a/subxt/src/dynamic.rs b/subxt/src/dynamic.rs new file mode 100644 index 0000000000..e8017b174e --- /dev/null +++ b/subxt/src/dynamic.rs @@ -0,0 +1,23 @@ +// 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. + +//! This module provides the entry points to create dynamic +//! transactions, storage and constant lookups. + +pub use scale_value::Value; + +/// A [`scale_value::Value`] type endowed with contextual information +/// regarding what type was used to decode each part of it. This implements +/// [`crate::metadata::DecodeWithMetadata`], and is used as a return type +/// for dynamic requests. +pub type DecodedValue = scale_value::Value; + +// Submit dynamic transactions. +pub use crate::tx::dynamic as tx; + +// Lookup constants dynamically. +pub use crate::constants::dynamic as constant; + +// Lookup storage values dynamically. +pub use crate::storage::dynamic as storage; diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 443a2d57be..f94e845449 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -12,7 +12,10 @@ pub use crate::metadata::{ MetadataError, }; pub use jsonrpsee::core::error::Error as RequestError; -pub use scale_value::scale::DecodeError; +pub use scale_value::scale::{ + DecodeError, + EncodeError, +}; pub use sp_core::crypto::SecretStringError; pub use sp_runtime::transaction_validity::TransactionValidityError; @@ -48,12 +51,18 @@ pub enum Error { /// Runtime error. #[error("Runtime error: {0:?}")] Runtime(DispatchError), - /// Events decoding error. - #[error("Events decoding error: {0}")] - EventsDecoding(#[from] DecodeError), + /// Error decoding to a [`crate::dynamic::Value`]. + #[error("Error decoding into dynamic value: {0}")] + DecodeValue(#[from] DecodeError), + /// Error encoding from a [`crate::dynamic::Value`]. + #[error("Error encoding from dynamic value: {0}")] + EncodeValue(#[from] EncodeError<()>), /// Transaction progress error. #[error("Transaction error: {0}")] Transaction(#[from] TransactionError), + /// An error encoding a storage address. + #[error("Error encoding storage address: {0}")] + StorageAddress(#[from] StorageAddressError), /// Other error. #[error("Other error: {0}")] Other(String), @@ -149,3 +158,34 @@ impl ModuleErrorData { self.error[0] } } + +/// Something went wrong trying to encode a storage address. +#[derive(Clone, Debug, thiserror::Error)] +pub enum StorageAddressError { + /// Storage map type must be a composite type. + #[error("Storage map type must be a composite type")] + MapTypeMustbeComposite, + /// Storage lookup does not have the expected number of keys. + #[error("Storage lookup requires {expected} keys but got {actual} keys")] + WrongNumberOfKeys { + /// The actual number of keys needed, based on the metadata. + actual: usize, + /// The number of keys provided in the storage address. + expected: usize, + }, + /// Storage lookup requires a type that wasn't found in the metadata. + #[error( + "Storage lookup requires type {0} to exist in the metadata, but it was not found" + )] + TypeNotFound(u32), + /// This storage entry in the metadata does not have the correct number of hashers to fields. + #[error( + "Storage entry in metadata does not have the correct number of hashers to fields" + )] + WrongNumberOfHashers { + /// The number of hashers in the metadata for this storage entry. + hashers: usize, + /// The number of fields in the metadata for this storage entry. + fields: usize, + }, +} diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 80d08c5892..5a3bc7d4c5 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -9,6 +9,7 @@ use super::{ StaticEvent, }; use crate::{ + dynamic::DecodedValue, error::Error, Config, Metadata, @@ -149,7 +150,7 @@ pub struct EventDetails { pallet: String, variant: String, bytes: Vec, - fields: Vec>, + fields: Vec, } impl EventDetails { @@ -195,13 +196,13 @@ impl EventDetails { } /// Decode and provide the event fields back in the form of a - /// list of [`scale_value::Value`]s. + /// list of [`DecodedValue`]s. // Dev note: if we can optimise Value decoding to avoid allocating // while working through events, or if the event structure changes // to allow us to skip over them, we'll no longer keep a copy of the // decoded events in the event, and the actual decoding will happen // when this method is called. - pub fn field_values(&self) -> Vec> { + pub fn field_values(&self) -> Vec { self.fields.clone() } diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index bb20fb7a6f..d8b58b7d19 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -125,6 +125,7 @@ pub use subxt_macro::subxt; pub mod client; pub mod config; pub mod constants; +pub mod dynamic; pub mod error; pub mod events; pub mod metadata; diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs index f247fa914b..aa87447f34 100644 --- a/subxt/src/metadata/decode_with_metadata.rs +++ b/subxt/src/metadata/decode_with_metadata.rs @@ -3,12 +3,15 @@ // see LICENSE for license details. use super::Metadata; -use crate::error::Error; +use crate::{ + dynamic::DecodedValue, + error::Error, +}; use codec::Decode; use frame_metadata::StorageEntryType; /// This trait is implemented for types which can be decoded with the help of metadata. -pub trait DecodeWithMetadata: Sized { +pub trait DecodeWithMetadata { /// The type that we'll get back from decoding. type Target; /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. @@ -39,7 +42,7 @@ pub trait DecodeWithMetadata: Sized { } // Things can be dynamically decoded to our Value type: -impl DecodeWithMetadata for scale_value::Value { +impl DecodeWithMetadata for DecodedValue { type Target = Self; fn decode_with_metadata( bytes: &mut &[u8], diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs new file mode 100644 index 0000000000..26a789e74a --- /dev/null +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -0,0 +1,67 @@ +// 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. + +use crate::{ + dynamic::Value, + error::Error, + metadata::Metadata, +}; +use codec::Encode; + +/// This trait is implemented for types which can be encoded with the help of metadata. +pub trait EncodeWithMetadata { + /// SCALE encode this type to bytes, possibly with the help of metadata. + fn encode_with_metadata( + &self, + type_id: u32, + metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error>; +} + +impl EncodeWithMetadata for Value<()> { + fn encode_with_metadata( + &self, + type_id: u32, + metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error> { + scale_value::scale::encode_as_type(self.clone(), type_id, metadata.types(), bytes) + .map_err(|e| e.into()) + } +} + +/// Any type implementing [`Encode`] can also be encoded with the help of metadata. +pub struct EncodeStaticType(pub T); + +impl EncodeWithMetadata for EncodeStaticType { + fn encode_with_metadata( + &self, + _type_id: u32, + _metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error> { + self.0.encode_to(bytes); + Ok(()) + } +} + +// We can transparently Encode anything wrapped in EncodeStaticType, too. +impl Encode for EncodeStaticType { + fn size_hint(&self) -> usize { + self.0.size_hint() + } + fn encode_to(&self, dest: &mut T) { + self.0.encode_to(dest) + } + fn encode(&self) -> Vec { + self.0.encode() + } + fn using_encoded R>(&self, f: F) -> R { + self.0.using_encoded(f) + } + fn encoded_size(&self) -> usize { + self.0.encoded_size() + } +} diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index 68a596ec53..ae521e7a76 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -5,6 +5,7 @@ //! Types representing the metadata obtained from a node. mod decode_with_metadata; +mod encode_with_metadata; mod hash_cache; mod metadata_location; mod metadata_type; @@ -24,3 +25,8 @@ pub use decode_with_metadata::{ DecodeStaticType, DecodeWithMetadata, }; + +pub use encode_with_metadata::{ + EncodeStaticType, + EncodeWithMetadata, +}; diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index c743f25ff7..a9150d0e75 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -6,6 +6,9 @@ mod storage_address; mod storage_client; +mod storage_map_key; + +pub mod utils; pub use storage_client::{ KeyIter, @@ -18,18 +21,26 @@ pub use sp_core::storage::StorageKey; /// Types representing an address which describes where a storage /// entry lives and how to properly decode it. pub mod address { - pub use super::storage_address::{ - StaticStorageAddress, - StorageAddress, - StorageHasher, - StorageMapKey, - Yes, + pub use super::{ + storage_address::{ + dynamic, + DynamicStorageAddress, + StaticStorageAddress, + StorageAddress, + Yes, + }, + storage_map_key::{ + StorageHasher, + StorageMapKey, + }, }; } // For consistency with other modules, also expose // the basic address stuff at the root of the module. pub use storage_address::{ + dynamic, + DynamicStorageAddress, StaticStorageAddress, StorageAddress, }; diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 0c5f8fac78..0f57d91379 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -2,9 +2,22 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::metadata::DecodeWithMetadata; -use codec::Encode; -pub use sp_runtime::traits::SignedExtension; +use super::storage_map_key::StorageMapKey; +use crate::{ + dynamic::DecodedValue, + error::{ + Error, + StorageAddressError, + }, + metadata::{ + DecodeWithMetadata, + EncodeWithMetadata, + Metadata, + }, +}; +use frame_metadata::StorageEntryType; +use scale_info::TypeDef; +use std::borrow::Cow; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; @@ -32,7 +45,11 @@ pub trait StorageAddress { /// Output the non-prefix bytes; that is, any additional bytes that need /// to be appended to the key to dig into maps. - fn append_entry_bytes(&self, bytes: &mut Vec); + fn append_entry_bytes( + &self, + metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error>; /// An optional hash which, if present, will be checked against /// the node metadata to confirm that the return type matches what @@ -40,37 +57,6 @@ pub trait StorageAddress { fn validation_hash(&self) -> Option<[u8; 32]> { None } - - /// Output the "prefix"; the bytes which encode the pallet - /// name and entry name. - /// - /// There should be no need to override this. - fn append_root_bytes(&self, bytes: &mut Vec) { - bytes.extend(&sp_core::twox_128(self.pallet_name().as_bytes())); - bytes.extend(&sp_core::twox_128(self.entry_name().as_bytes())); - } - - /// This is a helper which combines [`StorageAddress::append_root_bytes()`] - /// and [`StorageAddress::append_entry_bytes`] and gives back all of the bytes - /// that represent this storage address. - /// - /// There should be no need to override this. - fn to_bytes(&self) -> Vec { - let mut bytes = Vec::new(); - self.append_root_bytes(&mut bytes); - self.append_entry_bytes(&mut bytes); - bytes - } - - /// This is a helper which returns bytes representing the root pallet/entry - /// location of this address; useful for manually iterating over for instance. - /// - /// There should be no need to override this. - fn to_root_bytes(&self) -> Vec { - let mut bytes = Vec::new(); - self.append_root_bytes(&mut bytes); - bytes - } } /// Used to signal whether a [`StorageAddress`] can be iterated, @@ -82,7 +68,7 @@ pub struct StaticStorageAddress { pallet_name: &'static str, entry_name: &'static str, // How to access the specific value at that storage address. - storage_entry_key: Vec, + storage_entry_keys: Vec, // Hash provided from static code for validation. validation_hash: Option<[u8; 32]>, _marker: std::marker::PhantomData<(ReturnTy, Fetchable, Defaultable, Iterable)>, @@ -98,13 +84,13 @@ where pub fn new( pallet_name: &'static str, entry_name: &'static str, - storage_entry_key: Vec, + storage_entry_keys: Vec, hash: [u8; 32], ) -> Self { Self { pallet_name, entry_name, - storage_entry_key, + storage_entry_keys, validation_hash: Some(hash), _marker: std::marker::PhantomData, } @@ -118,17 +104,20 @@ where } } - // A common trait methods implemented to avoid needingto import the trait: - /// Return bytes representing this storage entry. pub fn to_bytes(&self) -> Vec { - StorageAddress::to_bytes(self) + let mut bytes = Vec::new(); + super::utils::storage_address_root_bytes(self, &mut bytes); + for entry in &self.storage_entry_keys { + entry.to_bytes(&mut bytes); + } + bytes } /// Return bytes representing the root of this storage entry (ie a hash of /// the pallet and entry name). pub fn to_root_bytes(&self) -> Vec { - StorageAddress::to_root_bytes(self) + super::utils::storage_address_to_root_bytes(self) } } @@ -150,10 +139,15 @@ where self.entry_name } - fn append_entry_bytes(&self, bytes: &mut Vec) { - for entry in &self.storage_entry_key { + fn append_entry_bytes( + &self, + _metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error> { + for entry in &self.storage_entry_keys { entry.to_bytes(bytes); } + Ok(()) } fn validation_hash(&self) -> Option<[u8; 32]> { @@ -161,40 +155,114 @@ where } } -/// Storage key for a Map. -#[derive(Clone)] -pub struct StorageMapKey { - value: Vec, - hasher: StorageHasher, +/// This represents a dynamically generated storage address. +pub struct DynamicStorageAddress<'a, Encodable> { + pallet_name: Cow<'a, str>, + entry_name: Cow<'a, str>, + storage_entry_keys: Vec, } -impl StorageMapKey { - /// Create a new [`StorageMapKey`] with the encoded data and the hasher. - pub fn new(value: T, hasher: StorageHasher) -> Self { - Self { - value: value.encode(), - hasher, - } +/// Construct a new dynamic storage lookup. +pub fn dynamic<'a, Encodable: EncodeWithMetadata>( + pallet_name: impl Into>, + entry_name: impl Into>, + storage_entry_keys: Vec, +) -> DynamicStorageAddress<'a, Encodable> { + DynamicStorageAddress { + pallet_name: pallet_name.into(), + entry_name: entry_name.into(), + storage_entry_keys, } +} + +impl<'a, Encodable> StorageAddress for DynamicStorageAddress<'a, Encodable> +where + Encodable: EncodeWithMetadata, +{ + type Target = DecodedValue; + + // For dynamic types, we have no static guarantees about any of + // this stuff, so we just allow it and let it fail at runtime: + type IsFetchable = Yes; + type IsDefaultable = Yes; + type IsIterable = Yes; - /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. - pub fn to_bytes(&self, bytes: &mut Vec) { - match &self.hasher { - StorageHasher::Identity => bytes.extend(&self.value), - StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(bytes)), - StorageHasher::Blake2_128Concat => { - // adapted from substrate Blake2_128Concat::hash since StorageHasher is not public - let v = sp_core::blake2_128(&self.value); - let v = v.iter().chain(&self.value).cloned(); - bytes.extend(v); + fn pallet_name(&self) -> &str { + &self.pallet_name + } + + fn entry_name(&self) -> &str { + &self.entry_name + } + + fn append_entry_bytes( + &self, + metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error> { + let pallet = metadata.pallet(&self.pallet_name)?; + let storage = pallet.storage(&self.entry_name)?; + + match &storage.ty { + StorageEntryType::Plain(_) => { + if !self.storage_entry_keys.is_empty() { + Err(StorageAddressError::WrongNumberOfKeys { + expected: 0, + actual: self.storage_entry_keys.len(), + } + .into()) + } else { + Ok(()) + } } - StorageHasher::Blake2_256 => bytes.extend(sp_core::blake2_256(&self.value)), - StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(&self.value)), - StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(&self.value)), - StorageHasher::Twox64Concat => { - let v = sp_core::twox_64(&self.value); - let v = v.iter().chain(&self.value).cloned(); - bytes.extend(v); + StorageEntryType::Map { hashers, key, .. } => { + let ty = metadata + .resolve_type(key.id()) + .ok_or(StorageAddressError::TypeNotFound(key.id()))?; + let tuple = match ty.type_def() { + TypeDef::Tuple(t) => t, + _ => return Err(StorageAddressError::MapTypeMustbeComposite.into()), + }; + let fields = tuple.fields(); + + if fields.len() != self.storage_entry_keys.len() { + return Err(StorageAddressError::WrongNumberOfKeys { + expected: fields.len(), + actual: self.storage_entry_keys.len(), + } + .into()) + } + + if hashers.len() == 1 { + // One hasher; hash a tuple of all SCALE encoded bytes with the one hash function. + let mut input = Vec::new(); + for (key, field) in self.storage_entry_keys.iter().zip(tuple.fields()) + { + key.encode_with_metadata(field.id(), metadata, &mut input)?; + } + super::storage_map_key::hash_bytes(input, &hashers[0], bytes); + Ok(()) + } else if hashers.len() == fields.len() { + // A hasher per field; encode and hash each field independently. + for ((key, field), hasher) in self + .storage_entry_keys + .iter() + .zip(tuple.fields()) + .zip(hashers) + { + let mut input = Vec::new(); + key.encode_with_metadata(field.id(), metadata, &mut input)?; + super::storage_map_key::hash_bytes(input, hasher, bytes); + } + Ok(()) + } else { + // Mismatch; wrong number of hashers/fields. + Err(StorageAddressError::WrongNumberOfHashers { + hashers: hashers.len(), + fields: fields.len(), + } + .into()) + } } } } diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 8dc86d9a4f..1ba9468717 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -140,7 +140,8 @@ where // Look up the return type ID to enable DecodeWithMetadata: let metadata = client.client.metadata(); - let lookup_bytes = address.to_bytes(); + let lookup_bytes = + super::utils::storage_address_to_bytes(address, &metadata)?; if let Some(data) = client .client .storage() @@ -288,8 +289,8 @@ where )?; // The root pallet/entry bytes for this storage entry: - let mut address_root_bytes = Vec::new(); - address.append_root_bytes(&mut address_root_bytes); + let address_root_bytes = + super::utils::storage_address_to_root_bytes(&address); Ok(KeyIter { client, diff --git a/subxt/src/storage/storage_map_key.rs b/subxt/src/storage/storage_map_key.rs new file mode 100644 index 0000000000..9c1b9ac722 --- /dev/null +++ b/subxt/src/storage/storage_map_key.rs @@ -0,0 +1,53 @@ +// 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. + +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; + +/// Storage key for a Map. +#[derive(Clone)] +pub struct StorageMapKey { + value: Vec, + hasher: StorageHasher, +} + +impl StorageMapKey { + /// Create a new [`StorageMapKey`] by pre-encoding static data and pairing it with a hasher. + pub fn new( + value: Encodable, + hasher: StorageHasher, + ) -> StorageMapKey { + Self { + value: value.encode(), + hasher, + } + } + + /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. + pub fn to_bytes(&self, bytes: &mut Vec) { + hash_bytes(self.value.encode(), &self.hasher, bytes) + } +} + +/// Take some SCALE encoded bytes and a [`StorageHasher`] and hash the bytes accordingly. +pub(super) fn hash_bytes(input: Vec, hasher: &StorageHasher, bytes: &mut Vec) { + match hasher { + StorageHasher::Identity => bytes.extend(input), + StorageHasher::Blake2_128 => bytes.extend(sp_core::blake2_128(&input)), + StorageHasher::Blake2_128Concat => { + bytes.extend(sp_core::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::Twox64Concat => { + bytes.extend(sp_core::twox_64(&input)); + bytes.extend(input); + } + } +} diff --git a/subxt/src/storage/utils.rs b/subxt/src/storage/utils.rs new file mode 100644 index 0000000000..331d55217d --- /dev/null +++ b/subxt/src/storage/utils.rs @@ -0,0 +1,42 @@ +// 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. + +//! these utility methods complement the [`StorageAddress`] trait, but +//! aren't things that should ever be overridden, and so don't exist on +//! the trait itself. + +use super::StorageAddress; +use crate::{ + error::Error, + metadata::Metadata, +}; + +/// Return the root of a given [`StorageAddress`]: hash the pallet name and entry name +/// and append those bytes to the output. +pub fn 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())); +} + +/// Outputs the [`storage_address_root_bytes`] as well as any additional bytes that represent +/// a lookup in a storage map at that location. +pub fn storage_address_to_bytes( + addr: &Address, + metadata: &Metadata, +) -> Result, Error> { + let mut bytes = Vec::new(); + storage_address_root_bytes(addr, &mut bytes); + addr.append_entry_bytes(metadata, &mut bytes)?; + Ok(bytes) +} + +/// Outputs a vector containing the [`storage_address_root_bytes`] bytes. +pub fn storage_address_to_root_bytes(addr: &Address) -> Vec { + let mut bytes = Vec::new(); + storage_address_root_bytes(addr, &mut bytes); + bytes +} diff --git a/subxt/src/tx/mod.rs b/subxt/src/tx/mod.rs index 626733a9d3..95a60a8f98 100644 --- a/subxt/src/tx/mod.rs +++ b/subxt/src/tx/mod.rs @@ -46,6 +46,8 @@ pub use self::{ TxClient, }, tx_payload::{ + dynamic, + DynamicTxPayload, StaticTxPayload, TxPayload, }, diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index e26437337a..af73a88a25 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -6,10 +6,15 @@ //! transactions that can be submitted. use crate::{ - error::Error, + dynamic::Value, + error::{ + Error, + MetadataError, + }, metadata::Metadata, }; use codec::Encode; +use std::borrow::Cow; /// This represents a transaction payload that can be submitted /// to a node. @@ -96,3 +101,47 @@ impl TxPayload for StaticTxPayload { self.validation_hash } } + +/// This represents a dynamically generated transaction payload. +pub struct DynamicTxPayload<'a> { + pallet_name: Cow<'a, str>, + call_name: Cow<'a, str>, + fields: Vec>, +} + +/// Construct a new dynamic transaction payload to submit to a node. +pub fn dynamic<'a>( + pallet_name: impl Into>, + call_name: impl Into>, + fields: Vec>, +) -> DynamicTxPayload<'a> { + DynamicTxPayload { + pallet_name: pallet_name.into(), + call_name: call_name.into(), + fields, + } +} + +impl<'a> TxPayload for DynamicTxPayload<'a> { + fn pallet_name(&self) -> &str { + &self.pallet_name + } + + fn call_name(&self) -> &str { + &self.call_name + } + + fn encode_call_data( + &self, + metadata: &Metadata, + out: &mut Vec, + ) -> Result<(), Error> { + let pallet = metadata.pallet(&self.pallet_name)?; + let call_id = pallet.call_ty_id().ok_or(MetadataError::CallNotFound)?; + let call_value = + Value::unnamed_variant(self.call_name.to_owned(), self.fields.clone()); + + scale_value::scale::encode_as_type(call_value, call_id, metadata.types(), out)?; + Ok(()) + } +} From a2d400bac47c0dcd5284d11aef2bf60ecebecb4d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 20 Jul 2022 12:13:56 +0100 Subject: [PATCH 59/75] fix double encoding of storage map key after refactor --- subxt/src/storage/storage_address.rs | 4 ++-- subxt/src/storage/storage_map_key.rs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 0f57d91379..5fd068a3fc 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -240,7 +240,7 @@ where { key.encode_with_metadata(field.id(), metadata, &mut input)?; } - super::storage_map_key::hash_bytes(input, &hashers[0], bytes); + super::storage_map_key::hash_bytes(&input, &hashers[0], bytes); Ok(()) } else if hashers.len() == fields.len() { // A hasher per field; encode and hash each field independently. @@ -252,7 +252,7 @@ where { let mut input = Vec::new(); key.encode_with_metadata(field.id(), metadata, &mut input)?; - super::storage_map_key::hash_bytes(input, hasher, bytes); + super::storage_map_key::hash_bytes(&input, hasher, bytes); } Ok(()) } else { diff --git a/subxt/src/storage/storage_map_key.rs b/subxt/src/storage/storage_map_key.rs index 9c1b9ac722..bd5b96ec1e 100644 --- a/subxt/src/storage/storage_map_key.rs +++ b/subxt/src/storage/storage_map_key.rs @@ -29,24 +29,24 @@ impl StorageMapKey { /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. pub fn to_bytes(&self, bytes: &mut Vec) { - hash_bytes(self.value.encode(), &self.hasher, bytes) + hash_bytes(&self.value, &self.hasher, bytes) } } /// Take some SCALE encoded bytes and a [`StorageHasher`] and hash the bytes accordingly. -pub(super) fn hash_bytes(input: Vec, hasher: &StorageHasher, bytes: &mut Vec) { +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::blake2_128(input)), StorageHasher::Blake2_128Concat => { - bytes.extend(sp_core::blake2_128(&input)); + bytes.extend(sp_core::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::blake2_256(input)), + StorageHasher::Twox128 => bytes.extend(sp_core::twox_128(input)), + StorageHasher::Twox256 => bytes.extend(sp_core::twox_256(input)), StorageHasher::Twox64Concat => { - bytes.extend(sp_core::twox_64(&input)); + bytes.extend(sp_core::twox_64(input)); bytes.extend(input); } } From 644bd6e4ee9ce2f293c1dd4c6f0abb9f0c8276e5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 20 Jul 2022 12:25:12 +0100 Subject: [PATCH 60/75] clippy fix --- subxt/src/storage/storage_address.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 5fd068a3fc..c9116abacc 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -218,7 +218,7 @@ where StorageEntryType::Map { hashers, key, .. } => { let ty = metadata .resolve_type(key.id()) - .ok_or(StorageAddressError::TypeNotFound(key.id()))?; + .ok_or_else(|| StorageAddressError::TypeNotFound(key.id()))?; let tuple = match ty.type_def() { TypeDef::Tuple(t) => t, _ => return Err(StorageAddressError::MapTypeMustbeComposite.into()), From 1cfef3b55088cb5c2eaef0a4e4284bc2f298766d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 20 Jul 2022 14:27:43 +0100 Subject: [PATCH 61/75] Fixes and add a dynamic usage example (needs new scale_value release) --- examples/Cargo.toml | 1 + examples/examples/dynamic_queries.rs | 76 ++++++++++++++++++++++ subxt/src/dynamic.rs | 2 + subxt/src/error.rs | 2 +- subxt/src/events/events_type.rs | 2 +- subxt/src/metadata/encode_with_metadata.rs | 2 +- subxt/src/storage/mod.rs | 2 + subxt/src/storage/storage_address.rs | 49 ++++++++++---- subxt/src/tx/tx_payload.rs | 3 +- 9 files changed, 121 insertions(+), 18 deletions(-) create mode 100644 examples/examples/dynamic_queries.rs diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 36934d30cc..7f5ab9d08c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -19,3 +19,4 @@ 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" + diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs new file mode 100644 index 0000000000..5cc5da7a96 --- /dev/null +++ b/examples/examples/dynamic_queries.rs @@ -0,0 +1,76 @@ +// 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. + +//! To run this example, a local polkadot node should be running. Example verified against polkadot polkadot 0.9.25-5174e9ae75b. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.25/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + +// This example showcases working with dynamic values rather than those that are generated via the subxt proc macro. + +use sp_keyring::AccountKeyring; +use subxt::{ + tx::PairSigner, + OnlineClient, + PolkadotConfig, + dynamic::Value, +}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + + let api = OnlineClient::::new().await?; + + + // 1. Dynamic Balance Transfer (the dynamic equivalent to the balance_transfer example). + + let signer = PairSigner::new(AccountKeyring::Alice.pair()); + let dest = AccountKeyring::Bob.to_account_id(); + + // Create a transaction to submit: + let tx = subxt::dynamic::tx("Balances", "transfer", vec![ + // A value representing a MultiAddress. We want the "Id" variant, and that + // will ultimately contain the bytes for our destination address (there is a new type wrapping + // the address, but our encoding will happily ignore such things and do it's best to line up what + // we provide with what it needs). + Value::unnamed_variant("Id", vec![ Value::from_bytes(&dest) ]), + // A value representing the amount we'd like to transfer. + Value::uint(123_456_789_012_345u128), + ]); + + // submit the transaction with default params: + let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; + println!("Balance transfer extrinsic submitted: {}", hash); + + + // 2. Dynamic constant access (the dynamic equivalent to the fetch_constants example). + + let constant_address = subxt::dynamic::constant("Balances", "ExistentialDeposit"); + let existential_deposit = api.constants().at(&constant_address)?; + println!("Existential Deposit: {}", existential_deposit); + + + // 3. Dynamic storage access + + let storage_address = subxt::dynamic::storage("System", "Account", vec![ + // Something that encodes to an AccountId32 is what we need for the map key here: + Value::from_bytes(&dest) + ]); + let account = api.storage().fetch_or_default(&storage_address, None).await?; + println!("Bob's account details: {account}"); + + + // 4. Dynamic storage iteration (the dynamic equivalent to the fetch_all_accounts example). + + let storage_address = subxt::dynamic::storage_root("System", "Account"); + let mut iter = api.storage().iter(storage_address, 10, None).await?; + while let Some((key, account)) = iter.next().await? { + println!("{}: {}", hex::encode(key), account); + } + + Ok(()) +} \ No newline at end of file diff --git a/subxt/src/dynamic.rs b/subxt/src/dynamic.rs index e8017b174e..bebbd6907a 100644 --- a/subxt/src/dynamic.rs +++ b/subxt/src/dynamic.rs @@ -21,3 +21,5 @@ pub use crate::constants::dynamic as constant; // Lookup storage values dynamically. pub use crate::storage::dynamic as storage; +pub use crate::storage::dynamic_root as storage_root; + diff --git a/subxt/src/error.rs b/subxt/src/error.rs index f94e845449..fa735b4d25 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -164,7 +164,7 @@ impl ModuleErrorData { pub enum StorageAddressError { /// Storage map type must be a composite type. #[error("Storage map type must be a composite type")] - MapTypeMustbeComposite, + MapTypeMustBeTuple, /// Storage lookup does not have the expected number of keys. #[error("Storage lookup requires {expected} keys but got {actual} keys")] WrongNumberOfKeys { diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 5a3bc7d4c5..f8986ea955 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -443,7 +443,7 @@ mod tests { let mut actual_bytes = vec![]; for field in &actual.fields { scale_value::scale::encode_as_type( - field.clone(), + field, field.context, types, &mut actual_bytes, diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs index 26a789e74a..387c20fd00 100644 --- a/subxt/src/metadata/encode_with_metadata.rs +++ b/subxt/src/metadata/encode_with_metadata.rs @@ -27,7 +27,7 @@ impl EncodeWithMetadata for Value<()> { metadata: &Metadata, bytes: &mut Vec, ) -> Result<(), Error> { - scale_value::scale::encode_as_type(self.clone(), type_id, metadata.types(), bytes) + scale_value::scale::encode_as_type(self, type_id, metadata.types(), bytes) .map_err(|e| e.into()) } } diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index a9150d0e75..61b400fad7 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -24,6 +24,7 @@ pub mod address { pub use super::{ storage_address::{ dynamic, + dynamic_root, DynamicStorageAddress, StaticStorageAddress, StorageAddress, @@ -40,6 +41,7 @@ pub mod address { // the basic address stuff at the root of the module. pub use storage_address::{ dynamic, + dynamic_root, DynamicStorageAddress, StaticStorageAddress, StorageAddress, diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index c9116abacc..26991911de 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -4,7 +4,10 @@ use super::storage_map_key::StorageMapKey; use crate::{ - dynamic::DecodedValue, + dynamic::{ + Value, + DecodedValue, + }, error::{ Error, StorageAddressError, @@ -162,6 +165,18 @@ pub struct DynamicStorageAddress<'a, Encodable> { storage_entry_keys: Vec, } +/// Construct a new dynamic storage lookup to the root of some entry. +pub fn dynamic_root<'a>( + pallet_name: impl Into>, + entry_name: impl Into>, +) -> DynamicStorageAddress<'a, Value> { + DynamicStorageAddress { + pallet_name: pallet_name.into(), + entry_name: entry_name.into(), + storage_entry_keys: vec![], + } +} + /// Construct a new dynamic storage lookup. pub fn dynamic<'a, Encodable: EncodeWithMetadata>( pallet_name: impl Into>, @@ -219,15 +234,21 @@ where let ty = metadata .resolve_type(key.id()) .ok_or_else(|| StorageAddressError::TypeNotFound(key.id()))?; - let tuple = match ty.type_def() { - TypeDef::Tuple(t) => t, - _ => return Err(StorageAddressError::MapTypeMustbeComposite.into()), + + // If the key is a tuple, we encode each value to the corresponding tuple type. + // If the key is not a tuple, encode a single value to the key type. + let type_ids = match ty.type_def() { + TypeDef::Tuple(tuple) => { + tuple.fields().iter().map(|f| f.id()).collect() + }, + _other => { + vec![key.id()] + }, }; - let fields = tuple.fields(); - if fields.len() != self.storage_entry_keys.len() { + if type_ids.len() != self.storage_entry_keys.len() { return Err(StorageAddressError::WrongNumberOfKeys { - expected: fields.len(), + expected: type_ids.len(), actual: self.storage_entry_keys.len(), } .into()) @@ -236,22 +257,22 @@ where if hashers.len() == 1 { // One hasher; hash a tuple of all SCALE encoded bytes with the one hash function. let mut input = Vec::new(); - for (key, field) in self.storage_entry_keys.iter().zip(tuple.fields()) + for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) { - key.encode_with_metadata(field.id(), metadata, &mut input)?; + key.encode_with_metadata(type_id, metadata, &mut input)?; } super::storage_map_key::hash_bytes(&input, &hashers[0], bytes); Ok(()) - } else if hashers.len() == fields.len() { + } else if hashers.len() == type_ids.len() { // A hasher per field; encode and hash each field independently. - for ((key, field), hasher) in self + for ((key, type_id), hasher) in self .storage_entry_keys .iter() - .zip(tuple.fields()) + .zip(type_ids) .zip(hashers) { let mut input = Vec::new(); - key.encode_with_metadata(field.id(), metadata, &mut input)?; + key.encode_with_metadata(type_id, metadata, &mut input)?; super::storage_map_key::hash_bytes(&input, hasher, bytes); } Ok(()) @@ -259,7 +280,7 @@ where // Mismatch; wrong number of hashers/fields. Err(StorageAddressError::WrongNumberOfHashers { hashers: hashers.len(), - fields: fields.len(), + fields: type_ids.len(), } .into()) } diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index af73a88a25..d1928d0dcc 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -141,7 +141,8 @@ impl<'a> TxPayload for DynamicTxPayload<'a> { let call_value = Value::unnamed_variant(self.call_name.to_owned(), self.fields.clone()); - scale_value::scale::encode_as_type(call_value, call_id, metadata.types(), out)?; + pallet.index().encode_to(out); + scale_value::scale::encode_as_type(&call_value, call_id, metadata.types(), out)?; Ok(()) } } From 12e483c6f6953f385fbbc5837278b73fb5113cc6 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 20 Jul 2022 16:14:54 +0100 Subject: [PATCH 62/75] bump scale_value version --- subxt/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 7264d691bf..946e02499e 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -22,7 +22,7 @@ integration-tests = [] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } 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"] } -scale-value = "0.2.0" +scale-value = "0.3.0" futures = "0.3.13" hex = "0.4.3" jsonrpsee = { version = "0.14.0", features = ["async-client", "client-ws-transport"] } From 3e62bce7e9b5b9caa300227515b6f3fb2cf3677e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 20 Jul 2022 16:17:40 +0100 Subject: [PATCH 63/75] cargo fmt --- examples/examples/dynamic_queries.rs | 48 ++++++++++++++++------------ subxt/src/dynamic.rs | 7 ++-- subxt/src/storage/storage_address.rs | 16 ++++------ 3 files changed, 37 insertions(+), 34 deletions(-) diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs index 5cc5da7a96..cff5849bd5 100644 --- a/examples/examples/dynamic_queries.rs +++ b/examples/examples/dynamic_queries.rs @@ -14,56 +14,62 @@ use sp_keyring::AccountKeyring; use subxt::{ + dynamic::Value, tx::PairSigner, OnlineClient, PolkadotConfig, - dynamic::Value, }; #[tokio::main] async fn main() -> Result<(), Box> { - let api = OnlineClient::::new().await?; - // 1. Dynamic Balance Transfer (the dynamic equivalent to the balance_transfer example). let signer = PairSigner::new(AccountKeyring::Alice.pair()); let dest = AccountKeyring::Bob.to_account_id(); // Create a transaction to submit: - let tx = subxt::dynamic::tx("Balances", "transfer", vec![ - // A value representing a MultiAddress. We want the "Id" variant, and that - // will ultimately contain the bytes for our destination address (there is a new type wrapping - // the address, but our encoding will happily ignore such things and do it's best to line up what - // we provide with what it needs). - Value::unnamed_variant("Id", vec![ Value::from_bytes(&dest) ]), - // A value representing the amount we'd like to transfer. - Value::uint(123_456_789_012_345u128), - ]); + let tx = subxt::dynamic::tx( + "Balances", + "transfer", + vec![ + // A value representing a MultiAddress. We want the "Id" variant, and that + // will ultimately contain the bytes for our destination address (there is a new type wrapping + // the address, but our encoding will happily ignore such things and do it's best to line up what + // we provide with what it needs). + Value::unnamed_variant("Id", vec![Value::from_bytes(&dest)]), + // A value representing the amount we'd like to transfer. + Value::uint(123_456_789_012_345u128), + ], + ); // submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; println!("Balance transfer extrinsic submitted: {}", hash); - // 2. Dynamic constant access (the dynamic equivalent to the fetch_constants example). let constant_address = subxt::dynamic::constant("Balances", "ExistentialDeposit"); let existential_deposit = api.constants().at(&constant_address)?; println!("Existential Deposit: {}", existential_deposit); - // 3. Dynamic storage access - let storage_address = subxt::dynamic::storage("System", "Account", vec![ - // Something that encodes to an AccountId32 is what we need for the map key here: - Value::from_bytes(&dest) - ]); - let account = api.storage().fetch_or_default(&storage_address, None).await?; + let storage_address = subxt::dynamic::storage( + "System", + "Account", + vec![ + // Something that encodes to an AccountId32 is what we need for the map key here: + Value::from_bytes(&dest), + ], + ); + let account = api + .storage() + .fetch_or_default(&storage_address, None) + .await?; println!("Bob's account details: {account}"); - // 4. Dynamic storage iteration (the dynamic equivalent to the fetch_all_accounts example). let storage_address = subxt::dynamic::storage_root("System", "Account"); @@ -73,4 +79,4 @@ async fn main() -> Result<(), Box> { } Ok(()) -} \ No newline at end of file +} diff --git a/subxt/src/dynamic.rs b/subxt/src/dynamic.rs index bebbd6907a..29dd3dc262 100644 --- a/subxt/src/dynamic.rs +++ b/subxt/src/dynamic.rs @@ -20,6 +20,7 @@ pub use crate::tx::dynamic as tx; pub use crate::constants::dynamic as constant; // Lookup storage values dynamically. -pub use crate::storage::dynamic as storage; -pub use crate::storage::dynamic_root as storage_root; - +pub use crate::storage::{ + dynamic as storage, + dynamic_root as storage_root, +}; diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 26991911de..ff9070c2e8 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -5,8 +5,8 @@ use super::storage_map_key::StorageMapKey; use crate::{ dynamic::{ - Value, DecodedValue, + Value, }, error::{ Error, @@ -240,10 +240,10 @@ where let type_ids = match ty.type_def() { TypeDef::Tuple(tuple) => { tuple.fields().iter().map(|f| f.id()).collect() - }, + } _other => { vec![key.id()] - }, + } }; if type_ids.len() != self.storage_entry_keys.len() { @@ -257,19 +257,15 @@ where if hashers.len() == 1 { // One hasher; hash a tuple of all SCALE encoded bytes with the one hash function. let mut input = Vec::new(); - for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) - { + for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) { key.encode_with_metadata(type_id, metadata, &mut input)?; } super::storage_map_key::hash_bytes(&input, &hashers[0], bytes); Ok(()) } else if hashers.len() == type_ids.len() { // A hasher per field; encode and hash each field independently. - for ((key, type_id), hasher) in self - .storage_entry_keys - .iter() - .zip(type_ids) - .zip(hashers) + for ((key, type_id), hasher) in + self.storage_entry_keys.iter().zip(type_ids).zip(hashers) { let mut input = Vec::new(); key.encode_with_metadata(type_id, metadata, &mut input)?; From 09520b62f3405ba91c458cca1dc8db0c05ee474f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 21 Jul 2022 12:10:25 +0100 Subject: [PATCH 64/75] Tweak event bits --- subxt/src/events/events_type.rs | 81 +++++++++++++++++++++++------ subxt/src/metadata/metadata_type.rs | 25 ++++++--- 2 files changed, 82 insertions(+), 24 deletions(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index f8986ea955..276a0395dd 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -141,8 +141,7 @@ impl Events { } } -/// The raw bytes for an event with associated details about -/// where and when it was emitted. +/// The event details. #[derive(Debug, Clone, PartialEq)] pub struct EventDetails { phase: Phase, @@ -150,10 +149,41 @@ pub struct EventDetails { pallet: String, variant: String, bytes: Vec, - fields: Vec, + // Dev note: this is here because we've pretty much had to generate it + // anyway, but expect it to be generated on the fly in future versions, + // and so don't expose it. + fields: Vec<(Option, DecodedValue)>, +} + +/// The raw data associated with some event. +#[derive(Debug, Clone, PartialEq)] +pub struct EventDetailParts { + /// When was the event produced? + pub phase: Phase, + /// What index is this event in the stored events for this block. + pub index: u32, + /// The name of the pallet from whence the Event originated. + pub pallet: String, + /// The name of the pallet's Event variant. + pub variant: String, + /// All of the bytes representing this event, including the pallet + /// and variant index that the event originated from. + pub bytes: Vec, } impl EventDetails { + /// Return the raw data associated with this event. Useful if you want + /// ownership over parts of the event data. + pub fn parts(self) -> EventDetailParts { + EventDetailParts { + phase: self.phase, + index: self.index, + pallet: self.pallet, + variant: self.variant, + bytes: self.bytes + } + } + /// When was the event produced? pub fn phase(&self) -> Phase { self.phase @@ -195,15 +225,32 @@ impl EventDetails { &self.bytes[2..] } - /// Decode and provide the event fields back in the form of a - /// list of [`DecodedValue`]s. + /// Decode and provide the event fields back in the form of a composite + /// type, which represents either the named or unnamed fields that were + /// present. + // // Dev note: if we can optimise Value decoding to avoid allocating // while working through events, or if the event structure changes // to allow us to skip over them, we'll no longer keep a copy of the // decoded events in the event, and the actual decoding will happen - // when this method is called. - pub fn field_values(&self) -> Vec { - self.fields.clone() + // when this method is called. This is why we return an owned vec and + // not a reference. + pub fn field_values(&self) -> scale_value::Composite { + if self.fields.is_empty() { + scale_value::Composite::Unnamed(vec![]) + } else if self.fields[0].0.is_some() { + let named = self.fields + .iter() + .map(|(n,f)| (n.clone().unwrap_or(String::new()), f.clone())) + .collect(); + scale_value::Composite::Named(named) + } else { + let unnamed = self.fields + .iter() + .map(|(_n, f)| f.clone()) + .collect(); + scale_value::Composite::Unnamed(unnamed) + } } /// Attempt to decode these [`EventDetails`] into a specific static event. @@ -257,16 +304,18 @@ fn decode_raw_event_details( // like, we can decode them quite easily into a top level event type. let mut event_bytes = vec![pallet_index, variant_index]; let mut event_fields = Vec::new(); - for arg in event_metadata.variant().fields() { - let type_id = arg.ty().id(); + for (name, type_id) in event_metadata.fields() { let all_bytes = *input; // consume some bytes for each event field, moving the cursor forward: let value = scale_value::scale::decode_as_type( input, - type_id, + *type_id, &metadata.runtime_metadata().types, )?; - event_fields.push(value); + event_fields.push(( + name.clone(), + value + )); // count how many bytes were consumed based on remaining length: let consumed_len = all_bytes.len() - input.len(); // move those consumed bytes to the output vec unaltered: @@ -441,7 +490,7 @@ mod tests { // Make sure that the bytes handed back line up with the fields handed back; // encode the fields back into bytes and they should be equal. let mut actual_bytes = vec![]; - for field in &actual.fields { + for (_name, field) in &actual.fields { scale_value::scale::encode_as_type( field, field.context, @@ -450,12 +499,12 @@ mod tests { ) .expect("should be able to encode properly"); } - assert_eq!(actual_bytes, actual.bytes); + assert_eq!(actual_bytes, actual.field_bytes()); let actual_fields_no_context: Vec<_> = actual .field_values() - .into_iter() - .map(|f| f.remove_context()) + .into_values() + .map(|value| value.remove_context()) .collect(); // Check each of the other fields: diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 1f80d5ebca..b9b675b30e 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -17,7 +17,6 @@ use scale_info::{ form::PortableForm, PortableRegistry, Type, - Variant, }; use std::{ collections::HashMap, @@ -296,7 +295,9 @@ impl PalletMetadata { #[derive(Clone, Debug)] pub struct EventMetadata { pallet: Arc, - variant: Variant, + event: String, + fields: Vec<(Option, u32)>, + docs: Vec } impl EventMetadata { @@ -307,12 +308,17 @@ impl EventMetadata { /// Get the name of the pallet event which was emitted. pub fn event(&self) -> &str { - self.variant.name() + &self.event } - /// Get the type def variant for the pallet event. - pub fn variant(&self) -> &Variant { - &self.variant + /// The names and types of each field in the event. + pub fn fields(&self) -> &[(Option, u32)] { + &self.fields + } + + /// Documentation for this event. + pub fn docs(&self) -> &[String] { + &self.docs } } @@ -430,13 +436,16 @@ impl TryFrom for Metadata { for pallet in &metadata.pallets { if let Some(event) = &pallet.event { let pallet_name: Arc = pallet.name.to_string().into(); - let event_variant = get_type_def_variant(event.ty.id())?; + let event_type_id = event.ty.id(); + let event_variant = get_type_def_variant(event_type_id)?; for variant in event_variant.variants() { events.insert( (pallet.index, variant.index()), EventMetadata { pallet: pallet_name.clone(), - variant: variant.clone(), + event: variant.name().to_owned(), + fields: variant.fields().iter().map(|f| (f.name().map(|n| n.to_owned()), f.ty().id())).collect(), + docs: variant.docs().to_vec(), }, ); } From 98af08aa703f53f3b7fac1ed57722b9d355ee252 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 21 Jul 2022 14:20:42 +0100 Subject: [PATCH 65/75] cargo fmt --- subxt/src/events/events_type.rs | 18 ++++++------------ subxt/src/metadata/metadata_type.rs | 8 ++++++-- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 276a0395dd..664354590f 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -180,7 +180,7 @@ impl EventDetails { index: self.index, pallet: self.pallet, variant: self.variant, - bytes: self.bytes + bytes: self.bytes, } } @@ -228,7 +228,6 @@ impl EventDetails { /// Decode and provide the event fields back in the form of a composite /// type, which represents either the named or unnamed fields that were /// present. - // // Dev note: if we can optimise Value decoding to avoid allocating // while working through events, or if the event structure changes // to allow us to skip over them, we'll no longer keep a copy of the @@ -239,16 +238,14 @@ impl EventDetails { if self.fields.is_empty() { scale_value::Composite::Unnamed(vec![]) } else if self.fields[0].0.is_some() { - let named = self.fields + let named = self + .fields .iter() - .map(|(n,f)| (n.clone().unwrap_or(String::new()), f.clone())) + .map(|(n, f)| (n.clone().unwrap_or_default(), f.clone())) .collect(); scale_value::Composite::Named(named) } else { - let unnamed = self.fields - .iter() - .map(|(_n, f)| f.clone()) - .collect(); + let unnamed = self.fields.iter().map(|(_n, f)| f.clone()).collect(); scale_value::Composite::Unnamed(unnamed) } } @@ -312,10 +309,7 @@ fn decode_raw_event_details( *type_id, &metadata.runtime_metadata().types, )?; - event_fields.push(( - name.clone(), - value - )); + event_fields.push((name.clone(), value)); // count how many bytes were consumed based on remaining length: let consumed_len = all_bytes.len() - input.len(); // move those consumed bytes to the output vec unaltered: diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index b9b675b30e..69b593993b 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -297,7 +297,7 @@ pub struct EventMetadata { pallet: Arc, event: String, fields: Vec<(Option, u32)>, - docs: Vec + docs: Vec, } impl EventMetadata { @@ -444,7 +444,11 @@ impl TryFrom for Metadata { EventMetadata { pallet: pallet_name.clone(), event: variant.name().to_owned(), - fields: variant.fields().iter().map(|f| (f.name().map(|n| n.to_owned()), f.ty().id())).collect(), + fields: variant + .fields() + .iter() + .map(|f| (f.name().map(|n| n.to_owned()), f.ty().id())) + .collect(), docs: variant.docs().to_vec(), }, ); From 623911d5c559cec33af1750bffd772eab494417f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 22 Jul 2022 15:48:53 +0100 Subject: [PATCH 66/75] Add a test and bump scale-value to 0.4.0 to support this --- examples/examples/dynamic_queries.rs | 2 +- subxt/Cargo.toml | 2 +- subxt/src/events/events_type.rs | 12 +-- .../integration-tests/src/frame/balances.rs | 91 +++++++++++++++++++ 4 files changed, 99 insertions(+), 8 deletions(-) diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs index cff5849bd5..799a3ece86 100644 --- a/examples/examples/dynamic_queries.rs +++ b/examples/examples/dynamic_queries.rs @@ -40,7 +40,7 @@ async fn main() -> Result<(), Box> { // we provide with what it needs). Value::unnamed_variant("Id", vec![Value::from_bytes(&dest)]), // A value representing the amount we'd like to transfer. - Value::uint(123_456_789_012_345u128), + Value::u128(123_456_789_012_345), ], ); diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 946e02499e..f56b67e12a 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -22,7 +22,7 @@ integration-tests = [] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } 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"] } -scale-value = "0.3.0" +scale-value = "0.4.0" futures = "0.3.13" hex = "0.4.3" jsonrpsee = { version = "0.14.0", features = ["async-client", "client-ws-transport"] } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 664354590f..fee67439e5 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -541,7 +541,7 @@ mod tests { variant: "A".to_string(), variant_index: 0, fields: vec![ - Value::uint(1u8), + Value::u128(1), Value::bool(true), Value::unnamed_composite(vec![Value::string("Hi")]), ], @@ -588,7 +588,7 @@ mod tests { pallet_index: 0, variant: "A".to_string(), variant_index: 0, - fields: vec![Value::uint(1u8)], + fields: vec![Value::u128(1)], }, ); assert_raw_events_match( @@ -614,7 +614,7 @@ mod tests { pallet_index: 0, variant: "A".to_string(), variant_index: 0, - fields: vec![Value::uint(234u8)], + fields: vec![Value::u128(234)], }, ); assert!(event_details.next().is_none()); @@ -659,7 +659,7 @@ mod tests { pallet_index: 0, variant: "A".to_string(), variant_index: 0, - fields: vec![Value::uint(1u8)], + fields: vec![Value::u128(1)], }, ); assert_raw_events_match( @@ -712,7 +712,7 @@ mod tests { pallet_index: 0, variant: "A".to_string(), variant_index: 0, - fields: vec![Value::uint(1u8)], + fields: vec![Value::u128(1)], }, ); assert!(event_details.next().is_none()); @@ -753,7 +753,7 @@ mod tests { pallet_index: 0, variant: "A".to_string(), variant_index: 0, - fields: vec![Value::unnamed_composite(vec![Value::uint(1u8)])], + fields: vec![Value::unnamed_composite(vec![Value::u128(1)])], }, ); assert!(event_details.next().is_none()); diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index f79e6603a9..b0dd8d700b 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -85,6 +85,97 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { Ok(()) } +#[tokio::test] +async fn tx_dynamic_transfer() -> Result<(), subxt::Error> { + use subxt::ext::scale_value::{ + At, + Composite, + Value, + }; + + let alice = pair_signer(AccountKeyring::Alice.pair()); + let bob = pair_signer(AccountKeyring::Bob.pair()); + let ctx = test_context().await; + let api = ctx.client(); + + let alice_account_addr = subxt::dynamic::storage( + "System", + "Account", + vec![Value::from_bytes(&alice.account_id())], + ); + let bob_account_addr = subxt::dynamic::storage( + "System", + "Account", + vec![Value::from_bytes(&bob.account_id())], + ); + + let alice_pre = api + .storage() + .fetch_or_default(&alice_account_addr, None) + .await?; + let bob_pre = api + .storage() + .fetch_or_default(&bob_account_addr, None) + .await?; + + let tx = subxt::dynamic::tx( + "Balances", + "transfer", + vec![ + Value::unnamed_variant("Id", vec![Value::from_bytes(&bob.account_id())]), + Value::u128(10_000u128), + ], + ); + + let events = api + .tx() + .sign_and_submit_then_watch_default(&tx, &alice) + .await? + .wait_for_finalized_success() + .await?; + + let event_fields = events + .iter() + .filter_map(|ev| ev.ok()) + .find(|ev| ev.pallet_name() == "Balances" && ev.variant_name() == "Transfer") + .expect("Failed to find Transfer event") + .field_values() + .map_context(|_| ()); + + let expected_fields = Composite::Named(vec![ + ( + "from".into(), + Value::unnamed_composite(vec![Value::from_bytes(&alice.account_id())]), + ), + ( + "to".into(), + Value::unnamed_composite(vec![Value::from_bytes(&bob.account_id())]), + ), + ("amount".into(), Value::u128(10_000)), + ]); + assert_eq!(event_fields, expected_fields); + + let alice_post = api + .storage() + .fetch_or_default(&alice_account_addr, None) + .await?; + let bob_post = api + .storage() + .fetch_or_default(&bob_account_addr, None) + .await?; + + let alice_pre_free = alice_pre.at("data").at("free").unwrap().as_u128().unwrap(); + let alice_post_free = alice_post.at("data").at("free").unwrap().as_u128().unwrap(); + + let bob_pre_free = bob_pre.at("data").at("free").unwrap().as_u128().unwrap(); + let bob_post_free = bob_post.at("data").at("free").unwrap().as_u128().unwrap(); + + assert!(alice_pre_free - 10_000 >= alice_post_free); + assert_eq!(bob_pre_free + 10_000, bob_post_free); + + Ok(()) +} + #[tokio::test] async fn multiple_transfers_work_nonce_incremented() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); From b3287c8b57315c0f227e64b564617a41a484c10b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 22 Jul 2022 15:51:20 +0100 Subject: [PATCH 67/75] remove unnecessary vec from dynamic example --- examples/examples/dynamic_queries.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs index 799a3ece86..45392135b6 100644 --- a/examples/examples/dynamic_queries.rs +++ b/examples/examples/dynamic_queries.rs @@ -38,7 +38,7 @@ async fn main() -> Result<(), Box> { // will ultimately contain the bytes for our destination address (there is a new type wrapping // the address, but our encoding will happily ignore such things and do it's best to line up what // we provide with what it needs). - Value::unnamed_variant("Id", vec![Value::from_bytes(&dest)]), + Value::unnamed_variant("Id", [Value::from_bytes(&dest)]), // A value representing the amount we'd like to transfer. Value::u128(123_456_789_012_345), ], From b6b8f9d72f711a3d10be62cbed9293107e00450e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 27 Jul 2022 10:47:02 +0100 Subject: [PATCH 68/75] Various typo/grammar fixes Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> --- examples/examples/balance_transfer.rs | 2 +- subxt/src/client/online_client.rs | 2 +- subxt/src/lib.rs | 14 +++++++------- subxt/src/metadata/metadata_type.rs | 2 +- subxt/src/tx/tx_client.rs | 4 ++-- .../integration-tests/src/utils/wait_for_blocks.rs | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index 7f76c24d79..c58361cc95 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -35,7 +35,7 @@ async fn main() -> Result<(), Box> { .balances() .transfer(dest, 123_456_789_012_345); - // submit the transaction with default params: + // Submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; println!("Balance transfer extrinsic submitted: {}", hash); diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index feb839eb39..965b179bfa 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -32,7 +32,7 @@ pub trait OnlineClientT: OfflineClientT { fn rpc(&self) -> &Rpc; } -/// A client capable of perfomring offline or online operations. +/// A client capable of performing offline or online operations. #[derive(Derivative)] #[derivative(Clone(bound = ""))] pub struct OnlineClient { diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index d8b58b7d19..53b0a78c08 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -15,7 +15,7 @@ //! To interact with a node, you'll need to construct a client. //! //! ```no_run -//! use subxt::{ OnlineClient, PolkadotConfig }; +//! use subxt::{OnlineClient, PolkadotConfig}; //! //! # #[tokio::main] //! # async fn main() { @@ -24,13 +24,13 @@ //! ``` //! //! This default client connects to a locally running node, but can be configured to point anywhere. -//! additionally, an [`crate::OfflineClient`] is available to perform operations that don't require a +//! Additionally, an [`crate::OfflineClient`] is available to perform operations that don't require a //! network connection to a node. //! //! The client takes a type parameter, here [`crate::PolkadotConfig`], which bakes in assumptions about //! the structure of extrinsics and the underlying types used by the node for things like block numbers. -//! If the node you'd lik to interact with deviates from Polkadot or the default Substrate node in these -//! areas, you'll need to configur thie by implementing the [`crate::config::Config`] type yourself. +//! If the node you'd like to interact with deviates from Polkadot or the default Substrate node in these +//! areas, you'll need to configure them by implementing the [`crate::config::Config`] type yourself. //! //! # Generating runtime types //! @@ -66,13 +66,13 @@ //! If you use types generated by the [`crate::subxt`] macro, there is a chance that they will fall out of sync //! with the actual state of the node you're trying to interact with. //! -//! When you attempt to use any ofthese static types to interact with a node, Subxt will validate that they are +//! When you attempt to use any of these static types to interact with a node, Subxt will validate that they are //! still compatible and issue an error if they have deviated. //! -//! Accitionally, you can validate that the entirety of the statically generated code aligns with a node like so: +//! Additionally, you can validate that the entirety of the statically generated code aligns with a node like so: //! //! ```no_run -//! use subxt::{ OnlineClient, PolkadotConfig }; +//! use subxt::{OnlineClient, PolkadotConfig}; //! //! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] //! pub mod polkadot {} diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 69b593993b..6deb441612 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -322,7 +322,7 @@ impl EventMetadata { } } -/// Details abotu a specific runtime error. +/// Details about a specific runtime error. #[derive(Clone, Debug)] pub struct ErrorMetadata { pallet: Arc, diff --git a/subxt/src/tx/tx_client.rs b/subxt/src/tx/tx_client.rs index 0f98675322..1c281c39e6 100644 --- a/subxt/src/tx/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -79,7 +79,7 @@ impl> TxClient { Ok(bytes) } - /// Creates a returns a raw signed extrinsic, without submitting it. + /// Creates a raw signed extrinsic, without submitting it. pub async fn create_signed_with_nonce( &self, call: &Call, @@ -169,7 +169,7 @@ impl> TxClient { } impl> TxClient { - /// Creates a returns a raw signed extrinsic, without submitting it. + /// Creates a raw signed extrinsic, without submitting it. pub async fn create_signed( &self, call: &Call, diff --git a/testing/integration-tests/src/utils/wait_for_blocks.rs b/testing/integration-tests/src/utils/wait_for_blocks.rs index 8157db4471..0d190ec8ec 100644 --- a/testing/integration-tests/src/utils/wait_for_blocks.rs +++ b/testing/integration-tests/src/utils/wait_for_blocks.rs @@ -7,8 +7,8 @@ use subxt::{ Config, }; -/// Wait for blocks to be produced before running tests. waiting for two blocks -/// (the genesis block aond one actual one?) seems to be enough to allow tests +/// Wait for blocks to be produced before running tests. Waiting for two blocks +/// (the genesis block and another one) seems to be enough to allow tests /// like `dry_run_passes` to work properly. pub async fn wait_for_blocks(api: &impl OnlineClientT) { let mut sub = api.rpc().subscribe_blocks().await.unwrap(); From ddcaf7555bf666032f32af4e42ab28c9035e5753 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 27 Jul 2022 12:09:23 +0100 Subject: [PATCH 69/75] Address PR nits --- subxt/src/events/event_subscription.rs | 4 ++-- subxt/src/events/events_client.rs | 20 +++++++++++++++++-- subxt/src/events/events_type.rs | 4 ++++ subxt/src/tx/tx_progress.rs | 7 ++----- .../integration-tests/src/utils/context.rs | 1 - 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 48a5967fa7..809cf7707c 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -163,8 +163,8 @@ where Some(Ok(block_header)) => { // Note [jsdw]: We may be able to get rid of the per-item allocation // with https://github.com/oblique/reusable-box-future. - let at = - EventsClient::new(self.client.clone()).at(block_header.hash()); + let at = EventsClient::new(self.client.clone()) + .at(Some(block_header.hash())); self.at = Some(Box::pin(at)); // Continue, so that we poll this function future we've just created. } diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index e25d537391..27afcc5fd5 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -53,7 +53,7 @@ where /// Obtain events at some block hash. pub fn at( &self, - block_hash: T::Hash, + block_hash: Option, ) -> impl Future, Error>> + Send + 'static { // Clone and pass the client in like this so that we can explicitly // return a Future that's Send + 'static, rather than tied to &self. @@ -119,11 +119,27 @@ where } } -async fn at(client: Client, block_hash: T::Hash) -> Result, Error> +async fn at( + client: Client, + block_hash: Option, +) -> Result, Error> where T: Config, Client: OnlineClientT, { + // If block hash is not provided, get the hash + // for the latest block and use that. + let block_hash = match block_hash { + Some(hash) => hash, + None => { + client + .rpc() + .block_hash(None) + .await? + .expect("didn't pass a block number; qed") + } + }; + let event_bytes = client .rpc() .storage(&*system_events_key().0, Some(block_hash)) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index fee67439e5..6897cad439 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -196,11 +196,15 @@ impl EventDetails { /// The index of the pallet that the event originated from. pub fn pallet_index(&self) -> u8 { + // Note: never panics because we set the first two bytes + // in `decode_event_details` to build this. self.bytes[0] } /// The index of the event variant that the event originated from. pub fn variant_index(&self) -> u8 { + // Note: never panics because we set the first two bytes + // in `decode_event_details` to build this. self.bytes[1] } diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index a027aa8d7a..21bfc0c68c 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -382,7 +382,7 @@ impl> TxInBlock { .ok_or(Error::Transaction(TransactionError::BlockHashNotFound))?; let events = EventsClient::new(self.client.clone()) - .at(self.block_hash) + .at(Some(self.block_hash)) .await?; Ok(TxEvents { @@ -545,10 +545,7 @@ fn decode_dispatch_error(metadata: &Metadata, bytes: &[u8]) -> DispatchError { } } }; - println!( - "ERROR: pallet {:?} err {:?}, bytes: {bytes:?}", - err.index, err.error - ); + let error_details = match metadata.error(err.index, err.error[0]) { Ok(details) => details, Err(_) => { diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index 6012c5e8b4..1f39aaa56a 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -36,7 +36,6 @@ pub async fn test_context_with(key: AccountKeyring) -> TestContext { pub type TestContext = TestNodeProcess; pub async fn test_context() -> TestContext { - // tracing_subscriber::fmt::try_init().ok(); test_context_with(AccountKeyring::Alice).await } From e8ed05313bd14cf14510369f10218625f250168f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 5 Aug 2022 11:54:49 +0100 Subject: [PATCH 70/75] Undo accidental rename in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e9ac9c083..6ba5324029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,7 +92,7 @@ parameters (such as mortality and tip payment) to be customized. See `examples/b small usage example. If you're targeting a node which involves custom additional and extra transaction data, you'll need to implement the -trait `subxt::tx::ExtrinsicParams`, which determines the parameters that can be provided to `sign_and_submit`, as +trait `subxt::extrinsic::ExtrinsicParams`, which determines the parameters that can be provided to `sign_and_submit`, as well as how to encode these into the "additional" and "extra" data needed for a transaction. Have a look at `subxt/src/extrinsic/params.rs` for the trait definition and Substrate/Polkadot implementations. The aim with this change is to make it easier to customise this for your own chains, and provide a simple way to provide values at runtime. From 692f1da3be45a27cef5aa2202cbd98239d2b314a Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 5 Aug 2022 12:16:42 +0100 Subject: [PATCH 71/75] Small PR nits/tidyups --- codegen/src/api/storage.rs | 2 +- subxt/src/client/online_client.rs | 3 ++- subxt/src/events/event_subscription.rs | 2 +- subxt/src/metadata/metadata_type.rs | 4 ++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 6cdd99edfe..5d0e0b1674 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -182,7 +182,7 @@ fn generate_storage_entry_fns( // The field type is translated from `std::vec::Vec` to `[T]`. We apply // AsRef to all types, so this just makes it a little more ergonomic. // - // TODO [jsdw]: Support mappings like `String -> str` too for better Borrow + // TODO [jsdw]: Support mappings like `String -> str` too for better borrow // ergonomics. let field_ty = match field_type.vec_type_param() { Some(ty) => quote!([#ty]), diff --git a/subxt/src/client/online_client.rs b/subxt/src/client/online_client.rs index 965b179bfa..7043d58cfc 100644 --- a/subxt/src/client/online_client.rs +++ b/subxt/src/client/online_client.rs @@ -32,7 +32,8 @@ pub trait OnlineClientT: OfflineClientT { fn rpc(&self) -> &Rpc; } -/// A client capable of performing offline or online operations. +/// A client that can be used to perform API calls (that is, either those +/// requiriing an [`OfflineClientT`] or those requiring an [`OnlineClientT`]). #[derive(Derivative)] #[derivative(Clone(bound = ""))] pub struct OnlineClient { diff --git a/subxt/src/events/event_subscription.rs b/subxt/src/events/event_subscription.rs index 809cf7707c..704a31c82f 100644 --- a/subxt/src/events/event_subscription.rs +++ b/subxt/src/events/event_subscription.rs @@ -75,7 +75,7 @@ where /// /// ```no_run /// use futures::StreamExt; - /// use subxt::{ OnlineClient, PolkadotConfig }; + /// use subxt::{OnlineClient, PolkadotConfig}; /// /// #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] /// pub mod polkadot {} diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 6deb441612..6c199470fa 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -294,6 +294,8 @@ impl PalletMetadata { /// Metadata for specific events. #[derive(Clone, Debug)] pub struct EventMetadata { + // The pallet name is shared across every event, so put it + // behind an Arc to avoid lots of needless clones of it existing. pallet: Arc, event: String, fields: Vec<(Option, u32)>, @@ -325,6 +327,8 @@ impl EventMetadata { /// Details about a specific runtime error. #[derive(Clone, Debug)] pub struct ErrorMetadata { + // The pallet name is shared across every event, so put it + // behind an Arc to avoid lots of needless clones of it existing. pallet: Arc, error: String, docs: Vec, From 427c30885e8ac709ce1cd14c1601f842787108b2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 5 Aug 2022 14:38:30 +0100 Subject: [PATCH 72/75] fix tests; codegen change against latest substrate --- testing/integration-tests/src/frame/sudo.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/integration-tests/src/frame/sudo.rs b/testing/integration-tests/src/frame/sudo.rs index de67d111cd..8be70ea2bb 100644 --- a/testing/integration-tests/src/frame/sudo.rs +++ b/testing/integration-tests/src/frame/sudo.rs @@ -13,7 +13,7 @@ use crate::{ }; use sp_keyring::AccountKeyring; -type Call = runtime_types::node_runtime::Call; +type Call = runtime_types::kitchensink_runtime::Call; type BalancesCall = runtime_types::pallet_balances::pallet::Call; #[tokio::test] From 45963270cec59dd8da3e19fab6df7a0f377a10fd Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 5 Aug 2022 14:51:41 +0100 Subject: [PATCH 73/75] tweak storage address util names --- subxt/src/storage/storage_address.rs | 4 ++-- subxt/src/storage/storage_client.rs | 6 ++---- subxt/src/storage/utils.rs | 12 ++++++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index ff9070c2e8..238b26f6e4 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -110,7 +110,7 @@ where /// Return bytes representing this storage entry. pub fn to_bytes(&self) -> Vec { let mut bytes = Vec::new(); - super::utils::storage_address_root_bytes(self, &mut bytes); + super::utils::write_storage_address_root_bytes(self, &mut bytes); for entry in &self.storage_entry_keys { entry.to_bytes(&mut bytes); } @@ -120,7 +120,7 @@ where /// Return bytes representing the root of this storage entry (ie a hash of /// the pallet and entry name). pub fn to_root_bytes(&self) -> Vec { - super::utils::storage_address_to_root_bytes(self) + super::utils::storage_address_root_bytes(self) } } diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 1ba9468717..262ee6f78c 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -140,8 +140,7 @@ where // Look up the return type ID to enable DecodeWithMetadata: let metadata = client.client.metadata(); - let lookup_bytes = - super::utils::storage_address_to_bytes(address, &metadata)?; + let lookup_bytes = super::utils::storage_address_bytes(address, &metadata)?; if let Some(data) = client .client .storage() @@ -289,8 +288,7 @@ where )?; // The root pallet/entry bytes for this storage entry: - let address_root_bytes = - super::utils::storage_address_to_root_bytes(&address); + let address_root_bytes = super::utils::storage_address_root_bytes(&address); Ok(KeyIter { client, diff --git a/subxt/src/storage/utils.rs b/subxt/src/storage/utils.rs index 331d55217d..ecf6c3a134 100644 --- a/subxt/src/storage/utils.rs +++ b/subxt/src/storage/utils.rs @@ -14,7 +14,7 @@ use crate::{ /// Return the root of a given [`StorageAddress`]: hash the pallet name and entry name /// and append those bytes to the output. -pub fn storage_address_root_bytes( +pub fn write_storage_address_root_bytes( addr: &Address, out: &mut Vec, ) { @@ -24,19 +24,19 @@ pub fn storage_address_root_bytes( /// Outputs the [`storage_address_root_bytes`] as well as any additional bytes that represent /// a lookup in a storage map at that location. -pub fn storage_address_to_bytes( +pub fn storage_address_bytes( addr: &Address, metadata: &Metadata, ) -> Result, Error> { let mut bytes = Vec::new(); - storage_address_root_bytes(addr, &mut bytes); + write_storage_address_root_bytes(addr, &mut bytes); addr.append_entry_bytes(metadata, &mut bytes)?; Ok(bytes) } -/// Outputs a vector containing the [`storage_address_root_bytes`] bytes. -pub fn storage_address_to_root_bytes(addr: &Address) -> Vec { +/// Outputs a vector containing the bytes written by [`write_storage_address_root_bytes`]. +pub fn storage_address_root_bytes(addr: &Address) -> Vec { let mut bytes = Vec::new(); - storage_address_root_bytes(addr, &mut bytes); + write_storage_address_root_bytes(addr, &mut bytes); bytes } From a6498411df9b3e6590c8cf2d60f703c5fb154196 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 8 Aug 2022 11:11:41 +0100 Subject: [PATCH 74/75] move error decoding to DecodeError and expose --- subxt/src/error.rs | 113 ++++++++++++++++++++++++++++++++++++ subxt/src/tx/tx_progress.rs | 112 +---------------------------------- 2 files changed, 114 insertions(+), 111 deletions(-) diff --git a/subxt/src/error.rs b/subxt/src/error.rs index fa735b4d25..85c61e98b7 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -4,7 +4,11 @@ //! Types representing the errors that can be returned. +use crate::metadata::Metadata; +use codec::Decode; use core::fmt::Debug; +use scale_info::TypeDef; +use std::borrow::Cow; // Re-expose the errors we use from other crates here: pub use crate::metadata::{ @@ -112,6 +116,115 @@ pub enum DispatchError { Other(Vec), } +impl DispatchError { + /// Attempt to decode a runtime DispatchError, returning either the [`ModuleError`] it decodes + /// to, along with additional details on the error, or returning the raw bytes if it could not + /// be decoded. + pub fn decode_from<'a>(bytes: impl Into>, metadata: &Metadata) -> Self { + let bytes = bytes.into(); + + let dispatch_error_ty_id = match metadata.dispatch_error_ty() { + Some(id) => id, + None => { + tracing::warn!( + "Can't decode error: sp_runtime::DispatchError was not found in Metadata" + ); + return DispatchError::Other(bytes.into_owned()) + } + }; + + let dispatch_error_ty = match metadata.types().resolve(dispatch_error_ty_id) { + Some(ty) => ty, + None => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError type ID doesn't resolve to a known type"); + return DispatchError::Other(bytes.into_owned()) + } + }; + + let variant = match dispatch_error_ty.type_def() { + TypeDef::Variant(var) => var, + _ => { + tracing::warn!( + "Can't decode error: sp_runtime::DispatchError type is not a Variant" + ); + return DispatchError::Other(bytes.into_owned()) + } + }; + + let module_variant_idx = variant + .variants() + .iter() + .find(|v| v.name() == "Module") + .map(|v| v.index()); + let module_variant_idx = match module_variant_idx { + Some(idx) => idx, + None => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError does not have a 'Module' variant"); + return DispatchError::Other(bytes.into_owned()) + } + }; + + // If the error bytes don't correspond to a ModuleError, just return the bytes. + // This is perfectly reasonable and expected, so no logging. + if bytes[0] != module_variant_idx { + return DispatchError::Other(bytes.into_owned()) + } + + // The remaining bytes are the module error, all being well: + let bytes = &bytes[1..]; + + // The oldest and second oldest type of error decode to this shape: + #[derive(Decode)] + struct LegacyModuleError { + index: u8, + error: u8, + } + + // The newer case expands the error for forward compat: + #[derive(Decode)] + struct CurrentModuleError { + index: u8, + error: [u8; 4], + } + + // try to decode into the new shape, or the old if that doesn't work + let err = match CurrentModuleError::decode(&mut &*bytes) { + Ok(e) => e, + Err(_) => { + let old_e = match LegacyModuleError::decode(&mut &*bytes) { + Ok(err) => err, + Err(_) => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError does not match known formats"); + return DispatchError::Other(bytes.to_vec()) + } + }; + CurrentModuleError { + index: old_e.index, + error: [old_e.error, 0, 0, 0], + } + } + }; + + let error_details = match metadata.error(err.index, err.error[0]) { + Ok(details) => details, + Err(_) => { + tracing::warn!("Can't decode error: sp_runtime::DispatchError::Module details do not match known information"); + return DispatchError::Other(bytes.to_vec()) + } + }; + + DispatchError::Module(ModuleError { + pallet: error_details.pallet().to_string(), + error: error_details.error().to_string(), + description: error_details.docs().to_vec(), + error_data: ModuleErrorData { + pallet_index: err.index, + error: err.error, + }, + }) + } +} + /// Transaction error. #[derive(Clone, Debug, Eq, thiserror::Error, PartialEq)] pub enum TransactionError { diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index 21bfc0c68c..50b02f4844 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -11,8 +11,6 @@ use crate::{ error::{ DispatchError, Error, - ModuleError, - ModuleErrorData, TransactionError, }, events::{ @@ -23,11 +21,9 @@ use crate::{ Phase, StaticEvent, }, - metadata::Metadata, rpc::SubstrateTxStatus, Config, }; -use codec::Decode; use derivative::Derivative; use futures::{ Stream, @@ -37,7 +33,6 @@ use jsonrpsee::core::{ client::Subscription as RpcSubscription, Error as RpcError, }; -use scale_info::TypeDef; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; @@ -349,7 +344,7 @@ impl> TxInBlock { let ev = ev?; if ev.pallet_name() == "System" && ev.variant_name() == "ExtrinsicFailed" { let dispatch_error = - decode_dispatch_error(&self.client.metadata(), ev.field_bytes()); + DispatchError::decode_from(ev.field_bytes(), &self.client.metadata()); return Err(dispatch_error.into()) } } @@ -459,108 +454,3 @@ impl TxEvents { Ok(self.find::().next().transpose()?.is_some()) } } - -// Attempt to decode a DispatchError, returning either the ModuleError it decodes to, -// along with additional details on the error, or returning the raw bytes to work with -// downstream if we couldn't decode it. -fn decode_dispatch_error(metadata: &Metadata, bytes: &[u8]) -> DispatchError { - let dispatch_error_ty_id = match metadata.dispatch_error_ty() { - Some(id) => id, - None => { - tracing::warn!( - "Can't decode error: sp_runtime::DispatchError was not found in Metadata" - ); - return DispatchError::Other(bytes.to_vec()) - } - }; - - let dispatch_error_ty = match metadata.types().resolve(dispatch_error_ty_id) { - Some(ty) => ty, - None => { - tracing::warn!("Can't decode error: sp_runtime::DispatchError type ID doesn't resolve to a known type"); - return DispatchError::Other(bytes.to_vec()) - } - }; - - let variant = match dispatch_error_ty.type_def() { - TypeDef::Variant(var) => var, - _ => { - tracing::warn!( - "Can't decode error: sp_runtime::DispatchError type is not a Variant" - ); - return DispatchError::Other(bytes.to_vec()) - } - }; - - let module_variant_idx = variant - .variants() - .iter() - .find(|v| v.name() == "Module") - .map(|v| v.index()); - let module_variant_idx = match module_variant_idx { - Some(idx) => idx, - None => { - tracing::warn!("Can't decode error: sp_runtime::DispatchError does not have a 'Module' variant"); - return DispatchError::Other(bytes.to_vec()) - } - }; - - // If the error bytes don't correspond to a ModuleError, just return the bytes. - // This is perfectly reasonable and expected, so no logging. - if bytes[0] != module_variant_idx { - return DispatchError::Other(bytes.to_vec()) - } - - // The remaining bytes are the module error, all being well: - let bytes = &bytes[1..]; - - // The oldest and second oldest type of error decode to this shape: - #[derive(Decode)] - struct LegacyModuleError { - index: u8, - error: u8, - } - - // The newer case expands the error for forward compat: - #[derive(Decode)] - struct CurrentModuleError { - index: u8, - error: [u8; 4], - } - - // try to decode into the new shape, or the old if that doesn't work - let err = match CurrentModuleError::decode(&mut &*bytes) { - Ok(e) => e, - Err(_) => { - let old_e = match LegacyModuleError::decode(&mut &*bytes) { - Ok(err) => err, - Err(_) => { - tracing::warn!("Can't decode error: sp_runtime::DispatchError does not match known formats"); - return DispatchError::Other(bytes.to_vec()) - } - }; - CurrentModuleError { - index: old_e.index, - error: [old_e.error, 0, 0, 0], - } - } - }; - - let error_details = match metadata.error(err.index, err.error[0]) { - Ok(details) => details, - Err(_) => { - tracing::warn!("Can't decode error: sp_runtime::DispatchError::Module details do not match known information"); - return DispatchError::Other(bytes.to_vec()) - } - }; - - DispatchError::Module(ModuleError { - pallet: error_details.pallet().to_string(), - error: error_details.error().to_string(), - description: error_details.docs().to_vec(), - error_data: ModuleErrorData { - pallet_index: err.index, - error: err.error, - }, - }) -} From c0c0c2cdf81971ccd63d71bf0643c061b2eb13e6 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 8 Aug 2022 11:29:31 +0100 Subject: [PATCH 75/75] impl some basic traits on the extrinsic param builder --- subxt/src/tx/params.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subxt/src/tx/params.rs b/subxt/src/tx/params.rs index 50b69286b6..b2bf9cc629 100644 --- a/subxt/src/tx/params.rs +++ b/subxt/src/tx/params.rs @@ -92,6 +92,13 @@ pub struct BaseExtrinsicParams { /// /// Prefer to use [`SubstrateExtrinsicParamsBuilder`] for a version of this tailored towards /// Substrate, or [`PolkadotExtrinsicParamsBuilder`] for a version tailored to Polkadot. +#[derive(Derivative)] +#[derivative( + Debug(bound = "Tip: Debug"), + Clone(bound = "Tip: Clone"), + Copy(bound = "Tip: Copy"), + PartialEq(bound = "Tip: PartialEq") +)] pub struct BaseExtrinsicParamsBuilder { era: Era, mortality_checkpoint: Option,