From 92c2c1f77eaf60468454e241b79670c276e94dff Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 13 Jan 2022 16:22:40 +0000 Subject: [PATCH 01/21] WIP DispatchError generic param --- src/client.rs | 53 +++++++++-------- src/error.rs | 132 +++++++++++++++++++++---------------------- src/events.rs | 14 ++--- src/extrinsic/mod.rs | 16 +++--- src/lib.rs | 1 - src/subscription.rs | 18 +++--- src/transaction.rs | 84 +++++++++++++-------------- 7 files changed, 161 insertions(+), 157 deletions(-) diff --git a/src/client.rs b/src/client.rs index 0ae001cf18..c68d3b7bf9 100644 --- a/src/client.rs +++ b/src/client.rs @@ -42,22 +42,26 @@ use crate::{ }; use derivative::Derivative; use std::sync::Arc; +use std::marker::PhantomData; +use codec::Decode; /// ClientBuilder for constructing a Client. #[derive(Default)] -pub struct ClientBuilder { +pub struct ClientBuilder { url: Option, client: Option, page_size: Option, + _error: PhantomData } -impl ClientBuilder { +impl ClientBuilder { /// Creates a new ClientBuilder. pub fn new() -> Self { Self { url: None, client: None, page_size: None, + _error: PhantomData } } @@ -80,7 +84,7 @@ impl ClientBuilder { } /// Creates a new Client. - pub async fn build(self) -> Result, Error> { + pub async fn build(self) -> Result, Error> { let client = if let Some(client) = self.client { client } else { @@ -114,17 +118,17 @@ impl ClientBuilder { /// Client to interface with a substrate node. #[derive(Derivative)] #[derivative(Clone(bound = ""))] -pub struct Client { +pub struct Client { rpc: Rpc, genesis_hash: T::Hash, metadata: Arc, - events_decoder: EventsDecoder, + events_decoder: EventsDecoder, properties: SystemProperties, runtime_version: RuntimeVersion, iter_page_size: u32, } -impl std::fmt::Debug for Client { +impl std::fmt::Debug for Client { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Client") .field("rpc", &"") @@ -138,7 +142,7 @@ impl std::fmt::Debug for Client { } } -impl Client { +impl Client { /// Returns the genesis hash. pub fn genesis(&self) -> &T::Hash { &self.genesis_hash @@ -180,27 +184,28 @@ impl Client { } /// Returns the events decoder. - pub fn events_decoder(&self) -> &EventsDecoder { + pub fn events_decoder(&self) -> &EventsDecoder { &self.events_decoder } } /// A constructed call ready to be signed and submitted. -pub struct SubmittableExtrinsic<'client, T: Config, E, A, C> { - client: &'client Client, +pub struct SubmittableExtrinsic<'client, T: Config, X, A, C, E> { + client: &'client Client, call: C, - marker: std::marker::PhantomData<(E, A)>, + marker: std::marker::PhantomData<(X, A, E)>, } -impl<'client, T, E, A, C> SubmittableExtrinsic<'client, T, E, A, C> +impl<'client, T, X, A, C, E> SubmittableExtrinsic<'client, T, X, A, C, E> where T: Config, - E: SignedExtra, + X: SignedExtra, A: AccountData, C: Call + Send + Sync, + E: Decode, { /// Create a new [`SubmittableExtrinsic`]. - pub fn new(client: &'client Client, call: C) -> Self { + pub fn new(client: &'client Client, call: C) -> Self { Self { client, call, @@ -214,10 +219,10 @@ where /// 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), - ) -> Result, Error> + signer: &(dyn Signer + Send + Sync), + ) -> Result, Error> where - <>::Extra as SignedExtension>::AdditionalSigned: + <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, { // Sign the call data to create our extrinsic. @@ -240,10 +245,10 @@ where /// and has been included in the transaction pool. pub async fn sign_and_submit( self, - signer: &(dyn Signer + Send + Sync), - ) -> Result + signer: &(dyn Signer + Send + Sync), + ) -> Result> where - <>::Extra as SignedExtension>::AdditionalSigned: + <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, { let extrinsic = self.create_signed(signer, Default::default()).await?; @@ -253,11 +258,11 @@ where /// Creates a signed extrinsic. pub async fn create_signed( &self, - signer: &(dyn Signer + Send + Sync), - additional_params: E::Parameters, - ) -> Result, Error> + signer: &(dyn Signer + Send + Sync), + additional_params: X::Parameters, + ) -> Result, Error> where - <>::Extra as SignedExtension>::AdditionalSigned: + <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, { let account_nonce = if let Some(nonce) = signer.nonce() { diff --git a/src/error.rs b/src/error.rs index f74e376374..33de079854 100644 --- a/src/error.rs +++ b/src/error.rs @@ -20,19 +20,18 @@ use crate::{ InvalidMetadataError, MetadataError, }, - Metadata, }; +use core::fmt::Debug; use jsonrpsee::core::error::Error as RequestError; use sp_core::crypto::SecretStringError; use sp_runtime::{ transaction_validity::TransactionValidityError, - DispatchError, }; use thiserror::Error; /// Error enum. #[derive(Debug, Error)] -pub enum Error { +pub enum Error { /// Io error. #[error("Io error: {0}")] Io(#[from] std::io::Error), @@ -58,8 +57,9 @@ pub enum Error { #[error("Metadata: {0}")] Metadata(#[from] MetadataError), /// Runtime error. - #[error("Runtime error: {0}")] - Runtime(#[from] RuntimeError), + // TODO [jsdw]: derive Debug on generated types so that we can show something useful here? + #[error("Runtime error")] + Runtime(E), /// Events decoding error. #[error("Events decoding error: {0}")] EventsDecoding(#[from] EventsDecodingError), @@ -71,88 +71,88 @@ pub enum Error { Other(String), } -impl From for Error { +impl From for Error { fn from(error: SecretStringError) -> Self { Error::SecretString(error) } } -impl From for Error { +impl From for Error { fn from(error: TransactionValidityError) -> Self { Error::Invalid(error) } } -impl From<&str> for Error { +impl From<&str> for Error { fn from(error: &str) -> Self { Error::Other(error.into()) } } -impl From for Error { +impl From for Error { fn from(error: String) -> Self { Error::Other(error) } } -/// Runtime error. -#[derive(Clone, Debug, Eq, Error, PartialEq)] -pub enum RuntimeError { - /// Module error. - #[error("Runtime module error: {0}")] - Module(PalletError), - /// At least one consumer is remaining so the account cannot be destroyed. - #[error("At least one consumer is remaining so the account cannot be destroyed.")] - ConsumerRemaining, - /// There are no providers so the account cannot be created. - #[error("There are no providers so the account cannot be created.")] - NoProviders, - /// There are too many consumers so the account cannot be created. - #[error("There are too many consumers so the account cannot be created.")] - TooManyConsumers, - /// Bad origin. - #[error("Bad origin: throw by ensure_signed, ensure_root or ensure_none.")] - BadOrigin, - /// Cannot lookup. - #[error("Cannot lookup some information required to validate the transaction.")] - CannotLookup, - /// Other error. - #[error("Other error: {0}")] - Other(String), -} +// /// Runtime error. +// #[derive(Clone, Debug, Eq, Error, PartialEq)] +// pub enum RuntimeError { +// /// Module error. +// #[error("Runtime module error: {0}")] +// Module(PalletError), +// /// At least one consumer is remaining so the account cannot be destroyed. +// #[error("At least one consumer is remaining so the account cannot be destroyed.")] +// ConsumerRemaining, +// /// There are no providers so the account cannot be created. +// #[error("There are no providers so the account cannot be created.")] +// NoProviders, +// /// There are too many consumers so the account cannot be created. +// #[error("There are too many consumers so the account cannot be created.")] +// TooManyConsumers, +// /// Bad origin. +// #[error("Bad origin: throw by ensure_signed, ensure_root or ensure_none.")] +// BadOrigin, +// /// Cannot lookup. +// #[error("Cannot lookup some information required to validate the transaction.")] +// CannotLookup, +// /// Other error. +// #[error("Other error: {0}")] +// Other(String), +// } -impl RuntimeError { - /// Converts a `DispatchError` into a subxt error. - pub fn from_dispatch( - metadata: &Metadata, - error: DispatchError, - ) -> Result { - match error { - DispatchError::Module { - index, - error, - message: _, - } => { - let error = metadata.error(index, error)?; - Ok(Self::Module(PalletError { - pallet: error.pallet().to_string(), - error: error.error().to_string(), - description: error.description().to_vec(), - })) - } - DispatchError::BadOrigin => Ok(Self::BadOrigin), - DispatchError::CannotLookup => Ok(Self::CannotLookup), - DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining), - DispatchError::NoProviders => Ok(Self::NoProviders), - DispatchError::TooManyConsumers => Ok(Self::TooManyConsumers), - DispatchError::Arithmetic(_math_error) => { - Ok(Self::Other("math_error".into())) - } - DispatchError::Token(_token_error) => Ok(Self::Other("token error".into())), - DispatchError::Other(msg) => Ok(Self::Other(msg.to_string())), - } - } -} +// impl RuntimeError { +// /// Converts a `DispatchError` into a subxt error. +// pub fn from_dispatch( +// metadata: &Metadata, +// error: DispatchError, +// ) -> Result { +// match error { +// DispatchError::Module { +// index, +// error, +// message: _, +// } => { +// let error = metadata.error(index, error)?; +// Ok(Self::Module(PalletError { +// pallet: error.pallet().to_string(), +// error: error.error().to_string(), +// description: error.description().to_vec(), +// })) +// } +// DispatchError::BadOrigin => Ok(Self::BadOrigin), +// DispatchError::CannotLookup => Ok(Self::CannotLookup), +// DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining), +// DispatchError::NoProviders => Ok(Self::NoProviders), +// DispatchError::TooManyConsumers => Ok(Self::TooManyConsumers), +// DispatchError::Arithmetic(_math_error) => { +// Ok(Self::Other("math_error".into())) +// } +// DispatchError::Token(_token_error) => Ok(Self::Other("token error".into())), +// DispatchError::Other(msg) => Ok(Self::Other(msg.to_string())), +// } +// } +// } /// Module error. #[derive(Clone, Debug, Eq, Error, PartialEq)] diff --git a/src/events.rs b/src/events.rs index 6245953df7..67a99d6f76 100644 --- a/src/events.rs +++ b/src/events.rs @@ -71,9 +71,9 @@ impl RawEvent { /// Events decoder. #[derive(Derivative)] #[derivative(Clone(bound = ""), Debug(bound = ""))] -pub struct EventsDecoder { +pub struct EventsDecoder { metadata: Metadata, - marker: PhantomDataSendSync, + marker: PhantomDataSendSync<(T,E)>, } impl EventsDecoder { @@ -89,7 +89,7 @@ impl EventsDecoder { pub fn decode_events( &self, input: &mut &[u8], - ) -> Result, Error> { + ) -> Result, Error> { let compact_len = >::decode(input)?; let len = compact_len.0 as usize; log::debug!("decoding {} events", len); @@ -142,7 +142,7 @@ impl EventsDecoder { event_metadata: &EventMetadata, input: &mut &[u8], output: &mut Vec, - ) -> Result<(), Error> { + ) -> Result<(), Error> { log::debug!( "Decoding Event '{}::{}'", event_metadata.pallet(), @@ -160,16 +160,16 @@ impl EventsDecoder { type_id: u32, input: &mut &[u8], output: &mut Vec, - ) -> Result<(), Error> { + ) -> Result<(), Error> { let ty = self .metadata .resolve_type(type_id) .ok_or(MetadataError::TypeNotFound(type_id))?; - fn decode_raw( + fn decode_raw( input: &mut &[u8], output: &mut Vec, - ) -> Result<(), Error> { + ) -> Result<(), Error> { let decoded = T::decode(input)?; decoded.encode_to(output); Ok(()) diff --git a/src/extrinsic/mod.rs b/src/extrinsic/mod.rs index 77e6853f78..a4fbd13d2a 100644 --- a/src/extrinsic/mod.rs +++ b/src/extrinsic/mod.rs @@ -60,29 +60,29 @@ pub type SignedPayload = sp_runtime::generic::SignedPayload>::Extra>; /// Creates a signed extrinsic -pub async fn create_signed( +pub async fn create_signed( runtime_version: &RuntimeVersion, genesis_hash: T::Hash, nonce: T::Index, call: Encoded, - signer: &(dyn Signer + Send + Sync), - additional_params: E::Parameters, -) -> Result, Error> + signer: &(dyn Signer + Send + Sync), + additional_params: X::Parameters, +) -> Result, Error> where T: Config, - E: SignedExtra, - ::AdditionalSigned: Send + Sync, + X: SignedExtra, + ::AdditionalSigned: Send + Sync, { let spec_version = runtime_version.spec_version; let tx_version = runtime_version.transaction_version; - let extra = E::new( + let extra = X::new( spec_version, tx_version, nonce, genesis_hash, additional_params, ); - let payload = SignedPayload::::new(call, extra.extra())?; + let payload = SignedPayload::::new(call, extra.extra())?; let signed = signer.sign(payload).await?; Ok(signed) } diff --git a/src/lib.rs b/src/lib.rs index 405c43f79c..3ecaac4a9b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -81,7 +81,6 @@ pub use crate::{ error::{ Error, PalletError, - RuntimeError, TransactionError, }, events::{ diff --git a/src/subscription.rs b/src/subscription.rs index 4b3a5fcb22..803d92c430 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -42,8 +42,8 @@ use crate::{ /// Event subscription simplifies filtering a storage change set stream for /// events of interest. -pub struct EventSubscription<'a, T: Config> { - block_reader: BlockReader<'a, T>, +pub struct EventSubscription<'a, T: Config, E> { + block_reader: BlockReader<'a, T, E>, block: Option, extrinsic: Option, event: Option<(&'static str, &'static str)>, @@ -51,17 +51,17 @@ pub struct EventSubscription<'a, T: Config> { finished: bool, } -enum BlockReader<'a, T: Config> { +enum BlockReader<'a, T: Config, E> { Decoder { subscription: EventStorageSubscription, - decoder: &'a EventsDecoder, + decoder: &'a EventsDecoder, }, /// Mock event listener for unit tests #[cfg(test)] Mock(Box, Error>)>>), } -impl<'a, T: Config> BlockReader<'a, T> { +impl<'a, T: Config, E> BlockReader<'a, T, E> { async fn next(&mut self) -> Option<(T::Hash, Result, Error>)> { match self { BlockReader::Decoder { @@ -86,11 +86,11 @@ impl<'a, T: Config> BlockReader<'a, T> { } } -impl<'a, T: Config> EventSubscription<'a, T> { +impl<'a, T: Config, E> EventSubscription<'a, T, E> { /// Creates a new event subscription. pub fn new( subscription: EventStorageSubscription, - decoder: &'a EventsDecoder, + decoder: &'a EventsDecoder, ) -> Self { Self { block_reader: BlockReader::Decoder { @@ -117,8 +117,8 @@ impl<'a, T: Config> EventSubscription<'a, T> { } /// Filters events by type. - pub fn filter_event(&mut self) { - self.event = Some((E::PALLET, E::EVENT)); + pub fn filter_event(&mut self) { + self.event = Some((Ev::PALLET, Ev::EVENT)); } /// Gets the next event. diff --git a/src/transaction.rs b/src/transaction.rs index d1396a1f5d..836b904095 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -16,6 +16,13 @@ use std::task::Poll; +use sp_core::storage::StorageKey; +use sp_runtime::traits::Hash; +use codec::Decode; +pub use sp_runtime::traits::SignedExtension; +pub use sp_version::RuntimeVersion; +use crate::PhantomDataSendSync; + use crate::{ client::Client, error::{ @@ -36,30 +43,26 @@ use jsonrpsee::core::{ client::Subscription as RpcSubscription, Error as RpcError, }; -use sp_core::storage::StorageKey; -use sp_runtime::traits::Hash; -pub use sp_runtime::traits::SignedExtension; -pub use sp_version::RuntimeVersion; /// 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<'client, T: Config> { +pub struct TransactionProgress<'client, T: Config, E: Decode> { sub: Option>>, ext_hash: T::Hash, - client: &'client Client, + client: &'client Client, } // 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> Unpin for TransactionProgress<'client, T> {} +impl<'client, T: Config, E: Decode> Unpin for TransactionProgress<'client, T, E> {} -impl<'client, T: Config> TransactionProgress<'client, T> { +impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { pub(crate) fn new( sub: RpcSubscription>, - client: &'client Client, + client: &'client Client, ext_hash: T::Hash, ) -> Self { Self { @@ -74,7 +77,7 @@ impl<'client, T: Config> TransactionProgress<'client, T> { /// avoid importing that trait if you don't otherwise need it. pub async fn next_item( &mut self, - ) -> Option, Error>> { + ) -> Option, Error>> { self.next().await } @@ -91,7 +94,7 @@ impl<'client, T: Config> TransactionProgress<'client, T> { /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_in_block( mut self, - ) -> Result, Error> { + ) -> Result, Error> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. @@ -121,7 +124,7 @@ impl<'client, T: Config> TransactionProgress<'client, T> { /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized( mut self, - ) -> Result, Error> { + ) -> Result, Error> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. @@ -148,14 +151,14 @@ impl<'client, T: Config> TransactionProgress<'client, T> { /// 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> { + pub async fn wait_for_finalized_success(self) -> Result, Error> { let evs = self.wait_for_finalized().await?.wait_for_success().await?; Ok(evs) } } -impl<'client, T: Config> Stream for TransactionProgress<'client, T> { - type Item = Result, Error>; +impl<'client, T: Config, E: Decode> Stream for TransactionProgress<'client, T, E> { + type Item = Result, Error>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -264,7 +267,7 @@ impl<'client, T: Config> Stream for TransactionProgress<'client, T> { /// or that finality gadget is lagging behind. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub enum TransactionStatus<'client, T: Config> { +pub enum TransactionStatus<'client, T: Config, E: Decode> { /// The transaction is part of the "future" queue. Future, /// The transaction is part of the "ready" queue. @@ -272,7 +275,7 @@ pub enum TransactionStatus<'client, T: Config> { /// 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>), + InBlock(TransactionInBlock<'client, T, E>), /// The block this transaction was included in has been retracted, /// probably because it did not make it onto the blocks which were /// finalized. @@ -281,7 +284,7 @@ pub enum TransactionStatus<'client, T: Config> { /// 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>), + Finalized(TransactionInBlock<'client, T, E>), /// The transaction has been replaced in the pool by another transaction /// that provides the same tags. (e.g. same (sender, nonce)). Usurped(T::Hash), @@ -291,10 +294,10 @@ pub enum TransactionStatus<'client, T: Config> { Invalid, } -impl<'client, T: Config> TransactionStatus<'client, T> { +impl<'client, T: Config, E: Decode> TransactionStatus<'client, T, E> { /// 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>> { + pub fn as_finalized(&self) -> Option<&TransactionInBlock<'client, T, E>> { match self { Self::Finalized(val) => Some(val), _ => None, @@ -303,7 +306,7 @@ impl<'client, T: Config> TransactionStatus<'client, T> { /// 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>> { + pub fn as_in_block(&self) -> Option<&TransactionInBlock<'client, T, E>> { match self { Self::InBlock(val) => Some(val), _ => None, @@ -314,13 +317,13 @@ impl<'client, T: Config> TransactionStatus<'client, T> { /// This struct represents a transaction that has made it into a block. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionInBlock<'client, T: Config> { +pub struct TransactionInBlock<'client, T: Config, E: Decode> { block_hash: T::Hash, ext_hash: T::Hash, - client: &'client Client, + client: &'client Client, } -impl<'client, T: Config> TransactionInBlock<'client, T> { +impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { /// Return the hash of the block that the transaction has made it into. pub fn block_hash(&self) -> T::Hash { self.block_hash @@ -344,19 +347,14 @@ impl<'client, T: Config> TransactionInBlock<'client, T> { /// /// **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.as_slice() { if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { - use codec::Decode; - let dispatch_error = sp_runtime::DispatchError::decode(&mut &*ev.data)?; - let runtime_error = crate::RuntimeError::from_dispatch( - self.client.metadata(), - dispatch_error, - )?; - return Err(runtime_error.into()) + let dispatch_error = E::decode(&mut &*ev.data)?; + return Err(Error::Runtime(dispatch_error)) } } @@ -369,7 +367,7 @@ impl<'client, T: Config> TransactionInBlock<'client, T> { /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn fetch_events(&self) -> Result, Error> { + pub async fn fetch_events(&self) -> Result, Error> { let block = self .client .rpc() @@ -413,6 +411,7 @@ impl<'client, T: Config> TransactionInBlock<'client, T> { block_hash: self.block_hash, ext_hash: self.ext_hash, events, + _error: PhantomDataSendSync::new() }) } } @@ -421,13 +420,14 @@ impl<'client, T: Config> TransactionInBlock<'client, T> { /// We can iterate over the events, or look for a specific one. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionEvents { +pub struct TransactionEvents { block_hash: T::Hash, ext_hash: T::Hash, events: Vec, + _error: PhantomDataSendSync, } -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.block_hash @@ -445,10 +445,10 @@ impl TransactionEvents { /// Find all of the events matching the event type provided as a generic parameter. This /// will return an error if a matching event is found but cannot be properly decoded. - pub fn find_events(&self) -> Result, Error> { + pub fn find_events(&self) -> Result, Error> { self.events .iter() - .filter_map(|e| e.as_event::().map_err(Into::into).transpose()) + .filter_map(|e| e.as_event::().map_err(Into::into).transpose()) .collect() } @@ -457,22 +457,22 @@ impl TransactionEvents { /// /// Use [`TransactionEvents::find_events`], or iterate over [`TransactionEvents`] yourself /// if you'd like to handle multiple events of the same type. - pub fn find_first_event(&self) -> Result, Error> { + pub fn find_first_event(&self) -> Result, Error> { self.events .iter() - .filter_map(|e| e.as_event::().transpose()) + .filter_map(|e| e.as_event::().transpose()) .next() .transpose() .map_err(Into::into) } /// Find an event. Returns true if it was found. - pub fn has_event(&self) -> Result { - Ok(self.find_first_event::()?.is_some()) + pub fn has_event(&self) -> Result> { + Ok(self.find_first_event::()?.is_some()) } } -impl std::ops::Deref for TransactionEvents { +impl std::ops::Deref for TransactionEvents { type Target = [crate::RawEvent]; fn deref(&self) -> &Self::Target { &self.events From 55c1dcb7de559d52a8517dd25e7f6dfbf3568cd5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 13 Jan 2022 18:17:25 +0000 Subject: [PATCH 02/21] main crate now compiling with new E generic param for DispatchError --- src/client.rs | 34 ++++----- src/error.rs | 13 ++-- src/events.rs | 40 ++++++----- src/rpc.rs | 167 ++++++++++++++++++++++++++------------------ src/storage.rs | 36 +++++----- src/subscription.rs | 58 +++++++-------- src/transaction.rs | 10 +-- 7 files changed, 199 insertions(+), 159 deletions(-) diff --git a/src/client.rs b/src/client.rs index c68d3b7bf9..87a910d754 100644 --- a/src/client.rs +++ b/src/client.rs @@ -40,33 +40,35 @@ use crate::{ Config, Metadata, }; -use derivative::Derivative; -use std::sync::Arc; -use std::marker::PhantomData; use codec::Decode; +use derivative::Derivative; +use std::{ + marker::PhantomData, + sync::Arc, +}; /// ClientBuilder for constructing a Client. #[derive(Default)] -pub struct ClientBuilder { +pub struct ClientBuilder { url: Option, - client: Option, + client: Option>, page_size: Option, - _error: PhantomData + _error: PhantomData, } -impl ClientBuilder { +impl ClientBuilder { /// Creates a new ClientBuilder. pub fn new() -> Self { Self { url: None, client: None, page_size: None, - _error: PhantomData + _error: PhantomData, } } /// Sets the jsonrpsee client. - pub fn set_client>(mut self, client: C) -> Self { + pub fn set_client>>(mut self, client: C) -> Self { self.client = Some(client.into()); self } @@ -84,7 +86,7 @@ impl ClientBuilder { } /// Creates a new Client. - pub async fn build(self) -> Result, Error> { + pub async fn build(self) -> Result, Error> { let client = if let Some(client) = self.client { client } else { @@ -119,7 +121,7 @@ impl ClientBuilder { #[derive(Derivative)] #[derivative(Clone(bound = ""))] pub struct Client { - rpc: Rpc, + rpc: Rpc, genesis_hash: T::Hash, metadata: Arc, events_decoder: EventsDecoder, @@ -128,7 +130,7 @@ pub struct Client { iter_page_size: u32, } -impl std::fmt::Debug for Client { +impl std::fmt::Debug for Client { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Client") .field("rpc", &"") @@ -142,7 +144,7 @@ impl std::fmt::Debug for Client { } } -impl Client { +impl Client { /// Returns the genesis hash. pub fn genesis(&self) -> &T::Hash { &self.genesis_hash @@ -166,12 +168,12 @@ impl Client { } /// Returns the rpc client. - pub fn rpc(&self) -> &Rpc { + pub fn rpc(&self) -> &Rpc { &self.rpc } /// Create a client for accessing runtime storage - pub fn storage(&self) -> StorageClient { + pub fn storage(&self) -> StorageClient { StorageClient::new(&self.rpc, &self.metadata, self.iter_page_size) } @@ -190,7 +192,7 @@ impl Client { } /// A constructed call ready to be signed and submitted. -pub struct SubmittableExtrinsic<'client, T: Config, X, A, C, E> { +pub struct SubmittableExtrinsic<'client, T: Config, X, A, C, E: Decode> { client: &'client Client, call: C, marker: std::marker::PhantomData<(X, A, E)>, diff --git a/src/error.rs b/src/error.rs index 33de079854..103c894fdb 100644 --- a/src/error.rs +++ b/src/error.rs @@ -24,9 +24,7 @@ use crate::{ use core::fmt::Debug; use jsonrpsee::core::error::Error as RequestError; use sp_core::crypto::SecretStringError; -use sp_runtime::{ - transaction_validity::TransactionValidityError, -}; +use sp_runtime::transaction_validity::TransactionValidityError; use thiserror::Error; /// Error enum. @@ -57,7 +55,6 @@ pub enum Error { #[error("Metadata: {0}")] Metadata(#[from] MetadataError), /// Runtime error. - // TODO [jsdw]: derive Debug on generated types so that we can show something useful here? #[error("Runtime error")] Runtime(E), /// Events decoding error. @@ -71,25 +68,25 @@ pub enum Error { Other(String), } -impl From for Error { +impl From for Error { fn from(error: SecretStringError) -> Self { Error::SecretString(error) } } -impl From for Error { +impl From for Error { fn from(error: TransactionValidityError) -> Self { Error::Invalid(error) } } -impl From<&str> for Error { +impl From<&str> for Error { fn from(error: &str) -> Self { Error::Other(error.into()) } } -impl From for Error { +impl From for Error { fn from(error: String) -> Self { Error::Other(error) } diff --git a/src/events.rs b/src/events.rs index 67a99d6f76..d2ff6b1eae 100644 --- a/src/events.rs +++ b/src/events.rs @@ -73,10 +73,10 @@ impl RawEvent { #[derivative(Clone(bound = ""), Debug(bound = ""))] pub struct EventsDecoder { metadata: Metadata, - marker: PhantomDataSendSync<(T,E)>, + marker: PhantomDataSendSync<(T, E)>, } -impl EventsDecoder { +impl EventsDecoder { /// Creates a new `EventsDecoder`. pub fn new(metadata: Metadata) -> Self { Self { @@ -219,30 +219,30 @@ impl EventsDecoder { } TypeDef::Primitive(primitive) => { match primitive { - TypeDefPrimitive::Bool => decode_raw::(input, output), + TypeDefPrimitive::Bool => decode_raw::(input, output), TypeDefPrimitive::Char => { Err(EventsDecodingError::UnsupportedPrimitive( TypeDefPrimitive::Char, ) .into()) } - TypeDefPrimitive::Str => decode_raw::(input, output), - TypeDefPrimitive::U8 => decode_raw::(input, output), - TypeDefPrimitive::U16 => decode_raw::(input, output), - TypeDefPrimitive::U32 => decode_raw::(input, output), - TypeDefPrimitive::U64 => decode_raw::(input, output), - TypeDefPrimitive::U128 => decode_raw::(input, output), + TypeDefPrimitive::Str => decode_raw::(input, output), + TypeDefPrimitive::U8 => decode_raw::(input, output), + TypeDefPrimitive::U16 => decode_raw::(input, output), + TypeDefPrimitive::U32 => decode_raw::(input, output), + TypeDefPrimitive::U64 => decode_raw::(input, output), + TypeDefPrimitive::U128 => decode_raw::(input, output), TypeDefPrimitive::U256 => { Err(EventsDecodingError::UnsupportedPrimitive( TypeDefPrimitive::U256, ) .into()) } - TypeDefPrimitive::I8 => decode_raw::(input, output), - TypeDefPrimitive::I16 => decode_raw::(input, output), - TypeDefPrimitive::I32 => decode_raw::(input, output), - TypeDefPrimitive::I64 => decode_raw::(input, output), - TypeDefPrimitive::I128 => decode_raw::(input, output), + TypeDefPrimitive::I8 => decode_raw::(input, output), + TypeDefPrimitive::I16 => decode_raw::(input, output), + TypeDefPrimitive::I32 => decode_raw::(input, output), + TypeDefPrimitive::I64 => decode_raw::(input, output), + TypeDefPrimitive::I128 => decode_raw::(input, output), TypeDefPrimitive::I256 => { Err(EventsDecodingError::UnsupportedPrimitive( TypeDefPrimitive::I256, @@ -258,18 +258,20 @@ impl EventsDecoder { .ok_or(MetadataError::TypeNotFound(type_id))?; let mut decode_compact_primitive = |primitive: &TypeDefPrimitive| { match primitive { - TypeDefPrimitive::U8 => decode_raw::>(input, output), + TypeDefPrimitive::U8 => { + decode_raw::, _>(input, output) + } TypeDefPrimitive::U16 => { - decode_raw::>(input, output) + decode_raw::, _>(input, output) } TypeDefPrimitive::U32 => { - decode_raw::>(input, output) + decode_raw::, _>(input, output) } TypeDefPrimitive::U64 => { - decode_raw::>(input, output) + decode_raw::, _>(input, output) } TypeDefPrimitive::U128 => { - decode_raw::>(input, output) + decode_raw::, _>(input, output) } prim => { Err(EventsDecodingError::InvalidCompactPrimitive( diff --git a/src/rpc.rs b/src/rpc.rs index 470a4166c0..7d1eb49a0d 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -23,6 +23,18 @@ use std::sync::Arc; +use crate::{ + error::Error, + storage::StorageKeyPrefix, + subscription::{ + EventStorageSubscription, + FinalizedEventStorageSubscription, + SystemEvents, + }, + Config, + Metadata, + PhantomDataSendSync, +}; use codec::{ Decode, Encode, @@ -31,6 +43,7 @@ use core::{ convert::TryInto, marker::PhantomData, }; +use derivative::Derivative; use frame_metadata::RuntimeMetadataPrefixed; use jsonrpsee::{ core::{ @@ -70,18 +83,6 @@ use sp_runtime::generic::{ }; use sp_version::RuntimeVersion; -use crate::{ - error::Error, - storage::StorageKeyPrefix, - subscription::{ - EventStorageSubscription, - FinalizedEventStorageSubscription, - SystemEvents, - }, - Config, - Metadata, -}; - /// A number type that can be serialized both as a number or a string that encodes a number in a /// string. /// @@ -167,8 +168,15 @@ pub enum SubstrateTransactionStatus { /// Rpc client wrapper. /// This is workaround because adding generic types causes the macros to fail. +#[derive(Derivative)] +#[derivative(Clone(bound = ""))] +pub struct RpcClient { + client: RpcClientInner, + _error: PhantomDataSendSync, +} + #[derive(Clone)] -pub enum RpcClient { +enum RpcClientInner { /// JSONRPC client WebSocket transport. WebSocket(Arc), /// JSONRPC client HTTP transport. @@ -176,22 +184,28 @@ pub enum RpcClient { Http(Arc), } -impl RpcClient { +impl RpcClient { /// Create a new [`RpcClient`] from the given URL. /// /// Infers the protocol from the URL, supports: /// - Websockets (`ws://`, `wss://`) /// - Http (`http://`, `https://`) - pub async fn try_from_url(url: &str) -> Result { + pub async fn try_from_url(url: &str) -> Result> { if url.starts_with("ws://") || url.starts_with("wss://") { let client = WsClientBuilder::default() .max_notifs_per_subscription(4096) .build(url) .await?; - Ok(RpcClient::WebSocket(Arc::new(client))) + Ok(RpcClient { + client: RpcClientInner::WebSocket(Arc::new(client)), + _error: PhantomDataSendSync::new(), + }) } else { let client = HttpClientBuilder::default().build(&url)?; - Ok(RpcClient::Http(Arc::new(client))) + Ok(RpcClient { + client: RpcClientInner::Http(Arc::new(client)), + _error: PhantomDataSendSync::new(), + }) } } @@ -200,14 +214,16 @@ impl RpcClient { &self, method: &str, params: &[JsonValue], - ) -> Result { + ) -> Result> { let params = Some(params.into()); log::debug!("request {}: {:?}", method, params); - let data = match self { - Self::WebSocket(inner) => { + let data = match &self.client { + RpcClientInner::WebSocket(inner) => { + inner.request(method, params).await.map_err(Into::into) + } + RpcClientInner::Http(inner) => { inner.request(method, params).await.map_err(Into::into) } - Self::Http(inner) => inner.request(method, params).await.map_err(Into::into), }; data } @@ -218,16 +234,16 @@ impl RpcClient { subscribe_method: &str, params: &[JsonValue], unsubscribe_method: &str, - ) -> Result, Error> { + ) -> Result, Error> { let params = Some(params.into()); - match self { - Self::WebSocket(inner) => { + match &self.client { + RpcClientInner::WebSocket(inner) => { inner .subscribe(subscribe_method, params, unsubscribe_method) .await .map_err(Into::into) } - Self::Http(_) => { + RpcClientInner::Http(_) => { Err(RpcError::Custom( "Subscriptions not supported on HTTP transport".to_owned(), ) @@ -237,27 +253,39 @@ impl RpcClient { } } -impl From for RpcClient { +impl From for RpcClient { fn from(client: Client) -> Self { - RpcClient::WebSocket(Arc::new(client)) + RpcClient { + client: RpcClientInner::WebSocket(Arc::new(client)), + _error: PhantomDataSendSync::new(), + } } } -impl From> for RpcClient { +impl From> for RpcClient { fn from(client: Arc) -> Self { - RpcClient::WebSocket(client) + RpcClient { + client: RpcClientInner::WebSocket(client), + _error: PhantomDataSendSync::new(), + } } } -impl From for RpcClient { +impl From for RpcClient { fn from(client: HttpClient) -> Self { - RpcClient::Http(Arc::new(client)) + RpcClient { + client: RpcClientInner::Http(Arc::new(client)), + _error: PhantomDataSendSync::new(), + } } } -impl From> for RpcClient { +impl From> for RpcClient { fn from(client: Arc) -> Self { - RpcClient::Http(client) + RpcClient { + client: RpcClientInner::Http(client), + _error: PhantomDataSendSync::new(), + } } } @@ -277,13 +305,13 @@ pub struct ReadProof { } /// Client for substrate rpc interfaces -pub struct Rpc { +pub struct Rpc { /// Rpc client for sending requests. - pub client: RpcClient, + pub client: RpcClient, marker: PhantomData, } -impl Clone for Rpc { +impl Clone for Rpc { fn clone(&self) -> Self { Self { client: self.client.clone(), @@ -292,9 +320,9 @@ impl Clone for Rpc { } } -impl Rpc { +impl Rpc { /// Create a new [`Rpc`] - pub fn new(client: RpcClient) -> Self { + pub fn new(client: RpcClient) -> Self { Self { client, marker: PhantomData, @@ -306,7 +334,7 @@ impl Rpc { &self, key: &StorageKey, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let params = &[to_json_value(key)?, to_json_value(hash)?]; let data = self.client.request("state_getStorage", params).await?; Ok(data) @@ -321,7 +349,7 @@ impl Rpc { count: u32, start_key: Option, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let prefix = prefix.map(|p| p.to_storage_key()); let params = &[ to_json_value(prefix)?, @@ -339,7 +367,7 @@ impl Rpc { keys: Vec, from: T::Hash, to: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { let params = &[ to_json_value(keys)?, to_json_value(from)?, @@ -356,7 +384,7 @@ impl Rpc { &self, keys: &[StorageKey], at: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { let params = &[to_json_value(keys)?, to_json_value(at)?]; self.client .request("state_queryStorageAt", params) @@ -365,7 +393,7 @@ impl Rpc { } /// Fetch the genesis hash - pub async fn genesis_hash(&self) -> Result { + pub async fn genesis_hash(&self) -> Result> { let block_zero = Some(ListOrValue::Value(NumberOrHex::Number(0))); let params = &[to_json_value(block_zero)?]; let list_or_value: ListOrValue> = @@ -379,7 +407,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", &[]).await?; let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &bytes[..])?; let metadata: Metadata = meta.try_into()?; @@ -387,22 +415,22 @@ 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", &[]).await?) } /// Fetch system chain - pub async fn system_chain(&self) -> Result { + pub async fn system_chain(&self) -> Result> { Ok(self.client.request("system_chain", &[]).await?) } /// Fetch system name - pub async fn system_name(&self) -> Result { + pub async fn system_name(&self) -> Result> { Ok(self.client.request("system_name", &[]).await?) } /// Fetch system version - pub async fn system_version(&self) -> Result { + pub async fn system_version(&self) -> Result> { Ok(self.client.request("system_version", &[]).await?) } @@ -410,7 +438,7 @@ impl Rpc { pub async fn header( &self, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let params = &[to_json_value(hash)?]; let header = self.client.request("chain_getHeader", params).await?; Ok(header) @@ -420,7 +448,7 @@ impl Rpc { pub async fn block_hash( &self, block_number: Option, - ) -> Result, Error> { + ) -> Result, Error> { let block_number = block_number.map(ListOrValue::Value); let params = &[to_json_value(block_number)?]; let list_or_value = self.client.request("chain_getBlockHash", params).await?; @@ -431,7 +459,7 @@ impl Rpc { } /// 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", &[]).await?; Ok(hash) } @@ -440,7 +468,7 @@ impl Rpc { pub async fn block( &self, hash: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { let params = &[to_json_value(hash)?]; let block = self.client.request("chain_getBlock", params).await?; Ok(block) @@ -451,7 +479,7 @@ impl Rpc { &self, keys: Vec, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let params = &[to_json_value(keys)?, to_json_value(hash)?]; let proof = self.client.request("state_getReadProof", params).await?; Ok(proof) @@ -461,7 +489,7 @@ impl Rpc { pub async fn runtime_version( &self, at: Option, - ) -> Result { + ) -> Result> { let params = &[to_json_value(at)?]; let version = self .client @@ -474,7 +502,9 @@ impl Rpc { /// /// *WARNING* these may not be included in the finalized chain, use /// `subscribe_finalized_events` to ensure events are finalized. - pub async fn subscribe_events(&self) -> Result, Error> { + pub async fn subscribe_events( + &self, + ) -> Result, Error> { let keys = Some(vec![StorageKey::from(SystemEvents::new())]); let params = &[to_json_value(keys)?]; @@ -488,7 +518,7 @@ impl Rpc { /// Subscribe to finalized events. pub async fn subscribe_finalized_events( &self, - ) -> Result, Error> { + ) -> Result, Error> { Ok(EventStorageSubscription::Finalized( FinalizedEventStorageSubscription::new( self.clone(), @@ -498,7 +528,7 @@ impl Rpc { } /// Subscribe to blocks. - pub async fn subscribe_blocks(&self) -> Result, Error> { + pub async fn subscribe_blocks(&self) -> Result, Error> { let subscription = self .client .subscribe("chain_subscribeNewHeads", &[], "chain_unsubscribeNewHeads") @@ -510,7 +540,7 @@ impl Rpc { /// Subscribe to finalized blocks. pub async fn subscribe_finalized_blocks( &self, - ) -> Result, Error> { + ) -> Result, Error> { let subscription = self .client .subscribe( @@ -523,10 +553,10 @@ impl Rpc { } /// Create and submit an extrinsic and return corresponding Hash if successful - pub async fn submit_extrinsic( + pub async fn submit_extrinsic( &self, - extrinsic: E, - ) -> Result { + extrinsic: X, + ) -> Result> { let bytes: Bytes = extrinsic.encode().into(); let params = &[to_json_value(bytes)?]; let xt_hash = self @@ -537,10 +567,11 @@ impl Rpc { } /// Create and submit an extrinsic and return a subscription to the events triggered. - pub async fn watch_extrinsic( + pub async fn watch_extrinsic( &self, - extrinsic: E, - ) -> Result>, Error> { + extrinsic: X, + ) -> Result>, Error> + { let bytes: Bytes = extrinsic.encode().into(); let params = &[to_json_value(bytes)?]; let subscription = self @@ -560,7 +591,7 @@ impl Rpc { key_type: String, suri: String, public: Bytes, - ) -> Result<(), Error> { + ) -> Result<(), Error> { let params = &[ to_json_value(key_type)?, to_json_value(suri)?, @@ -571,7 +602,7 @@ impl Rpc { } /// Generate new session keys and returns the corresponding public keys. - pub async fn rotate_keys(&self) -> Result { + pub async fn rotate_keys(&self) -> Result> { Ok(self.client.request("author_rotateKeys", &[]).await?) } @@ -580,7 +611,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 = &[to_json_value(session_keys)?]; Ok(self.client.request("author_hasSessionKeys", params).await?) } @@ -592,7 +623,7 @@ impl Rpc { &self, public_key: Bytes, key_type: String, - ) -> Result { + ) -> Result> { let params = &[to_json_value(public_key)?, to_json_value(key_type)?]; Ok(self.client.request("author_hasKey", params).await?) } diff --git a/src/storage.rs b/src/storage.rs index 5b617a218c..0cd552d9ba 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -37,6 +37,7 @@ use crate::{ rpc::Rpc, Config, Error, + PhantomDataSendSync, StorageHasher, }; @@ -132,29 +133,32 @@ impl StorageMapKey { } /// Client for querying runtime storage. -pub struct StorageClient<'a, T: Config> { - rpc: &'a Rpc, +pub struct StorageClient<'a, T: Config, E> { + rpc: &'a Rpc, metadata: &'a Metadata, iter_page_size: u32, + _error: PhantomDataSendSync, } -impl<'a, T: Config> Clone for StorageClient<'a, T> { +impl<'a, T: Config, E> Clone for StorageClient<'a, T, E> { fn clone(&self) -> Self { Self { rpc: self.rpc, metadata: self.metadata, iter_page_size: self.iter_page_size, + _error: PhantomDataSendSync::new(), } } } -impl<'a, T: Config> StorageClient<'a, T> { +impl<'a, T: Config, E> StorageClient<'a, T, E> { /// Create a new [`StorageClient`] - pub fn new(rpc: &'a Rpc, metadata: &'a Metadata, iter_page_size: u32) -> Self { + pub fn new(rpc: &'a Rpc, metadata: &'a Metadata, iter_page_size: u32) -> Self { Self { rpc, metadata, iter_page_size, + _error: PhantomDataSendSync::new(), } } @@ -163,7 +167,7 @@ impl<'a, T: Config> StorageClient<'a, T> { &self, key: StorageKey, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { if let Some(data) = self.rpc.storage(&key, hash).await? { Ok(Some(Decode::decode(&mut &data.0[..])?)) } else { @@ -176,7 +180,7 @@ impl<'a, T: Config> StorageClient<'a, T> { &self, key: StorageKey, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { self.rpc.storage(&key, hash).await } @@ -185,7 +189,7 @@ impl<'a, T: Config> StorageClient<'a, T> { &self, store: &F, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let prefix = StorageKeyPrefix::new::(); let key = store.key().final_key(prefix); self.fetch_unhashed::(key, hash).await @@ -196,7 +200,7 @@ impl<'a, T: Config> StorageClient<'a, T> { &self, store: &F, hash: Option, - ) -> Result { + ) -> Result> { if let Some(data) = self.fetch(store, hash).await? { Ok(data) } else { @@ -214,7 +218,7 @@ impl<'a, T: Config> StorageClient<'a, T> { keys: Vec, from: T::Hash, to: Option, - ) -> Result>, Error> { + ) -> Result>, Error> { self.rpc.query_storage(keys, from, to).await } @@ -226,7 +230,7 @@ impl<'a, T: Config> StorageClient<'a, T> { count: u32, start_key: Option, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let prefix = StorageKeyPrefix::new::(); let keys = self .rpc @@ -239,7 +243,7 @@ impl<'a, T: Config> StorageClient<'a, T> { pub async fn iter( &self, hash: Option, - ) -> Result, Error> { + ) -> Result, Error> { let hash = if let Some(hash) = hash { hash } else { @@ -260,8 +264,8 @@ impl<'a, T: Config> StorageClient<'a, T> { } /// Iterates over key value pairs in a map. -pub struct KeyIter<'a, T: Config, F: StorageEntry> { - client: StorageClient<'a, T>, +pub struct KeyIter<'a, T: Config, F: StorageEntry, E> { + client: StorageClient<'a, T, E>, _marker: PhantomData, count: u32, hash: T::Hash, @@ -269,9 +273,9 @@ 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, F: StorageEntry, E> KeyIter<'a, T, F, E> { /// Returns the next key value pair from a map. - pub async fn next(&mut self) -> Result, Error> { + pub async fn next(&mut self) -> Result, Error> { loop { if let Some((k, v)) = self.buffer.pop() { return Ok(Some((k, Decode::decode(&mut &v.0[..])?))) diff --git a/src/subscription.rs b/src/subscription.rs index 803d92c430..6054cf8599 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -14,6 +14,18 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +use crate::{ + error::Error, + events::{ + EventsDecoder, + RawEvent, + }, + rpc::Rpc, + Config, + Event, + Phase, +}; +use codec::Decode; use jsonrpsee::core::{ client::Subscription, DeserializeOwned, @@ -28,21 +40,9 @@ use sp_core::{ use sp_runtime::traits::Header; use std::collections::VecDeque; -use crate::{ - error::Error, - events::{ - EventsDecoder, - RawEvent, - }, - rpc::Rpc, - Config, - Event, - Phase, -}; - /// Event subscription simplifies filtering a storage change set stream for /// events of interest. -pub struct EventSubscription<'a, T: Config, E> { +pub struct EventSubscription<'a, T: Config, E: Decode> { block_reader: BlockReader<'a, T, E>, block: Option, extrinsic: Option, @@ -51,18 +51,20 @@ pub struct EventSubscription<'a, T: Config, E> { finished: bool, } -enum BlockReader<'a, T: Config, E> { +enum BlockReader<'a, T: Config, E: Decode> { Decoder { - subscription: EventStorageSubscription, + subscription: EventStorageSubscription, decoder: &'a EventsDecoder, }, /// Mock event listener for unit tests #[cfg(test)] - Mock(Box, Error>)>>), + Mock(Box, Error>)>>), } -impl<'a, T: Config, E> BlockReader<'a, T, E> { - async fn next(&mut self) -> Option<(T::Hash, Result, Error>)> { +impl<'a, T: Config, E: Decode> BlockReader<'a, T, E> { + async fn next( + &mut self, + ) -> Option<(T::Hash, Result, Error>)> { match self { BlockReader::Decoder { subscription, @@ -86,10 +88,10 @@ impl<'a, T: Config, E> BlockReader<'a, T, E> { } } -impl<'a, T: Config, E> EventSubscription<'a, T, E> { +impl<'a, T: Config, E: Decode> EventSubscription<'a, T, E> { /// Creates a new event subscription. pub fn new( - subscription: EventStorageSubscription, + subscription: EventStorageSubscription, decoder: &'a EventsDecoder, ) -> Self { Self { @@ -122,7 +124,7 @@ impl<'a, T: Config, E> EventSubscription<'a, T, E> { } /// Gets the next event. - pub async fn next(&mut self) -> Option> { + pub async fn next(&mut self) -> Option>> { loop { if let Some(raw_event) = self.events.pop_front() { return Some(Ok(raw_event)) @@ -181,16 +183,16 @@ impl From for StorageKey { } /// Event subscription to only fetch finalized storage changes. -pub struct FinalizedEventStorageSubscription { - rpc: Rpc, +pub struct FinalizedEventStorageSubscription { + rpc: Rpc, subscription: Subscription, storage_changes: VecDeque>, storage_key: StorageKey, } -impl FinalizedEventStorageSubscription { +impl FinalizedEventStorageSubscription { /// Creates a new finalized event storage subscription. - pub fn new(rpc: Rpc, subscription: Subscription) -> Self { + pub fn new(rpc: Rpc, subscription: Subscription) -> Self { Self { rpc, subscription, @@ -219,14 +221,14 @@ impl FinalizedEventStorageSubscription { } /// Wrapper over imported and finalized event subscriptions. -pub enum EventStorageSubscription { +pub enum EventStorageSubscription { /// Events that are InBlock Imported(Subscription>), /// Events that are Finalized - Finalized(FinalizedEventStorageSubscription), + Finalized(FinalizedEventStorageSubscription), } -impl EventStorageSubscription { +impl EventStorageSubscription { /// Gets the next change_set from the subscription. pub async fn next(&mut self) -> Option> { match self { diff --git a/src/transaction.rs b/src/transaction.rs index 836b904095..b9ab28a291 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -16,12 +16,12 @@ use std::task::Poll; +use crate::PhantomDataSendSync; +use codec::Decode; use sp_core::storage::StorageKey; use sp_runtime::traits::Hash; -use codec::Decode; pub use sp_runtime::traits::SignedExtension; pub use sp_version::RuntimeVersion; -use crate::PhantomDataSendSync; use crate::{ client::Client, @@ -151,7 +151,9 @@ impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { /// 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> { + pub async fn wait_for_finalized_success( + self, + ) -> Result, Error> { let evs = self.wait_for_finalized().await?.wait_for_success().await?; Ok(evs) } @@ -411,7 +413,7 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { block_hash: self.block_hash, ext_hash: self.ext_hash, events, - _error: PhantomDataSendSync::new() + _error: PhantomDataSendSync::new(), }) } } From 2a8f09405d406580b56ef3d1dac2e944dd61591c Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 14 Jan 2022 11:19:44 +0000 Subject: [PATCH 03/21] Remove E param from RpcClient since it doesn't really need it --- src/client.rs | 4 +-- src/error.rs | 24 +++++++++++++++ src/rpc.rs | 85 +++++++++++++++++---------------------------------- 3 files changed, 54 insertions(+), 59 deletions(-) diff --git a/src/client.rs b/src/client.rs index 87a910d754..0936400477 100644 --- a/src/client.rs +++ b/src/client.rs @@ -51,7 +51,7 @@ use std::{ #[derive(Default)] pub struct ClientBuilder { url: Option, - client: Option>, + client: Option, page_size: Option, _error: PhantomData, } @@ -68,7 +68,7 @@ impl ClientBuilder { } /// Sets the jsonrpsee client. - pub fn set_client>>(mut self, client: C) -> Self { + pub fn set_client>(mut self, client: C) -> Self { self.client = Some(client.into()); self } diff --git a/src/error.rs b/src/error.rs index 103c894fdb..9d727100db 100644 --- a/src/error.rs +++ b/src/error.rs @@ -68,6 +68,30 @@ pub enum Error { Other(String), } +impl Error { + /// [`Error`] is parameterised over the type of `Runtime` error that + /// it holds. 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) -> Error + where F: FnOnce(E) -> NewE + { + match self { + Error::Io(e) => Error::Io(e), + Error::Codec(e) => Error::Codec(e), + Error::Rpc(e) => Error::Rpc(e), + Error::Serialization(e) => Error::Serialization(e), + Error::SecretString(e) => Error::SecretString(e), + Error::Invalid(e) => Error::Invalid(e), + Error::InvalidMetadata(e) => Error::InvalidMetadata(e), + Error::Metadata(e) => Error::Metadata(e), + Error::Runtime(e) => Error::Runtime(f(e)), + Error::EventsDecoding(e) => Error::EventsDecoding(e), + Error::Transaction(e) => Error::Transaction(e), + Error::Other(e) => Error::Other(e), + } + } +} + impl From for Error { fn from(error: SecretStringError) -> Self { Error::SecretString(error) diff --git a/src/rpc.rs b/src/rpc.rs index 7d1eb49a0d..09355dcbf5 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -33,7 +33,6 @@ use crate::{ }, Config, Metadata, - PhantomDataSendSync, }; use codec::{ Decode, @@ -43,7 +42,6 @@ use core::{ convert::TryInto, marker::PhantomData, }; -use derivative::Derivative; use frame_metadata::RuntimeMetadataPrefixed; use jsonrpsee::{ core::{ @@ -168,15 +166,8 @@ pub enum SubstrateTransactionStatus { /// Rpc client wrapper. /// This is workaround because adding generic types causes the macros to fail. -#[derive(Derivative)] -#[derivative(Clone(bound = ""))] -pub struct RpcClient { - client: RpcClientInner, - _error: PhantomDataSendSync, -} - #[derive(Clone)] -enum RpcClientInner { +pub enum RpcClient { /// JSONRPC client WebSocket transport. WebSocket(Arc), /// JSONRPC client HTTP transport. @@ -184,28 +175,22 @@ enum RpcClientInner { Http(Arc), } -impl RpcClient { +impl RpcClient { /// Create a new [`RpcClient`] from the given URL. /// /// Infers the protocol from the URL, supports: /// - Websockets (`ws://`, `wss://`) /// - Http (`http://`, `https://`) - pub async fn try_from_url(url: &str) -> Result> { + pub async fn try_from_url(url: &str) -> Result { if url.starts_with("ws://") || url.starts_with("wss://") { let client = WsClientBuilder::default() .max_notifs_per_subscription(4096) .build(url) .await?; - Ok(RpcClient { - client: RpcClientInner::WebSocket(Arc::new(client)), - _error: PhantomDataSendSync::new(), - }) + Ok(RpcClient::WebSocket(Arc::new(client))) } else { let client = HttpClientBuilder::default().build(&url)?; - Ok(RpcClient { - client: RpcClientInner::Http(Arc::new(client)), - _error: PhantomDataSendSync::new(), - }) + Ok(RpcClient::Http(Arc::new(client))) } } @@ -214,15 +199,15 @@ impl RpcClient { &self, method: &str, params: &[JsonValue], - ) -> Result> { + ) -> Result { let params = Some(params.into()); log::debug!("request {}: {:?}", method, params); - let data = match &self.client { - RpcClientInner::WebSocket(inner) => { - inner.request(method, params).await.map_err(Into::into) + let data = match self { + RpcClient::WebSocket(inner) => { + inner.request(method, params).await } - RpcClientInner::Http(inner) => { - inner.request(method, params).await.map_err(Into::into) + RpcClient::Http(inner) => { + inner.request(method, params).await } }; data @@ -234,58 +219,44 @@ impl RpcClient { subscribe_method: &str, params: &[JsonValue], unsubscribe_method: &str, - ) -> Result, Error> { + ) -> Result, RpcError> { let params = Some(params.into()); - match &self.client { - RpcClientInner::WebSocket(inner) => { + match self { + RpcClient::WebSocket(inner) => { inner .subscribe(subscribe_method, params, unsubscribe_method) .await - .map_err(Into::into) } - RpcClientInner::Http(_) => { + RpcClient::Http(_) => { Err(RpcError::Custom( "Subscriptions not supported on HTTP transport".to_owned(), - ) - .into()) + )) } } } } -impl From for RpcClient { +impl From for RpcClient { fn from(client: Client) -> Self { - RpcClient { - client: RpcClientInner::WebSocket(Arc::new(client)), - _error: PhantomDataSendSync::new(), - } + RpcClient::WebSocket(Arc::new(client)) } } -impl From> for RpcClient { +impl From> for RpcClient { fn from(client: Arc) -> Self { - RpcClient { - client: RpcClientInner::WebSocket(client), - _error: PhantomDataSendSync::new(), - } + RpcClient::WebSocket(client) } } -impl From for RpcClient { +impl From for RpcClient { fn from(client: HttpClient) -> Self { - RpcClient { - client: RpcClientInner::Http(Arc::new(client)), - _error: PhantomDataSendSync::new(), - } + RpcClient::Http(Arc::new(client)) } } -impl From> for RpcClient { +impl From> for RpcClient { fn from(client: Arc) -> Self { - RpcClient { - client: RpcClientInner::Http(client), - _error: PhantomDataSendSync::new(), - } + RpcClient::Http(client) } } @@ -305,10 +276,10 @@ pub struct ReadProof { } /// Client for substrate rpc interfaces -pub struct Rpc { +pub struct Rpc { /// Rpc client for sending requests. - pub client: RpcClient, - marker: PhantomData, + pub client: RpcClient, + marker: PhantomData<(T,E)>, } impl Clone for Rpc { @@ -322,7 +293,7 @@ impl Clone for Rpc { impl Rpc { /// Create a new [`Rpc`] - pub fn new(client: RpcClient) -> Self { + pub fn new(client: RpcClient) -> Self { Self { client, marker: PhantomData, From 2f19f9c344dffa3b665befda6faff41701075fa0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 14 Jan 2022 13:46:03 +0000 Subject: [PATCH 04/21] Point to generated DispatchError in codegen so no need for additional param there --- codegen/src/api/calls.rs | 17 ++++++++++------- codegen/src/api/mod.rs | 35 +++++++++++++++++++---------------- codegen/src/api/storage.rs | 11 +++++++---- src/subscription.rs | 2 +- 4 files changed, 37 insertions(+), 28 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 60a458e7e6..0d607a7f29 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -68,7 +68,7 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, #call_struct_name> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, #call_struct_name, DispatchError> { let call = #call_struct_name { #( #call_args, )* }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -80,20 +80,23 @@ pub fn generate_calls( quote! { pub mod calls { use super::#types_mod_ident; + + type DispatchError = #types_mod_ident::sp_runtime::DispatchError; + #( #call_structs )* - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData } } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 1816ece5d8..8962e6dba8 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -227,6 +227,9 @@ impl RuntimeGenerator { /// constructing a transaction. pub type DefaultAccountData = self::system::storage::Account; + /// The default error type returned when there is a runtime issue. + type DispatchError = self::runtime_types::sp_runtime::DispatchError; + impl ::subxt::AccountData<::subxt::DefaultConfig> for DefaultAccountData { fn nonce(result: &::Value) -> <::subxt::DefaultConfig as ::subxt::Config>::Index { result.nonce @@ -236,37 +239,37 @@ impl RuntimeGenerator { } } - pub struct RuntimeApi { - pub client: ::subxt::Client, - marker: ::core::marker::PhantomData, + pub struct RuntimeApi { + pub client: ::subxt::Client, + marker: ::core::marker::PhantomData, } - impl ::core::convert::From<::subxt::Client> for RuntimeApi + impl ::core::convert::From<::subxt::Client> for RuntimeApi where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, { - fn from(client: ::subxt::Client) -> Self { + fn from(client: ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData } } } - impl<'a, T, E> RuntimeApi + impl<'a, T, X> RuntimeApi where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, { pub fn storage(&'a self) -> StorageApi<'a, T> { StorageApi { client: &self.client } } - pub fn tx(&'a self) -> TransactionApi<'a, T, E, DefaultAccountData> { + pub fn tx(&'a self) -> TransactionApi<'a, T, X, DefaultAccountData> { TransactionApi { client: &self.client, marker: ::core::marker::PhantomData } } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T> StorageApi<'a, T> @@ -280,19 +283,19 @@ impl RuntimeGenerator { )* } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { #( - pub fn #pallets_with_calls(&self) -> #pallets_with_calls::calls::TransactionApi<'a, T, E, A> { + pub fn #pallets_with_calls(&self) -> #pallets_with_calls::calls::TransactionApi<'a, T, X, A> { #pallets_with_calls::calls::TransactionApi::new(self.client) } )* diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index f957a4cdf7..a491e2ca75 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -50,14 +50,17 @@ pub fn generate_storage( quote! { pub mod storage { use super::#types_mod_ident; + + type DispatchError = #types_mod_ident::sp_runtime::DispatchError; + #( #storage_structs )* pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } @@ -195,7 +198,7 @@ fn generate_storage_entry_fns( pub async fn #fn_name_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, #entry_struct_ident>, ::subxt::Error> { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, #entry_struct_ident, DispatchError>, ::subxt::Error> { self.client.storage().iter(hash).await } ) @@ -211,7 +214,7 @@ fn generate_storage_entry_fns( &self, #( #key_args, )* hash: ::core::option::Option, - ) -> ::core::result::Result<#return_ty, ::subxt::Error> { + ) -> ::core::result::Result<#return_ty, ::subxt::Error> { let entry = #constructor; self.client.storage().#fetch(&entry, hash).await } diff --git a/src/subscription.rs b/src/subscription.rs index 6054cf8599..9c40da6022 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -42,7 +42,7 @@ use std::collections::VecDeque; /// Event subscription simplifies filtering a storage change set stream for /// events of interest. -pub struct EventSubscription<'a, T: Config, E: Decode> { +pub struct EventSubscription<'a, T: Config, E: Decode = ()> { block_reader: BlockReader<'a, T, E>, block: Option, extrinsic: Option, From 5d0a56af85f357093aa508da94bd7b4559c904b0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 14 Jan 2022 15:53:13 +0000 Subject: [PATCH 05/21] More error hunting; cargo check --all-targets passes now --- codegen/src/api/mod.rs | 2 +- codegen/src/derives.rs | 1 + codegen/src/types/tests.rs | 68 +- examples/custom_type_derives.rs | 2 +- examples/transfer_subscribe.rs | 2 +- src/error.rs | 7 +- src/events.rs | 4 +- src/rpc.rs | 10 +- src/subscription.rs | 4 +- test-runtime/build.rs | 2 +- tests/integration/codegen/polkadot.rs | 11018 ++++++++++++++++-------- tests/integration/frame/balances.rs | 19 +- tests/integration/frame/contracts.rs | 12 +- tests/integration/frame/staking.rs | 41 +- tests/integration/frame/sudo.rs | 5 +- tests/integration/frame/system.rs | 9 +- tests/integration/utils/context.rs | 17 +- tests/integration/utils/node_proc.rs | 16 +- 18 files changed, 7732 insertions(+), 3507 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 8962e6dba8..933278f44c 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -228,7 +228,7 @@ impl RuntimeGenerator { pub type DefaultAccountData = self::system::storage::Account; /// The default error type returned when there is a runtime issue. - type DispatchError = self::runtime_types::sp_runtime::DispatchError; + pub type DispatchError = self::runtime_types::sp_runtime::DispatchError; impl ::subxt::AccountData<::subxt::DefaultConfig> for DefaultAccountData { fn nonce(result: &::Value) -> <::subxt::DefaultConfig as ::subxt::Config>::Index { diff --git a/codegen/src/derives.rs b/codegen/src/derives.rs index dace912ae8..cd7c7b8850 100644 --- a/codegen/src/derives.rs +++ b/codegen/src/derives.rs @@ -38,6 +38,7 @@ impl Default for GeneratedTypeDerives { let mut derives = Punctuated::new(); derives.push(syn::parse_quote!(::subxt::codec::Encode)); derives.push(syn::parse_quote!(::subxt::codec::Decode)); + derives.push(syn::parse_quote!(Debug)); Self::new(derives) } } diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs index 086347f787..16cce59a49 100644 --- a/codegen/src/types/tests.rs +++ b/codegen/src/types/tests.rs @@ -64,7 +64,7 @@ fn generate_struct_with_primitives() { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { pub a: ::core::primitive::bool, pub b: ::core::primitive::u32, @@ -110,12 +110,12 @@ fn generate_struct_with_a_struct_field() { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Child { pub a: ::core::primitive::i32, } - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Parent { pub a: ::core::primitive::bool, pub b: root::subxt_codegen::types::tests::Child, @@ -155,10 +155,10 @@ fn generate_tuple_struct() { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Child(pub ::core::primitive::i32,); - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Parent(pub ::core::primitive::bool, pub root::subxt_codegen::types::tests::Child,); } } @@ -238,43 +238,43 @@ fn derive_compact_as_for_uint_wrapper_structs() { use super::root; #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Su128 { pub a: ::core::primitive::u128, } #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Su16 { pub a: ::core::primitive::u16, } #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Su32 { pub a: ::core::primitive::u32, } #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Su64 { pub a: ::core::primitive::u64, } #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Su8 { pub a: ::core::primitive::u8, } #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct TSu128(pub ::core::primitive::u128,); #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct TSu16(pub ::core::primitive::u16,); #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct TSu32(pub ::core::primitive::u32,); #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct TSu64(pub ::core::primitive::u64,); #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct TSu8(pub ::core::primitive::u8,); } } @@ -310,7 +310,7 @@ fn generate_enum() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub enum E { # [codec (index = 0)] A, @@ -368,7 +368,7 @@ fn compact_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub enum E { # [codec (index = 0)] A { @@ -379,12 +379,12 @@ fn compact_fields() { B( #[codec(compact)] ::core::primitive::u32,), } - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { #[codec(compact)] pub a: ::core::primitive::u32, } - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct TupleStruct(#[codec(compact)] pub ::core::primitive::u32,); } } @@ -418,7 +418,7 @@ fn generate_array_field() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { pub a: [::core::primitive::u8; 32usize], } @@ -455,7 +455,7 @@ fn option_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { pub a: ::core::option::Option<::core::primitive::bool>, pub b: ::core::option::Option<::core::primitive::u32>, @@ -495,7 +495,7 @@ fn box_fields_struct() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { pub a: ::std::boxed::Box<::core::primitive::bool>, pub b: ::std::boxed::Box<::core::primitive::u32>, @@ -535,7 +535,7 @@ fn box_fields_enum() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub enum E { # [codec (index = 0)] A(::std::boxed::Box<::core::primitive::bool>,), @@ -575,7 +575,7 @@ fn range_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { pub a: ::core::ops::Range<::core::primitive::u32>, pub b: ::core::ops::RangeInclusive<::core::primitive::u32>, @@ -619,12 +619,12 @@ fn generics() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, 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::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Foo<_0> { pub a: _0, } @@ -667,12 +667,12 @@ fn generics_nested() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Bar<_0> { pub b: root::subxt_codegen::types::tests::Foo<_0, ::core::primitive::u32>, } - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Foo<_0, _1> { pub a: _0, pub b: ::core::option::Option<(_0, _1,)>, @@ -718,7 +718,7 @@ fn generate_bitvec() { quote! { pub mod tests { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct S { pub lsb: ::subxt::bitvec::vec::BitVec, pub msb: ::subxt::bitvec::vec::BitVec, @@ -772,12 +772,12 @@ fn generics_with_alias_adds_phantom_data_marker() { pub mod tests { use super::root; #[derive(::subxt::codec::CompactAs)] - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct NamedFields<_0> { pub b: ::core::primitive::u32, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_0>, } - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct UnnamedFields<_0, _1> ( pub (::core::primitive::u32, ::core::primitive::u32,), #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1)>, @@ -840,20 +840,20 @@ fn modules() { pub mod b { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Bar { pub a: root::subxt_codegen::types::tests::m::a::Foo, } } - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Foo {} } pub mod c { use super::root; - #[derive(::subxt::codec::Encode, ::subxt::codec::Decode)] + #[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)] pub struct Foo { pub a: root::subxt_codegen::types::tests::m::a::b::Bar, } diff --git a/examples/custom_type_derives.rs b/examples/custom_type_derives.rs index 2f2012d53e..c02807e99a 100644 --- a/examples/custom_type_derives.rs +++ b/examples/custom_type_derives.rs @@ -16,7 +16,7 @@ #[subxt::subxt( runtime_metadata_path = "examples/polkadot_metadata.scale", - generated_type_derives = "Clone, Debug" + generated_type_derives = "Clone" )] pub mod polkadot {} diff --git a/examples/transfer_subscribe.rs b/examples/transfer_subscribe.rs index 033c0533af..30e3c02aaa 100644 --- a/examples/transfer_subscribe.rs +++ b/examples/transfer_subscribe.rs @@ -48,7 +48,7 @@ async fn main() -> Result<(), Box> { let sub = api.client.rpc().subscribe_events().await?; let decoder = api.client.events_decoder(); - let mut sub = EventSubscription::::new(sub, decoder); + let mut sub = EventSubscription::::new(sub, decoder); sub.filter_event::(); api.tx() diff --git a/src/error.rs b/src/error.rs index 9d727100db..675eae6194 100644 --- a/src/error.rs +++ b/src/error.rs @@ -68,12 +68,13 @@ pub enum Error { Other(String), } -impl Error { +impl Error { /// [`Error`] is parameterised over the type of `Runtime` error that /// it holds. 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) -> Error - where F: FnOnce(E) -> NewE + pub fn map_runtime_err(self, f: F) -> Error + where + F: FnOnce(E) -> NewE, { match self { Error::Io(e) => Error::Io(e), diff --git a/src/events.rs b/src/events.rs index d2ff6b1eae..d9bd8f900e 100644 --- a/src/events.rs +++ b/src/events.rs @@ -394,7 +394,7 @@ mod tests { } } - fn init_decoder(pallets: Vec) -> EventsDecoder { + fn init_decoder(pallets: Vec) -> EventsDecoder { let extrinsic = ExtrinsicMetadata { ty: meta_type::<()>(), version: 0, @@ -403,7 +403,7 @@ mod tests { let v14 = RuntimeMetadataLastVersion::new(pallets, extrinsic, meta_type::<()>()); let runtime_metadata: RuntimeMetadataPrefixed = v14.into(); let metadata = Metadata::try_from(runtime_metadata).unwrap(); - EventsDecoder::::new(metadata) + EventsDecoder::::new(metadata) } #[test] diff --git a/src/rpc.rs b/src/rpc.rs index 09355dcbf5..fab7645d8e 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -203,12 +203,8 @@ impl RpcClient { let params = Some(params.into()); log::debug!("request {}: {:?}", method, params); let data = match self { - RpcClient::WebSocket(inner) => { - inner.request(method, params).await - } - RpcClient::Http(inner) => { - inner.request(method, params).await - } + RpcClient::WebSocket(inner) => inner.request(method, params).await, + RpcClient::Http(inner) => inner.request(method, params).await, }; data } @@ -279,7 +275,7 @@ pub struct ReadProof { pub struct Rpc { /// Rpc client for sending requests. pub client: RpcClient, - marker: PhantomData<(T,E)>, + marker: PhantomData<(T, E)>, } impl Clone for Rpc { diff --git a/src/subscription.rs b/src/subscription.rs index 9c40da6022..23b79382cd 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -42,7 +42,7 @@ use std::collections::VecDeque; /// Event subscription simplifies filtering a storage change set stream for /// events of interest. -pub struct EventSubscription<'a, T: Config, E: Decode = ()> { +pub struct EventSubscription<'a, T: Config, E: Decode> { block_reader: BlockReader<'a, T, E>, block: Option, extrinsic: Option, @@ -301,7 +301,7 @@ mod tests { for block_filter in [None, Some(H256::from([1; 32]))] { for extrinsic_filter in [None, Some(1)] { for event_filter in [None, Some(("b", "b"))] { - let mut subscription: EventSubscription = + let mut subscription: EventSubscription = EventSubscription { block_reader: BlockReader::Mock(Box::new( vec![ diff --git a/test-runtime/build.rs b/test-runtime/build.rs index a994365a11..71a075a37a 100644 --- a/test-runtime/build.rs +++ b/test-runtime/build.rs @@ -98,7 +98,7 @@ async fn run() { r#" #[subxt::subxt( runtime_metadata_path = "{}", - generated_type_derives = "Debug, Eq, PartialEq" + generated_type_derives = "Eq, PartialEq" )] pub mod node_runtime {{ #[subxt(substitute_type = "sp_arithmetic::per_things::Perbill")] diff --git a/tests/integration/codegen/polkadot.rs b/tests/integration/codegen/polkadot.rs index c16524a50e..bf942ce72b 100644 --- a/tests/integration/codegen/polkadot.rs +++ b/tests/integration/codegen/polkadot.rs @@ -1,11 +1,13 @@ #[allow(dead_code, unused_imports, non_camel_case_types)] pub mod api { - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Event { #[codec(index = 0)] System(system::Event), #[codec(index = 1)] Scheduler(scheduler::Event), + #[codec(index = 10)] + Preimage(preimage::Event), #[codec(index = 4)] Indices(indices::Event), #[codec(index = 5)] @@ -68,12 +70,15 @@ pub mod api { Auctions(auctions::Event), #[codec(index = 73)] Crowdloan(crowdloan::Event), + #[codec(index = 99)] + XcmPallet(xcm_pallet::Event), } pub mod system { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct FillBlock { pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, } @@ -81,7 +86,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "fill_block"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Remark { pub remark: ::std::vec::Vec<::core::primitive::u8>, } @@ -89,7 +94,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "remark"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHeapPages { pub pages: ::core::primitive::u64, } @@ -97,7 +102,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_heap_pages"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetCode { pub code: ::std::vec::Vec<::core::primitive::u8>, } @@ -105,7 +110,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_code"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetCodeWithoutChecks { pub code: ::std::vec::Vec<::core::primitive::u8>, } @@ -113,17 +118,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_code_without_checks"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SetChangesTrieConfig { - pub changes_trie_config: ::core::option::Option< - runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, - >, - } - impl ::subxt::Call for SetChangesTrieConfig { - const PALLET: &'static str = "System"; - const FUNCTION: &'static str = "set_changes_trie_config"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetStorage { pub items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, @@ -134,7 +129,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_storage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct KillStorage { pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, } @@ -142,7 +137,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "kill_storage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct KillPrefix { pub prefix: ::std::vec::Vec<::core::primitive::u8>, pub subkeys: ::core::primitive::u32, @@ -151,7 +146,7 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "kill_prefix"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemarkWithEvent { pub remark: ::std::vec::Vec<::core::primitive::u8>, } @@ -159,17 +154,17 @@ pub mod api { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "remark_with_event"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -178,7 +173,7 @@ pub mod api { pub fn fill_block( &self, ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, FillBlock> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, FillBlock, DispatchError> { let call = FillBlock { ratio }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -186,14 +181,15 @@ pub mod api { pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Remark> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Remark, DispatchError> + { let call = Remark { remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHeapPages> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetHeapPages, DispatchError> { let call = SetHeapPages { pages }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -201,37 +197,32 @@ pub mod api { pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetCode> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetCode, DispatchError> + { let call = SetCode { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_code_without_checks( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetCodeWithoutChecks> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetCodeWithoutChecks, + DispatchError, + > { let call = SetCodeWithoutChecks { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_changes_trie_config( - &self, - changes_trie_config: ::core::option::Option< - runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, - >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetChangesTrieConfig> - { - let call = SetChangesTrieConfig { - changes_trie_config, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } pub fn set_storage( &self, items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetStorage> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetStorage, DispatchError> { let call = SetStorage { items }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -239,7 +230,7 @@ pub mod api { pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, KillStorage> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, KillStorage, DispatchError> { let call = KillStorage { keys }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -248,7 +239,7 @@ pub mod api { &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, KillPrefix> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, KillPrefix, DispatchError> { let call = KillPrefix { prefix, subkeys }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -256,8 +247,14 @@ pub mod api { pub fn remark_with_event( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemarkWithEvent> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RemarkWithEvent, + DispatchError, + > { let call = RemarkWithEvent { remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -266,46 +263,50 @@ pub mod api { pub type Event = runtime_types::frame_system::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ExtrinsicSuccess( - pub runtime_types::frame_support::weights::DispatchInfo, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ExtrinsicSuccess { + pub dispatch_info: runtime_types::frame_support::weights::DispatchInfo, + } impl ::subxt::Event for ExtrinsicSuccess { const PALLET: &'static str = "System"; const EVENT: &'static str = "ExtrinsicSuccess"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ExtrinsicFailed( - pub runtime_types::sp_runtime::DispatchError, - pub runtime_types::frame_support::weights::DispatchInfo, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + 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 { const PALLET: &'static str = "System"; const EVENT: &'static str = "ExtrinsicFailed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CodeUpdated {} impl ::subxt::Event for CodeUpdated { const PALLET: &'static str = "System"; const EVENT: &'static str = "CodeUpdated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NewAccount(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NewAccount { + pub account: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for NewAccount { const PALLET: &'static str = "System"; const EVENT: &'static str = "NewAccount"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct KilledAccount(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct KilledAccount { + pub account: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for KilledAccount { const PALLET: &'static str = "System"; const EVENT: &'static str = "KilledAccount"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Remarked( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Remarked { + pub sender: ::subxt::sp_core::crypto::AccountId32, + pub hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Remarked { const PALLET: &'static str = "System"; const EVENT: &'static str = "Remarked"; @@ -313,6 +314,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Account(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Account { const PALLET: &'static str = "System"; @@ -403,9 +405,7 @@ pub mod api { impl ::subxt::StorageEntry for Digest { const PALLET: &'static str = "System"; const STORAGE: &'static str = "Digest"; - type Value = runtime_types::sp_runtime::generic::digest::Digest< - ::subxt::sp_core::H256, - >; + type Value = runtime_types::sp_runtime::generic::digest::Digest; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -483,10 +483,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn account( @@ -500,7 +500,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Account(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -509,8 +509,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Account>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Account, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -519,7 +519,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = ExtrinsicCount; self.client.storage().fetch(&entry, hash).await @@ -531,7 +531,7 @@ pub mod api { runtime_types::frame_support::weights::PerDispatchClass< ::core::primitive::u64, >, - ::subxt::Error, + ::subxt::Error, > { let entry = BlockWeight; self.client.storage().fetch_or_default(&entry, hash).await @@ -541,7 +541,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = AllExtrinsicsLen; self.client.storage().fetch(&entry, hash).await @@ -550,8 +550,10 @@ pub mod api { &self, _0: ::core::primitive::u32, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::sp_core::H256, + ::subxt::Error, + > { let entry = BlockHash(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -559,8 +561,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BlockHash>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, BlockHash, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -570,7 +572,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, - ::subxt::Error, + ::subxt::Error, > { let entry = ExtrinsicData(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -579,24 +581,28 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ExtrinsicData>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ExtrinsicData, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } pub async fn number( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = Number; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn parent_hash( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::sp_core::H256, + ::subxt::Error, + > { let entry = ParentHash; self.client.storage().fetch_or_default(&entry, hash).await } @@ -604,10 +610,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::sp_runtime::generic::digest::Digest< - ::subxt::sp_core::H256, - >, - ::subxt::Error, + runtime_types::sp_runtime::generic::digest::Digest, + ::subxt::Error, > { let entry = Digest; self.client.storage().fetch_or_default(&entry, hash).await @@ -622,7 +626,7 @@ pub mod api { ::subxt::sp_core::H256, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Events; self.client.storage().fetch_or_default(&entry, hash).await @@ -630,8 +634,10 @@ pub mod api { pub async fn event_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = EventCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -641,7 +647,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::Error, + ::subxt::Error, > { let entry = EventTopics(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -650,8 +656,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, EventTopics>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, EventTopics, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -662,7 +668,7 @@ pub mod api { ::core::option::Option< runtime_types::frame_system::LastRuntimeUpgradeInfo, >, - ::subxt::Error, + ::subxt::Error, > { let entry = LastRuntimeUpgrade; self.client.storage().fetch(&entry, hash).await @@ -670,16 +676,20 @@ pub mod api { pub async fn upgraded_to_u32_ref_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = UpgradedToU32RefCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn upgraded_to_triple_ref_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = UpgradedToTripleRefCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -688,7 +698,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = ExecutionPhase; self.client.storage().fetch(&entry, hash).await @@ -700,7 +710,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Schedule { pub when: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( @@ -708,13 +719,16 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, } impl ::subxt::Call for Schedule { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Cancel { pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, @@ -723,7 +737,7 @@ pub mod api { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "cancel"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ScheduleNamed { pub id: ::std::vec::Vec<::core::primitive::u8>, pub when: ::core::primitive::u32, @@ -732,13 +746,16 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, } impl ::subxt::Call for ScheduleNamed { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_named"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelNamed { pub id: ::std::vec::Vec<::core::primitive::u8>, } @@ -746,7 +763,7 @@ pub mod api { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "cancel_named"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ScheduleAfter { pub after: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( @@ -754,13 +771,16 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, } impl ::subxt::Call for ScheduleAfter { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_after"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ScheduleNamedAfter { pub id: ::std::vec::Vec<::core::primitive::u8>, pub after: ::core::primitive::u32, @@ -769,23 +789,26 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::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, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -799,8 +822,11 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Schedule> + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Schedule, DispatchError> { let call = Schedule { when, @@ -814,7 +840,8 @@ pub mod api { &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Cancel> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Cancel, DispatchError> + { let call = Cancel { when, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -827,9 +854,18 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ScheduleNamed> - { + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ScheduleNamed, + DispatchError, + > { let call = ScheduleNamed { id, when, @@ -842,7 +878,7 @@ pub mod api { pub fn cancel_named( &self, id: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelNamed> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CancelNamed, DispatchError> { let call = CancelNamed { id }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -855,9 +891,18 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ScheduleAfter> - { + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ScheduleAfter, + DispatchError, + > { let call = ScheduleAfter { after, maybe_periodic, @@ -875,9 +920,18 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ScheduleNamedAfter> - { + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ScheduleNamedAfter, + DispatchError, + > { let call = ScheduleNamedAfter { id, after, @@ -892,39 +946,60 @@ pub mod api { pub type Event = runtime_types::pallet_scheduler::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Scheduled(pub ::core::primitive::u32, pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Scheduled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } impl ::subxt::Event for Scheduled { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Scheduled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Canceled(pub ::core::primitive::u32, pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Canceled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } impl ::subxt::Event for Canceled { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Canceled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Dispatched( - pub (::core::primitive::u32, ::core::primitive::u32), - pub ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Dispatched { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for Dispatched { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Dispatched"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + 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 { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "CallLookupFailed"; + } } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Agenda(pub ::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::ScheduledV2< - runtime_types::polkadot_runtime::Call, + 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, @@ -960,37 +1035,22 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } - pub async fn agenda( - &self, - _0: ::core::primitive::u32, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::std::vec::Vec< - ::core::option::Option< - runtime_types::pallet_scheduler::ScheduledV2< - runtime_types::polkadot_runtime::Call, - ::core::primitive::u32, - runtime_types::polkadot_runtime::OriginCaller, - ::subxt::sp_core::crypto::AccountId32, - >, - >, - >, - ::subxt::Error, - > { + } pub async fn agenda (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: 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 :: Error < DispatchError >>{ let entry = Agenda(_0); self.client.storage().fetch_or_default(&entry, hash).await } pub async fn agenda_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Agenda>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Agenda, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn lookup( @@ -1002,7 +1062,7 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Lookup(_0); self.client.storage().fetch(&entry, hash).await @@ -1010,8 +1070,10 @@ pub mod api { pub async fn lookup_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Lookup>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Lookup, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn storage_version( @@ -1019,7 +1081,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_scheduler::Releases, - ::subxt::Error, + ::subxt::Error, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -1027,113 +1089,358 @@ pub mod api { } } } - pub mod babe { + pub mod preimage { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ReportEquivocation { - pub 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, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotePreimage { + pub bytes: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ReportEquivocation { - const PALLET: &'static str = "Babe"; - const FUNCTION: &'static str = "report_equivocation"; + impl ::subxt::Call for NotePreimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "note_preimage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ReportEquivocationUnsigned { - pub 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, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct UnnotePreimage { + pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ReportEquivocationUnsigned { - const PALLET: &'static str = "Babe"; - const FUNCTION: &'static str = "report_equivocation_unsigned"; + impl ::subxt::Call for UnnotePreimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "unnote_preimage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PlanConfigChange { - pub config: - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct RequestPreimage { + pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for PlanConfigChange { - const PALLET: &'static str = "Babe"; - const FUNCTION: &'static str = "plan_config_change"; + impl ::subxt::Call for RequestPreimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "request_preimage"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct UnrequestPreimage { + pub hash: ::subxt::sp_core::H256, } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + impl ::subxt::Call for UnrequestPreimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "unrequest_preimage"; } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, } } - pub fn report_equivocation( + pub fn note_preimage( &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::SubmittableExtrinsic<'a, T, E, A, ReportEquivocation> + bytes: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NotePreimage, DispatchError> { - let call = ReportEquivocation { - equivocation_proof, - key_owner_proof, - }; + let call = NotePreimage { bytes }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn report_equivocation_unsigned( + pub fn unnote_preimage( &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::SubmittableExtrinsic<'a, T, E, A, ReportEquivocationUnsigned> - { - let call = ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - }; + hash: ::subxt::sp_core::H256, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + UnnotePreimage, + DispatchError, + > { + let call = UnnotePreimage { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn plan_config_change( + pub fn request_preimage( &self, - config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, PlanConfigChange> - { - let call = PlanConfigChange { config }; + hash: ::subxt::sp_core::H256, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RequestPreimage, + DispatchError, + > { + let call = RequestPreimage { hash }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn unrequest_preimage( + &self, + hash: ::subxt::sp_core::H256, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + UnrequestPreimage, + DispatchError, + > { + let call = UnrequestPreimage { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } + pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Noted { + pub hash: ::subxt::sp_core::H256, + } + impl ::subxt::Event for Noted { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Noted"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Requested { + pub hash: ::subxt::sp_core::H256, + } + impl ::subxt::Event for Requested { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Requested"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Cleared { + pub hash: ::subxt::sp_core::H256, + } + impl ::subxt::Event for Cleared { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Cleared"; + } + } 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; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct StatusFor(pub ::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::Plain + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Identity, + )]) } } - pub struct Authorities; + pub struct PreimageFor(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for PreimageFor { + const PALLET: &'static str = "Preimage"; + const STORAGE: &'static str = "PreimageFor"; + type Value = + runtime_types::frame_support::storage::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 async fn status_for( + &self, + _0: ::subxt::sp_core::H256, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + runtime_types::pallet_preimage::RequestStatus< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + >, + ::subxt::Error, + > { + let entry = StatusFor(_0); + self.client.storage().fetch(&entry, hash).await + } + pub async fn status_for_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, StatusFor, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn preimage_for( + &self, + _0: ::subxt::sp_core::H256, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + runtime_types::frame_support::storage::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + ::subxt::Error, + > { + let entry = PreimageFor(_0); + self.client.storage().fetch(&entry, hash).await + } + pub async fn preimage_for_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, PreimageFor, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + } + } + } + pub mod babe { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ReportEquivocation { + pub 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, + >, + 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ReportEquivocationUnsigned { + pub 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, + >, + 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 :: Encode, :: subxt :: codec :: Decode, 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, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn report_equivocation( + &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::SubmittableExtrinsic< + 'a, + T, + X, + A, + ReportEquivocation, + DispatchError, + > { + let call = ReportEquivocation { + equivocation_proof, + key_owner_proof, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn report_equivocation_unsigned( + &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::SubmittableExtrinsic< + 'a, + T, + X, + A, + ReportEquivocationUnsigned, + DispatchError, + > { + let call = ReportEquivocationUnsigned { + equivocation_proof, + key_owner_proof, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn plan_config_change( + &self, + config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + PlanConfigChange, + DispatchError, + > { + let call = PlanConfigChange { config }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub mod storage { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + 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"; @@ -1276,20 +1583,22 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn epoch_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u64, + ::subxt::Error, + > { let entry = EpochIndex; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: Error >{ + } pub async fn authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: Error < DispatchError >>{ let entry = Authorities; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1298,7 +1607,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_consensus_slots::Slot, - ::subxt::Error, + ::subxt::Error, > { let entry = GenesisSlot; self.client.storage().fetch_or_default(&entry, hash).await @@ -1308,7 +1617,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_consensus_slots::Slot, - ::subxt::Error, + ::subxt::Error, > { let entry = CurrentSlot; self.client.storage().fetch_or_default(&entry, hash).await @@ -1318,7 +1627,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< [::core::primitive::u8; 32usize], - ::subxt::Error, + ::subxt::Error, > { let entry = Randomness; self.client.storage().fetch_or_default(&entry, hash).await @@ -1330,7 +1639,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, >, - ::subxt::Error, + ::subxt::Error, > { let entry = PendingEpochConfigChange; self.client.storage().fetch(&entry, hash).await @@ -1340,19 +1649,21 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< [::core::primitive::u8; 32usize], - ::subxt::Error, + ::subxt::Error, > { let entry = NextRandomness; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn next_authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: Error >{ + } pub async fn next_authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: Error < DispatchError >>{ let entry = NextAuthorities; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn segment_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = SegmentIndex; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1364,7 +1675,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< [::core::primitive::u8; 32usize], >, - ::subxt::Error, + ::subxt::Error, > { let entry = UnderConstruction(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -1373,8 +1684,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UnderConstruction>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UnderConstruction, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -1385,7 +1696,7 @@ pub mod api { ::core::option::Option< ::core::option::Option<[::core::primitive::u8; 32usize]>, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Initialized; self.client.storage().fetch(&entry, hash).await @@ -1395,7 +1706,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<[::core::primitive::u8; 32usize]>, - ::subxt::Error, + ::subxt::Error, > { let entry = AuthorVrfRandomness; self.client.storage().fetch_or_default(&entry, hash).await @@ -1405,7 +1716,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< (::core::primitive::u32, ::core::primitive::u32), - ::subxt::Error, + ::subxt::Error, > { let entry = EpochStart; self.client.storage().fetch_or_default(&entry, hash).await @@ -1413,8 +1724,10 @@ pub mod api { pub async fn lateness( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = Lateness; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1425,7 +1738,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_consensus_babe::BabeEpochConfiguration, >, - ::subxt::Error, + ::subxt::Error, > { let entry = EpochConfig; self.client.storage().fetch(&entry, hash).await @@ -1437,7 +1750,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_consensus_babe::BabeEpochConfiguration, >, - ::subxt::Error, + ::subxt::Error, > { let entry = NextEpochConfig; self.client.storage().fetch(&entry, hash).await @@ -1449,7 +1762,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Set { #[codec(compact)] pub now: ::core::primitive::u64, @@ -1458,17 +1772,17 @@ pub mod api { const PALLET: &'static str = "Timestamp"; const FUNCTION: &'static str = "set"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -1477,7 +1791,8 @@ pub mod api { pub fn set( &self, now: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Set> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Set, DispatchError> + { let call = Set { now }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -1485,6 +1800,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Now; impl ::subxt::StorageEntry for Now { const PALLET: &'static str = "Timestamp"; @@ -1504,25 +1820,29 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn now( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u64, + ::subxt::Error, + > { let entry = Now; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn did_update( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = DidUpdate; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1533,7 +1853,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Claim { pub index: ::core::primitive::u32, } @@ -1541,7 +1862,7 @@ pub mod api { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "claim"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Transfer { pub new: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, @@ -1550,7 +1871,7 @@ pub mod api { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Free { pub index: ::core::primitive::u32, } @@ -1558,7 +1879,7 @@ pub mod api { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "free"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceTransfer { pub new: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, @@ -1568,7 +1889,7 @@ pub mod api { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "force_transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Freeze { pub index: ::core::primitive::u32, } @@ -1576,17 +1897,17 @@ pub mod api { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "freeze"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -1595,7 +1916,8 @@ pub mod api { pub fn claim( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Claim> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Claim, DispatchError> + { let call = Claim { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -1603,7 +1925,7 @@ pub mod api { &self, new: ::subxt::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Transfer> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Transfer, DispatchError> { let call = Transfer { new, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -1611,7 +1933,8 @@ pub mod api { pub fn free( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Free> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Free, DispatchError> + { let call = Free { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -1620,15 +1943,22 @@ pub mod api { new: ::subxt::sp_core::crypto::AccountId32, index: ::core::primitive::u32, freeze: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceTransfer> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceTransfer, + DispatchError, + > { let call = ForceTransfer { new, index, freeze }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn freeze( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Freeze> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Freeze, DispatchError> + { let call = Freeze { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -1637,26 +1967,28 @@ pub mod api { pub type Event = runtime_types::pallet_indices::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct IndexAssigned( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IndexAssigned { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub index: ::core::primitive::u32, + } impl ::subxt::Event for IndexAssigned { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexAssigned"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct IndexFreed(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IndexFreed { + pub index: ::core::primitive::u32, + } impl ::subxt::Event for IndexFreed { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexFreed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct IndexFrozen( - pub ::core::primitive::u32, - pub ::subxt::sp_core::crypto::AccountId32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IndexFrozen { + pub index: ::core::primitive::u32, + pub who: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for IndexFrozen { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexFrozen"; @@ -1664,6 +1996,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Accounts(pub ::core::primitive::u32); impl ::subxt::StorageEntry for Accounts { const PALLET: &'static str = "Indices"; @@ -1681,10 +2014,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn accounts( @@ -1697,7 +2030,7 @@ pub mod api { ::core::primitive::u128, ::core::primitive::bool, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Accounts(_0); self.client.storage().fetch(&entry, hash).await @@ -1706,8 +2039,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Accounts>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Accounts, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -1718,7 +2051,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Transfer { pub dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -1731,7 +2065,7 @@ pub mod api { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetBalance { pub who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -1746,7 +2080,7 @@ pub mod api { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "set_balance"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceTransfer { pub source: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -1763,7 +2097,7 @@ pub mod api { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "force_transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct TransferKeepAlive { pub dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -1776,7 +2110,7 @@ pub mod api { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer_keep_alive"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct TransferAll { pub dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -1788,7 +2122,7 @@ pub mod api { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer_all"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceUnreserve { pub who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -1800,17 +2134,17 @@ pub mod api { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "force_unreserve"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -1823,7 +2157,7 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Transfer> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Transfer, DispatchError> { let call = Transfer { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -1836,7 +2170,7 @@ pub mod api { >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetBalance> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetBalance, DispatchError> { let call = SetBalance { who, @@ -1856,8 +2190,14 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceTransfer> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceTransfer, + DispatchError, + > { let call = ForceTransfer { source, dest, @@ -1872,8 +2212,14 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, TransferKeepAlive> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + TransferKeepAlive, + DispatchError, + > { let call = TransferKeepAlive { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -1884,7 +2230,7 @@ pub mod api { (), >, keep_alive: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, TransferAll> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, TransferAll, DispatchError> { let call = TransferAll { dest, keep_alive }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -1896,8 +2242,14 @@ pub mod api { (), >, amount: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceUnreserve> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceUnreserve, + DispatchError, + > { let call = ForceUnreserve { who, amount }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -1906,96 +2258,97 @@ pub mod api { pub type Event = runtime_types::pallet_balances::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Endowed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Endowed { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub free_balance: ::core::primitive::u128, + } impl ::subxt::Event for Endowed { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Endowed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct DustLost( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct DustLost { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for DustLost { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "DustLost"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Transfer( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Transfer { + pub from: ::subxt::sp_core::crypto::AccountId32, + pub to: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Transfer { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BalanceSet( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BalanceSet { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub free: ::core::primitive::u128, + pub reserved: ::core::primitive::u128, + } impl ::subxt::Event for BalanceSet { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "BalanceSet"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Reserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Reserved { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Reserved { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Reserved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Unreserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Unreserved { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Unreserved { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Unreserved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ReserveRepatriated( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ReserveRepatriated { + pub from: ::subxt::sp_core::crypto::AccountId32, + pub to: ::subxt::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 { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "ReserveRepatriated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Deposit( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Deposit { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Deposit { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Deposit"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Withdraw( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Withdraw { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Withdraw { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Withdraw"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Slashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Slashed { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Slashed { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Slashed"; @@ -2003,6 +2356,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TotalIssuance; impl ::subxt::StorageEntry for TotalIssuance { const PALLET: &'static str = "Balances"; @@ -2065,17 +2419,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn total_issuance( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u128, + ::subxt::Error, + > { let entry = TotalIssuance; self.client.storage().fetch_or_default(&entry, hash).await } @@ -2085,7 +2441,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - ::subxt::Error, + ::subxt::Error, > { let entry = Account(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -2094,19 +2450,21 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Account>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Account, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await - } pub async fn locks (& self , _0 : :: subxt :: sp_core :: crypto :: AccountId32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > , :: subxt :: Error >{ + } pub async fn locks (& self , _0 : :: subxt :: sp_core :: crypto :: AccountId32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > , :: subxt :: Error < DispatchError >>{ let entry = Locks(_0); self.client.storage().fetch_or_default(&entry, hash).await } pub async fn locks_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Locks, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn reserves( @@ -2120,7 +2478,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Reserves(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -2129,8 +2487,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reserves>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Reserves, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -2139,7 +2497,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_balances::Releases, - ::subxt::Error, + ::subxt::Error, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -2151,6 +2509,7 @@ pub mod api { use super::runtime_types; pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct NextFeeMultiplier; impl ::subxt::StorageEntry for NextFeeMultiplier { const PALLET: &'static str = "TransactionPayment"; @@ -2170,10 +2529,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn next_fee_multiplier( @@ -2181,7 +2540,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_arithmetic::fixed_point::FixedU128, - ::subxt::Error, + ::subxt::Error, > { let entry = NextFeeMultiplier; self.client.storage().fetch_or_default(&entry, hash).await @@ -2191,7 +2550,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_transaction_payment::Releases, - ::subxt::Error, + ::subxt::Error, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -2203,7 +2562,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetUncles { pub new_uncles: ::std::vec::Vec< runtime_types::sp_runtime::generic::header::Header< @@ -2216,17 +2576,17 @@ pub mod api { const PALLET: &'static str = "Authorship"; const FUNCTION: &'static str = "set_uncles"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -2240,7 +2600,7 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetUncles> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetUncles, DispatchError> { let call = SetUncles { new_uncles }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -2249,6 +2609,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Uncles; impl ::subxt::StorageEntry for Uncles { const PALLET: &'static str = "Authorship"; @@ -2283,10 +2644,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn uncles( @@ -2300,7 +2661,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Uncles; self.client.storage().fetch_or_default(&entry, hash).await @@ -2310,7 +2671,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Author; self.client.storage().fetch(&entry, hash).await @@ -2318,8 +2679,10 @@ pub mod api { pub async fn did_set_uncles( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = DidSetUncles; self.client.storage().fetch_or_default(&entry, hash).await } @@ -2330,7 +2693,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Bond { pub controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -2346,7 +2710,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "bond"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BondExtra { #[codec(compact)] pub max_additional: ::core::primitive::u128, @@ -2355,7 +2719,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "bond_extra"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Unbond { #[codec(compact)] pub value: ::core::primitive::u128, @@ -2364,7 +2728,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "unbond"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct WithdrawUnbonded { pub num_slashing_spans: ::core::primitive::u32, } @@ -2372,7 +2736,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "withdraw_unbonded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Validate { pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } @@ -2380,7 +2744,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "validate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Nominate { pub targets: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -2393,13 +2757,13 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "nominate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Chill {} impl ::subxt::Call for Chill { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "chill"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetPayee { pub payee: runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, @@ -2409,7 +2773,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_payee"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetController { pub controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -2420,7 +2784,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_controller"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetValidatorCount { #[codec(compact)] pub new: ::core::primitive::u32, @@ -2429,7 +2793,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_validator_count"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct IncreaseValidatorCount { #[codec(compact)] pub additional: ::core::primitive::u32, @@ -2438,7 +2802,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "increase_validator_count"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ScaleValidatorCount { pub factor: runtime_types::sp_arithmetic::per_things::Percent, } @@ -2446,19 +2810,19 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "scale_validator_count"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceNoEras {} impl ::subxt::Call for ForceNoEras { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_no_eras"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceNewEra {} impl ::subxt::Call for ForceNewEra { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_new_era"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetInvulnerables { pub invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } @@ -2466,7 +2830,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_invulnerables"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceUnstake { pub stash: ::subxt::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, @@ -2475,13 +2839,13 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_unstake"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelDeferredSlash { pub era: ::core::primitive::u32, pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, @@ -2490,7 +2854,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "cancel_deferred_slash"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct PayoutStakers { pub validator_stash: ::subxt::sp_core::crypto::AccountId32, pub era: ::core::primitive::u32, @@ -2499,7 +2863,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "payout_stakers"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Rebond { #[codec(compact)] pub value: ::core::primitive::u128, @@ -2508,7 +2872,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "rebond"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHistoryDepth { #[codec(compact)] pub new_history_depth: ::core::primitive::u32, @@ -2519,7 +2883,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_history_depth"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReapStash { pub stash: ::subxt::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, @@ -2528,7 +2892,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "reap_stash"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Kick { pub who: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -2541,21 +2905,22 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "kick"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SetStakingLimits { + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SetStakingConfigs { pub min_nominator_bond: ::core::primitive::u128, pub min_validator_bond: ::core::primitive::u128, pub max_nominator_count: ::core::option::Option<::core::primitive::u32>, pub max_validator_count: ::core::option::Option<::core::primitive::u32>, - pub threshold: ::core::option::Option< + pub chill_threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, + pub min_commission: runtime_types::sp_arithmetic::per_things::Perbill, } - impl ::subxt::Call for SetStakingLimits { + impl ::subxt::Call for SetStakingConfigs { const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_staking_limits"; + const FUNCTION: &'static str = "set_staking_configs"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ChillOther { pub controller: ::subxt::sp_core::crypto::AccountId32, } @@ -2563,17 +2928,17 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "chill_other"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -2589,7 +2954,8 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Bond> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Bond, DispatchError> + { let call = Bond { controller, value, @@ -2600,7 +2966,7 @@ pub mod api { pub fn bond_extra( &self, max_additional: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, BondExtra> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, BondExtra, DispatchError> { let call = BondExtra { max_additional }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -2608,22 +2974,29 @@ pub mod api { pub fn unbond( &self, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Unbond> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Unbond, DispatchError> + { let call = Unbond { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn withdraw_unbonded( &self, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, WithdrawUnbonded> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + WithdrawUnbonded, + DispatchError, + > { let call = WithdrawUnbonded { num_slashing_spans }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn validate( &self, prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Validate> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Validate, DispatchError> { let call = Validate { prefs }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -2636,12 +3009,15 @@ pub mod api { (), >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Nominate> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Nominate, DispatchError> { let call = Nominate { targets }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn chill(&self) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Chill> { + pub fn chill( + &self, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Chill, DispatchError> + { let call = Chill {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -2650,7 +3026,7 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetPayee> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetPayee, DispatchError> { let call = SetPayee { payee }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -2661,45 +3037,69 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetController> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetController, + DispatchError, + > { let call = SetController { controller }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_validator_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetValidatorCount> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetValidatorCount, + DispatchError, + > { let call = SetValidatorCount { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn increase_validator_count( &self, additional: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, IncreaseValidatorCount> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + IncreaseValidatorCount, + DispatchError, + > { let call = IncreaseValidatorCount { additional }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn scale_validator_count( &self, factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ScaleValidatorCount> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ScaleValidatorCount, + DispatchError, + > { let call = ScaleValidatorCount { factor }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_no_eras( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceNoEras> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceNoEras, DispatchError> { let call = ForceNoEras {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_new_era( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceNewEra> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceNewEra, DispatchError> { let call = ForceNewEra {}; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -2707,8 +3107,14 @@ pub mod api { pub fn set_invulnerables( &self, invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetInvulnerables> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetInvulnerables, + DispatchError, + > { let call = SetInvulnerables { invulnerables }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -2716,7 +3122,7 @@ pub mod api { &self, stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceUnstake> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceUnstake, DispatchError> { let call = ForceUnstake { stash, @@ -2726,8 +3132,14 @@ pub mod api { } pub fn force_new_era_always( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceNewEraAlways> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceNewEraAlways, + DispatchError, + > { let call = ForceNewEraAlways {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -2735,8 +3147,14 @@ pub mod api { &self, era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelDeferredSlash> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CancelDeferredSlash, + DispatchError, + > { let call = CancelDeferredSlash { era, slash_indices }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -2744,8 +3162,14 @@ pub mod api { &self, validator_stash: ::subxt::sp_core::crypto::AccountId32, era: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, PayoutStakers> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + PayoutStakers, + DispatchError, + > { let call = PayoutStakers { validator_stash, era, @@ -2755,7 +3179,8 @@ pub mod api { pub fn rebond( &self, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Rebond> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Rebond, DispatchError> + { let call = Rebond { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -2763,8 +3188,14 @@ pub mod api { &self, new_history_depth: ::core::primitive::u32, era_items_deleted: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHistoryDepth> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetHistoryDepth, + DispatchError, + > { let call = SetHistoryDepth { new_history_depth, era_items_deleted, @@ -2775,7 +3206,7 @@ pub mod api { &self, stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ReapStash> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ReapStash, DispatchError> { let call = ReapStash { stash, @@ -2791,34 +3222,43 @@ pub mod api { (), >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Kick> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Kick, DispatchError> + { let call = Kick { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_staking_limits( + pub fn set_staking_configs( &self, min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, max_nominator_count: ::core::option::Option<::core::primitive::u32>, max_validator_count: ::core::option::Option<::core::primitive::u32>, - threshold: ::core::option::Option< + chill_threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetStakingLimits> - { - let call = SetStakingLimits { + min_commission: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetStakingConfigs, + DispatchError, + > { + let call = SetStakingConfigs { min_nominator_bond, min_validator_bond, max_nominator_count, max_validator_count, - threshold, + chill_threshold, + min_commission, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn chill_other( &self, controller: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ChillOther> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ChillOther, DispatchError> { let call = ChillOther { controller }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -2828,7 +3268,7 @@ pub mod api { pub type Event = runtime_types::pallet_staking::pallet::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EraPaid( pub ::core::primitive::u32, pub ::core::primitive::u128, @@ -2838,7 +3278,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "EraPaid"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Rewarded( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2847,7 +3287,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Rewarded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Slashed( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2856,19 +3296,19 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Slashed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OldSlashingReportDiscarded(pub ::core::primitive::u32); impl ::subxt::Event for OldSlashingReportDiscarded { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "OldSlashingReportDiscarded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct StakersElected {} impl ::subxt::Event for StakersElected { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "StakersElected"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Bonded( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2877,7 +3317,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Bonded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Unbonded( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2886,7 +3326,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Unbonded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Withdrawn( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2895,7 +3335,7 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Withdrawn"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Kicked( pub ::subxt::sp_core::crypto::AccountId32, pub ::subxt::sp_core::crypto::AccountId32, @@ -2904,19 +3344,19 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Kicked"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct StakingElectionFailed {} impl ::subxt::Event for StakingElectionFailed { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "StakingElectionFailed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Chilled(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for Chilled { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Chilled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct PayoutStarted( pub ::core::primitive::u32, pub ::subxt::sp_core::crypto::AccountId32, @@ -2928,6 +3368,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HistoryDepth; impl ::subxt::StorageEntry for HistoryDepth { const PALLET: &'static str = "Staking"; @@ -2994,6 +3435,15 @@ pub mod api { ::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(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Ledger { const PALLET: &'static str = "Staking"; @@ -3397,33 +3847,39 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn history_depth( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = HistoryDepth; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn validator_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = ValidatorCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn minimum_validator_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = MinimumValidatorCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -3432,7 +3888,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Invulnerables; self.client.storage().fetch_or_default(&entry, hash).await @@ -3443,7 +3899,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Bonded(_0); self.client.storage().fetch(&entry, hash).await @@ -3451,26 +3907,42 @@ pub mod api { pub async fn bonded_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Bonded>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Bonded, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn min_nominator_bond( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u128, + ::subxt::Error, + > { let entry = MinNominatorBond; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn min_validator_bond( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u128, + ::subxt::Error, + > { let entry = MinValidatorBond; self.client.storage().fetch_or_default(&entry, hash).await } + pub async fn min_commission( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::Error, + > { + let entry = MinCommission; + self.client.storage().fetch_or_default(&entry, hash).await + } pub async fn ledger( &self, _0: ::subxt::sp_core::crypto::AccountId32, @@ -3482,7 +3954,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Ledger(_0); self.client.storage().fetch(&entry, hash).await @@ -3490,8 +3962,10 @@ pub mod api { pub async fn ledger_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Ledger>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Ledger, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn payee( @@ -3502,7 +3976,7 @@ pub mod api { runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Payee(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -3510,8 +3984,10 @@ pub mod api { pub async fn payee_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Payee>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Payee, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn validators( @@ -3520,7 +3996,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::Error, + ::subxt::Error, > { let entry = Validators(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -3529,16 +4005,18 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Validators>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Validators, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } pub async fn counter_for_validators( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CounterForValidators; self.client.storage().fetch_or_default(&entry, hash).await } @@ -3547,7 +4025,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = MaxValidatorsCount; self.client.storage().fetch(&entry, hash).await @@ -3562,7 +4040,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Nominators(_0); self.client.storage().fetch(&entry, hash).await @@ -3571,16 +4049,18 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Nominators>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Nominators, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } pub async fn counter_for_nominators( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CounterForNominators; self.client.storage().fetch_or_default(&entry, hash).await } @@ -3589,7 +4069,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = MaxNominatorsCount; self.client.storage().fetch(&entry, hash).await @@ -3599,7 +4079,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = CurrentEra; self.client.storage().fetch(&entry, hash).await @@ -3609,7 +4089,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = ActiveEra; self.client.storage().fetch(&entry, hash).await @@ -3620,7 +4100,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = ErasStartSessionIndex(_0); self.client.storage().fetch(&entry, hash).await @@ -3629,8 +4109,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStartSessionIndex>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasStartSessionIndex, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3644,7 +4124,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ErasStakers(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -3653,8 +4133,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakers>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasStakers, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3668,7 +4148,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ErasStakersClipped(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -3677,8 +4157,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakersClipped>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasStakersClipped, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3689,7 +4169,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::Error, + ::subxt::Error, > { let entry = ErasValidatorPrefs(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -3698,8 +4178,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorPrefs>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasValidatorPrefs, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3709,7 +4189,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::Error, > { let entry = ErasValidatorReward(_0); self.client.storage().fetch(&entry, hash).await @@ -3718,8 +4198,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorReward>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasValidatorReward, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3731,7 +4211,7 @@ pub mod api { runtime_types::pallet_staking::EraRewardPoints< ::subxt::sp_core::crypto::AccountId32, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ErasRewardPoints(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -3740,8 +4220,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasRewardPoints>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasRewardPoints, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3749,8 +4229,10 @@ pub mod api { &self, _0: ::core::primitive::u32, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u128, + ::subxt::Error, + > { let entry = ErasTotalStake(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -3758,8 +4240,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasTotalStake>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasTotalStake, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3768,7 +4250,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::Forcing, - ::subxt::Error, + ::subxt::Error, > { let entry = ForceEra; self.client.storage().fetch_or_default(&entry, hash).await @@ -3778,7 +4260,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::Error, + ::subxt::Error, > { let entry = SlashRewardFraction; self.client.storage().fetch_or_default(&entry, hash).await @@ -3786,8 +4268,10 @@ pub mod api { pub async fn canceled_slash_payout( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u128, + ::subxt::Error, + > { let entry = CanceledSlashPayout; self.client.storage().fetch_or_default(&entry, hash).await } @@ -3802,7 +4286,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = UnappliedSlashes(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -3811,8 +4295,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UnappliedSlashes>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UnappliedSlashes, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3821,7 +4305,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::Error, + ::subxt::Error, > { let entry = BondedEras; self.client.storage().fetch_or_default(&entry, hash).await @@ -3836,7 +4320,7 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Perbill, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = ValidatorSlashInEra(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -3845,8 +4329,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ValidatorSlashInEra>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ValidatorSlashInEra, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3857,7 +4341,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::Error, > { let entry = NominatorSlashInEra(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -3866,8 +4350,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, NominatorSlashInEra>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, NominatorSlashInEra, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3879,7 +4363,7 @@ pub mod api { ::core::option::Option< runtime_types::pallet_staking::slashing::SlashingSpans, >, - ::subxt::Error, + ::subxt::Error, > { let entry = SlashingSpans(_0); self.client.storage().fetch(&entry, hash).await @@ -3888,8 +4372,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SlashingSpans>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SlashingSpans, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3902,7 +4386,7 @@ pub mod api { runtime_types::pallet_staking::slashing::SpanRecord< ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::Error, > { let entry = SpanSlash(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -3911,8 +4395,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SpanSlash>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SpanSlash, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -3921,7 +4405,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = EarliestUnappliedSlash; self.client.storage().fetch(&entry, hash).await @@ -3929,8 +4413,10 @@ pub mod api { pub async fn current_planned_session( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CurrentPlannedSession; self.client.storage().fetch_or_default(&entry, hash).await } @@ -3939,7 +4425,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, - ::subxt::Error, + ::subxt::Error, > { let entry = OffendingValidators; self.client.storage().fetch_or_default(&entry, hash).await @@ -3949,7 +4435,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::Releases, - ::subxt::Error, + ::subxt::Error, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -3961,7 +4447,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ChillThreshold; self.client.storage().fetch(&entry, hash).await @@ -3974,11 +4460,11 @@ pub mod api { pub type Event = runtime_types::pallet_offences::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Offence( - pub [::core::primitive::u8; 16usize], - pub ::std::vec::Vec<::core::primitive::u8>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Offence { + pub kind: [::core::primitive::u8; 16usize], + pub timeslot: ::std::vec::Vec<::core::primitive::u8>, + } impl ::subxt::Event for Offence { const PALLET: &'static str = "Offences"; const EVENT: &'static str = "Offence"; @@ -3986,6 +4472,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Reports(pub ::subxt::sp_core::H256); impl ::subxt::StorageEntry for Reports { const PALLET: &'static str = "Offences"; @@ -4041,10 +4528,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn reports( @@ -4064,7 +4551,7 @@ pub mod api { ), >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Reports(_0); self.client.storage().fetch(&entry, hash).await @@ -4073,8 +4560,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reports>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Reports, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4085,7 +4572,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::H256>, - ::subxt::Error, + ::subxt::Error, > { let entry = ConcurrentReportsIndex(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -4094,8 +4581,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ConcurrentReportsIndex>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ConcurrentReportsIndex, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4105,7 +4592,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, - ::subxt::Error, + ::subxt::Error, > { let entry = ReportsByKindIndex(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -4114,8 +4601,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReportsByKindIndex>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReportsByKindIndex, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4129,7 +4616,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetKeys { pub keys: runtime_types::polkadot_runtime::SessionKeys, pub proof: ::std::vec::Vec<::core::primitive::u8>, @@ -4138,23 +4626,23 @@ pub mod api { const PALLET: &'static str = "Session"; const FUNCTION: &'static str = "set_keys"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -4164,13 +4652,14 @@ pub mod api { &self, keys: runtime_types::polkadot_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetKeys> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetKeys, DispatchError> + { let call = SetKeys { keys, proof }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn purge_keys( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, PurgeKeys> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, PurgeKeys, DispatchError> { let call = PurgeKeys {}; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -4180,8 +4669,10 @@ pub mod api { pub type Event = runtime_types::pallet_session::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NewSession(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NewSession { + pub session_index: ::core::primitive::u32, + } impl ::subxt::Event for NewSession { const PALLET: &'static str = "Session"; const EVENT: &'static str = "NewSession"; @@ -4189,6 +4680,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Validators; impl ::subxt::StorageEntry for Validators { const PALLET: &'static str = "Session"; @@ -4265,10 +4757,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn validators( @@ -4276,7 +4768,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Validators; self.client.storage().fetch_or_default(&entry, hash).await @@ -4284,16 +4776,20 @@ pub mod api { pub async fn current_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CurrentIndex; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn queued_changed( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = QueuedChanged; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4305,7 +4801,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, runtime_types::polkadot_runtime::SessionKeys, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = QueuedKeys; self.client.storage().fetch_or_default(&entry, hash).await @@ -4315,7 +4811,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = DisabledValidators; self.client.storage().fetch_or_default(&entry, hash).await @@ -4326,7 +4822,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = NextKeys(_0); self.client.storage().fetch(&entry, hash).await @@ -4335,8 +4831,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, NextKeys>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, NextKeys, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4347,7 +4843,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = KeyOwner(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -4356,8 +4852,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, KeyOwner>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, KeyOwner, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4368,7 +4864,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReportEquivocation { pub equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< @@ -4381,7 +4878,7 @@ pub mod api { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "report_equivocation"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReportEquivocationUnsigned { pub equivocation_proof: runtime_types::sp_finality_grandpa::EquivocationProof< @@ -4394,7 +4891,7 @@ pub mod api { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "report_equivocation_unsigned"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NoteStalled { pub delay: ::core::primitive::u32, pub best_finalized_block_number: ::core::primitive::u32, @@ -4403,17 +4900,17 @@ pub mod api { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "note_stalled"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -4423,8 +4920,14 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ReportEquivocation> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ReportEquivocation, + DispatchError, + > { let call = ReportEquivocation { equivocation_proof, key_owner_proof, @@ -4435,8 +4938,14 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ReportEquivocationUnsigned> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ReportEquivocationUnsigned, + DispatchError, + > { let call = ReportEquivocationUnsigned { equivocation_proof, key_owner_proof, @@ -4447,7 +4956,7 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, NoteStalled> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NoteStalled, DispatchError> { let call = NoteStalled { delay, @@ -4460,24 +4969,24 @@ pub mod api { pub type Event = runtime_types::pallet_grandpa::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NewAuthorities( - pub ::std::vec::Vec<( + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NewAuthorities { + pub authority_set: ::std::vec::Vec<( runtime_types::sp_finality_grandpa::app::Public, ::core::primitive::u64, )>, - ); + } impl ::subxt::Event for NewAuthorities { const PALLET: &'static str = "Grandpa"; const EVENT: &'static str = "NewAuthorities"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Paused {} impl ::subxt::Event for Paused { const PALLET: &'static str = "Grandpa"; const EVENT: &'static str = "Paused"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Resumed {} impl ::subxt::Event for Resumed { const PALLET: &'static str = "Grandpa"; @@ -4486,6 +4995,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct State; impl ::subxt::StorageEntry for State { const PALLET: &'static str = "Grandpa"; @@ -4547,10 +5057,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn state( @@ -4558,7 +5068,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = State; self.client.storage().fetch_or_default(&entry, hash).await @@ -4572,7 +5082,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = PendingChange; self.client.storage().fetch(&entry, hash).await @@ -4582,7 +5092,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = NextForced; self.client.storage().fetch(&entry, hash).await @@ -4595,7 +5105,7 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Stalled; self.client.storage().fetch(&entry, hash).await @@ -4603,8 +5113,10 @@ pub mod api { pub async fn current_set_id( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u64, + ::subxt::Error, + > { let entry = CurrentSetId; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4614,7 +5126,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = SetIdSession(_0); self.client.storage().fetch(&entry, hash).await @@ -4623,8 +5135,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SetIdSession>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SetIdSession, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4635,7 +5147,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Heartbeat { pub heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, @@ -4646,17 +5159,17 @@ pub mod api { const PALLET: &'static str = "ImOnline"; const FUNCTION: &'static str = "heartbeat"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -4668,7 +5181,7 @@ pub mod api { ::core::primitive::u32, >, signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Heartbeat> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Heartbeat, DispatchError> { let call = Heartbeat { heartbeat, @@ -4681,30 +5194,31 @@ pub mod api { pub type Event = runtime_types::pallet_im_online::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct HeartbeatReceived( - pub runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct HeartbeatReceived { + pub authority_id: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + } impl ::subxt::Event for HeartbeatReceived { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "HeartbeatReceived"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AllGood {} impl ::subxt::Event for AllGood { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "AllGood"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SomeOffline( - pub ::std::vec::Vec<( + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SomeOffline { + pub offline: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_staking::Exposure< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, )>, - ); + } impl ::subxt::Event for SomeOffline { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "SomeOffline"; @@ -4712,6 +5226,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HeartbeatAfter; impl ::subxt::StorageEntry for HeartbeatAfter { const PALLET: &'static str = "ImOnline"; @@ -4772,20 +5287,22 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn heartbeat_after( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = HeartbeatAfter; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn keys (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Public > , :: subxt :: Error >{ + } pub async fn keys (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Public > , :: subxt :: Error < DispatchError >>{ let entry = Keys; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4800,7 +5317,7 @@ pub mod api { runtime_types::pallet_im_online::BoundedOpaqueNetworkState, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ReceivedHeartbeats(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -4809,8 +5326,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReceivedHeartbeats>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReceivedHeartbeats, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4819,8 +5336,10 @@ pub mod api { _0: ::core::primitive::u32, _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = AuthoredBlocks(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await } @@ -4828,8 +5347,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AuthoredBlocks>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, AuthoredBlocks, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -4843,7 +5362,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Propose { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] @@ -4853,7 +5373,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "propose"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Second { #[codec(compact)] pub proposal: ::core::primitive::u32, @@ -4864,7 +5384,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "second"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vote { #[codec(compact)] pub ref_index: ::core::primitive::u32, @@ -4876,7 +5396,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EmergencyCancel { pub ref_index: ::core::primitive::u32, } @@ -4884,7 +5404,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "emergency_cancel"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ExternalPropose { pub proposal_hash: ::subxt::sp_core::H256, } @@ -4892,7 +5412,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ExternalProposeMajority { pub proposal_hash: ::subxt::sp_core::H256, } @@ -4900,7 +5420,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose_majority"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ExternalProposeDefault { pub proposal_hash: ::subxt::sp_core::H256, } @@ -4908,7 +5428,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose_default"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct FastTrack { pub proposal_hash: ::subxt::sp_core::H256, pub voting_period: ::core::primitive::u32, @@ -4918,7 +5438,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "fast_track"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct VetoExternal { pub proposal_hash: ::subxt::sp_core::H256, } @@ -4926,7 +5446,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "veto_external"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelReferendum { #[codec(compact)] pub ref_index: ::core::primitive::u32, @@ -4935,7 +5455,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_referendum"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelQueued { pub which: ::core::primitive::u32, } @@ -4943,7 +5463,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_queued"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Delegate { pub to: ::subxt::sp_core::crypto::AccountId32, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, @@ -4953,19 +5473,19 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "delegate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Undelegate {} impl ::subxt::Call for Undelegate { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "undelegate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ClearPublicProposals {} impl ::subxt::Call for ClearPublicProposals { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "clear_public_proposals"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NotePreimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } @@ -4973,7 +5493,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_preimage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NotePreimageOperational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } @@ -4981,7 +5501,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_preimage_operational"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NoteImminentPreimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } @@ -4989,7 +5509,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_imminent_preimage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NoteImminentPreimageOperational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } @@ -4997,7 +5517,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_imminent_preimage_operational"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReapPreimage { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] @@ -5007,7 +5527,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "reap_preimage"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Unlock { pub target: ::subxt::sp_core::crypto::AccountId32, } @@ -5015,7 +5535,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "unlock"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveVote { pub index: ::core::primitive::u32, } @@ -5023,7 +5543,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "remove_vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveOtherVote { pub target: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, @@ -5032,7 +5552,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "remove_other_vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EnactProposal { pub proposal_hash: ::subxt::sp_core::H256, pub index: ::core::primitive::u32, @@ -5041,7 +5561,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "enact_proposal"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Blacklist { pub proposal_hash: ::subxt::sp_core::H256, pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, @@ -5050,7 +5570,7 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "blacklist"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelProposal { #[codec(compact)] pub prop_index: ::core::primitive::u32, @@ -5059,17 +5579,17 @@ pub mod api { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_proposal"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -5079,7 +5599,8 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Propose> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Propose, DispatchError> + { let call = Propose { proposal_hash, value, @@ -5090,7 +5611,8 @@ pub mod api { &self, proposal: ::core::primitive::u32, seconds_upper_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Second> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Second, DispatchError> + { let call = Second { proposal, seconds_upper_bound, @@ -5103,39 +5625,64 @@ pub mod api { vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Vote> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> + { let call = Vote { ref_index, vote }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn emergency_cancel( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, EmergencyCancel> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + EmergencyCancel, + DispatchError, + > { let call = EmergencyCancel { ref_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ExternalPropose> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ExternalPropose, + DispatchError, + > { let call = ExternalPropose { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose_majority( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ExternalProposeMajority> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ExternalProposeMajority, + DispatchError, + > { let call = ExternalProposeMajority { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose_default( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ExternalProposeDefault> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ExternalProposeDefault, + DispatchError, + > { let call = ExternalProposeDefault { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -5144,7 +5691,7 @@ pub mod api { proposal_hash: ::subxt::sp_core::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, FastTrack> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, FastTrack, DispatchError> { let call = FastTrack { proposal_hash, @@ -5156,7 +5703,7 @@ pub mod api { pub fn veto_external( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, VetoExternal> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, VetoExternal, DispatchError> { let call = VetoExternal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -5164,15 +5711,21 @@ pub mod api { pub fn cancel_referendum( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelReferendum> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CancelReferendum, + DispatchError, + > { let call = CancelReferendum { ref_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_queued( &self, which: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelQueued> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CancelQueued, DispatchError> { let call = CancelQueued { which }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -5182,7 +5735,7 @@ pub mod api { to: ::subxt::sp_core::crypto::AccountId32, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Delegate> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Delegate, DispatchError> { let call = Delegate { to, @@ -5193,22 +5746,28 @@ pub mod api { } pub fn undelegate( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Undelegate> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Undelegate, DispatchError> { let call = Undelegate {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_public_proposals( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ClearPublicProposals> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ClearPublicProposals, + DispatchError, + > { let call = ClearPublicProposals {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, NotePreimage> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NotePreimage, DispatchError> { let call = NotePreimage { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -5216,16 +5775,28 @@ pub mod api { pub fn note_preimage_operational( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, NotePreimageOperational> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + NotePreimageOperational, + DispatchError, + > { let call = NotePreimageOperational { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_imminent_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, NoteImminentPreimage> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + NoteImminentPreimage, + DispatchError, + > { let call = NoteImminentPreimage { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -5235,9 +5806,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, NoteImminentPreimageOperational, + DispatchError, > { let call = NoteImminentPreimageOperational { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -5246,7 +5818,7 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, proposal_len_upper_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ReapPreimage> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ReapPreimage, DispatchError> { let call = ReapPreimage { proposal_hash, @@ -5257,14 +5829,15 @@ pub mod api { pub fn unlock( &self, target: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Unlock> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Unlock, DispatchError> + { let call = Unlock { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveVote> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveVote, DispatchError> { let call = RemoveVote { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -5273,8 +5846,14 @@ pub mod api { &self, target: ::subxt::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveOtherVote> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RemoveOtherVote, + DispatchError, + > { let call = RemoveOtherVote { target, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -5282,8 +5861,14 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, EnactProposal> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + EnactProposal, + DispatchError, + > { let call = EnactProposal { proposal_hash, index, @@ -5294,7 +5879,7 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Blacklist> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Blacklist, DispatchError> { let call = Blacklist { proposal_hash, @@ -5305,8 +5890,14 @@ pub mod api { pub fn cancel_proposal( &self, prop_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelProposal> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CancelProposal, + DispatchError, + > { let call = CancelProposal { prop_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -5315,147 +5906,184 @@ pub mod api { pub type Event = runtime_types::pallet_democracy::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Proposed(pub ::core::primitive::u32, pub ::core::primitive::u128); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Proposed { + pub proposal_index: ::core::primitive::u32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for Proposed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Tabled( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Tabled { + pub proposal_index: ::core::primitive::u32, + pub deposit: ::core::primitive::u128, + pub depositors: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + } impl ::subxt::Event for Tabled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Tabled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ExternalTabled {} impl ::subxt::Event for ExternalTabled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "ExternalTabled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Started( - pub ::core::primitive::u32, - pub runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Started { + pub ref_index: ::core::primitive::u32, + pub threshold: + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + } impl ::subxt::Event for Started { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Started"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Passed(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Passed { + pub ref_index: ::core::primitive::u32, + } impl ::subxt::Event for Passed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Passed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NotPassed(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotPassed { + pub ref_index: ::core::primitive::u32, + } impl ::subxt::Event for NotPassed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "NotPassed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Cancelled(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Cancelled { + pub ref_index: ::core::primitive::u32, + } impl ::subxt::Event for Cancelled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Cancelled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Executed( - pub ::core::primitive::u32, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Executed { + pub ref_index: ::core::primitive::u32, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for Executed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Executed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Delegated( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Delegated { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub target: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Delegated { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Delegated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Undelegated(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Undelegated { + pub account: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Undelegated { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Undelegated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Vetoed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Vetoed { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::sp_core::H256, + pub until: ::core::primitive::u32, + } impl ::subxt::Event for Vetoed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Vetoed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PreimageNoted( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PreimageNoted { + pub proposal_hash: ::subxt::sp_core::H256, + pub who: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for PreimageNoted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageNoted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PreimageUsed( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PreimageUsed { + pub proposal_hash: ::subxt::sp_core::H256, + pub provider: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for PreimageUsed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageUsed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PreimageInvalid( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PreimageInvalid { + pub proposal_hash: ::subxt::sp_core::H256, + pub ref_index: ::core::primitive::u32, + } impl ::subxt::Event for PreimageInvalid { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageInvalid"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PreimageMissing( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PreimageMissing { + pub proposal_hash: ::subxt::sp_core::H256, + pub ref_index: ::core::primitive::u32, + } impl ::subxt::Event for PreimageMissing { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageMissing"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PreimageReaped( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::subxt::sp_core::crypto::AccountId32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PreimageReaped { + pub proposal_hash: ::subxt::sp_core::H256, + pub provider: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + pub reaper: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for PreimageReaped { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageReaped"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Blacklisted(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Blacklisted { + pub proposal_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Blacklisted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Blacklisted"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Voted { + pub voter: ::subxt::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 { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Voted"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Seconded { + pub seconder: ::subxt::sp_core::crypto::AccountId32, + pub prop_index: ::core::primitive::u32, + } + impl ::subxt::Event for Seconded { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Seconded"; + } } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct PublicPropCount; impl ::subxt::StorageEntry for PublicPropCount { const PALLET: &'static str = "Democracy"; @@ -5629,17 +6257,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn public_prop_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = PublicPropCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -5652,7 +6282,7 @@ pub mod api { ::subxt::sp_core::H256, ::subxt::sp_core::crypto::AccountId32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = PublicProps; self.client.storage().fetch_or_default(&entry, hash).await @@ -5666,7 +6296,7 @@ pub mod api { ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = DepositOf(_0); self.client.storage().fetch(&entry, hash).await @@ -5675,8 +6305,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DepositOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, DepositOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -5692,7 +6322,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Preimages(_0); self.client.storage().fetch(&entry, hash).await @@ -5701,24 +6331,28 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Preimages>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Preimages, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } pub async fn referendum_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = ReferendumCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn lowest_unbaked( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = LowestUnbaked; self.client.storage().fetch_or_default(&entry, hash).await } @@ -5734,7 +6368,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ReferendumInfoOf(_0); self.client.storage().fetch(&entry, hash).await @@ -5743,8 +6377,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReferendumInfoOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReferendumInfoOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -5758,7 +6392,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::Error, > { let entry = VotingOf(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -5767,8 +6401,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, VotingOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, VotingOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -5778,7 +6412,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Locks(_0); self.client.storage().fetch(&entry, hash).await @@ -5786,15 +6420,19 @@ pub mod api { pub async fn locks_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Locks, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn last_tabled_was_external( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = LastTabledWasExternal; self.client.storage().fetch_or_default(&entry, hash).await } @@ -5806,7 +6444,7 @@ pub mod api { ::subxt::sp_core::H256, runtime_types::pallet_democracy::vote_threshold::VoteThreshold, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = NextExternal; self.client.storage().fetch(&entry, hash).await @@ -5820,7 +6458,7 @@ pub mod api { ::core::primitive::u32, ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Blacklist(_0); self.client.storage().fetch(&entry, hash).await @@ -5829,8 +6467,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Blacklist>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Blacklist, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -5838,8 +6476,10 @@ pub mod api { &self, _0: ::subxt::sp_core::H256, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::bool, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { let entry = Cancellations(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -5847,8 +6487,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Cancellations>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Cancellations, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -5857,7 +6497,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = StorageVersion; self.client.storage().fetch(&entry, hash).await @@ -5869,7 +6509,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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>, @@ -5879,7 +6520,7 @@ pub mod api { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "set_members"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Execute { pub proposal: runtime_types::polkadot_runtime::Call, #[codec(compact)] @@ -5889,7 +6530,7 @@ pub mod api { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "execute"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Propose { #[codec(compact)] pub threshold: ::core::primitive::u32, @@ -5901,7 +6542,7 @@ pub mod api { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "propose"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vote { pub proposal: ::subxt::sp_core::H256, #[codec(compact)] @@ -5912,7 +6553,7 @@ pub mod api { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Close { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] @@ -5926,7 +6567,7 @@ pub mod api { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "close"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct DisapproveProposal { pub proposal_hash: ::subxt::sp_core::H256, } @@ -5934,17 +6575,17 @@ pub mod api { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "disapprove_proposal"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -5955,7 +6596,7 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMembers> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetMembers, DispatchError> { let call = SetMembers { new_members, @@ -5968,7 +6609,8 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Execute> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Execute, DispatchError> + { let call = Execute { proposal, length_bound, @@ -5980,7 +6622,8 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Propose> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Propose, DispatchError> + { let call = Propose { threshold, proposal, @@ -5993,7 +6636,8 @@ pub mod api { proposal: ::subxt::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Vote> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> + { let call = Vote { proposal, index, @@ -6007,7 +6651,8 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Close> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Close, DispatchError> + { let call = Close { proposal_hash, index, @@ -6019,8 +6664,14 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, DisapproveProposal> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + DisapproveProposal, + DispatchError, + > { let call = DisapproveProposal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -6029,65 +6680,71 @@ pub mod api { pub type Event = runtime_types::pallet_collective::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Proposed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Proposed { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub proposal_index: ::core::primitive::u32, + pub proposal_hash: ::subxt::sp_core::H256, + pub threshold: ::core::primitive::u32, + } impl ::subxt::Event for Proposed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Voted( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::bool, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Voted { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::sp_core::H256, + pub voted: ::core::primitive::bool, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, + } impl ::subxt::Event for Voted { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Voted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Approved(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Approved { + pub proposal_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Approved { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Approved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Disapproved(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Disapproved { + pub proposal_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Disapproved { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Disapproved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Executed( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Executed { + pub proposal_hash: ::subxt::sp_core::H256, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for Executed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Executed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MemberExecuted( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MemberExecuted { + pub proposal_hash: ::subxt::sp_core::H256, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for MemberExecuted { const PALLET: &'static str = "Council"; const EVENT: &'static str = "MemberExecuted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Closed( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Closed { + pub proposal_hash: ::subxt::sp_core::H256, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, + } impl ::subxt::Event for Closed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Closed"; @@ -6095,6 +6752,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Proposals; impl ::subxt::StorageEntry for Proposals { const PALLET: &'static str = "Council"; @@ -6162,10 +6820,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proposals( @@ -6175,7 +6833,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< ::subxt::sp_core::H256, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Proposals; self.client.storage().fetch_or_default(&entry, hash).await @@ -6186,7 +6844,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = ProposalOf(_0); self.client.storage().fetch(&entry, hash).await @@ -6195,8 +6853,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ProposalOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -6211,7 +6869,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Voting(_0); self.client.storage().fetch(&entry, hash).await @@ -6219,15 +6877,19 @@ pub mod api { pub async fn voting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Voting, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn proposal_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = ProposalCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6236,7 +6898,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -6246,7 +6908,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Prime; self.client.storage().fetch(&entry, hash).await @@ -6258,7 +6920,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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>, @@ -6268,7 +6931,7 @@ pub mod api { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "set_members"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Execute { pub proposal: runtime_types::polkadot_runtime::Call, #[codec(compact)] @@ -6278,7 +6941,7 @@ pub mod api { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "execute"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Propose { #[codec(compact)] pub threshold: ::core::primitive::u32, @@ -6290,7 +6953,7 @@ pub mod api { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "propose"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vote { pub proposal: ::subxt::sp_core::H256, #[codec(compact)] @@ -6301,7 +6964,7 @@ pub mod api { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Close { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] @@ -6315,7 +6978,7 @@ pub mod api { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "close"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct DisapproveProposal { pub proposal_hash: ::subxt::sp_core::H256, } @@ -6323,17 +6986,17 @@ pub mod api { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "disapprove_proposal"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -6344,7 +7007,7 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMembers> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetMembers, DispatchError> { let call = SetMembers { new_members, @@ -6357,7 +7020,8 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Execute> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Execute, DispatchError> + { let call = Execute { proposal, length_bound, @@ -6369,7 +7033,8 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Propose> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Propose, DispatchError> + { let call = Propose { threshold, proposal, @@ -6382,7 +7047,8 @@ pub mod api { proposal: ::subxt::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Vote> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> + { let call = Vote { proposal, index, @@ -6396,7 +7062,8 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Close> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Close, DispatchError> + { let call = Close { proposal_hash, index, @@ -6408,8 +7075,14 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, DisapproveProposal> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + DisapproveProposal, + DispatchError, + > { let call = DisapproveProposal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -6418,65 +7091,71 @@ pub mod api { pub type Event = runtime_types::pallet_collective::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Proposed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Proposed { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub proposal_index: ::core::primitive::u32, + pub proposal_hash: ::subxt::sp_core::H256, + pub threshold: ::core::primitive::u32, + } impl ::subxt::Event for Proposed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Voted( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::bool, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Voted { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub proposal_hash: ::subxt::sp_core::H256, + pub voted: ::core::primitive::bool, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, + } impl ::subxt::Event for Voted { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Voted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Approved(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Approved { + pub proposal_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Approved { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Approved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Disapproved(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Disapproved { + pub proposal_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Disapproved { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Disapproved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Executed( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Executed { + pub proposal_hash: ::subxt::sp_core::H256, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for Executed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Executed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MemberExecuted( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MemberExecuted { + pub proposal_hash: ::subxt::sp_core::H256, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for MemberExecuted { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "MemberExecuted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Closed( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Closed { + pub proposal_hash: ::subxt::sp_core::H256, + pub yes: ::core::primitive::u32, + pub no: ::core::primitive::u32, + } impl ::subxt::Event for Closed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Closed"; @@ -6484,6 +7163,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Proposals; impl ::subxt::StorageEntry for Proposals { const PALLET: &'static str = "TechnicalCommittee"; @@ -6551,10 +7231,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proposals( @@ -6564,7 +7244,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< ::subxt::sp_core::H256, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Proposals; self.client.storage().fetch_or_default(&entry, hash).await @@ -6575,7 +7255,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = ProposalOf(_0); self.client.storage().fetch(&entry, hash).await @@ -6584,8 +7264,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ProposalOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -6600,7 +7280,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Voting(_0); self.client.storage().fetch(&entry, hash).await @@ -6608,15 +7288,19 @@ pub mod api { pub async fn voting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Voting, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn proposal_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = ProposalCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6625,7 +7309,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -6635,7 +7319,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Prime; self.client.storage().fetch(&entry, hash).await @@ -6647,7 +7331,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vote { pub votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, #[codec(compact)] @@ -6657,13 +7342,13 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveVoter {} impl ::subxt::Call for RemoveVoter { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "remove_voter"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SubmitCandidacy { #[codec(compact)] pub candidate_count: ::core::primitive::u32, @@ -6672,7 +7357,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "submit_candidacy"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RenounceCandidacy { pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, } @@ -6680,7 +7365,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "renounce_candidacy"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveMember { pub who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -6692,7 +7377,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "remove_member"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CleanDefunctVoters { pub num_voters: ::core::primitive::u32, pub num_defunct: ::core::primitive::u32, @@ -6701,17 +7386,17 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "clean_defunct_voters"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -6721,13 +7406,14 @@ pub mod api { &self, votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Vote> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> + { let call = Vote { votes, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_voter( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveVoter> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveVoter, DispatchError> { let call = RemoveVoter {}; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -6735,16 +7421,28 @@ pub mod api { pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SubmitCandidacy> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SubmitCandidacy, + DispatchError, + > { let call = SubmitCandidacy { candidate_count }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn renounce_candidacy( &self, renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RenounceCandidacy> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RenounceCandidacy, + DispatchError, + > { let call = RenounceCandidacy { renouncing }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -6755,7 +7453,7 @@ pub mod api { (), >, has_replacement: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveMember> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveMember, DispatchError> { let call = RemoveMember { who, @@ -6767,8 +7465,14 @@ pub mod api { &self, num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CleanDefunctVoters> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CleanDefunctVoters, + DispatchError, + > { let call = CleanDefunctVoters { num_voters, num_defunct, @@ -6780,55 +7484,59 @@ pub mod api { pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NewTerm( - pub ::std::vec::Vec<( + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NewTerm { + pub new_members: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - ); + } impl ::subxt::Event for NewTerm { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "NewTerm"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EmptyTerm {} impl ::subxt::Event for EmptyTerm { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "EmptyTerm"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ElectionError {} impl ::subxt::Event for ElectionError { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "ElectionError"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MemberKicked(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MemberKicked { + pub member: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for MemberKicked { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "MemberKicked"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Renounced(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Renounced { + pub candidate: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Renounced { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "Renounced"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct CandidateSlashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct CandidateSlashed { + pub candidate: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for CandidateSlashed { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "CandidateSlashed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SeatHolderSlashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SeatHolderSlashed { + pub seat_holder: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for SeatHolderSlashed { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "SeatHolderSlashed"; @@ -6836,6 +7544,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Members; impl ::subxt::StorageEntry for Members { const PALLET: &'static str = "PhragmenElection"; @@ -6901,10 +7610,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn members( @@ -6917,7 +7626,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -6932,7 +7641,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = RunnersUp; self.client.storage().fetch_or_default(&entry, hash).await @@ -6945,7 +7654,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Candidates; self.client.storage().fetch_or_default(&entry, hash).await @@ -6953,8 +7662,10 @@ pub mod api { pub async fn election_rounds( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = ElectionRounds; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6967,7 +7678,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Voting(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -6975,8 +7686,10 @@ pub mod api { pub async fn voting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Voting, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } } @@ -6986,7 +7699,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddMember { pub who: ::subxt::sp_core::crypto::AccountId32, } @@ -6994,7 +7708,7 @@ pub mod api { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "add_member"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveMember { pub who: ::subxt::sp_core::crypto::AccountId32, } @@ -7002,7 +7716,7 @@ pub mod api { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "remove_member"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SwapMember { pub remove: ::subxt::sp_core::crypto::AccountId32, pub add: ::subxt::sp_core::crypto::AccountId32, @@ -7011,7 +7725,7 @@ pub mod api { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "swap_member"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ResetMembers { pub members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } @@ -7019,7 +7733,7 @@ pub mod api { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "reset_members"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ChangeKey { pub new: ::subxt::sp_core::crypto::AccountId32, } @@ -7027,7 +7741,7 @@ pub mod api { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "change_key"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetPrime { pub who: ::subxt::sp_core::crypto::AccountId32, } @@ -7035,23 +7749,23 @@ pub mod api { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "set_prime"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -7060,7 +7774,7 @@ pub mod api { pub fn add_member( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AddMember> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddMember, DispatchError> { let call = AddMember { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7068,7 +7782,7 @@ pub mod api { pub fn remove_member( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveMember> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveMember, DispatchError> { let call = RemoveMember { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7077,7 +7791,7 @@ pub mod api { &self, remove: ::subxt::sp_core::crypto::AccountId32, add: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SwapMember> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SwapMember, DispatchError> { let call = SwapMember { remove, add }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7085,7 +7799,7 @@ pub mod api { pub fn reset_members( &self, members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ResetMembers> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ResetMembers, DispatchError> { let call = ResetMembers { members }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7093,7 +7807,7 @@ pub mod api { pub fn change_key( &self, new: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ChangeKey> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ChangeKey, DispatchError> { let call = ChangeKey { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7101,14 +7815,14 @@ pub mod api { pub fn set_prime( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetPrime> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetPrime, DispatchError> { let call = SetPrime { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_prime( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ClearPrime> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ClearPrime, DispatchError> { let call = ClearPrime {}; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7118,37 +7832,37 @@ pub mod api { pub type Event = runtime_types::pallet_membership::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MemberAdded {} impl ::subxt::Event for MemberAdded { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MemberAdded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MemberRemoved {} impl ::subxt::Event for MemberRemoved { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MemberRemoved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MembersSwapped {} impl ::subxt::Event for MembersSwapped { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MembersSwapped"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MembersReset {} impl ::subxt::Event for MembersReset { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "MembersReset"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct KeyChanged {} impl ::subxt::Event for KeyChanged { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "KeyChanged"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Dummy {} impl ::subxt::Event for Dummy { const PALLET: &'static str = "TechnicalMembership"; @@ -7157,6 +7871,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Members; impl ::subxt::StorageEntry for Members { const PALLET: &'static str = "TechnicalMembership"; @@ -7176,10 +7891,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn members( @@ -7187,7 +7902,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -7197,7 +7912,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::Error, > { let entry = Prime; self.client.storage().fetch(&entry, hash).await @@ -7209,7 +7924,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, @@ -7222,7 +7938,7 @@ pub mod api { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "propose_spend"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RejectProposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, @@ -7231,7 +7947,7 @@ pub mod api { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "reject_proposal"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ApproveProposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, @@ -7240,17 +7956,17 @@ pub mod api { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "approve_proposal"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -7263,7 +7979,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ProposeSpend> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ProposeSpend, DispatchError> { let call = ProposeSpend { value, beneficiary }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7271,16 +7987,28 @@ pub mod api { pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RejectProposal> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RejectProposal, + DispatchError, + > { let call = RejectProposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ApproveProposal> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ApproveProposal, + DispatchError, + > { let call = ApproveProposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -7289,48 +8017,61 @@ pub mod api { pub type Event = runtime_types::pallet_treasury::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Proposed(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Proposed { + pub proposal_index: ::core::primitive::u32, + } impl ::subxt::Event for Proposed { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Proposed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Spending(pub ::core::primitive::u128); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Spending { + pub budget_remaining: ::core::primitive::u128, + } impl ::subxt::Event for Spending { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Spending"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Awarded( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::subxt::sp_core::crypto::AccountId32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Awarded { + pub proposal_index: ::core::primitive::u32, + pub award: ::core::primitive::u128, + pub account: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Awarded { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Awarded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Rejected(pub ::core::primitive::u32, pub ::core::primitive::u128); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Rejected { + pub proposal_index: ::core::primitive::u32, + pub slashed: ::core::primitive::u128, + } impl ::subxt::Event for Rejected { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Rejected"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Burnt(pub ::core::primitive::u128); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Burnt { + pub burnt_funds: ::core::primitive::u128, + } impl ::subxt::Event for Burnt { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Burnt"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Rollover(pub ::core::primitive::u128); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Rollover { + pub rollover_balance: ::core::primitive::u128, + } impl ::subxt::Event for Rollover { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Rollover"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Deposit(pub ::core::primitive::u128); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Deposit { + pub value: ::core::primitive::u128, + } impl ::subxt::Event for Deposit { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Deposit"; @@ -7338,6 +8079,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ProposalCount; impl ::subxt::StorageEntry for ProposalCount { const PALLET: &'static str = "Treasury"; @@ -7375,17 +8117,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proposal_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = ProposalCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -7400,7 +8144,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Proposals(_0); self.client.storage().fetch(&entry, hash).await @@ -7409,8 +8153,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Proposals>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Proposals, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -7421,7 +8165,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Approvals; self.client.storage().fetch_or_default(&entry, hash).await @@ -7433,7 +8177,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Claim { pub dest: ::subxt::sp_core::crypto::AccountId32, pub ethereum_signature: @@ -7443,7 +8188,7 @@ pub mod api { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "claim"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MintClaim { pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub value: ::core::primitive::u128, @@ -7460,7 +8205,7 @@ pub mod api { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "mint_claim"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ClaimAttest { pub dest: ::subxt::sp_core::crypto::AccountId32, pub ethereum_signature: @@ -7471,7 +8216,7 @@ pub mod api { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "claim_attest"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Attest { pub statement: ::std::vec::Vec<::core::primitive::u8>, } @@ -7479,7 +8224,7 @@ pub mod api { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "attest"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MoveClaim { pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, @@ -7490,17 +8235,17 @@ pub mod api { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "move_claim"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -7510,7 +8255,8 @@ pub mod api { &self, dest: ::subxt::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Claim> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Claim, DispatchError> + { let call = Claim { dest, ethereum_signature, @@ -7529,7 +8275,7 @@ pub mod api { statement: ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, MintClaim> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, MintClaim, DispatchError> { let call = MintClaim { who, @@ -7544,7 +8290,7 @@ pub mod api { dest: ::subxt::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ClaimAttest> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ClaimAttest, DispatchError> { let call = ClaimAttest { dest, @@ -7556,7 +8302,8 @@ pub mod api { pub fn attest( &self, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Attest> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Attest, DispatchError> + { let call = Attest { statement }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -7567,7 +8314,7 @@ pub mod api { maybe_preclaim: ::core::option::Option< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, MoveClaim> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, MoveClaim, DispatchError> { let call = MoveClaim { old, @@ -7581,7 +8328,7 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Claimed( pub ::subxt::sp_core::crypto::AccountId32, pub runtime_types::polkadot_runtime_common::claims::EthereumAddress, @@ -7594,6 +8341,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Claims( pub runtime_types::polkadot_runtime_common::claims::EthereumAddress, ); @@ -7664,10 +8412,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn claims( @@ -7676,7 +8424,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::Error, > { let entry = Claims(_0); self.client.storage().fetch(&entry, hash).await @@ -7684,15 +8432,19 @@ pub mod api { pub async fn claims_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Claims>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Claims, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn total( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u128, + ::subxt::Error, + > { let entry = Total; self.client.storage().fetch_or_default(&entry, hash).await } @@ -7706,7 +8458,7 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Vesting(_0); self.client.storage().fetch(&entry, hash).await @@ -7715,8 +8467,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Vesting>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Vesting, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -7728,7 +8480,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Signing(_0); self.client.storage().fetch(&entry, hash).await @@ -7737,8 +8489,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Signing>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Signing, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -7750,7 +8502,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Preclaims(_0); self.client.storage().fetch(&entry, hash).await @@ -7759,8 +8511,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Preclaims>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Preclaims, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -7771,13 +8523,14 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vest {} impl ::subxt::Call for Vest { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vest"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct VestOther { pub target: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -7788,7 +8541,7 @@ pub mod api { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vest_other"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct VestedTransfer { pub target: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -7803,7 +8556,7 @@ pub mod api { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vested_transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceVestedTransfer { pub source: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -7822,7 +8575,7 @@ pub mod api { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "force_vested_transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MergeSchedules { pub schedule1_index: ::core::primitive::u32, pub schedule2_index: ::core::primitive::u32, @@ -7831,23 +8584,26 @@ pub mod api { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "merge_schedules"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, } } - pub fn vest(&self) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Vest> { + pub fn vest( + &self, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vest, DispatchError> + { let call = Vest {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -7857,7 +8613,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, VestOther> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, VestOther, DispatchError> { let call = VestOther { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -7872,8 +8628,14 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, VestedTransfer> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + VestedTransfer, + DispatchError, + > { let call = VestedTransfer { target, schedule }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -7891,8 +8653,14 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceVestedTransfer> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceVestedTransfer, + DispatchError, + > { let call = ForceVestedTransfer { source, target, @@ -7904,8 +8672,14 @@ pub mod api { &self, schedule1_index: ::core::primitive::u32, schedule2_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, MergeSchedules> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + MergeSchedules, + DispatchError, + > { let call = MergeSchedules { schedule1_index, schedule2_index, @@ -7917,17 +8691,19 @@ pub mod api { pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct VestingUpdated( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct VestingUpdated { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub unvested: ::core::primitive::u128, + } impl ::subxt::Event for VestingUpdated { const PALLET: &'static str = "Vesting"; const EVENT: &'static str = "VestingUpdated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct VestingCompleted(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct VestingCompleted { + pub account: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for VestingCompleted { const PALLET: &'static str = "Vesting"; const EVENT: &'static str = "VestingCompleted"; @@ -7935,6 +8711,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Vesting(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Vesting { const PALLET: &'static str = "Vesting"; @@ -7963,10 +8740,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn vesting( @@ -7982,7 +8759,7 @@ pub mod api { >, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Vesting(_0); self.client.storage().fetch(&entry, hash).await @@ -7991,8 +8768,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Vesting>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Vesting, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -8001,7 +8778,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_vesting::Releases, - ::subxt::Error, + ::subxt::Error, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -8013,7 +8790,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Batch { pub calls: ::std::vec::Vec, } @@ -8021,7 +8799,7 @@ pub mod api { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "batch"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AsDerivative { pub index: ::core::primitive::u16, pub call: runtime_types::polkadot_runtime::Call, @@ -8030,7 +8808,7 @@ pub mod api { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "as_derivative"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BatchAll { pub calls: ::std::vec::Vec, } @@ -8038,7 +8816,7 @@ pub mod api { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "batch_all"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct DispatchAs { pub as_origin: runtime_types::polkadot_runtime::OriginCaller, pub call: runtime_types::polkadot_runtime::Call, @@ -8047,17 +8825,17 @@ pub mod api { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "dispatch_as"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8066,7 +8844,8 @@ pub mod api { pub fn batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Batch> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Batch, DispatchError> + { let call = Batch { calls }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8074,7 +8853,7 @@ pub mod api { &self, index: ::core::primitive::u16, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AsDerivative> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AsDerivative, DispatchError> { let call = AsDerivative { index, call }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8082,7 +8861,7 @@ pub mod api { pub fn batch_all( &self, calls: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, BatchAll> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, BatchAll, DispatchError> { let call = BatchAll { calls }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8091,7 +8870,7 @@ pub mod api { &self, as_origin: runtime_types::polkadot_runtime::OriginCaller, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, DispatchAs> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, DispatchAs, DispatchError> { let call = DispatchAs { as_origin, call }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8101,31 +8880,32 @@ pub mod api { pub type Event = runtime_types::pallet_utility::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BatchInterrupted( - pub ::core::primitive::u32, - pub runtime_types::sp_runtime::DispatchError, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BatchInterrupted { + pub index: ::core::primitive::u32, + pub error: runtime_types::sp_runtime::DispatchError, + } impl ::subxt::Event for BatchInterrupted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "BatchInterrupted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BatchCompleted {} impl ::subxt::Event for BatchCompleted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "BatchCompleted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ItemCompleted {} impl ::subxt::Event for ItemCompleted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "ItemCompleted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct DispatchedAs( - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct DispatchedAs { + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for DispatchedAs { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "DispatchedAs"; @@ -8136,7 +8916,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddRegistrar { pub account: ::subxt::sp_core::crypto::AccountId32, } @@ -8144,7 +8925,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "add_registrar"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetIdentity { pub info: runtime_types::pallet_identity::types::IdentityInfo, } @@ -8152,7 +8933,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_identity"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetSubs { pub subs: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, @@ -8163,13 +8944,13 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_subs"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ClearIdentity {} impl ::subxt::Call for ClearIdentity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "clear_identity"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RequestJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, @@ -8180,7 +8961,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "request_judgement"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelRequest { pub reg_index: ::core::primitive::u32, } @@ -8188,7 +8969,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "cancel_request"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetFee { #[codec(compact)] pub index: ::core::primitive::u32, @@ -8199,7 +8980,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_fee"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetAccountId { #[codec(compact)] pub index: ::core::primitive::u32, @@ -8209,7 +8990,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_account_id"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetFields { #[codec(compact)] pub index: ::core::primitive::u32, @@ -8221,7 +9002,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_fields"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProvideJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, @@ -8237,7 +9018,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "provide_judgement"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct KillIdentity { pub target: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -8248,7 +9029,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "kill_identity"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddSub { pub sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -8260,7 +9041,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "add_sub"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RenameSub { pub sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -8272,7 +9053,7 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "rename_sub"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveSub { pub sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -8283,23 +9064,23 @@ pub mod api { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "remove_sub"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8308,7 +9089,7 @@ pub mod api { pub fn add_registrar( &self, account: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AddRegistrar> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddRegistrar, DispatchError> { let call = AddRegistrar { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8316,7 +9097,7 @@ pub mod api { pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetIdentity> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetIdentity, DispatchError> { let call = SetIdentity { info }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8327,14 +9108,21 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetSubs> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetSubs, DispatchError> + { let call = SetSubs { subs }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_identity( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ClearIdentity> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ClearIdentity, + DispatchError, + > { let call = ClearIdentity {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8342,16 +9130,28 @@ pub mod api { &self, reg_index: ::core::primitive::u32, max_fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RequestJudgement> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RequestJudgement, + DispatchError, + > { let call = RequestJudgement { reg_index, max_fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_request( &self, reg_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelRequest> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CancelRequest, + DispatchError, + > { let call = CancelRequest { reg_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8359,7 +9159,8 @@ pub mod api { &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetFee> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetFee, DispatchError> + { let call = SetFee { index, fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8367,7 +9168,7 @@ pub mod api { &self, index: ::core::primitive::u32, new: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetAccountId> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetAccountId, DispatchError> { let call = SetAccountId { index, new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8378,7 +9179,7 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetFields> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetFields, DispatchError> { let call = SetFields { index, fields }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8393,8 +9194,14 @@ pub mod api { judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ProvideJudgement> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ProvideJudgement, + DispatchError, + > { let call = ProvideJudgement { reg_index, target, @@ -8408,7 +9215,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, KillIdentity> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, KillIdentity, DispatchError> { let call = KillIdentity { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8420,7 +9227,8 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AddSub> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddSub, DispatchError> + { let call = AddSub { sub, data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8431,7 +9239,7 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RenameSub> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RenameSub, DispatchError> { let call = RenameSub { sub, data }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8442,14 +9250,15 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveSub> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveSub, DispatchError> { let call = RemoveSub { sub }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn quit_sub( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, QuitSub> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, QuitSub, DispatchError> + { let call = QuitSub {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8458,89 +9267,93 @@ pub mod api { pub type Event = runtime_types::pallet_identity::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct IdentitySet(pub ::subxt::sp_core::crypto::AccountId32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IdentitySet { + pub who: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for IdentitySet { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentitySet"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct IdentityCleared( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IdentityCleared { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for IdentityCleared { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentityCleared"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct IdentityKilled( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IdentityKilled { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for IdentityKilled { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentityKilled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct JudgementRequested( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct JudgementRequested { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub registrar_index: ::core::primitive::u32, + } impl ::subxt::Event for JudgementRequested { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementRequested"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct JudgementUnrequested( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct JudgementUnrequested { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub registrar_index: ::core::primitive::u32, + } impl ::subxt::Event for JudgementUnrequested { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementUnrequested"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct JudgementGiven( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct JudgementGiven { + pub target: ::subxt::sp_core::crypto::AccountId32, + pub registrar_index: ::core::primitive::u32, + } impl ::subxt::Event for JudgementGiven { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementGiven"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct RegistrarAdded(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct RegistrarAdded { + pub registrar_index: ::core::primitive::u32, + } impl ::subxt::Event for RegistrarAdded { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "RegistrarAdded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SubIdentityAdded( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SubIdentityAdded { + pub sub: ::subxt::sp_core::crypto::AccountId32, + pub main: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for SubIdentityAdded { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityAdded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SubIdentityRemoved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SubIdentityRemoved { + pub sub: ::subxt::sp_core::crypto::AccountId32, + pub main: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for SubIdentityRemoved { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityRemoved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SubIdentityRevoked( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + 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"; @@ -8548,6 +9361,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct IdentityOf(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for IdentityOf { const PALLET: &'static str = "Identity"; @@ -8612,10 +9426,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn identity_of( @@ -8628,7 +9442,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = IdentityOf(_0); self.client.storage().fetch(&entry, hash).await @@ -8637,8 +9451,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, IdentityOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, IdentityOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -8651,7 +9465,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = SuperOf(_0); self.client.storage().fetch(&entry, hash).await @@ -8660,8 +9474,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SuperOf>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SuperOf, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -8676,7 +9490,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, ), - ::subxt::Error, + ::subxt::Error, > { let entry = SubsOf(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -8684,8 +9498,10 @@ pub mod api { pub async fn subs_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, SubsOf>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, SubsOf, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn registrars( @@ -8700,7 +9516,7 @@ pub mod api { >, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Registrars; self.client.storage().fetch_or_default(&entry, hash).await @@ -8712,7 +9528,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Proxy { pub real: ::subxt::sp_core::crypto::AccountId32, pub force_proxy_type: @@ -8723,7 +9540,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "proxy"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddProxy { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -8733,7 +9550,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "add_proxy"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveProxy { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -8743,13 +9560,13 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_proxy"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveProxies {} impl ::subxt::Call for RemoveProxies { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_proxies"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Anonymous { pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, @@ -8759,7 +9576,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "anonymous"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct KillAnonymous { pub spawner: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -8773,7 +9590,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "kill_anonymous"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Announce { pub real: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, @@ -8782,7 +9599,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "announce"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RemoveAnnouncement { pub real: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, @@ -8791,7 +9608,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_announcement"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RejectAnnouncement { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, @@ -8800,7 +9617,7 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "reject_announcement"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProxyAnnounced { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub real: ::subxt::sp_core::crypto::AccountId32, @@ -8812,17 +9629,17 @@ pub mod api { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "proxy_announced"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8835,7 +9652,8 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Proxy> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Proxy, DispatchError> + { let call = Proxy { real, force_proxy_type, @@ -8848,7 +9666,7 @@ pub mod api { delegate: ::subxt::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AddProxy> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddProxy, DispatchError> { let call = AddProxy { delegate, @@ -8862,7 +9680,7 @@ pub mod api { delegate: ::subxt::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveProxy> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveProxy, DispatchError> { let call = RemoveProxy { delegate, @@ -8873,8 +9691,14 @@ pub mod api { } pub fn remove_proxies( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveProxies> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RemoveProxies, + DispatchError, + > { let call = RemoveProxies {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8883,7 +9707,7 @@ pub mod api { proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Anonymous> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Anonymous, DispatchError> { let call = Anonymous { proxy_type, @@ -8899,8 +9723,14 @@ pub mod api { index: ::core::primitive::u16, height: ::core::primitive::u32, ext_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, KillAnonymous> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + KillAnonymous, + DispatchError, + > { let call = KillAnonymous { spawner, proxy_type, @@ -8914,7 +9744,7 @@ pub mod api { &self, real: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Announce> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Announce, DispatchError> { let call = Announce { real, call_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -8923,8 +9753,14 @@ pub mod api { &self, real: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RemoveAnnouncement> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RemoveAnnouncement, + DispatchError, + > { let call = RemoveAnnouncement { real, call_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8932,8 +9768,14 @@ pub mod api { &self, delegate: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RejectAnnouncement> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + RejectAnnouncement, + DispatchError, + > { let call = RejectAnnouncement { delegate, call_hash, @@ -8948,8 +9790,14 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ProxyAnnounced> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ProxyAnnounced, + DispatchError, + > { let call = ProxyAnnounced { delegate, real, @@ -8963,42 +9811,43 @@ pub mod api { pub type Event = runtime_types::pallet_proxy::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ProxyExecuted( - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ProxyExecuted { + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for ProxyExecuted { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyExecuted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct AnonymousCreated( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_runtime::ProxyType, - pub ::core::primitive::u16, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct AnonymousCreated { + pub anonymous: ::subxt::sp_core::crypto::AccountId32, + pub who: ::subxt::sp_core::crypto::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub disambiguation_index: ::core::primitive::u16, + } impl ::subxt::Event for AnonymousCreated { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "AnonymousCreated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Announced( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Announced { + pub real: ::subxt::sp_core::crypto::AccountId32, + pub proxy: ::subxt::sp_core::crypto::AccountId32, + pub call_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for Announced { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "Announced"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ProxyAdded( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_runtime::ProxyType, - pub ::core::primitive::u32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ProxyAdded { + pub delegator: ::subxt::sp_core::crypto::AccountId32, + pub delegatee: ::subxt::sp_core::crypto::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } impl ::subxt::Event for ProxyAdded { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyAdded"; @@ -9006,6 +9855,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Proxies(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Proxies { const PALLET: &'static str = "Proxy"; @@ -9049,10 +9899,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proxies( @@ -9070,7 +9920,7 @@ pub mod api { >, ::core::primitive::u128, ), - ::subxt::Error, + ::subxt::Error, > { let entry = Proxies(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -9079,8 +9929,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Proxies>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Proxies, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -9099,7 +9949,7 @@ pub mod api { >, ::core::primitive::u128, ), - ::subxt::Error, + ::subxt::Error, > { let entry = Announcements(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -9108,8 +9958,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Announcements>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Announcements, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -9120,7 +9970,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AsMultiThreshold1 { pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, @@ -9130,7 +9981,7 @@ pub mod api { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "as_multi_threshold1"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: @@ -9147,7 +9998,7 @@ pub mod api { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "as_multi"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ApproveAsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: @@ -9162,7 +10013,7 @@ pub mod api { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "approve_as_multi"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CancelAsMulti { pub threshold: ::core::primitive::u16, pub other_signatories: @@ -9175,17 +10026,17 @@ pub mod api { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "cancel_as_multi"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -9197,8 +10048,14 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AsMultiThreshold1> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + AsMultiThreshold1, + DispatchError, + > { let call = AsMultiThreshold1 { other_signatories, call, @@ -9219,7 +10076,8 @@ pub mod api { >, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AsMulti> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AsMulti, DispatchError> + { let call = AsMulti { threshold, other_signatories, @@ -9241,10 +10099,16 @@ pub mod api { >, call_hash: [::core::primitive::u8; 32usize], max_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ApproveAsMulti> - { - let call = ApproveAsMulti { - threshold, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ApproveAsMulti, + DispatchError, + > { + let call = ApproveAsMulti { + threshold, other_signatories, maybe_timepoint, call_hash, @@ -9262,8 +10126,14 @@ pub mod api { ::core::primitive::u32, >, call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelAsMulti> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CancelAsMulti, + DispatchError, + > { let call = CancelAsMulti { threshold, other_signatories, @@ -9277,46 +10147,50 @@ pub mod api { pub type Event = runtime_types::pallet_multisig::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NewMultisig( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub [::core::primitive::u8; 32usize], - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NewMultisig { + pub approving: ::subxt::sp_core::crypto::AccountId32, + pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } impl ::subxt::Event for NewMultisig { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "NewMultisig"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MultisigApproval( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub ::subxt::sp_core::crypto::AccountId32, - pub [::core::primitive::u8; 32usize], - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MultisigApproval { + pub approving: ::subxt::sp_core::crypto::AccountId32, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } impl ::subxt::Event for MultisigApproval { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigApproval"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MultisigExecuted( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub ::subxt::sp_core::crypto::AccountId32, - pub [::core::primitive::u8; 32usize], - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MultisigExecuted { + pub approving: ::subxt::sp_core::crypto::AccountId32, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::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 { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigExecuted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MultisigCancelled( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub ::subxt::sp_core::crypto::AccountId32, - pub [::core::primitive::u8; 32usize], - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MultisigCancelled { + pub cancelling: ::subxt::sp_core::crypto::AccountId32, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::sp_core::crypto::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } impl ::subxt::Event for MultisigCancelled { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigCancelled"; @@ -9324,6 +10198,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Multisigs( ::subxt::sp_core::crypto::AccountId32, [::core::primitive::u8; 32usize], @@ -9366,10 +10241,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn multisigs( @@ -9385,7 +10260,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Multisigs(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -9394,8 +10269,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Multisigs>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Multisigs, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -9409,7 +10284,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Calls(_0); self.client.storage().fetch(&entry, hash).await @@ -9417,8 +10292,10 @@ pub mod api { pub async fn calls_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Calls>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Calls, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } } @@ -9428,7 +10305,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProposeBounty { #[codec(compact)] pub value: ::core::primitive::u128, @@ -9438,7 +10316,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "propose_bounty"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ApproveBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9447,7 +10325,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "approve_bounty"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProposeCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9462,7 +10340,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "propose_curator"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct UnassignCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9471,7 +10349,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "unassign_curator"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AcceptCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9480,7 +10358,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "accept_curator"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AwardBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9493,7 +10371,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "award_bounty"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ClaimBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9502,7 +10380,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "claim_bounty"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CloseBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9511,7 +10389,7 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "close_bounty"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ExtendBountyExpiry { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -9521,17 +10399,17 @@ pub mod api { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "extend_bounty_expiry"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -9541,16 +10419,28 @@ pub mod api { &self, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ProposeBounty> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ProposeBounty, + DispatchError, + > { let call = ProposeBounty { value, description }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ApproveBounty> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ApproveBounty, + DispatchError, + > { let call = ApproveBounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -9562,8 +10452,14 @@ pub mod api { (), >, fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ProposeCurator> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ProposeCurator, + DispatchError, + > { let call = ProposeCurator { bounty_id, curator, @@ -9574,16 +10470,28 @@ pub mod api { pub fn unassign_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, UnassignCurator> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + UnassignCurator, + DispatchError, + > { let call = UnassignCurator { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn accept_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AcceptCurator> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + AcceptCurator, + DispatchError, + > { let call = AcceptCurator { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -9594,7 +10502,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AwardBounty> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AwardBounty, DispatchError> { let call = AwardBounty { bounty_id, @@ -9605,7 +10513,7 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ClaimBounty> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ClaimBounty, DispatchError> { let call = ClaimBounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -9613,7 +10521,7 @@ pub mod api { pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CloseBounty> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CloseBounty, DispatchError> { let call = CloseBounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -9622,8 +10530,14 @@ pub mod api { &self, bounty_id: ::core::primitive::u32, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ExtendBountyExpiry> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ExtendBountyExpiry, + DispatchError, + > { let call = ExtendBountyExpiry { bounty_id, remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -9632,54 +10546,62 @@ pub mod api { pub type Event = runtime_types::pallet_bounties::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyProposed(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyProposed { + pub index: ::core::primitive::u32, + } impl ::subxt::Event for BountyProposed { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyProposed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyRejected( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyRejected { + pub index: ::core::primitive::u32, + pub bond: ::core::primitive::u128, + } impl ::subxt::Event for BountyRejected { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyRejected"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyBecameActive(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyBecameActive { + pub index: ::core::primitive::u32, + } impl ::subxt::Event for BountyBecameActive { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyBecameActive"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyAwarded( - pub ::core::primitive::u32, - pub ::subxt::sp_core::crypto::AccountId32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyAwarded { + pub index: ::core::primitive::u32, + pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for BountyAwarded { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyAwarded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyClaimed( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::subxt::sp_core::crypto::AccountId32, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyClaimed { + pub index: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for BountyClaimed { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyClaimed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyCanceled(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyCanceled { + pub index: ::core::primitive::u32, + } impl ::subxt::Event for BountyCanceled { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyCanceled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BountyExtended(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BountyExtended { + pub index: ::core::primitive::u32, + } impl ::subxt::Event for BountyExtended { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyExtended"; @@ -9687,6 +10609,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct BountyCount; impl ::subxt::StorageEntry for BountyCount { const PALLET: &'static str = "Bounties"; @@ -9734,17 +10657,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn bounty_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = BountyCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -9760,7 +10685,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Bounties(_0); self.client.storage().fetch(&entry, hash).await @@ -9769,8 +10694,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Bounties>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Bounties, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -9780,7 +10705,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::Error, + ::subxt::Error, > { let entry = BountyDescriptions(_0); self.client.storage().fetch(&entry, hash).await @@ -9789,8 +10714,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BountyDescriptions>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, BountyDescriptions, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -9799,7 +10724,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = BountyApprovals; self.client.storage().fetch_or_default(&entry, hash).await @@ -9811,7 +10736,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReportAwesome { pub reason: ::std::vec::Vec<::core::primitive::u8>, pub who: ::subxt::sp_core::crypto::AccountId32, @@ -9820,7 +10746,7 @@ pub mod api { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "report_awesome"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RetractTip { pub hash: ::subxt::sp_core::H256, } @@ -9828,7 +10754,7 @@ pub mod api { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "retract_tip"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct TipNew { pub reason: ::std::vec::Vec<::core::primitive::u8>, pub who: ::subxt::sp_core::crypto::AccountId32, @@ -9839,7 +10765,7 @@ pub mod api { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "tip_new"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Tip { pub hash: ::subxt::sp_core::H256, #[codec(compact)] @@ -9849,7 +10775,7 @@ pub mod api { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "tip"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CloseTip { pub hash: ::subxt::sp_core::H256, } @@ -9857,7 +10783,7 @@ pub mod api { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "close_tip"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SlashTip { pub hash: ::subxt::sp_core::H256, } @@ -9865,17 +10791,17 @@ pub mod api { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "slash_tip"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -9885,15 +10811,21 @@ pub mod api { &self, reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ReportAwesome> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ReportAwesome, + DispatchError, + > { let call = ReportAwesome { reason, who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn retract_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, RetractTip> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RetractTip, DispatchError> { let call = RetractTip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -9903,7 +10835,8 @@ pub mod api { reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::sp_core::crypto::AccountId32, tip_value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, TipNew> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, TipNew, DispatchError> + { let call = TipNew { reason, who, @@ -9915,14 +10848,15 @@ pub mod api { &self, hash: ::subxt::sp_core::H256, tip_value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Tip> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Tip, DispatchError> + { let call = Tip { hash, tip_value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn close_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CloseTip> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CloseTip, DispatchError> { let call = CloseTip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -9930,7 +10864,7 @@ pub mod api { pub fn slash_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SlashTip> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SlashTip, DispatchError> { let call = SlashTip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -9940,40 +10874,46 @@ pub mod api { pub type Event = runtime_types::pallet_tips::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct NewTip(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NewTip { + pub tip_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for NewTip { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "NewTip"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct TipClosing(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct TipClosing { + pub tip_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for TipClosing { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipClosing"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct TipClosed( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct TipClosed { + pub tip_hash: ::subxt::sp_core::H256, + pub who: ::subxt::sp_core::crypto::AccountId32, + pub payout: ::core::primitive::u128, + } impl ::subxt::Event for TipClosed { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipClosed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct TipRetracted(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct TipRetracted { + pub tip_hash: ::subxt::sp_core::H256, + } impl ::subxt::Event for TipRetracted { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipRetracted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct TipSlashed( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct TipSlashed { + pub tip_hash: ::subxt::sp_core::H256, + pub finder: ::subxt::sp_core::crypto::AccountId32, + pub deposit: ::core::primitive::u128, + } impl ::subxt::Event for TipSlashed { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipSlashed"; @@ -9981,6 +10921,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Tips(pub ::subxt::sp_core::H256); impl ::subxt::StorageEntry for Tips { const PALLET: &'static str = "Tips"; @@ -10011,10 +10952,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn tips( @@ -10030,7 +10971,7 @@ pub mod api { ::subxt::sp_core::H256, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Tips(_0); self.client.storage().fetch(&entry, hash).await @@ -10038,8 +10979,10 @@ pub mod api { pub async fn tips_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Tips>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Tips, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn reasons( @@ -10048,7 +10991,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::Error, + ::subxt::Error, > { let entry = Reasons(_0); self.client.storage().fetch(&entry, hash).await @@ -10057,8 +11000,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reasons>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Reasons, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -10069,13 +11012,14 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SubmitUnsigned { pub raw_solution : 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 :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMinimumUntrustedScore { pub maybe_next_score: ::core::option::Option<[::core::primitive::u128; 3usize]>, @@ -10084,7 +11028,7 @@ pub mod api { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "set_minimum_untrusted_score"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetEmergencyElectionResult { pub supports: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, @@ -10097,7 +11041,7 @@ pub mod api { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "set_emergency_election_result"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Submit { pub raw_solution: runtime_types::pallet_election_provider_multi_phase::RawSolution< @@ -10109,17 +11053,17 @@ pub mod api { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "submit"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -10129,8 +11073,14 @@ 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::SubmittableExtrinsic<'a, T, E, A, SubmitUnsigned> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SubmitUnsigned, + DispatchError, + > { let call = SubmitUnsigned { raw_solution, witness, @@ -10142,8 +11092,14 @@ pub mod api { maybe_next_score: ::core::option::Option< [::core::primitive::u128; 3usize], >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMinimumUntrustedScore> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMinimumUntrustedScore, + DispatchError, + > { let call = SetMinimumUntrustedScore { maybe_next_score }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -10155,8 +11111,14 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, )>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetEmergencyElectionResult> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetEmergencyElectionResult, + DispatchError, + > { let call = SetEmergencyElectionResult { supports }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -10164,7 +11126,8 @@ pub mod api { &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, num_signed_submissions: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Submit> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Submit, DispatchError> + { let call = Submit { raw_solution, num_signed_submissions, @@ -10177,51 +11140,56 @@ pub mod api { runtime_types::pallet_election_provider_multi_phase::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SolutionStored( - pub runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub ::core::primitive::bool, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SolutionStored { + pub election_compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub prev_ejected: ::core::primitive::bool, + } impl ::subxt::Event for SolutionStored { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "SolutionStored"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ElectionFinalized( - pub ::core::option::Option< + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ElectionFinalized { + pub election_compute: ::core::option::Option< runtime_types::pallet_election_provider_multi_phase::ElectionCompute, >, - ); + } impl ::subxt::Event for ElectionFinalized { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "ElectionFinalized"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Rewarded( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Rewarded { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub value: ::core::primitive::u128, + } impl ::subxt::Event for Rewarded { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "Rewarded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Slashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Slashed { + pub account: ::subxt::sp_core::crypto::AccountId32, + pub value: ::core::primitive::u128, + } impl ::subxt::Event for Slashed { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "Slashed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SignedPhaseStarted(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SignedPhaseStarted { + pub round: ::core::primitive::u32, + } impl ::subxt::Event for SignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "SignedPhaseStarted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct UnsignedPhaseStarted(pub ::core::primitive::u32); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct UnsignedPhaseStarted { + pub round: ::core::primitive::u32, + } impl ::subxt::Event for UnsignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "UnsignedPhaseStarted"; @@ -10229,6 +11197,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Round; impl ::subxt::StorageEntry for Round { const PALLET: &'static str = "ElectionProviderMultiPhase"; @@ -10331,17 +11300,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn round( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = Round; self.client.storage().fetch_or_default(&entry, hash).await } @@ -10352,14 +11323,14 @@ pub mod api { runtime_types::pallet_election_provider_multi_phase::Phase< ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::Error, > { let entry = CurrentPhase; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn queued_solution (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: Error >{ + } pub async fn queued_solution (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: Error < DispatchError >>{ let entry = QueuedSolution; self.client.storage().fetch(&entry, hash).await - } pub async fn snapshot (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: Error >{ + } pub async fn snapshot (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: Error < DispatchError >>{ let entry = Snapshot; self.client.storage().fetch(&entry, hash).await } @@ -10368,34 +11339,36 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = DesiredTargets; self.client.storage().fetch(&entry, hash).await - } pub async fn snapshot_metadata (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: Error >{ + } pub async fn snapshot_metadata (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: Error < DispatchError >>{ let entry = SnapshotMetadata; self.client.storage().fetch(&entry, hash).await } pub async fn signed_submission_next_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = SignedSubmissionNextIndex; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn signed_submission_indices (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: bounded_btree_map :: BoundedBTreeMap < [:: core :: primitive :: u128 ; 3usize] , :: core :: primitive :: u32 > , :: subxt :: Error >{ + } pub async fn signed_submission_indices (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: bounded_btree_map :: BoundedBTreeMap < [:: core :: primitive :: u128 ; 3usize] , :: core :: primitive :: u32 > , :: subxt :: Error < DispatchError >>{ let entry = SignedSubmissionIndices; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn signed_submissions_map (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > , :: subxt :: Error >{ + } pub async fn signed_submissions_map (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: 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 :: Error < DispatchError >>{ let entry = SignedSubmissionsMap(_0); - self.client.storage().fetch_or_default(&entry, hash).await + self.client.storage().fetch(&entry, hash).await } pub async fn signed_submissions_map_iter( &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SignedSubmissionsMap>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SignedSubmissionsMap, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -10404,7 +11377,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<[::core::primitive::u128; 3usize]>, - ::subxt::Error, + ::subxt::Error, > { let entry = MinimumUntrustedScore; self.client.storage().fetch(&entry, hash).await @@ -10416,7 +11389,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Rebag { pub dislocated: ::subxt::sp_core::crypto::AccountId32, } @@ -10424,17 +11398,25 @@ pub mod api { const PALLET: &'static str = "BagsList"; const FUNCTION: &'static str = "rebag"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PutInFrontOf { + pub lighter: ::subxt::sp_core::crypto::AccountId32, + } + impl ::subxt::Call for PutInFrontOf { + const PALLET: &'static str = "BagsList"; + const FUNCTION: &'static str = "put_in_front_of"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -10443,21 +11425,30 @@ pub mod api { pub fn rebag( &self, dislocated: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Rebag> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Rebag, DispatchError> + { let call = Rebag { dislocated }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn put_in_front_of( + &self, + lighter: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, PutInFrontOf, DispatchError> + { + let call = PutInFrontOf { lighter }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } } } pub type Event = runtime_types::pallet_bags_list::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Rebagged( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u64, - pub ::core::primitive::u64, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Rebagged { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub from: ::core::primitive::u64, + pub to: ::core::primitive::u64, + } impl ::subxt::Event for Rebagged { const PALLET: &'static str = "BagsList"; const EVENT: &'static str = "Rebagged"; @@ -10465,6 +11456,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ListNodes(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for ListNodes { const PALLET: &'static str = "BagsList"; @@ -10499,10 +11491,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn list_nodes( @@ -10511,7 +11503,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = ListNodes(_0); self.client.storage().fetch(&entry, hash).await @@ -10520,16 +11512,18 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ListNodes>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ListNodes, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } pub async fn counter_for_list_nodes( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CounterForListNodes; self.client.storage().fetch_or_default(&entry, hash).await } @@ -10539,7 +11533,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::Error, > { let entry = ListBags(_0); self.client.storage().fetch(&entry, hash).await @@ -10548,8 +11542,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ListBags>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ListBags, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -10563,15 +11557,16 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct SetValidationUpgradeFrequency { + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SetValidationUpgradeCooldown { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidationUpgradeFrequency { + impl ::subxt::Call for SetValidationUpgradeCooldown { const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_validation_upgrade_frequency"; + const FUNCTION: &'static str = "set_validation_upgrade_cooldown"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetValidationUpgradeDelay { pub new: ::core::primitive::u32, } @@ -10579,7 +11574,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_validation_upgrade_delay"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetCodeRetentionPeriod { pub new: ::core::primitive::u32, } @@ -10587,7 +11582,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_code_retention_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxCodeSize { pub new: ::core::primitive::u32, } @@ -10595,7 +11590,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_code_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxPovSize { pub new: ::core::primitive::u32, } @@ -10603,7 +11598,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_pov_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxHeadDataSize { pub new: ::core::primitive::u32, } @@ -10611,7 +11606,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_head_data_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetParathreadCores { pub new: ::core::primitive::u32, } @@ -10619,7 +11614,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_parathread_cores"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetParathreadRetries { pub new: ::core::primitive::u32, } @@ -10627,7 +11622,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_parathread_retries"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetGroupRotationFrequency { pub new: ::core::primitive::u32, } @@ -10635,7 +11630,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_group_rotation_frequency"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetChainAvailabilityPeriod { pub new: ::core::primitive::u32, } @@ -10643,7 +11638,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_chain_availability_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetThreadAvailabilityPeriod { pub new: ::core::primitive::u32, } @@ -10651,7 +11646,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_thread_availability_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetSchedulingLookahead { pub new: ::core::primitive::u32, } @@ -10659,7 +11654,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_scheduling_lookahead"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxValidatorsPerCore { pub new: ::core::option::Option<::core::primitive::u32>, } @@ -10667,7 +11662,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_validators_per_core"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxValidators { pub new: ::core::option::Option<::core::primitive::u32>, } @@ -10675,7 +11670,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_validators"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetDisputePeriod { pub new: ::core::primitive::u32, } @@ -10683,7 +11678,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_dispute_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetDisputePostConclusionAcceptancePeriod { pub new: ::core::primitive::u32, } @@ -10692,7 +11687,7 @@ pub mod api { const FUNCTION: &'static str = "set_dispute_post_conclusion_acceptance_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetDisputeMaxSpamSlots { pub new: ::core::primitive::u32, } @@ -10700,7 +11695,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_dispute_max_spam_slots"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetDisputeConclusionByTimeOutPeriod { pub new: ::core::primitive::u32, } @@ -10709,7 +11704,7 @@ pub mod api { const FUNCTION: &'static str = "set_dispute_conclusion_by_time_out_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetNoShowSlots { pub new: ::core::primitive::u32, } @@ -10717,7 +11712,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_no_show_slots"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetNDelayTranches { pub new: ::core::primitive::u32, } @@ -10725,7 +11720,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_n_delay_tranches"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetZerothDelayTrancheWidth { pub new: ::core::primitive::u32, } @@ -10733,7 +11728,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_zeroth_delay_tranche_width"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetNeededApprovals { pub new: ::core::primitive::u32, } @@ -10741,7 +11736,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_needed_approvals"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetRelayVrfModuloSamples { pub new: ::core::primitive::u32, } @@ -10749,7 +11744,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_relay_vrf_modulo_samples"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxUpwardQueueCount { pub new: ::core::primitive::u32, } @@ -10757,7 +11752,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_queue_count"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxUpwardQueueSize { pub new: ::core::primitive::u32, } @@ -10765,7 +11760,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_queue_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxDownwardMessageSize { pub new: ::core::primitive::u32, } @@ -10773,7 +11768,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_downward_message_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetUmpServiceTotalWeight { pub new: ::core::primitive::u64, } @@ -10781,7 +11776,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_ump_service_total_weight"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxUpwardMessageSize { pub new: ::core::primitive::u32, } @@ -10789,7 +11784,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_message_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMaxUpwardMessageNumPerCandidate { pub new: ::core::primitive::u32, } @@ -10797,7 +11792,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_message_num_per_candidate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpOpenRequestTtl { pub new: ::core::primitive::u32, } @@ -10805,7 +11800,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_open_request_ttl"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpSenderDeposit { pub new: ::core::primitive::u128, } @@ -10813,7 +11808,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_sender_deposit"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpRecipientDeposit { pub new: ::core::primitive::u128, } @@ -10821,7 +11816,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_recipient_deposit"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpChannelMaxCapacity { pub new: ::core::primitive::u32, } @@ -10829,7 +11824,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_channel_max_capacity"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpChannelMaxTotalSize { pub new: ::core::primitive::u32, } @@ -10837,7 +11832,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_channel_max_total_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpMaxParachainInboundChannels { pub new: ::core::primitive::u32, } @@ -10845,7 +11840,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parachain_inbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpMaxParathreadInboundChannels { pub new: ::core::primitive::u32, } @@ -10853,7 +11848,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parathread_inbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpChannelMaxMessageSize { pub new: ::core::primitive::u32, } @@ -10861,7 +11856,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_channel_max_message_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpMaxParachainOutboundChannels { pub new: ::core::primitive::u32, } @@ -10869,7 +11864,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parachain_outbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpMaxParathreadOutboundChannels { pub new: ::core::primitive::u32, } @@ -10878,7 +11873,7 @@ pub mod api { const FUNCTION: &'static str = "set_hrmp_max_parathread_outbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetHrmpMaxMessageNumPerCandidate { pub new: ::core::primitive::u32, } @@ -10886,7 +11881,7 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_message_num_per_candidate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetUmpMaxIndividualWeight { pub new: ::core::primitive::u64, } @@ -10894,144 +11889,261 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_ump_max_individual_weight"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SetPvfCheckingEnabled { + pub new: ::core::primitive::bool, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl ::subxt::Call for SetPvfCheckingEnabled { + const PALLET: &'static str = "Configuration"; + const FUNCTION: &'static str = "set_pvf_checking_enabled"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, } } - pub fn set_validation_upgrade_frequency( + pub fn set_validation_upgrade_cooldown( &self, new: ::core::primitive::u32, ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, - SetValidationUpgradeFrequency, + SetValidationUpgradeCooldown, + DispatchError, > { - let call = SetValidationUpgradeFrequency { new }; + let call = SetValidationUpgradeCooldown { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_validation_upgrade_delay( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetValidationUpgradeDelay> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetValidationUpgradeDelay, + DispatchError, + > { let call = SetValidationUpgradeDelay { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_code_retention_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetCodeRetentionPeriod> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetCodeRetentionPeriod, + DispatchError, + > { let call = SetCodeRetentionPeriod { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_code_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxCodeSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxCodeSize, + DispatchError, + > { let call = SetMaxCodeSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_pov_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxPovSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxPovSize, + DispatchError, + > { let call = SetMaxPovSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_head_data_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxHeadDataSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxHeadDataSize, + DispatchError, + > { let call = SetMaxHeadDataSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_parathread_cores( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetParathreadCores> - { - let call = SetParathreadCores { new }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetParathreadCores, + DispatchError, + > { + let call = SetParathreadCores { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } pub fn set_parathread_retries( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetParathreadRetries> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetParathreadRetries, + DispatchError, + > { let call = SetParathreadRetries { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_group_rotation_frequency( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetGroupRotationFrequency> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetGroupRotationFrequency, + DispatchError, + > { let call = SetGroupRotationFrequency { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_chain_availability_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetChainAvailabilityPeriod> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetChainAvailabilityPeriod, + DispatchError, + > { let call = SetChainAvailabilityPeriod { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_thread_availability_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetThreadAvailabilityPeriod> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetThreadAvailabilityPeriod, + DispatchError, + > { let call = SetThreadAvailabilityPeriod { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_scheduling_lookahead( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetSchedulingLookahead> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetSchedulingLookahead, + DispatchError, + > { let call = SetSchedulingLookahead { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_validators_per_core( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxValidatorsPerCore> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxValidatorsPerCore, + DispatchError, + > { let call = SetMaxValidatorsPerCore { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_validators( &self, new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxValidators> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxValidators, + DispatchError, + > { let call = SetMaxValidators { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_dispute_period( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetDisputePeriod> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetDisputePeriod, + DispatchError, + > { let call = SetDisputePeriod { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11041,9 +12153,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetDisputePostConclusionAcceptancePeriod, + DispatchError, > { let call = SetDisputePostConclusionAcceptancePeriod { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11051,8 +12164,14 @@ pub mod api { pub fn set_dispute_max_spam_slots( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetDisputeMaxSpamSlots> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetDisputeMaxSpamSlots, + DispatchError, + > { let call = SetDisputeMaxSpamSlots { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11062,9 +12181,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetDisputeConclusionByTimeOutPeriod, + DispatchError, > { let call = SetDisputeConclusionByTimeOutPeriod { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11072,80 +12192,140 @@ pub mod api { pub fn set_no_show_slots( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetNoShowSlots> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetNoShowSlots, + DispatchError, + > { let call = SetNoShowSlots { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_n_delay_tranches( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetNDelayTranches> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetNDelayTranches, + DispatchError, + > { let call = SetNDelayTranches { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_zeroth_delay_tranche_width( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetZerothDelayTrancheWidth> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetZerothDelayTrancheWidth, + DispatchError, + > { let call = SetZerothDelayTrancheWidth { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_needed_approvals( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetNeededApprovals> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetNeededApprovals, + DispatchError, + > { let call = SetNeededApprovals { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_relay_vrf_modulo_samples( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetRelayVrfModuloSamples> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetRelayVrfModuloSamples, + DispatchError, + > { let call = SetRelayVrfModuloSamples { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_queue_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxUpwardQueueCount> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxUpwardQueueCount, + DispatchError, + > { let call = SetMaxUpwardQueueCount { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_queue_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxUpwardQueueSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxUpwardQueueSize, + DispatchError, + > { let call = SetMaxUpwardQueueSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_downward_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxDownwardMessageSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxDownwardMessageSize, + DispatchError, + > { let call = SetMaxDownwardMessageSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_ump_service_total_weight( &self, new: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetUmpServiceTotalWeight> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetUmpServiceTotalWeight, + DispatchError, + > { let call = SetUmpServiceTotalWeight { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_message_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetMaxUpwardMessageSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMaxUpwardMessageSize, + DispatchError, + > { let call = SetMaxUpwardMessageSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11155,9 +12335,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetMaxUpwardMessageNumPerCandidate, + DispatchError, > { let call = SetMaxUpwardMessageNumPerCandidate { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11165,40 +12346,70 @@ pub mod api { pub fn set_hrmp_open_request_ttl( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHrmpOpenRequestTtl> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetHrmpOpenRequestTtl, + DispatchError, + > { let call = SetHrmpOpenRequestTtl { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_sender_deposit( &self, new: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHrmpSenderDeposit> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetHrmpSenderDeposit, + DispatchError, + > { let call = SetHrmpSenderDeposit { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_recipient_deposit( &self, new: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHrmpRecipientDeposit> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetHrmpRecipientDeposit, + DispatchError, + > { let call = SetHrmpRecipientDeposit { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_channel_max_capacity( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHrmpChannelMaxCapacity> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetHrmpChannelMaxCapacity, + DispatchError, + > { let call = SetHrmpChannelMaxCapacity { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_channel_max_total_size( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetHrmpChannelMaxTotalSize> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetHrmpChannelMaxTotalSize, + DispatchError, + > { let call = SetHrmpChannelMaxTotalSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11208,9 +12419,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetHrmpMaxParachainInboundChannels, + DispatchError, > { let call = SetHrmpMaxParachainInboundChannels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11221,9 +12433,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetHrmpMaxParathreadInboundChannels, + DispatchError, > { let call = SetHrmpMaxParathreadInboundChannels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11234,9 +12447,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetHrmpChannelMaxMessageSize, + DispatchError, > { let call = SetHrmpChannelMaxMessageSize { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11247,9 +12461,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetHrmpMaxParachainOutboundChannels, + DispatchError, > { let call = SetHrmpMaxParachainOutboundChannels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11260,9 +12475,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetHrmpMaxParathreadOutboundChannels, + DispatchError, > { let call = SetHrmpMaxParathreadOutboundChannels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11273,9 +12489,10 @@ pub mod api { ) -> ::subxt::SubmittableExtrinsic< 'a, T, - E, + X, A, SetHrmpMaxMessageNumPerCandidate, + DispatchError, > { let call = SetHrmpMaxMessageNumPerCandidate { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11283,15 +12500,78 @@ pub mod api { pub fn set_ump_max_individual_weight( &self, new: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, SetUmpMaxIndividualWeight> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetUmpMaxIndividualWeight, + DispatchError, + > { let call = SetUmpMaxIndividualWeight { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn set_pvf_checking_enabled( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetPvfCheckingEnabled, + DispatchError, + > { + let call = SetPvfCheckingEnabled { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_pvf_voting_ttl( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetPvfVotingTtl, + DispatchError, + > { + let call = SetPvfVotingTtl { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_minimum_validation_upgrade_delay( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetMinimumValidationUpgradeDelay, + DispatchError, + > { + let call = SetMinimumValidationUpgradeDelay { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_bypass_consistency_check( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetBypassConsistencyCheck, + DispatchError, + > { + let call = SetBypassConsistencyCheck { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } } } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ActiveConfig; impl ::subxt::StorageEntry for ActiveConfig { const PALLET: &'static str = "Configuration"; @@ -11305,7 +12585,7 @@ pub mod api { impl ::subxt::StorageEntry for PendingConfig { const PALLET: &'static str = "Configuration"; const STORAGE: &'static str = "PendingConfig"; - type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ; + type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: migration :: v1 :: HostConfiguration < :: core :: primitive :: u32 > ; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -11313,16 +12593,34 @@ pub mod api { )]) } } + 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, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn active_config (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , :: subxt :: Error >{ + } pub async fn active_config (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , :: subxt :: Error < DispatchError >>{ let entry = ActiveConfig; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn pending_config (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: Error >{ + } pub async fn pending_config (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: configuration :: migration :: v1 :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ let entry = PendingConfig(_0); self.client.storage().fetch(&entry, hash).await } @@ -11330,10 +12628,23 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingConfig>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingConfig, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await + } pub async fn pending_configs (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: Error < DispatchError >>{ + let entry = PendingConfigs; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn bypass_consistency_check( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::primitive::bool, + ::subxt::Error, + > { + let entry = BypassConsistencyCheck; + self.client.storage().fetch_or_default(&entry, hash).await } } } @@ -11342,17 +12653,18 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -11362,6 +12674,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct CurrentSessionIndex; impl ::subxt::StorageEntry for CurrentSessionIndex { const PALLET: &'static str = "ParasShared"; @@ -11394,17 +12707,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn current_session_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CurrentSessionIndex; self.client.storage().fetch_or_default(&entry, hash).await } @@ -11415,7 +12730,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_primitives::v0::ValidatorIndex, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ActiveValidatorIndices; self.client.storage().fetch_or_default(&entry, hash).await @@ -11427,7 +12742,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_primitives::v0::validator_app::Public, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ActiveValidatorKeys; self.client.storage().fetch_or_default(&entry, hash).await @@ -11439,17 +12754,18 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -11461,7 +12777,7 @@ pub mod api { runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CandidateBacked( pub runtime_types::polkadot_primitives::v1::CandidateReceipt< ::subxt::sp_core::H256, @@ -11474,7 +12790,7 @@ pub mod api { const PALLET: &'static str = "ParaInclusion"; const EVENT: &'static str = "CandidateBacked"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CandidateIncluded( pub runtime_types::polkadot_primitives::v1::CandidateReceipt< ::subxt::sp_core::H256, @@ -11487,7 +12803,7 @@ pub mod api { const PALLET: &'static str = "ParaInclusion"; const EVENT: &'static str = "CandidateIncluded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CandidateTimedOut( pub runtime_types::polkadot_primitives::v1::CandidateReceipt< ::subxt::sp_core::H256, @@ -11502,6 +12818,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct AvailabilityBitfields( pub runtime_types::polkadot_primitives::v0::ValidatorIndex, ); @@ -11547,12 +12864,12 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn availability_bitfields (& self , _0 : runtime_types :: polkadot_primitives :: v0 :: ValidatorIndex , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: Error >{ + } pub async fn availability_bitfields (& self , _0 : runtime_types :: polkadot_primitives :: v0 :: ValidatorIndex , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ let entry = AvailabilityBitfields(_0); self.client.storage().fetch(&entry, hash).await } @@ -11560,11 +12877,11 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AvailabilityBitfields>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, AvailabilityBitfields, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await - } pub async fn pending_availability (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 > > , :: subxt :: Error >{ + } pub async fn pending_availability (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ let entry = PendingAvailability(_0); self.client.storage().fetch(&entry, hash).await } @@ -11572,8 +12889,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingAvailability>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingAvailability, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -11587,7 +12904,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = PendingAvailabilityCommitments(_0); self.client.storage().fetch(&entry, hash).await @@ -11596,8 +12913,13 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingAvailabilityCommitments>, - ::subxt::Error, + ::subxt::KeyIter< + 'a, + T, + PendingAvailabilityCommitments, + DispatchError, + >, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -11608,7 +12930,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Enter { pub data: runtime_types::polkadot_primitives::v1::InherentData< runtime_types::sp_runtime::generic::header::Header< @@ -11621,17 +12944,17 @@ pub mod api { const PALLET: &'static str = "ParaInherent"; const FUNCTION: &'static str = "enter"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -11645,7 +12968,8 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Enter> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Enter, DispatchError> + { let call = Enter { data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11653,6 +12977,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Included; impl ::subxt::StorageEntry for Included { const PALLET: &'static str = "ParaInherent"; @@ -11674,17 +12999,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn included( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::option::Option<()>, + ::subxt::Error, + > { let entry = Included; self.client.storage().fetch(&entry, hash).await } @@ -11697,7 +13024,7 @@ pub mod api { ::subxt::sp_core::H256, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = OnChainVotes; self.client.storage().fetch(&entry, hash).await @@ -11709,6 +13036,7 @@ pub mod api { use super::runtime_types; pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ValidatorGroups; impl ::subxt::StorageEntry for ValidatorGroups { const PALLET: &'static str = "ParaScheduler"; @@ -11775,10 +13103,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn validator_groups( @@ -11790,11 +13118,11 @@ pub mod api { runtime_types::polkadot_primitives::v0::ValidatorIndex, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ValidatorGroups; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn parathread_queue (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , :: subxt :: Error >{ + } pub async fn parathread_queue (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , :: subxt :: Error < DispatchError >>{ let entry = ParathreadQueue; self.client.storage().fetch_or_default(&entry, hash).await } @@ -11807,7 +13135,7 @@ pub mod api { runtime_types::polkadot_primitives::v1::CoreOccupied, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = AvailabilityCores; self.client.storage().fetch_or_default(&entry, hash).await @@ -11817,7 +13145,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = ParathreadClaimIndex; self.client.storage().fetch_or_default(&entry, hash).await @@ -11825,11 +13153,13 @@ pub mod api { pub async fn session_start_block( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = SessionStartBlock; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn scheduled (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , :: subxt :: Error >{ + } pub async fn scheduled (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , :: subxt :: Error < DispatchError >>{ let entry = Scheduled; self.client.storage().fetch_or_default(&entry, hash).await } @@ -11840,7 +13170,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceSetCurrentCode { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: @@ -11850,7 +13181,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_set_current_code"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceSetCurrentHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -11859,7 +13190,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_set_current_head"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceScheduleCodeUpgrade { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: @@ -11870,7 +13201,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_schedule_code_upgrade"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceNoteNewHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -11879,7 +13210,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_note_new_head"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceQueueAction { pub para: runtime_types::polkadot_parachain::primitives::Id, } @@ -11887,17 +13218,45 @@ pub mod api { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_queue_action"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct IncludePvfCheckStatement { + pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, + pub signature: + runtime_types::polkadot_primitives::v0::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, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -11907,8 +13266,14 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceSetCurrentCode> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceSetCurrentCode, + DispatchError, + > { let call = ForceSetCurrentCode { para, new_code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11916,8 +13281,14 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceSetCurrentHead> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceSetCurrentHead, + DispatchError, + > { let call = ForceSetCurrentHead { para, new_head }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -11926,8 +13297,14 @@ 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::SubmittableExtrinsic<'a, T, E, A, ForceScheduleCodeUpgrade> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceScheduleCodeUpgrade, + DispatchError, + > { let call = ForceScheduleCodeUpgrade { para, new_code, @@ -11939,25 +13316,82 @@ pub mod api { &self, para: runtime_types::polkadot_parachain::primitives::Id, new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceNoteNewHead> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceNoteNewHead, + DispatchError, + > { let call = ForceNoteNewHead { para, new_head }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_queue_action( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceQueueAction> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceQueueAction, + DispatchError, + > { let call = ForceQueueAction { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn add_trusted_validation_code( + &self, + validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + AddTrustedValidationCode, + DispatchError, + > { + let call = AddTrustedValidationCode { validation_code }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn poke_unused_validation_code( + &self, + validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + PokeUnusedValidationCode, + DispatchError, + > { + let call = PokeUnusedValidationCode { + validation_code_hash, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn include_pvf_check_statement( + &self, + stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, + signature : runtime_types :: polkadot_primitives :: v0 :: validator_app :: Signature, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + IncludePvfCheckStatement, + DispatchError, + > { + let call = IncludePvfCheckStatement { stmt, signature }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } } } pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CurrentCodeUpdated( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -11965,7 +13399,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "CurrentCodeUpdated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CurrentHeadUpdated( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -11973,7 +13407,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "CurrentHeadUpdated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CodeUpgradeScheduled( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -11981,7 +13415,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "CodeUpgradeScheduled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NewHeadNoted( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -11989,7 +13423,7 @@ pub mod api { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "NewHeadNoted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ActionQueued( pub runtime_types::polkadot_parachain::primitives::Id, pub ::core::primitive::u32, @@ -11998,9 +13432,62 @@ pub mod api { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "ActionQueued"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PvfCheckStarted( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::Event for PvfCheckStarted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckStarted"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PvfCheckAccepted( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::Event for PvfCheckAccepted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckAccepted"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PvfCheckRejected( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::Event for PvfCheckRejected { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckRejected"; + } } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct PvfActiveVoteMap( + pub 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"; @@ -12237,18 +13724,42 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } + } pub async fn pvf_active_vote_map (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ + let entry = PvfActiveVoteMap(_0); + self.client.storage().fetch(&entry, hash).await + } + pub async fn pvf_active_vote_map_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, PvfActiveVoteMap, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn pvf_active_vote_list( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + >, + ::subxt::Error, + > { + let entry = PvfActiveVoteList; + self.client.storage().fetch_or_default(&entry, hash).await } pub async fn parachains( &self, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = Parachains; self.client.storage().fetch_or_default(&entry, hash).await @@ -12261,7 +13772,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, >, - ::subxt::Error, + ::subxt::Error, > { let entry = ParaLifecycles(_0); self.client.storage().fetch(&entry, hash).await @@ -12270,8 +13781,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ParaLifecycles>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ParaLifecycles, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12283,7 +13794,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::HeadData, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Heads(_0); self.client.storage().fetch(&entry, hash).await @@ -12291,8 +13802,10 @@ pub mod api { pub async fn heads_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Heads>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Heads, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn current_code_hash( @@ -12303,7 +13816,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ::subxt::Error, + ::subxt::Error, > { let entry = CurrentCodeHash(_0); self.client.storage().fetch(&entry, hash).await @@ -12312,8 +13825,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, CurrentCodeHash>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, CurrentCodeHash, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12326,7 +13839,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ::subxt::Error, + ::subxt::Error, > { let entry = PastCodeHash(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -12335,8 +13848,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PastCodeHash>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PastCodeHash, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12348,7 +13861,7 @@ pub mod api { runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::Error, > { let entry = PastCodeMeta(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -12357,8 +13870,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PastCodeMeta>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PastCodeMeta, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12370,7 +13883,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = PastCodePruning; self.client.storage().fetch_or_default(&entry, hash).await @@ -12381,7 +13894,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = FutureCodeUpgrades(_0); self.client.storage().fetch(&entry, hash).await @@ -12390,8 +13903,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, FutureCodeUpgrades>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, FutureCodeUpgrades, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12403,7 +13916,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ::subxt::Error, + ::subxt::Error, > { let entry = FutureCodeHash(_0); self.client.storage().fetch(&entry, hash).await @@ -12412,8 +13925,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, FutureCodeHash>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, FutureCodeHash, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12425,7 +13938,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_primitives::v1::UpgradeGoAhead, >, - ::subxt::Error, + ::subxt::Error, > { let entry = UpgradeGoAheadSignal(_0); self.client.storage().fetch(&entry, hash).await @@ -12434,8 +13947,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UpgradeGoAheadSignal>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UpgradeGoAheadSignal, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12447,7 +13960,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_primitives::v1::UpgradeRestriction, >, - ::subxt::Error, + ::subxt::Error, > { let entry = UpgradeRestrictionSignal(_0); self.client.storage().fetch(&entry, hash).await @@ -12456,8 +13969,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UpgradeRestrictionSignal>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UpgradeRestrictionSignal, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12469,7 +13982,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = UpgradeCooldowns; self.client.storage().fetch_or_default(&entry, hash).await @@ -12482,7 +13995,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = UpcomingUpgrades; self.client.storage().fetch_or_default(&entry, hash).await @@ -12493,7 +14006,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = ActionsQueue(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -12502,11 +14015,11 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ActionsQueue>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ActionsQueue, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await - } pub async fn upcoming_paras_genesis (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: Error >{ + } pub async fn upcoming_paras_genesis (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: Error < DispatchError >>{ let entry = UpcomingParasGenesis(_0); self.client.storage().fetch(&entry, hash).await } @@ -12514,8 +14027,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UpcomingParasGenesis>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UpcomingParasGenesis, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12523,8 +14036,10 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = CodeByHashRefs(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -12532,8 +14047,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, CodeByHashRefs>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, CodeByHashRefs, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12545,7 +14060,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCode, >, - ::subxt::Error, + ::subxt::Error, > { let entry = CodeByHash(_0); self.client.storage().fetch(&entry, hash).await @@ -12554,8 +14069,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, CodeByHash>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, CodeByHash, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12566,7 +14081,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceApprove { pub up_to: ::core::primitive::u32, } @@ -12574,17 +14090,17 @@ pub mod api { const PALLET: &'static str = "Initializer"; const FUNCTION: &'static str = "force_approve"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -12593,7 +14109,7 @@ pub mod api { pub fn force_approve( &self, up_to: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceApprove> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceApprove, DispatchError> { let call = ForceApprove { up_to }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -12602,6 +14118,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HasInitialized; impl ::subxt::StorageEntry for HasInitialized { const PALLET: &'static str = "Initializer"; @@ -12621,20 +14138,22 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn has_initialized( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::option::Option<()>, + ::subxt::Error, + > { let entry = HasInitialized; self.client.storage().fetch(&entry, hash).await - } pub async fn buffered_session_changes (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: Error >{ + } pub async fn buffered_session_changes (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: Error < DispatchError >>{ let entry = BufferedSessionChanges; self.client.storage().fetch_or_default(&entry, hash).await } @@ -12645,17 +14164,18 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -12665,6 +14185,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct DownwardMessageQueues( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -12698,10 +14219,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn downward_message_queues( @@ -12714,7 +14235,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = DownwardMessageQueues(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -12723,8 +14244,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DownwardMessageQueues>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, DownwardMessageQueues, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12732,8 +14253,10 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::sp_core::H256, + ::subxt::Error, + > { let entry = DownwardMessageQueueHeads(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -12741,8 +14264,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DownwardMessageQueueHeads>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, DownwardMessageQueueHeads, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12753,7 +14276,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ServiceOverweight { pub index: ::core::primitive::u64, pub weight_limit: ::core::primitive::u64, @@ -12762,17 +14286,17 @@ pub mod api { const PALLET: &'static str = "Ump"; const FUNCTION: &'static str = "service_overweight"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -12782,8 +14306,14 @@ pub mod api { &self, index: ::core::primitive::u64, weight_limit: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ServiceOverweight> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ServiceOverweight, + DispatchError, + > { let call = ServiceOverweight { index, weight_limit, @@ -12795,19 +14325,19 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_parachains::ump::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); impl ::subxt::Event for InvalidFormat { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "InvalidFormat"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); impl ::subxt::Event for UnsupportedVersion { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "UnsupportedVersion"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ExecutedUpward( pub [::core::primitive::u8; 32usize], pub runtime_types::xcm::v2::traits::Outcome, @@ -12816,7 +14346,7 @@ pub mod api { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "ExecutedUpward"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct WeightExhausted( pub [::core::primitive::u8; 32usize], pub ::core::primitive::u64, @@ -12826,7 +14356,7 @@ pub mod api { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "WeightExhausted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct UpwardMessagesReceived( pub runtime_types::polkadot_parachain::primitives::Id, pub ::core::primitive::u32, @@ -12836,7 +14366,7 @@ pub mod api { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "UpwardMessagesReceived"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OverweightEnqueued( pub runtime_types::polkadot_parachain::primitives::Id, pub [::core::primitive::u8; 32usize], @@ -12847,7 +14377,7 @@ pub mod api { const PALLET: &'static str = "Ump"; const EVENT: &'static str = "OverweightEnqueued"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OverweightServiced( pub ::core::primitive::u64, pub ::core::primitive::u64, @@ -12859,6 +14389,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct RelayDispatchQueues( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -12931,10 +14462,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn relay_dispatch_queues( @@ -12943,7 +14474,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::Error, + ::subxt::Error, > { let entry = RelayDispatchQueues(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -12952,8 +14483,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayDispatchQueues>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, RelayDispatchQueues, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12963,7 +14494,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< (::core::primitive::u32, ::core::primitive::u32), - ::subxt::Error, + ::subxt::Error, > { let entry = RelayDispatchQueueSize(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -12972,8 +14503,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayDispatchQueueSize>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, RelayDispatchQueueSize, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -12982,7 +14513,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = NeedsDispatch; self.client.storage().fetch_or_default(&entry, hash).await @@ -12994,7 +14525,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::Id, >, - ::subxt::Error, + ::subxt::Error, > { let entry = NextDispatchRoundStartWith; self.client.storage().fetch(&entry, hash).await @@ -13008,7 +14539,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::std::vec::Vec<::core::primitive::u8>, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = Overweight(_0); self.client.storage().fetch(&entry, hash).await @@ -13017,16 +14548,18 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Overweight>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Overweight, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } pub async fn overweight_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u64, + ::subxt::Error, + > { let entry = OverweightCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -13037,7 +14570,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct HrmpInitOpenChannel { pub recipient: runtime_types::polkadot_parachain::primitives::Id, pub proposed_max_capacity: ::core::primitive::u32, @@ -13047,7 +14581,7 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_init_open_channel"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct HrmpAcceptOpenChannel { pub sender: runtime_types::polkadot_parachain::primitives::Id, } @@ -13055,7 +14589,7 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_accept_open_channel"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct HrmpCloseChannel { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, @@ -13064,7 +14598,7 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_close_channel"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceCleanHrmp { pub para: runtime_types::polkadot_parachain::primitives::Id, } @@ -13072,19 +14606,19 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "force_clean_hrmp"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceProcessHrmpOpen {} impl ::subxt::Call for ForceProcessHrmpOpen { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "force_process_hrmp_open"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceProcessHrmpClose {} impl ::subxt::Call for ForceProcessHrmpClose { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "force_process_hrmp_close"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct HrmpCancelOpenRequest { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, @@ -13093,17 +14627,17 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_cancel_open_request"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -13114,8 +14648,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::SubmittableExtrinsic<'a, T, E, A, HrmpInitOpenChannel> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + HrmpInitOpenChannel, + DispatchError, + > { let call = HrmpInitOpenChannel { recipient, proposed_max_capacity, @@ -13126,46 +14666,82 @@ pub mod api { pub fn hrmp_accept_open_channel( &self, sender: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, HrmpAcceptOpenChannel> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + HrmpAcceptOpenChannel, + DispatchError, + > { let call = HrmpAcceptOpenChannel { sender }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn hrmp_close_channel( &self, channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, HrmpCloseChannel> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + HrmpCloseChannel, + DispatchError, + > { let call = HrmpCloseChannel { channel_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_clean_hrmp( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceCleanHrmp> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceCleanHrmp, + DispatchError, + > { let call = ForceCleanHrmp { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_process_hrmp_open( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceProcessHrmpOpen> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceProcessHrmpOpen, + DispatchError, + > { let call = ForceProcessHrmpOpen {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_process_hrmp_close( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceProcessHrmpClose> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceProcessHrmpClose, + DispatchError, + > { let call = ForceProcessHrmpClose {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn hrmp_cancel_open_request( &self, channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, HrmpCancelOpenRequest> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + HrmpCancelOpenRequest, + DispatchError, + > { let call = HrmpCancelOpenRequest { channel_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -13174,7 +14750,7 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OpenChannelRequested( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::Id, @@ -13185,7 +14761,7 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "OpenChannelRequested"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OpenChannelCanceled( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, @@ -13194,7 +14770,7 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "OpenChannelCanceled"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OpenChannelAccepted( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::Id, @@ -13203,7 +14779,7 @@ pub mod api { const PALLET: &'static str = "Hrmp"; const EVENT: &'static str = "OpenChannelAccepted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ChannelClosed( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, @@ -13215,6 +14791,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HrmpOpenChannelRequests( pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, ); @@ -13388,12 +14965,12 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn hrmp_open_channel_requests (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: Error >{ + } pub async fn hrmp_open_channel_requests (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: Error < DispatchError >>{ let entry = HrmpOpenChannelRequests(_0); self.client.storage().fetch(&entry, hash).await } @@ -13401,8 +14978,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpOpenChannelRequests>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpOpenChannelRequests, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13413,7 +14990,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpOpenChannelRequestsList; self.client.storage().fetch_or_default(&entry, hash).await @@ -13422,8 +14999,10 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = HrmpOpenChannelRequestCount(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -13431,8 +15010,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpOpenChannelRequestCount>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpOpenChannelRequestCount, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13440,8 +15019,10 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = HrmpAcceptedChannelRequestCount(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -13449,8 +15030,13 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpAcceptedChannelRequestCount>, - ::subxt::Error, + ::subxt::KeyIter< + 'a, + T, + HrmpAcceptedChannelRequestCount, + DispatchError, + >, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13458,8 +15044,10 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::HrmpChannelId, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::option::Option<()>, + ::subxt::Error, + > { let entry = HrmpCloseChannelRequests(_0); self.client.storage().fetch(&entry, hash).await } @@ -13467,8 +15055,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpCloseChannelRequests>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpCloseChannelRequests, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13479,7 +15067,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpCloseChannelRequestsList; self.client.storage().fetch_or_default(&entry, hash).await @@ -13490,7 +15078,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpWatermarks(_0); self.client.storage().fetch(&entry, hash).await @@ -13499,8 +15087,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpWatermarks>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpWatermarks, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13512,7 +15100,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, >, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpChannels(_0); self.client.storage().fetch(&entry, hash).await @@ -13521,8 +15109,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannels>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpChannels, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13532,7 +15120,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpIngressChannelsIndex(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -13541,8 +15129,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpIngressChannelsIndex>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpIngressChannelsIndex, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13552,7 +15140,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpEgressChannelsIndex(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -13561,8 +15149,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpEgressChannelsIndex>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpEgressChannelsIndex, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13576,7 +15164,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpChannelContents(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -13585,8 +15173,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannelContents>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpChannelContents, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13601,7 +15189,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, >, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = HrmpChannelDigests(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -13610,8 +15198,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannelDigests>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpChannelDigests, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13622,6 +15210,7 @@ pub mod api { use super::runtime_types; pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct AssignmentKeysUnsafe; impl ::subxt::StorageEntry for AssignmentKeysUnsafe { const PALLET: &'static str = "ParaSessionInfo"; @@ -13646,7 +15235,7 @@ pub mod api { impl ::subxt::StorageEntry for Sessions { const PALLET: &'static str = "ParaSessionInfo"; const STORAGE: &'static str = "Sessions"; - type Value = runtime_types::polkadot_primitives::v1::SessionInfo; + type Value = runtime_types::polkadot_primitives::v2::SessionInfo; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -13655,10 +15244,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn assignment_keys_unsafe( @@ -13668,7 +15257,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_primitives::v1::assignment_app::Public, >, - ::subxt::Error, + ::subxt::Error, > { let entry = AssignmentKeysUnsafe; self.client.storage().fetch_or_default(&entry, hash).await @@ -13676,8 +15265,10 @@ pub mod api { pub async fn earliest_stored_session( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = EarliestStoredSession; self.client.storage().fetch_or_default(&entry, hash).await } @@ -13687,9 +15278,9 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::SessionInfo, + runtime_types::polkadot_primitives::v2::SessionInfo, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Sessions(_0); self.client.storage().fetch(&entry, hash).await @@ -13698,8 +15289,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Sessions>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Sessions, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13710,7 +15301,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Register { pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -13721,7 +15313,7 @@ pub mod api { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "register"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceRegister { pub who: ::subxt::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, @@ -13734,7 +15326,7 @@ pub mod api { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "force_register"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Deregister { pub id: runtime_types::polkadot_parachain::primitives::Id, } @@ -13742,7 +15334,7 @@ pub mod api { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "deregister"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Swap { pub id: runtime_types::polkadot_parachain::primitives::Id, pub other: runtime_types::polkadot_parachain::primitives::Id, @@ -13751,7 +15343,7 @@ pub mod api { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "swap"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceRemoveLock { pub para: runtime_types::polkadot_parachain::primitives::Id, } @@ -13759,23 +15351,23 @@ pub mod api { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "force_remove_lock"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -13786,7 +15378,7 @@ 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::SubmittableExtrinsic<'a, T, E, A, Register> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Register, DispatchError> { let call = Register { id, @@ -13802,8 +15394,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::SubmittableExtrinsic<'a, T, E, A, ForceRegister> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceRegister, + DispatchError, + > { let call = ForceRegister { who, deposit, @@ -13816,7 +15414,7 @@ pub mod api { pub fn deregister( &self, id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Deregister> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Deregister, DispatchError> { let call = Deregister { id }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -13825,21 +15423,29 @@ pub mod api { &self, id: runtime_types::polkadot_parachain::primitives::Id, other: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Swap> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Swap, DispatchError> + { let call = Swap { id, other }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_remove_lock( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceRemoveLock> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceRemoveLock, + DispatchError, + > { let call = ForceRemoveLock { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reserve( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Reserve> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Reserve, DispatchError> + { let call = Reserve {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -13849,7 +15455,7 @@ pub mod api { runtime_types::polkadot_runtime_common::paras_registrar::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Registered( pub runtime_types::polkadot_parachain::primitives::Id, pub ::subxt::sp_core::crypto::AccountId32, @@ -13858,7 +15464,7 @@ pub mod api { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Registered"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Deregistered( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -13866,7 +15472,7 @@ pub mod api { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Deregistered"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Reserved( pub runtime_types::polkadot_parachain::primitives::Id, pub ::subxt::sp_core::crypto::AccountId32, @@ -13878,6 +15484,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct PendingSwap(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::StorageEntry for PendingSwap { const PALLET: &'static str = "Registrar"; @@ -13916,10 +15523,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn pending_swap( @@ -13930,7 +15537,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::Id, >, - ::subxt::Error, + ::subxt::Error, > { let entry = PendingSwap(_0); self.client.storage().fetch(&entry, hash).await @@ -13939,8 +15546,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingSwap>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingSwap, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -13955,7 +15562,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Paras(_0); self.client.storage().fetch(&entry, hash).await @@ -13963,8 +15570,10 @@ pub mod api { pub async fn paras_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Paras>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Paras, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn next_free_para_id( @@ -13972,7 +15581,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::polkadot_parachain::primitives::Id, - ::subxt::Error, + ::subxt::Error, > { let entry = NextFreeParaId; self.client.storage().fetch_or_default(&entry, hash).await @@ -13984,7 +15593,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceLease { pub para: runtime_types::polkadot_parachain::primitives::Id, pub leaser: ::subxt::sp_core::crypto::AccountId32, @@ -13996,7 +15606,7 @@ pub mod api { const PALLET: &'static str = "Slots"; const FUNCTION: &'static str = "force_lease"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ClearAllLeases { pub para: runtime_types::polkadot_parachain::primitives::Id, } @@ -14004,7 +15614,7 @@ pub mod api { const PALLET: &'static str = "Slots"; const FUNCTION: &'static str = "clear_all_leases"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct TriggerOnboard { pub para: runtime_types::polkadot_parachain::primitives::Id, } @@ -14012,17 +15622,17 @@ pub mod api { const PALLET: &'static str = "Slots"; const FUNCTION: &'static str = "trigger_onboard"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14035,7 +15645,7 @@ pub mod api { amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ForceLease> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceLease, DispatchError> { let call = ForceLease { para, @@ -14049,16 +15659,28 @@ pub mod api { pub fn clear_all_leases( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, ClearAllLeases> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ClearAllLeases, + DispatchError, + > { let call = ClearAllLeases { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn trigger_onboard( &self, para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, TriggerOnboard> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + TriggerOnboard, + DispatchError, + > { let call = TriggerOnboard { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -14067,13 +15689,13 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_common::slots::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NewLeasePeriod(pub ::core::primitive::u32); impl ::subxt::Event for NewLeasePeriod { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "NewLeasePeriod"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Leased( pub runtime_types::polkadot_parachain::primitives::Id, pub ::subxt::sp_core::crypto::AccountId32, @@ -14089,6 +15711,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Leases(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::StorageEntry for Leases { const PALLET: &'static str = "Slots"; @@ -14107,10 +15730,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn leases( @@ -14124,7 +15747,7 @@ pub mod api { ::core::primitive::u128, )>, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Leases(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -14132,8 +15755,10 @@ pub mod api { pub async fn leases_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Leases>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Leases, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } } @@ -14143,7 +15768,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NewAuction { #[codec(compact)] pub duration: ::core::primitive::u32, @@ -14154,7 +15780,7 @@ pub mod api { const PALLET: &'static str = "Auctions"; const FUNCTION: &'static str = "new_auction"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Bid { #[codec(compact)] pub para: runtime_types::polkadot_parachain::primitives::Id, @@ -14171,23 +15797,23 @@ pub mod api { const PALLET: &'static str = "Auctions"; const FUNCTION: &'static str = "bid"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14197,7 +15823,7 @@ pub mod api { &self, duration: ::core::primitive::u32, lease_period_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, NewAuction> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NewAuction, DispatchError> { let call = NewAuction { duration, @@ -14212,7 +15838,8 @@ pub mod api { first_slot: ::core::primitive::u32, last_slot: ::core::primitive::u32, amount: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Bid> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Bid, DispatchError> + { let call = Bid { para, auction_index, @@ -14224,8 +15851,14 @@ pub mod api { } pub fn cancel_auction( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, CancelAuction> - { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + CancelAuction, + DispatchError, + > { let call = CancelAuction {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -14234,7 +15867,7 @@ pub mod api { pub type Event = runtime_types::polkadot_runtime_common::auctions::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AuctionStarted( pub ::core::primitive::u32, pub ::core::primitive::u32, @@ -14244,13 +15877,13 @@ pub mod api { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionStarted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AuctionClosed(pub ::core::primitive::u32); impl ::subxt::Event for AuctionClosed { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionClosed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Reserved( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -14260,7 +15893,7 @@ pub mod api { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Reserved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Unreserved( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -14269,7 +15902,7 @@ pub mod api { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Unreserved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReserveConfiscated( pub runtime_types::polkadot_parachain::primitives::Id, pub ::subxt::sp_core::crypto::AccountId32, @@ -14279,7 +15912,7 @@ pub mod api { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "ReserveConfiscated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BidAccepted( pub ::subxt::sp_core::crypto::AccountId32, pub runtime_types::polkadot_parachain::primitives::Id, @@ -14291,7 +15924,7 @@ pub mod api { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "BidAccepted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct WinningOffset( pub ::core::primitive::u32, pub ::core::primitive::u32, @@ -14303,6 +15936,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct AuctionCounter; impl ::subxt::StorageEntry for AuctionCounter { const PALLET: &'static str = "Auctions"; @@ -14353,17 +15987,19 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn auction_counter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = AuctionCounter; self.client.storage().fetch_or_default(&entry, hash).await } @@ -14375,7 +16011,7 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::Error, > { let entry = AuctionInfo; self.client.storage().fetch(&entry, hash).await @@ -14387,7 +16023,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::Error, > { let entry = ReservedAmounts(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -14396,8 +16032,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReservedAmounts>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReservedAmounts, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -14413,7 +16049,7 @@ pub mod api { ::core::primitive::u128, )>; 36usize], >, - ::subxt::Error, + ::subxt::Error, > { let entry = Winning(_0); self.client.storage().fetch(&entry, hash).await @@ -14422,8 +16058,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Winning>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Winning, DispatchError>, + ::subxt::Error, > { self.client.storage().iter(hash).await } @@ -14434,7 +16070,8 @@ pub mod api { use super::runtime_types; pub mod calls { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Create { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -14453,7 +16090,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "create"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Contribute { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -14466,7 +16103,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "contribute"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Withdraw { pub who: ::subxt::sp_core::crypto::AccountId32, #[codec(compact)] @@ -14476,7 +16113,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "withdraw"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Refund { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -14485,7 +16122,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "refund"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Dissolve { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -14494,7 +16131,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "dissolve"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Edit { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -14513,7 +16150,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "edit"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddMemo { pub index: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, @@ -14522,7 +16159,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "add_memo"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Poke { pub index: runtime_types::polkadot_parachain::primitives::Id, } @@ -14530,17 +16167,28 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "poke"; } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14556,7 +16204,8 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Create> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Create, DispatchError> + { let call = Create { index, cap, @@ -14574,7 +16223,7 @@ pub mod api { signature: ::core::option::Option< runtime_types::sp_runtime::MultiSignature, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Contribute> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Contribute, DispatchError> { let call = Contribute { index, @@ -14587,7 +16236,7 @@ pub mod api { &self, who: ::subxt::sp_core::crypto::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Withdraw> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Withdraw, DispatchError> { let call = Withdraw { who, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -14595,14 +16244,15 @@ pub mod api { pub fn refund( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Refund> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Refund, DispatchError> + { let call = Refund { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn dissolve( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Dissolve> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Dissolve, DispatchError> { let call = Dissolve { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -14617,7 +16267,8 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Edit> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Edit, DispatchError> + { let call = Edit { index, cap, @@ -14632,29 +16283,48 @@ pub mod api { &self, index: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, AddMemo> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddMemo, DispatchError> + { let call = AddMemo { index, memo }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn poke( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, E, A, Poke> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Poke, DispatchError> + { let call = Poke { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn contribute_all( + &self, + index: runtime_types::polkadot_parachain::primitives::Id, + signature: ::core::option::Option< + runtime_types::sp_runtime::MultiSignature, + >, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ContributeAll, + DispatchError, + > { + let call = ContributeAll { index, signature }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } } } pub type Event = runtime_types::polkadot_runtime_common::crowdloan::pallet::Event; pub mod events { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Created(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::Event for Created { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Created"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Contributed( pub ::subxt::sp_core::crypto::AccountId32, pub runtime_types::polkadot_parachain::primitives::Id, @@ -14664,7 +16334,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Contributed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Withdrew( pub ::subxt::sp_core::crypto::AccountId32, pub runtime_types::polkadot_parachain::primitives::Id, @@ -14674,7 +16344,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Withdrew"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct PartiallyRefunded( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -14682,19 +16352,19 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "PartiallyRefunded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AllRefunded(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::Event for AllRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AllRefunded"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Dissolved(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::Event for Dissolved { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Dissolved"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct HandleBidResult( pub runtime_types::polkadot_parachain::primitives::Id, pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, @@ -14703,13 +16373,13 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "HandleBidResult"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Edited(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::Event for Edited { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Edited"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct MemoUpdated( pub ::subxt::sp_core::crypto::AccountId32, pub runtime_types::polkadot_parachain::primitives::Id, @@ -14719,7 +16389,7 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "MemoUpdated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddedToNewRaise( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -14730,6 +16400,7 @@ pub mod api { } pub mod storage { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Funds(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::StorageEntry for Funds { const PALLET: &'static str = "Crowdloan"; @@ -14776,10 +16447,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn funds( @@ -14795,7 +16466,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::Error, > { let entry = Funds(_0); self.client.storage().fetch(&entry, hash).await @@ -14803,8 +16474,10 @@ pub mod api { pub async fn funds_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Funds>, ::subxt::Error> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Funds, DispatchError>, + ::subxt::Error, + > { self.client.storage().iter(hash).await } pub async fn new_raise( @@ -14812,7 +16485,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::Error, > { let entry = NewRaise; self.client.storage().fetch_or_default(&entry, hash).await @@ -14820,432 +16493,1320 @@ pub mod api { pub async fn endings_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = EndingsCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn next_trie_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::Error> - { + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { let entry = NextTrieIndex; self.client.storage().fetch_or_default(&entry, hash).await } } } } - pub mod runtime_types { + pub mod xcm_pallet { use super::runtime_types; - pub mod bitvec { + pub mod calls { use super::runtime_types; - pub mod order { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Lsb0 {} + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Send { + pub dest: runtime_types::xcm::VersionedMultiLocation, + pub message: runtime_types::xcm::VersionedXcm, + } + impl ::subxt::Call for Send { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "send"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct TeleportAssets { + pub dest: runtime_types::xcm::VersionedMultiLocation, + pub beneficiary: runtime_types::xcm::VersionedMultiLocation, + pub assets: runtime_types::xcm::VersionedMultiAssets, + 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ReserveTransferAssets { + pub dest: runtime_types::xcm::VersionedMultiLocation, + pub beneficiary: runtime_types::xcm::VersionedMultiLocation, + pub assets: runtime_types::xcm::VersionedMultiAssets, + 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Execute { + pub message: runtime_types::xcm::VersionedXcm, + pub max_weight: ::core::primitive::u64, } - } - pub mod finality_grandpa { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - 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 :: Encode, :: subxt :: codec :: Decode)] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Prevote<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + impl ::subxt::Call for Execute { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "execute"; } - } - pub mod frame_support { - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct BoundedBTreeMap<_0, _1>( - pub ::std::collections::BTreeMap<_0, _1>, - ); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ForceXcmVersion { + pub location: 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ForceSubscribeVersionNotify { + pub location: runtime_types::xcm::VersionedMultiLocation, + } + impl ::subxt::Call for ForceSubscribeVersionNotify { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "force_subscribe_version_notify"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ForceUnsubscribeVersionNotify { + pub location: runtime_types::xcm::VersionedMultiLocation, + } + impl ::subxt::Call for ForceUnsubscribeVersionNotify { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "force_unsubscribe_version_notify"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct LimitedReserveTransferAssets { + pub dest: runtime_types::xcm::VersionedMultiLocation, + pub beneficiary: runtime_types::xcm::VersionedMultiLocation, + pub assets: runtime_types::xcm::VersionedMultiAssets, + 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct LimitedTeleportAssets { + pub dest: runtime_types::xcm::VersionedMultiLocation, + pub beneficiary: runtime_types::xcm::VersionedMultiLocation, + pub assets: runtime_types::xcm::VersionedMultiAssets, + 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, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } } - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + pub fn send( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + message: runtime_types::xcm::VersionedXcm, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Send, DispatchError> + { + let call = Send { dest, message }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + pub fn teleport_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + TeleportAssets, + DispatchError, + > { + let call = TeleportAssets { + dest, + beneficiary, + assets, + fee_asset_item, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - } - pub mod traits { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct WrapperKeepOpaque<_0>( - #[codec(compact)] ::core::primitive::u32, - pub _0, - ); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct WrapperOpaque<_0>( - #[codec(compact)] ::core::primitive::u32, - pub _0, - ); + pub fn reserve_transfer_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ReserveTransferAssets, + DispatchError, + > { + let call = ReserveTransferAssets { + dest, + beneficiary, + assets, + fee_asset_item, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - } + pub fn execute( + &self, + message: runtime_types::xcm::VersionedXcm, + max_weight: ::core::primitive::u64, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Execute, DispatchError> + { + let call = Execute { + message, + max_weight, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - } - pub mod weights { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum DispatchClass { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, + pub fn force_xcm_version( + &self, + location: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm_version: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceXcmVersion, + DispatchError, + > { + let call = ForceXcmVersion { + location, + xcm_version, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct DispatchInfo { - pub weight: ::core::primitive::u64, - pub class: runtime_types::frame_support::weights::DispatchClass, - pub pays_fee: runtime_types::frame_support::weights::Pays, + pub fn force_default_xcm_version( + &self, + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceDefaultXcmVersion, + DispatchError, + > { + let call = ForceDefaultXcmVersion { maybe_xcm_version }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Pays { - #[codec(index = 0)] - Yes, - #[codec(index = 1)] - No, + pub fn force_subscribe_version_notify( + &self, + location: runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceSubscribeVersionNotify, + DispatchError, + > { + let call = ForceSubscribeVersionNotify { location }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, + pub fn force_unsubscribe_version_notify( + &self, + location: runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + ForceUnsubscribeVersionNotify, + DispatchError, + > { + let call = ForceUnsubscribeVersionNotify { location }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, + pub fn limited_reserve_transfer_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + LimitedReserveTransferAssets, + DispatchError, + > { + let call = LimitedReserveTransferAssets { + dest, + beneficiary, + assets, + fee_asset_item, + weight_limit, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct WeightToFeeCoefficient<_0> { - pub coeff_integer: _0, - pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, - pub negative: ::core::primitive::bool, - pub degree: ::core::primitive::u8, + pub fn limited_teleport_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + LimitedTeleportAssets, + DispatchError, + > { + let call = LimitedTeleportAssets { + dest, + beneficiary, + assets, + fee_asset_item, + weight_limit, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub mod frame_system { + pub type Event = runtime_types::pallet_xcm::pallet::Event; + pub mod events { use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct CheckGenesis {} - } - pub mod check_mortality { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct CheckMortality( - pub runtime_types::sp_runtime::generic::era::Era, - ); - } - pub mod check_nonce { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod check_spec_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct CheckSpecVersion {} - } - pub mod check_tx_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct CheckTxVersion {} - } - pub mod check_weight { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub struct CheckWeight {} - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Attempted(pub runtime_types::xcm::v2::traits::Outcome); + impl ::subxt::Event for Attempted { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "Attempted"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Sent( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v2::Xcm, + ); + impl ::subxt::Event for Sent { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "Sent"; } - pub mod limits { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BlockLength { - pub max: runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u32, - >, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BlockWeights { - pub base_block: ::core::primitive::u64, - pub max_block: ::core::primitive::u64, - pub per_class: - runtime_types::frame_support::weights::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct WeightsPerClass { - pub base_extrinsic: ::core::primitive::u64, - pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, - pub max_total: ::core::option::Option<::core::primitive::u64>, - pub reserved: ::core::option::Option<::core::primitive::u64>, - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct UnexpectedResponse( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::Event for UnexpectedResponse { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "UnexpectedResponse"; } - pub mod pallet { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Call { - # [codec (index = 0)] fill_block { ratio : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 1)] remark { remark : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 2)] set_heap_pages { pages : :: core :: primitive :: u64 , } , # [codec (index = 3)] set_code { code : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] set_code_without_checks { code : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 5)] set_changes_trie_config { changes_trie_config : :: core :: option :: Option < runtime_types :: sp_core :: changes_trie :: ChangesTrieConfiguration > , } , # [codec (index = 6)] set_storage { items : :: std :: vec :: Vec < (:: std :: vec :: Vec < :: core :: primitive :: u8 > , :: std :: vec :: Vec < :: core :: primitive :: u8 > ,) > , } , # [codec (index = 7)] kill_storage { keys : :: std :: vec :: Vec < :: std :: vec :: Vec < :: core :: primitive :: u8 > > , } , # [codec (index = 8)] kill_prefix { prefix : :: std :: vec :: Vec < :: core :: primitive :: u8 > , subkeys : :: core :: primitive :: u32 , } , # [codec (index = 9)] remark_with_event { remark : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Error { - #[codec(index = 0)] - InvalidSpecName, - #[codec(index = 1)] - SpecVersionNeedsToIncrease, - #[codec(index = 2)] - FailedToExtractRuntimeVersion, - #[codec(index = 3)] - NonDefaultComposite, - #[codec(index = 4)] - NonZeroRefCount, - #[codec(index = 5)] - CallFiltered, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Event { - #[codec(index = 0)] - ExtrinsicSuccess(runtime_types::frame_support::weights::DispatchInfo), - #[codec(index = 1)] - ExtrinsicFailed( - runtime_types::sp_runtime::DispatchError, - runtime_types::frame_support::weights::DispatchInfo, - ), - #[codec(index = 2)] - CodeUpdated, - #[codec(index = 3)] - NewAccount(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 4)] - KilledAccount(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 5)] - Remarked( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ), - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ResponseReady( + pub ::core::primitive::u64, + pub runtime_types::xcm::v2::Response, + ); + impl ::subxt::Event for ResponseReady { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "ResponseReady"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, - pub data: _1, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Notified( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + ); + impl ::subxt::Event for Notified { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "Notified"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::std::vec::Vec<_1>, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotifyOverweight( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + pub ::core::primitive::u64, + pub ::core::primitive::u64, + ); + impl ::subxt::Event for NotifyOverweight { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyOverweight"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotifyDispatchError( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + ); + impl ::subxt::Event for NotifyDispatchError { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyDispatchError"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotifyDecodeFailed( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + ); + impl ::subxt::Event for NotifyDecodeFailed { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyDecodeFailed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct InvalidResponder( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + pub ::core::option::Option< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + ); + impl ::subxt::Event for InvalidResponder { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "InvalidResponder"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct InvalidResponderVersion( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::Event for InvalidResponderVersion { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "InvalidResponderVersion"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ResponseTaken(pub ::core::primitive::u64); + impl ::subxt::Event for ResponseTaken { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "ResponseTaken"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct AssetsTrapped( + pub ::subxt::sp_core::H256, + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::VersionedMultiAssets, + ); + impl ::subxt::Event for AssetsTrapped { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "AssetsTrapped"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct VersionChangeNotified( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u32, + ); + impl ::subxt::Event for VersionChangeNotified { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "VersionChangeNotified"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SupportedVersionChanged( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u32, + ); + impl ::subxt::Event for SupportedVersionChanged { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "SupportedVersionChanged"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotifyTargetSendFail( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + pub runtime_types::xcm::v2::traits::Error, + ); + impl ::subxt::Event for NotifyTargetSendFail { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyTargetSendFail"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct NotifyTargetMigrationFail( + pub runtime_types::xcm::VersionedMultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::Event for NotifyTargetMigrationFail { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyTargetMigrationFail"; } } - pub mod pallet_authorship { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Call { - #[codec(index = 0)] - set_uncles { - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, + type DispatchError = runtime_types::sp_runtime::DispatchError; + 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 } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Error { - #[codec(index = 0)] - InvalidUncleParent, - #[codec(index = 1)] - UnclesAlreadySet, - #[codec(index = 2)] - TooManyUncles, - #[codec(index = 3)] - GenesisUncle, - #[codec(index = 4)] - TooHighUncle, - #[codec(index = 5)] - UncleAlreadyIncluded, - #[codec(index = 6)] - OldUncle, + } + pub struct Queries(pub ::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, + )]) } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), + pub struct AssetTraps(pub ::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 mod pallet_babe { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Call { - # [codec (index = 0)] 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)] 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)] plan_config_change { config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor , } , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Error { - #[codec(index = 0)] - InvalidEquivocationProof, - #[codec(index = 1)] - InvalidKeyOwnershipProof, - #[codec(index = 2)] - DuplicateOffenceReport, + 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 mod pallet_bags_list { - use super::runtime_types; - pub mod list { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct Bag { - pub head: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - pub tail: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub struct SupportedVersion( + ::core::primitive::u32, + 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, + ), + ]) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - 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 bag_upper: ::core::primitive::u64, + } + pub struct VersionNotifiers( + ::core::primitive::u32, + 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 mod pallet { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Call { - #[codec(index = 0)] - rebag { - dislocated: ::subxt::sp_core::crypto::AccountId32, - }, + pub struct VersionNotifyTargets( + ::core::primitive::u32, + 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, + ), + ]) } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Event { - #[codec(index = 0)] - Rebagged( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u64, - ::core::primitive::u64, - ), + } + pub struct VersionDiscoveryQueue; + impl ::subxt::StorageEntry for VersionDiscoveryQueue { + const PALLET: &'static str = "XcmPallet"; + const STORAGE: &'static str = "VersionDiscoveryQueue"; + type Value = + runtime_types::frame_support::storage::bounded_vec::BoundedVec<( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u32, + )>; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain } } - } - pub mod pallet_balances { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Call { - #[codec(index = 0)] - transfer { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, + 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 async fn query_counter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::primitive::u64, + ::subxt::Error, + > { + let entry = QueryCounter; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn queries( + &self, + _0: ::core::primitive::u64, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, + >, + >, + ::subxt::Error, + > { + let entry = Queries(_0); + self.client.storage().fetch(&entry, hash).await + } + pub async fn queries_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, Queries, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn asset_traps( + &self, + _0: ::subxt::sp_core::H256, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::primitive::u32, + ::subxt::Error, + > { + let entry = AssetTraps(_0); + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn asset_traps_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, AssetTraps, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn safe_xcm_version( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u32>, + ::subxt::Error, + > { + let entry = SafeXcmVersion; + self.client.storage().fetch(&entry, hash).await + } + pub async fn supported_version( + &self, + _0: ::core::primitive::u32, + _1: runtime_types::xcm::VersionedMultiLocation, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u32>, + ::subxt::Error, + > { + let entry = SupportedVersion(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn supported_version_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, SupportedVersion, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn version_notifiers( + &self, + _0: ::core::primitive::u32, + _1: runtime_types::xcm::VersionedMultiLocation, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u64>, + ::subxt::Error, + > { + let entry = VersionNotifiers(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn version_notifiers_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, VersionNotifiers, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn version_notify_targets( + &self, + _0: ::core::primitive::u32, + _1: runtime_types::xcm::VersionedMultiLocation, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<( + ::core::primitive::u64, + ::core::primitive::u64, + ::core::primitive::u32, + )>, + ::subxt::Error, + > { + let entry = VersionNotifyTargets(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn version_notify_targets_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, VersionNotifyTargets, DispatchError>, + ::subxt::Error, + > { + self.client.storage().iter(hash).await + } + pub async fn version_discovery_queue( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + runtime_types::frame_support::storage::bounded_vec::BoundedVec<( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u32, + )>, + ::subxt::Error, + > { + let entry = VersionDiscoveryQueue; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn current_migration( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + runtime_types::pallet_xcm::pallet::VersionMigrationStage, + >, + ::subxt::Error, + > { + let entry = CurrentMigration; + self.client.storage().fetch(&entry, hash).await + } + } + } + } + pub mod runtime_types { + use super::runtime_types; + pub mod bitvec { + use super::runtime_types; + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Lsb0 {} + } + } + pub mod finality_grandpa { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BoundedBTreeMap<_0, _1>( + pub ::std::collections::BTreeMap<_0, _1>, + ); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } + pub mod traits { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WrapperKeepOpaque<_0>( + #[codec(compact)] ::core::primitive::u32, + pub _0, + ); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WrapperOpaque<_0>( + #[codec(compact)] ::core::primitive::u32, + pub _0, + ); + } + pub mod schedule { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum LookupError { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + BadFormat, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum MaybeHashed<_0, _1> { + #[codec(index = 0)] + Value(_0), + #[codec(index = 1)] + Hash(_1), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } + } + } + pub mod weights { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct DispatchInfo { + pub weight: ::core::primitive::u64, + pub class: runtime_types::frame_support::weights::DispatchClass, + pub pays_fee: runtime_types::frame_support::weights::Pays, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WeightToFeeCoefficient<_0> { + pub coeff_integer: _0, + pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, + pub negative: ::core::primitive::bool, + pub degree: ::core::primitive::u8, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); + } + pub mod frame_system { + use super::runtime_types; + pub mod extensions { + use super::runtime_types; + pub mod check_genesis { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckGenesis {} + } + pub mod check_mortality { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckMortality( + pub runtime_types::sp_runtime::generic::era::Era, + ); + } + pub mod check_non_zero_sender { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckNonZeroSender {} + } + pub mod check_nonce { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckSpecVersion {} + } + pub mod check_tx_version { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckTxVersion {} + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckWeight {} + } + } + pub mod limits { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BlockLength { + pub max: runtime_types::frame_support::weights::PerDispatchClass< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BlockWeights { + pub base_block: ::core::primitive::u64, + pub max_block: ::core::primitive::u64, + pub per_class: + runtime_types::frame_support::weights::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WeightsPerClass { + pub base_extrinsic: ::core::primitive::u64, + pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, + pub max_total: ::core::option::Option<::core::primitive::u64>, + pub reserved: ::core::option::Option<::core::primitive::u64>, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + fill_block { + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 1)] + remark { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 2)] + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 3)] + set_code { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + set_code_without_checks { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 5)] + set_storage { + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 6)] + kill_storage { + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + }, + #[codec(index = 7)] + kill_prefix { + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 8)] + remark_with_event { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidSpecName, + #[codec(index = 1)] + SpecVersionNeedsToIncrease, + #[codec(index = 2)] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + NonDefaultComposite, + #[codec(index = 4)] + NonZeroRefCount, + #[codec(index = 5)] + CallFiltered, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + ExtrinsicSuccess { + dispatch_info: + runtime_types::frame_support::weights::DispatchInfo, + }, + #[codec(index = 1)] + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: + runtime_types::frame_support::weights::DispatchInfo, + }, + #[codec(index = 2)] + CodeUpdated, + #[codec(index = 3)] + NewAccount { + account: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 4)] + KilledAccount { + account: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 5)] + Remarked { + sender: ::subxt::sp_core::crypto::AccountId32, + hash: ::subxt::sp_core::H256, + }, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } + pub mod pallet_authorship { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidUncleParent, + #[codec(index = 1)] + UnclesAlreadySet, + #[codec(index = 2)] + TooManyUncles, + #[codec(index = 3)] + GenesisUncle, + #[codec(index = 4)] + TooHighUncle, + #[codec(index = 5)] + UncleAlreadyIncluded, + #[codec(index = 6)] + OldUncle, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum UncleEntryItem<_0, _1, _2> { + #[codec(index = 0)] + InclusionHeight(_0), + #[codec(index = 1)] + Uncle(_1, ::core::option::Option<_2>), + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + # [codec (index = 0)] 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)] 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)] plan_config_change { config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor , } , } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidEquivocationProof, + #[codec(index = 1)] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + DuplicateOffenceReport, + } + } + } + pub mod pallet_bags_list { + use super::runtime_types; + pub mod list { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Bag { + pub head: + ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub tail: + ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 bag_upper: ::core::primitive::u64, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + rebag { + dislocated: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 1)] + put_in_front_of { + lighter: ::subxt::sp_core::crypto::AccountId32, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + NotInSameBag, + #[codec(index = 1)] + IdNotFound, + #[codec(index = 2)] + NotHeavier, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + Rebagged { + who: ::subxt::sp_core::crypto::AccountId32, + from: ::core::primitive::u64, + to: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_balances { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + transfer { + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, #[codec(index = 1)] set_balance { who: ::subxt::sp_runtime::MultiAddress< @@ -15296,7 +17857,9 @@ pub mod api { amount: ::core::primitive::u128, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] VestingBalance, @@ -15315,78 +17878,26 @@ pub mod api { #[codec(index = 7)] TooManyReserves, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { - #[codec(index = 0)] - Endowed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 1)] - DustLost( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 2)] - Transfer( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 3)] - BalanceSet( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), - #[codec(index = 4)] - Reserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 5)] - Unreserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 6)] - ReserveRepatriated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - ), - #[codec(index = 7)] - Deposit( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 8)] - Withdraw( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 9)] - Slashed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - } + # [codec (index = 0)] Endowed { account : :: subxt :: sp_core :: crypto :: AccountId32 , free_balance : :: core :: primitive :: u128 , } , # [codec (index = 1)] DustLost { account : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] Transfer { from : :: subxt :: sp_core :: crypto :: AccountId32 , to : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 3)] BalanceSet { who : :: subxt :: sp_core :: crypto :: AccountId32 , free : :: core :: primitive :: u128 , reserved : :: core :: primitive :: u128 , } , # [codec (index = 4)] Reserved { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 5)] Unreserved { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 6)] 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)] Deposit { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 8)] Withdraw { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 9)] Slashed { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AccountData<_0> { pub free: _0, pub reserved: _0, pub misc_frozen: _0, pub fee_frozen: _0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BalanceLock<_0> { pub id: [::core::primitive::u8; 8usize], pub amount: _0, pub reasons: runtime_types::pallet_balances::Reasons, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Reasons { #[codec(index = 0)] Fee, @@ -15395,14 +17906,14 @@ pub mod api { #[codec(index = 2)] All, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Releases { #[codec(index = 0)] V1_0_0, #[codec(index = 1)] V2_0_0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReserveData<_0, _1> { pub id: _0, pub amount: _1, @@ -15412,7 +17923,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] propose_bounty { @@ -15472,7 +17985,9 @@ pub mod api { remark: ::std::vec::Vec<::core::primitive::u8>, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] InsufficientProposersBalance, @@ -15492,33 +18007,40 @@ pub mod api { PendingPayout, #[codec(index = 8)] Premature, + #[codec(index = 9)] + HasActiveChildBounty, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - BountyProposed(::core::primitive::u32), + BountyProposed { index: ::core::primitive::u32 }, #[codec(index = 1)] - BountyRejected(::core::primitive::u32, ::core::primitive::u128), + BountyRejected { + index: ::core::primitive::u32, + bond: ::core::primitive::u128, + }, #[codec(index = 2)] - BountyBecameActive(::core::primitive::u32), + BountyBecameActive { index: ::core::primitive::u32 }, #[codec(index = 3)] - BountyAwarded( - ::core::primitive::u32, - ::subxt::sp_core::crypto::AccountId32, - ), + BountyAwarded { + index: ::core::primitive::u32, + beneficiary: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 4)] - BountyClaimed( - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ), + BountyClaimed { + index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 5)] - BountyCanceled(::core::primitive::u32), + BountyCanceled { index: ::core::primitive::u32 }, #[codec(index = 6)] - BountyExtended(::core::primitive::u32), + BountyExtended { index: ::core::primitive::u32 }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Bounty<_0, _1, _2> { pub proposer: _0, pub value: _1, @@ -15527,7 +18049,7 @@ pub mod api { pub bond: _1, pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum BountyStatus<_0, _1> { #[codec(index = 0)] Proposed, @@ -15551,7 +18073,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] set_members { @@ -15599,7 +18123,9 @@ pub mod api { proposal_hash: ::subxt::sp_core::H256, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] NotMember, @@ -15622,52 +18148,58 @@ pub mod api { #[codec(index = 9)] WrongProposalLength, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - Proposed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - ), + Proposed { + account: ::subxt::sp_core::crypto::AccountId32, + proposal_index: ::core::primitive::u32, + proposal_hash: ::subxt::sp_core::H256, + threshold: ::core::primitive::u32, + }, #[codec(index = 1)] - Voted( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::bool, - ::core::primitive::u32, - ::core::primitive::u32, - ), + Voted { + account: ::subxt::sp_core::crypto::AccountId32, + proposal_hash: ::subxt::sp_core::H256, + voted: ::core::primitive::bool, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, #[codec(index = 2)] - Approved(::subxt::sp_core::H256), + Approved { + proposal_hash: ::subxt::sp_core::H256, + }, #[codec(index = 3)] - Disapproved(::subxt::sp_core::H256), + Disapproved { + proposal_hash: ::subxt::sp_core::H256, + }, #[codec(index = 4)] - Executed( - ::subxt::sp_core::H256, - ::core::result::Result< + Executed { + proposal_hash: ::subxt::sp_core::H256, + result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - ), + }, #[codec(index = 5)] - MemberExecuted( - ::subxt::sp_core::H256, - ::core::result::Result< + MemberExecuted { + proposal_hash: ::subxt::sp_core::H256, + result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - ), + }, #[codec(index = 6)] - Closed( - ::subxt::sp_core::H256, - ::core::primitive::u32, - ::core::primitive::u32, - ), + Closed { + proposal_hash: ::subxt::sp_core::H256, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum RawOrigin<_0> { #[codec(index = 0)] Members(::core::primitive::u32, ::core::primitive::u32), @@ -15676,7 +18208,7 @@ pub mod api { #[codec(index = 2)] _Phantom, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Votes<_0, _1> { pub index: _1, pub threshold: _1, @@ -15689,7 +18221,9 @@ pub mod api { use super::runtime_types; pub mod conviction { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Conviction { #[codec(index = 0)] None, @@ -15709,7 +18243,9 @@ pub mod api { } pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] propose { @@ -15823,7 +18359,9 @@ pub mod api { prop_index: ::core::primitive::u32, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] ValueLow, @@ -15880,87 +18418,26 @@ pub mod api { #[codec(index = 26)] MaxVotesReached, #[codec(index = 27)] - TooManyProposals, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Event { - #[codec(index = 0)] - Proposed(::core::primitive::u32, ::core::primitive::u128), - #[codec(index = 1)] - Tabled( - ::core::primitive::u32, - ::core::primitive::u128, - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ), - #[codec(index = 2)] - ExternalTabled, - #[codec(index = 3)] - Started( - ::core::primitive::u32, - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ), - #[codec(index = 4)] - Passed(::core::primitive::u32), - #[codec(index = 5)] - NotPassed(::core::primitive::u32), - #[codec(index = 6)] - Cancelled(::core::primitive::u32), - #[codec(index = 7)] - Executed( - ::core::primitive::u32, - ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - ), - #[codec(index = 8)] - Delegated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 9)] - Undelegated(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 10)] - Vetoed( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - ), - #[codec(index = 11)] - PreimageNoted( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 12)] - PreimageUsed( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 13)] - PreimageInvalid(::subxt::sp_core::H256, ::core::primitive::u32), - #[codec(index = 14)] - PreimageMissing(::subxt::sp_core::H256, ::core::primitive::u32), - #[codec(index = 15)] - PreimageReaped( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 16)] - Blacklisted(::subxt::sp_core::H256), + TooManyProposals, } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + # [codec (index = 0)] Proposed { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 1)] Tabled { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , depositors : :: std :: vec :: Vec < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 2)] ExternalTabled , # [codec (index = 3)] Started { ref_index : :: core :: primitive :: u32 , threshold : runtime_types :: pallet_democracy :: vote_threshold :: VoteThreshold , } , # [codec (index = 4)] Passed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 5)] NotPassed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 6)] Cancelled { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 7)] Executed { ref_index : :: core :: primitive :: u32 , result : :: core :: result :: Result < () , runtime_types :: sp_runtime :: DispatchError > , } , # [codec (index = 8)] Delegated { who : :: subxt :: sp_core :: crypto :: AccountId32 , target : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 9)] Undelegated { account : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 10)] Vetoed { who : :: subxt :: sp_core :: crypto :: AccountId32 , proposal_hash : :: subxt :: sp_core :: H256 , until : :: core :: primitive :: u32 , } , # [codec (index = 11)] PreimageNoted { proposal_hash : :: subxt :: sp_core :: H256 , who : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 12)] PreimageUsed { proposal_hash : :: subxt :: sp_core :: H256 , provider : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 13)] PreimageInvalid { proposal_hash : :: subxt :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 14)] PreimageMissing { proposal_hash : :: subxt :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 15)] 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)] Blacklisted { proposal_hash : :: subxt :: sp_core :: H256 , } , # [codec (index = 17)] 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)] Seconded { seconder : :: subxt :: sp_core :: crypto :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , } } pub mod types { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Delegations<_0> { pub votes: _0, pub capital: _0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] Ongoing( @@ -15976,7 +18453,9 @@ pub mod api { end: _0, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ReferendumStatus<_0, _1, _2> { pub end: _0, pub proposal_hash: _1, @@ -15985,7 +18464,9 @@ pub mod api { pub delay: _0, pub tally: runtime_types::pallet_democracy::types::Tally<_2>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Tally<_0> { pub ayes: _0, pub nays: _0, @@ -15994,7 +18475,9 @@ pub mod api { } pub mod vote { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum AccountVote<_0> { #[codec(index = 0)] Standard { @@ -16004,15 +18487,20 @@ pub mod api { #[codec(index = 1)] Split { aye: _0, nay: _0 }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct PriorLock<_0, _1>(pub _0, pub _1); #[derive( :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct Vote(::core::primitive::u8); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Voting<_0, _1, _2> { #[codec(index = 0)] Direct { @@ -16038,7 +18526,9 @@ pub mod api { } pub mod vote_threshold { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum VoteThreshold { #[codec(index = 0)] SuperMajorityApprove, @@ -16048,7 +18538,7 @@ pub mod api { SimpleMajority, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum PreimageStatus<_0, _1, _2> { #[codec(index = 0)] Missing(_2), @@ -16061,7 +18551,7 @@ pub mod api { expiry: ::core::option::Option<_2>, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Releases { #[codec(index = 0)] V1, @@ -16071,10 +18561,14 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { # [codec (index = 0)] 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)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < [:: core :: primitive :: u128 ; 3usize] > , } , # [codec (index = 2)] 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)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , num_signed_submissions : :: core :: primitive :: u32 , } , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] PreDispatchEarlySubmission, @@ -16099,13 +18593,17 @@ pub mod api { #[codec(index = 10)] CallNotAllowed, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { - # [codec (index = 0)] SolutionStored (runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , :: core :: primitive :: bool ,) , # [codec (index = 1)] ElectionFinalized (:: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute > ,) , # [codec (index = 2)] Rewarded (:: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 ,) , # [codec (index = 3)] Slashed (:: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 ,) , # [codec (index = 4)] SignedPhaseStarted (:: core :: primitive :: u32 ,) , # [codec (index = 5)] UnsignedPhaseStarted (:: core :: primitive :: u32 ,) , } + # [codec (index = 0)] SolutionStored { election_compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , prev_ejected : :: core :: primitive :: bool , } , # [codec (index = 1)] ElectionFinalized { election_compute : :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute > , } , # [codec (index = 2)] Rewarded { account : :: subxt :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 3)] Slashed { account : :: subxt :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 4)] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 5)] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } } pub mod signed { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct SignedSubmission<_0, _1, _2> { pub who: _0, pub deposit: _1, @@ -16116,7 +18614,7 @@ pub mod api { pub reward: _1, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum ElectionCompute { #[codec(index = 0)] OnChain, @@ -16129,7 +18627,7 @@ pub mod api { #[codec(index = 4)] Emergency, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Phase<_0> { #[codec(index = 0)] Off, @@ -16140,13 +18638,13 @@ pub mod api { #[codec(index = 3)] Emergency, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RawSolution<_0> { pub solution: _0, pub score: [::core::primitive::u128; 3usize], pub round: ::core::primitive::u32, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReadySolution<_0> { pub supports: ::std::vec::Vec<(_0, runtime_types::sp_npos_elections::Support<_0>)>, @@ -16154,13 +18652,13 @@ pub mod api { pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct RoundSnapshot<_0> { pub voters: ::std::vec::Vec<(_0, ::core::primitive::u64, ::std::vec::Vec<_0>)>, pub targets: ::std::vec::Vec<_0>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SolutionOrSnapshotSize { #[codec(compact)] pub voters: ::core::primitive::u32, @@ -16172,7 +18670,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] vote { @@ -16205,7 +18705,9 @@ pub mod api { num_defunct: ::core::primitive::u32, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] UnableToVote, @@ -16242,36 +18744,42 @@ pub mod api { #[codec(index = 16)] InvalidReplacement, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - NewTerm( - ::std::vec::Vec<( + NewTerm { + new_members: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - ), + }, #[codec(index = 1)] EmptyTerm, #[codec(index = 2)] ElectionError, #[codec(index = 3)] - MemberKicked(::subxt::sp_core::crypto::AccountId32), + MemberKicked { + member: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 4)] - Renounced(::subxt::sp_core::crypto::AccountId32), + Renounced { + candidate: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 5)] - CandidateSlashed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + CandidateSlashed { + candidate: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, #[codec(index = 6)] - SeatHolderSlashed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + SeatHolderSlashed { + seat_holder: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Renouncing { #[codec(index = 0)] Member, @@ -16280,13 +18788,13 @@ pub mod api { #[codec(index = 2)] Candidate(#[codec(compact)] ::core::primitive::u32), } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SeatHolder<_0, _1> { pub who: _0, pub stake: _1, pub deposit: _1, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Voter<_0, _1> { pub votes: ::std::vec::Vec<_0>, pub stake: _1, @@ -16297,7 +18805,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] report_equivocation { @@ -16325,7 +18835,9 @@ pub mod api { best_finalized_block_number: ::core::primitive::u32, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] PauseFailed, @@ -16342,24 +18854,26 @@ pub mod api { #[codec(index = 6)] DuplicateOffenceReport, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - NewAuthorities( - ::std::vec::Vec<( + NewAuthorities { + authority_set: ::std::vec::Vec<( runtime_types::sp_finality_grandpa::app::Public, ::core::primitive::u64, )>, - ), + }, #[codec(index = 1)] Paused, #[codec(index = 2)] Resumed, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct StoredPendingChange < _0 > { pub scheduled_at : _0 , pub delay : _0 , pub next_authorities : runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_finality_grandpa :: app :: Public , :: core :: primitive :: u64 ,) > , pub forced : :: core :: option :: Option < _0 > , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum StoredState<_0> { #[codec(index = 0)] Live, @@ -16375,7 +18889,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] add_registrar { @@ -16471,7 +18987,9 @@ pub mod api { #[codec(index = 14)] quit_sub, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] TooManySubAccounts, @@ -16506,55 +19024,61 @@ pub mod api { #[codec(index = 15)] NotOwned, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - IdentitySet(::subxt::sp_core::crypto::AccountId32), + IdentitySet { + who: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 1)] - IdentityCleared( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + IdentityCleared { + who: ::subxt::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, #[codec(index = 2)] - IdentityKilled( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + IdentityKilled { + who: ::subxt::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, #[codec(index = 3)] - JudgementRequested( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + JudgementRequested { + who: ::subxt::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, #[codec(index = 4)] - JudgementUnrequested( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + JudgementUnrequested { + who: ::subxt::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, #[codec(index = 5)] - JudgementGiven( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + JudgementGiven { + target: ::subxt::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, #[codec(index = 6)] - RegistrarAdded(::core::primitive::u32), + RegistrarAdded { + registrar_index: ::core::primitive::u32, + }, #[codec(index = 7)] - SubIdentityAdded( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + SubIdentityAdded { + sub: ::subxt::sp_core::crypto::AccountId32, + main: ::subxt::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, #[codec(index = 8)] - SubIdentityRemoved( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + SubIdentityRemoved { + sub: ::subxt::sp_core::crypto::AccountId32, + main: ::subxt::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, #[codec(index = 9)] - SubIdentityRevoked( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + SubIdentityRevoked { + sub: ::subxt::sp_core::crypto::AccountId32, + main: ::subxt::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, } } pub mod types { @@ -16563,12 +19087,15 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct BitFlags<_0>( pub ::core::primitive::u64, #[codec(skip)] pub ::core::marker::PhantomData<_0>, ); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Data { #[codec(index = 0)] None, @@ -16647,7 +19174,9 @@ pub mod api { #[codec(index = 37)] ShaThree256([::core::primitive::u8; 32usize]), } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum IdentityField { #[codec(index = 1)] Display, @@ -16666,7 +19195,9 @@ pub mod api { #[codec(index = 128)] Twitter, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct IdentityInfo { pub additional: runtime_types::frame_support::storage::bounded_vec::BoundedVec<( @@ -16683,7 +19214,9 @@ pub mod api { pub image: runtime_types::pallet_identity::types::Data, pub twitter: runtime_types::pallet_identity::types::Data, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Judgement<_0> { #[codec(index = 0)] Unknown, @@ -16700,7 +19233,9 @@ pub mod api { #[codec(index = 6)] Erroneous, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct RegistrarInfo<_0, _1> { pub account: _1, pub fee: _0, @@ -16708,7 +19243,9 @@ pub mod api { runtime_types::pallet_identity::types::IdentityField, >, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Registration<_0> { pub judgements: runtime_types::frame_support::storage::bounded_vec::BoundedVec<( @@ -16724,34 +19261,41 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { # [codec (index = 0)] heartbeat { heartbeat : runtime_types :: pallet_im_online :: Heartbeat < :: core :: primitive :: u32 > , signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature , } , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] InvalidKey, #[codec(index = 1)] DuplicatedHeartbeat, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - HeartbeatReceived( - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - ), + HeartbeatReceived { + authority_id: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, #[codec(index = 1)] AllGood, #[codec(index = 2)] - SomeOffline( - ::std::vec::Vec<( + SomeOffline { + offline: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_staking::Exposure< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, )>, - ), + }, } } pub mod sr25519 { @@ -16759,18 +19303,18 @@ pub mod api { pub mod app_sr25519 { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BoundedOpaqueNetworkState { pub peer_id : runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > , pub external_addresses : runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > > , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Heartbeat<_0> { pub block_number: _0, pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, @@ -16783,7 +19327,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] claim { index: ::core::primitive::u32 }, @@ -16803,7 +19349,9 @@ pub mod api { #[codec(index = 4)] freeze { index: ::core::primitive::u32 }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] NotAssigned, @@ -16816,20 +19364,22 @@ pub mod api { #[codec(index = 4)] Permanent, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - IndexAssigned( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + IndexAssigned { + who: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, #[codec(index = 1)] - IndexFreed(::core::primitive::u32), + IndexFreed { index: ::core::primitive::u32 }, #[codec(index = 2)] - IndexFrozen( - ::core::primitive::u32, - ::subxt::sp_core::crypto::AccountId32, - ), + IndexFrozen { + index: ::core::primitive::u32, + who: ::subxt::sp_core::crypto::AccountId32, + }, } } } @@ -16837,7 +19387,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] add_member { @@ -16867,14 +19419,18 @@ pub mod api { #[codec(index = 6)] clear_prime, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] AlreadyMember, #[codec(index = 1)] NotMember, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] MemberAdded, @@ -16895,7 +19451,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] as_multi_threshold_1 { @@ -16943,7 +19501,9 @@ pub mod api { call_hash: [::core::primitive::u8; 32usize], }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] MinimumThreshold, @@ -16974,49 +19534,57 @@ pub mod api { #[codec(index = 13)] AlreadyStored, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - NewMultisig( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - [::core::primitive::u8; 32usize], - ), + NewMultisig { + approving: ::subxt::sp_core::crypto::AccountId32, + multisig: ::subxt::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, #[codec(index = 1)] - MultisigApproval( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - ::subxt::sp_core::crypto::AccountId32, - [::core::primitive::u8; 32usize], - ), + MultisigApproval { + approving: ::subxt::sp_core::crypto::AccountId32, + timepoint: runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, + >, + multisig: ::subxt::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, #[codec(index = 2)] - MultisigExecuted( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - ::subxt::sp_core::crypto::AccountId32, - [::core::primitive::u8; 32usize], - ::core::result::Result< + MultisigExecuted { + approving: ::subxt::sp_core::crypto::AccountId32, + timepoint: runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, + >, + multisig: ::subxt::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - ), + }, #[codec(index = 3)] - MultisigCancelled( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - ::subxt::sp_core::crypto::AccountId32, - [::core::primitive::u8; 32usize], - ), + MultisigCancelled { + cancelling: ::subxt::sp_core::crypto::AccountId32, + timepoint: runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, + >, + multisig: ::subxt::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Timepoint<_0> { pub height: _0, pub index: _0, @@ -17026,21 +19594,81 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - Offence( - [::core::primitive::u8; 16usize], - ::std::vec::Vec<::core::primitive::u8>, - ), + Offence { + kind: [::core::primitive::u8; 16usize], + timeslot: ::std::vec::Vec<::core::primitive::u8>, + }, + } + } + } + pub mod pallet_preimage { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + note_preimage { + bytes: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + unnote_preimage { hash: ::subxt::sp_core::H256 }, + #[codec(index = 2)] + request_preimage { hash: ::subxt::sp_core::H256 }, + #[codec(index = 3)] + unrequest_preimage { hash: ::subxt::sp_core::H256 }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + TooLarge, + #[codec(index = 1)] + AlreadyNoted, + #[codec(index = 2)] + NotAuthorized, + #[codec(index = 3)] + NotNoted, + #[codec(index = 4)] + Requested, + #[codec(index = 5)] + NotRequested, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + Noted { hash: ::subxt::sp_core::H256 }, + #[codec(index = 1)] + Requested { hash: ::subxt::sp_core::H256 }, + #[codec(index = 2)] + Cleared { hash: ::subxt::sp_core::H256 }, } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum RequestStatus<_0, _1> { + #[codec(index = 0)] + Unrequested(::core::option::Option<(_0, _1)>), + #[codec(index = 1)] + Requested(::core::primitive::u32), + } } pub mod pallet_proxy { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] proxy { @@ -17105,7 +19733,9 @@ pub mod api { call: ::std::boxed::Box, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] TooMany, @@ -17124,44 +19754,46 @@ pub mod api { #[codec(index = 7)] NoSelfProxy, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - ProxyExecuted( - ::core::result::Result< + ProxyExecuted { + result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - ), + }, #[codec(index = 1)] - AnonymousCreated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u16, - ), - #[codec(index = 2)] - Announced( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ), + AnonymousCreated { + anonymous: ::subxt::sp_core::crypto::AccountId32, + who: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, + }, + #[codec(index = 2)] + Announced { + real: ::subxt::sp_core::crypto::AccountId32, + proxy: ::subxt::sp_core::crypto::AccountId32, + call_hash: ::subxt::sp_core::H256, + }, #[codec(index = 3)] - ProxyAdded( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - ), + ProxyAdded { + delegator: ::subxt::sp_core::crypto::AccountId32, + delegatee: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Announcement<_0, _1, _2> { pub real: _0, pub call_hash: _1, pub height: _2, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProxyDefinition<_0, _1, _2> { pub delegate: _0, pub proxy_type: _1, @@ -17172,7 +19804,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] schedule { @@ -17182,7 +19816,12 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box, + call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, }, #[codec(index = 1)] cancel { @@ -17198,7 +19837,12 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box, + call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, }, #[codec(index = 3)] cancel_named { @@ -17212,7 +19856,12 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box, + call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, }, #[codec(index = 5)] schedule_named_after { @@ -17223,10 +19872,17 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box, + call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] FailedToSchedule, @@ -17237,32 +19893,53 @@ pub mod api { #[codec(index = 3)] RescheduleNoChange, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - Scheduled(::core::primitive::u32, ::core::primitive::u32), + Scheduled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, #[codec(index = 1)] - Canceled(::core::primitive::u32, ::core::primitive::u32), + Canceled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, #[codec(index = 2)] - Dispatched( - (::core::primitive::u32, ::core::primitive::u32), - ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::core::result::Result< + Dispatched { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option< + ::std::vec::Vec<::core::primitive::u8>, + >, + result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - ), + }, + #[codec(index = 3)] + CallLookupFailed { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option< + ::std::vec::Vec<::core::primitive::u8>, + >, + error: + runtime_types::frame_support::traits::schedule::LookupError, + }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Releases { #[codec(index = 0)] V1, #[codec(index = 1)] V2, + #[codec(index = 2)] + V3, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ScheduledV2<_0, _1, _2, _3> { + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ScheduledV3<_0, _1, _2, _3> { pub maybe_id: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, pub priority: ::core::primitive::u8, @@ -17277,7 +19954,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] set_keys { @@ -17287,7 +19966,9 @@ pub mod api { #[codec(index = 1)] purge_keys, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] InvalidProof, @@ -17300,10 +19981,14 @@ pub mod api { #[codec(index = 4)] NoAccount, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - NewSession(::core::primitive::u32), + NewSession { + session_index: ::core::primitive::u32, + }, } } } @@ -17314,7 +19999,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] @@ -17438,16 +20123,18 @@ pub mod api { >, }, #[codec(index = 23)] - set_staking_limits { + set_staking_configs { min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, max_nominator_count: ::core::option::Option<::core::primitive::u32>, max_validator_count: ::core::option::Option<::core::primitive::u32>, - threshold: ::core::option::Option< + chill_threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, + min_commission: + runtime_types::sp_arithmetic::per_things::Perbill, }, #[codec(index = 24)] chill_other { @@ -17455,7 +20142,7 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -17504,9 +20191,11 @@ pub mod api { TooManyNominators, #[codec(index = 22)] TooManyValidators, + #[codec(index = 23)] + CommissionTooLow, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -17563,30 +20252,34 @@ pub mod api { } pub mod slashing { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct SlashingSpans { pub span_index: ::core::primitive::u32, pub last_start: ::core::primitive::u32, pub last_nonzero_slash: ::core::primitive::u32, pub prior: ::std::vec::Vec<::core::primitive::u32>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct SpanRecord<_0> { pub slashed: _0, pub paid_out: _0, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ActiveEraInfo { pub index: ::core::primitive::u32, pub start: ::core::option::Option<::core::primitive::u64>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EraRewardPoints<_0> { pub total: ::core::primitive::u32, pub individual: ::std::collections::BTreeMap<_0, ::core::primitive::u32>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Exposure<_0, _1> { #[codec(compact)] pub total: _1, @@ -17596,7 +20289,7 @@ pub mod api { runtime_types::pallet_staking::IndividualExposure<_0, _1>, >, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Forcing { #[codec(index = 0)] NotForcing, @@ -17607,19 +20300,19 @@ pub mod api { #[codec(index = 3)] ForceAlways, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct IndividualExposure<_0, _1> { pub who: _0, #[codec(compact)] pub value: _1, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Nominations<_0> { pub targets: ::std::vec::Vec<_0>, pub submitted_in: ::core::primitive::u32, pub suppressed: ::core::primitive::bool, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Releases { #[codec(index = 0)] V1_0_0Ancient, @@ -17638,7 +20331,7 @@ pub mod api { #[codec(index = 7)] V8_0_0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum RewardDestination<_0> { #[codec(index = 0)] Staked, @@ -17651,7 +20344,7 @@ pub mod api { #[codec(index = 4)] None, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct StakingLedger<_0, _1> { pub stash: _0, #[codec(compact)] @@ -17662,7 +20355,7 @@ pub mod api { ::std::vec::Vec>, pub claimed_rewards: ::std::vec::Vec<::core::primitive::u32>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct UnappliedSlash<_0, _1> { pub validator: _0, pub own: _1, @@ -17670,14 +20363,14 @@ pub mod api { pub reporters: ::std::vec::Vec<_0>, pub payout: _1, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct UnlockChunk<_0> { #[codec(compact)] pub value: _0, #[codec(compact)] pub era: ::core::primitive::u32, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ValidatorPrefs { #[codec(compact)] pub commission: runtime_types::sp_arithmetic::per_things::Perbill, @@ -17688,7 +20381,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] set { @@ -17702,7 +20397,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] report_awesome { @@ -17729,7 +20426,9 @@ pub mod api { #[codec(index = 5)] slash_tip { hash: ::subxt::sp_core::H256 }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] ReasonTooBig, @@ -17744,29 +20443,31 @@ pub mod api { #[codec(index = 5)] Premature, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - NewTip(::subxt::sp_core::H256), + NewTip { tip_hash: ::subxt::sp_core::H256 }, #[codec(index = 1)] - TipClosing(::subxt::sp_core::H256), + TipClosing { tip_hash: ::subxt::sp_core::H256 }, #[codec(index = 2)] - TipClosed( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + TipClosed { + tip_hash: ::subxt::sp_core::H256, + who: ::subxt::sp_core::crypto::AccountId32, + payout: ::core::primitive::u128, + }, #[codec(index = 3)] - TipRetracted(::subxt::sp_core::H256), + TipRetracted { tip_hash: ::subxt::sp_core::H256 }, #[codec(index = 4)] - TipSlashed( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + TipSlashed { + tip_hash: ::subxt::sp_core::H256, + finder: ::subxt::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OpenTip<_0, _1, _2, _3> { pub reason: _3, pub who: _0, @@ -17779,11 +20480,11 @@ pub mod api { } pub mod pallet_transaction_payment { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ChargeTransactionPayment( #[codec(compact)] pub ::core::primitive::u128, ); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Releases { #[codec(index = 0)] V1Ancient, @@ -17795,7 +20496,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] propose_spend { @@ -17817,7 +20520,9 @@ pub mod api { proposal_id: ::core::primitive::u32, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] InsufficientProposersBalance, @@ -17826,29 +20531,42 @@ pub mod api { #[codec(index = 2)] TooManyApprovals, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - Proposed(::core::primitive::u32), + Proposed { + proposal_index: ::core::primitive::u32, + }, #[codec(index = 1)] - Spending(::core::primitive::u128), + Spending { + budget_remaining: ::core::primitive::u128, + }, #[codec(index = 2)] - Awarded( - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ), + Awarded { + proposal_index: ::core::primitive::u32, + award: ::core::primitive::u128, + account: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 3)] - Rejected(::core::primitive::u32, ::core::primitive::u128), + Rejected { + proposal_index: ::core::primitive::u32, + slashed: ::core::primitive::u128, + }, #[codec(index = 4)] - Burnt(::core::primitive::u128), + Burnt { + burnt_funds: ::core::primitive::u128, + }, #[codec(index = 5)] - Rollover(::core::primitive::u128), + Rollover { + rollover_balance: ::core::primitive::u128, + }, #[codec(index = 6)] - Deposit(::core::primitive::u128), + Deposit { value: ::core::primitive::u128 }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Proposal<_0, _1> { pub proposer: _0, pub value: _1, @@ -17860,7 +20578,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] batch { @@ -17883,29 +20603,33 @@ pub mod api { call: ::std::boxed::Box, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Error { #[codec(index = 0)] TooManyCalls, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Event { #[codec(index = 0)] - BatchInterrupted( - ::core::primitive::u32, - runtime_types::sp_runtime::DispatchError, - ), + BatchInterrupted { + index: ::core::primitive::u32, + error: runtime_types::sp_runtime::DispatchError, + }, #[codec(index = 1)] BatchCompleted, #[codec(index = 2)] ItemCompleted, #[codec(index = 3)] - DispatchedAs( - ::core::result::Result< + DispatchedAs { + result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - ), + }, } } } @@ -17913,7 +20637,9 @@ pub mod api { use super::runtime_types; pub mod pallet { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum Call { #[codec(index = 0)] vest, @@ -17958,62 +20684,325 @@ pub mod api { schedule2_index: ::core::primitive::u32, }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Error { + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + NotVesting, + #[codec(index = 1)] + AtMaxVestingSchedules, + #[codec(index = 2)] + AmountLow, + #[codec(index = 3)] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + InvalidScheduleParams, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + VestingUpdated { + account: ::subxt::sp_core::crypto::AccountId32, + unvested: ::core::primitive::u128, + }, + #[codec(index = 1)] + VestingCompleted { + account: ::subxt::sp_core::crypto::AccountId32, + }, + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + pub mod pallet_xcm { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + send { + dest: + ::std::boxed::Box, + message: ::std::boxed::Box, + }, + #[codec(index = 1)] + teleport_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 2)] + reserve_transfer_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 3)] + execute { + message: ::std::boxed::Box, + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + force_xcm_version { + location: ::std::boxed::Box< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + xcm_version: ::core::primitive::u32, + }, + #[codec(index = 5)] + force_default_xcm_version { + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 6)] + force_subscribe_version_notify { + location: + ::std::boxed::Box, + }, + #[codec(index = 7)] + force_unsubscribe_version_notify { + location: + ::std::boxed::Box, + }, + #[codec(index = 8)] + limited_reserve_transfer_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 9)] + limited_teleport_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + Unreachable, + #[codec(index = 1)] + SendFailure, + #[codec(index = 2)] + Filtered, + #[codec(index = 3)] + UnweighableMessage, + #[codec(index = 4)] + DestinationNotInvertible, + #[codec(index = 5)] + Empty, + #[codec(index = 6)] + CannotReanchor, + #[codec(index = 7)] + TooManyAssets, + #[codec(index = 8)] + InvalidOrigin, + #[codec(index = 9)] + BadVersion, + #[codec(index = 10)] + BadLocation, + #[codec(index = 11)] + NoSubscription, + #[codec(index = 12)] + AlreadySubscribed, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + Attempted(runtime_types::xcm::v2::traits::Outcome), + #[codec(index = 1)] + Sent( + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v2::Xcm, + ), + #[codec(index = 2)] + UnexpectedResponse( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 3)] + ResponseReady( + ::core::primitive::u64, + runtime_types::xcm::v2::Response, + ), + #[codec(index = 4)] + Notified( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 5)] + NotifyOverweight( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ::core::primitive::u64, + ::core::primitive::u64, + ), + #[codec(index = 6)] + NotifyDispatchError( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 7)] + NotifyDecodeFailed( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 8)] + InvalidResponder( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + ::core::option::Option< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + ), + #[codec(index = 9)] + InvalidResponderVersion( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 10)] + ResponseTaken(::core::primitive::u64), + #[codec(index = 11)] + AssetsTrapped( + ::subxt::sp_core::H256, + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + #[codec(index = 12)] + VersionChangeNotified( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u32, + ), + #[codec(index = 13)] + SupportedVersionChanged( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u32, + ), + #[codec(index = 14)] + NotifyTargetSendFail( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v2::traits::Error, + ), + #[codec(index = 15)] + NotifyTargetMigrationFail( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u64, + ), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Origin { #[codec(index = 0)] - NotVesting, + Xcm(runtime_types::xcm::v1::multilocation::MultiLocation), #[codec(index = 1)] - AtMaxVestingSchedules, - #[codec(index = 2)] - AmountLow, - #[codec(index = 3)] - ScheduleIndexOutOfBounds, - #[codec(index = 4)] - InvalidScheduleParams, + Response(runtime_types::xcm::v1::multilocation::MultiLocation), } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Event { + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum QueryStatus<_0> { #[codec(index = 0)] - VestingUpdated( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + Pending { + responder: runtime_types::xcm::VersionedMultiLocation, + maybe_notify: ::core::option::Option<( + ::core::primitive::u8, + ::core::primitive::u8, + )>, + timeout: _0, + }, #[codec(index = 1)] - VestingCompleted(::subxt::sp_core::crypto::AccountId32), + VersionNotifier { + origin: runtime_types::xcm::VersionedMultiLocation, + is_active: ::core::primitive::bool, + }, + #[codec(index = 2)] + Ready { + response: runtime_types::xcm::VersionedResponse, + at: _0, + }, } - } - pub mod vesting_info { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum VersionMigrationStage { + #[codec(index = 0)] + MigrateSupportedVersion, + #[codec(index = 1)] + MigrateVersionNotifiers, + #[codec(index = 2)] + NotifyCurrentTargets( + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ), + #[codec(index = 3)] + MigrateAndNotifyOldTargets, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } } pub mod polkadot_core_primitives { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct CandidateHash(pub ::subxt::sp_core::H256); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct InboundDownwardMessage<_0> { pub sent_at: _0, pub msg: ::std::vec::Vec<::core::primitive::u8>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct InboundHrmpMessage<_0> { pub sent_at: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OutboundHrmpMessage<_0> { pub recipient: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, @@ -18023,9 +21012,13 @@ pub mod api { use super::runtime_types; pub mod primitives { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct HrmpChannelId { pub sender: runtime_types::polkadot_parachain::primitives::Id, pub recipient: runtime_types::polkadot_parachain::primitives::Id, @@ -18034,11 +21027,16 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct Id(pub ::core::primitive::u32); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ValidationCodeHash(pub ::subxt::sp_core::H256); } } @@ -18049,22 +21047,22 @@ pub mod api { pub mod collator_app { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } pub mod validator_app { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } @@ -18072,9 +21070,12 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct ValidatorIndex(pub ::core::primitive::u32); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum ValidityAttestation { #[codec(index = 1)] Implicit( @@ -18091,25 +21092,29 @@ pub mod api { pub mod assignment_app { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } pub mod signed { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub struct UncheckedSigned < _0 , _1 > { pub payload : _0 , pub validator_index : runtime_types :: polkadot_primitives :: v0 :: ValidatorIndex , pub signature : runtime_types :: polkadot_primitives :: v0 :: validator_app :: Signature , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _1 > , } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct AvailabilityBitfield( pub ::subxt::bitvec::vec::BitVec< ::subxt::bitvec::order::Lsb0, ::core::primitive::u8, >, ); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct BackedCandidate<_0> { pub candidate: runtime_types::polkadot_primitives::v1::CommittedCandidateReceipt< @@ -18123,7 +21128,9 @@ pub mod api { ::core::primitive::u8, >, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct CandidateCommitments<_0> { pub upward_messages: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, @@ -18140,7 +21147,9 @@ pub mod api { pub processed_downward_messages: _0, pub hrmp_watermark: _0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct CandidateDescriptor<_0> { pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub relay_parent: _0, @@ -18155,13 +21164,17 @@ pub mod api { pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct CandidateReceipt<_0> { pub descriptor: runtime_types::polkadot_primitives::v1::CandidateDescriptor<_0>, pub commitments_hash: _0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct CommittedCandidateReceipt<_0> { pub descriptor: runtime_types::polkadot_primitives::v1::CandidateDescriptor<_0>, @@ -18174,19 +21187,26 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct CoreIndex(pub ::core::primitive::u32); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum CoreOccupied { #[codec(index = 0)] Parathread(runtime_types::polkadot_primitives::v1::ParathreadEntry), #[codec(index = 1)] Parachain, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum DisputeStatement { # [codec (index = 0)] Valid (runtime_types :: polkadot_primitives :: v1 :: ValidDisputeStatementKind ,) , # [codec (index = 1)] Invalid (runtime_types :: polkadot_primitives :: v1 :: InvalidDisputeStatementKind ,) , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct DisputeStatementSet { pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, @@ -18201,9 +21221,12 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct GroupIndex(pub ::core::primitive::u32); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct InherentData<_0> { pub bitfields: ::std::vec::Vec< runtime_types::polkadot_primitives::v1::signed::UncheckedSigned< @@ -18221,22 +21244,30 @@ pub mod api { >, pub parent_header: _0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum InvalidDisputeStatementKind { #[codec(index = 0)] Explicit, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_primitives::v0::collator_app::Public, ); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ParathreadEntry { pub claim: runtime_types::polkadot_primitives::v1::ParathreadClaim, pub retries: ::core::primitive::u32, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, pub backing_validators_per_candidate: ::std::vec::Vec<( @@ -18250,8 +21281,58 @@ pub mod api { runtime_types::polkadot_primitives::v1::DisputeStatementSet, >, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum UpgradeGoAhead { + #[codec(index = 0)] + Abort, + #[codec(index = 1)] + GoAhead, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum UpgradeRestriction { + #[codec(index = 0)] + Present, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum ValidDisputeStatementKind { + #[codec(index = 0)] + Explicit, + #[codec(index = 1)] + BackingSeconded(::subxt::sp_core::H256), + #[codec(index = 2)] + BackingValid(::subxt::sp_core::H256), + #[codec(index = 3)] + ApprovalChecking, + } + } + pub mod v2 { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct PvfCheckStatement { + pub accept: ::core::primitive::bool, + pub subject: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub session_index: ::core::primitive::u32, + pub validator_index: + runtime_types::polkadot_primitives::v0::ValidatorIndex, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct SessionInfo { + pub active_validator_indices: ::std::vec::Vec< + runtime_types::polkadot_primitives::v0::ValidatorIndex, + >, + pub random_seed: [::core::primitive::u8; 32usize], + pub dispute_period: ::core::primitive::u32, pub validators: ::std::vec::Vec< runtime_types::polkadot_primitives::v0::validator_app::Public, >, @@ -18273,40 +21354,17 @@ pub mod api { pub no_show_slots: ::core::primitive::u32, pub needed_approvals: ::core::primitive::u32, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum UpgradeGoAhead { - #[codec(index = 0)] - Abort, - #[codec(index = 1)] - GoAhead, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum UpgradeRestriction { - #[codec(index = 0)] - Present, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum ValidDisputeStatementKind { - #[codec(index = 0)] - Explicit, - #[codec(index = 1)] - BackingSeconded(::subxt::sp_core::H256), - #[codec(index = 2)] - BackingValid(::subxt::sp_core::H256), - #[codec(index = 3)] - ApprovalChecking, - } } } pub mod polkadot_runtime { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 = 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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] BagsList (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 = 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 ,) , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + # [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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] BagsList (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 = 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 :: Encode, :: subxt :: codec :: Decode, 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 = 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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] BagsList (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 = 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 ,) , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + # [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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] BagsList (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 = 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 :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NposCompactSolution16 { votes1: ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u16)>, votes2: ::std::vec::Vec<( @@ -18430,7 +21488,7 @@ pub mod api { ::core::primitive::u16, )>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum OriginCaller { #[codec(index = 0)] system( @@ -18454,10 +21512,12 @@ pub mod api { ParachainsOrigin( runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, ), - #[codec(index = 4)] + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Origin), + #[codec(index = 5)] Void(runtime_types::sp_core::Void), } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum ProxyType { #[codec(index = 0)] Any, @@ -18474,9 +21534,9 @@ pub mod api { #[codec(index = 7)] Auction, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Runtime {} - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SessionKeys { pub grandpa: runtime_types::sp_finality_grandpa::app::Public, pub babe: runtime_types::sp_consensus_babe::app::Public, @@ -18497,7 +21557,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] @@ -18524,7 +21584,7 @@ pub mod api { cancel_auction, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -18543,7 +21603,7 @@ pub mod api { AlreadyLeasedOut, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -18589,12 +21649,12 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { # [codec (index = 0)] claim { dest : :: subxt :: sp_core :: crypto :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] 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)] 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)] 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 > , } , } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -18611,18 +21671,26 @@ pub mod api { VestedBalanceExists, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { # [codec (index = 0)] Claimed (:: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , :: core :: primitive :: u128 ,) , } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct PrevalidateAttests {} - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum StatementKind { #[codec(index = 0)] Regular, @@ -18635,7 +21703,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] @@ -18705,9 +21773,17 @@ pub mod api { poke { index: runtime_types::polkadot_parachain::primitives::Id, }, + #[codec(index = 8)] + contribute_all { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + signature: ::core::option::Option< + runtime_types::sp_runtime::MultiSignature, + >, + }, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -18758,7 +21834,7 @@ pub mod api { NoLeasePeriod, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -18805,9 +21881,13 @@ pub mod api { ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 trie_index : _2 , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _3 > , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum LastContribution<_0> { #[codec(index = 0)] Never, @@ -18822,12 +21902,12 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { # [codec (index = 0)] 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)] 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)] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] force_remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] reserve , } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -18854,9 +21934,11 @@ pub mod api { ParaLocked, #[codec(index = 11)] NotReserved, + #[codec(index = 12)] + EmptyCode, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -18873,7 +21955,9 @@ pub mod api { ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ParaInfo<_0, _1> { pub manager: _0, pub deposit: _1, @@ -18885,7 +21969,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] @@ -18906,7 +21990,7 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -18915,7 +21999,7 @@ pub mod api { LeaseError, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -18937,14 +22021,67 @@ pub mod api { use super::runtime_types; pub mod configuration { use super::runtime_types; + pub mod migration { + use super::runtime_types; + pub mod v1 { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + )] + pub struct HostConfiguration<_0> { + pub max_code_size: _0, + pub max_head_data_size: _0, + pub max_upward_queue_count: _0, + pub max_upward_queue_size: _0, + pub max_upward_message_size: _0, + pub max_upward_message_num_per_candidate: _0, + pub hrmp_max_message_num_per_candidate: _0, + pub validation_upgrade_frequency: _0, + pub validation_upgrade_delay: _0, + pub max_pov_size: _0, + pub max_downward_message_size: _0, + pub ump_service_total_weight: ::core::primitive::u64, + pub hrmp_max_parachain_outbound_channels: _0, + pub hrmp_max_parathread_outbound_channels: _0, + pub hrmp_sender_deposit: ::core::primitive::u128, + pub hrmp_recipient_deposit: ::core::primitive::u128, + pub hrmp_channel_max_capacity: _0, + pub hrmp_channel_max_total_size: _0, + pub hrmp_max_parachain_inbound_channels: _0, + pub hrmp_max_parathread_inbound_channels: _0, + pub hrmp_channel_max_message_size: _0, + pub code_retention_period: _0, + pub parathread_cores: _0, + pub parathread_retries: _0, + pub group_rotation_frequency: _0, + pub chain_availability_period: _0, + pub thread_availability_period: _0, + pub scheduling_lookahead: _0, + pub max_validators_per_core: ::core::option::Option<_0>, + pub max_validators: ::core::option::Option<_0>, + pub dispute_period: _0, + pub dispute_post_conclusion_acceptance_period: _0, + pub dispute_max_spam_slots: _0, + pub dispute_conclusion_by_time_out_period: _0, + pub no_show_slots: _0, + pub n_delay_tranches: _0, + pub zeroth_delay_tranche_width: _0, + pub needed_approvals: _0, + pub relay_vrf_modulo_samples: _0, + pub ump_max_individual_weight: ::core::primitive::u64, + } + } + } pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] - set_validation_upgrade_frequency { new: ::core::primitive::u32 }, + set_validation_upgrade_cooldown { new: ::core::primitive::u32 }, #[codec(index = 1)] set_validation_upgrade_delay { new: ::core::primitive::u32 }, #[codec(index = 2)] @@ -19045,16 +22182,28 @@ pub mod api { }, #[codec(index = 40)] set_ump_max_individual_weight { new: ::core::primitive::u64 }, + #[codec(index = 41)] + set_pvf_checking_enabled { new: ::core::primitive::bool }, + #[codec(index = 42)] + set_pvf_voting_ttl { new: ::core::primitive::u32 }, + #[codec(index = 43)] + set_minimum_validation_upgrade_delay { + new: ::core::primitive::u32, + }, + #[codec(index = 44)] + set_bypass_consistency_check { new: ::core::primitive::bool }, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] InvalidNewValue, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct HostConfiguration<_0> { pub max_code_size: _0, pub max_head_data_size: _0, @@ -19063,7 +22212,7 @@ pub mod api { pub max_upward_message_size: _0, pub max_upward_message_num_per_candidate: _0, pub hrmp_max_message_num_per_candidate: _0, - pub validation_upgrade_frequency: _0, + pub validation_upgrade_cooldown: _0, pub validation_upgrade_delay: _0, pub max_pov_size: _0, pub max_downward_message_size: _0, @@ -19096,6 +22245,9 @@ pub mod api { pub needed_approvals: _0, pub relay_vrf_modulo_samples: _0, pub ump_max_individual_weight: ::core::primitive::u64, + pub pvf_checking_enabled: ::core::primitive::bool, + pub pvf_voting_ttl: _0, + pub minimum_validation_upgrade_delay: _0, } } pub mod dmp { @@ -19103,7 +22255,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call {} } @@ -19113,12 +22265,12 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { # [codec (index = 0)] 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)] hrmp_accept_open_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 2)] hrmp_close_channel { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , } , # [codec (index = 3)] force_clean_hrmp { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] force_process_hrmp_open , # [codec (index = 5)] force_process_hrmp_close , # [codec (index = 6)] hrmp_cancel_open_request { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , } , } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -19159,7 +22311,7 @@ pub mod api { OpenHrmpChannelAlreadyConfirmed, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -19186,7 +22338,9 @@ pub mod api { ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct HrmpChannel { pub max_capacity: ::core::primitive::u32, pub max_total_size: ::core::primitive::u32, @@ -19197,7 +22351,9 @@ pub mod api { pub sender_deposit: ::core::primitive::u128, pub recipient_deposit: ::core::primitive::u128, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct HrmpOpenChannelRequest { pub confirmed: ::core::primitive::bool, pub _age: ::core::primitive::u32, @@ -19212,11 +22368,11 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call {} #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -19265,9 +22421,11 @@ pub mod api { InvalidValidationCodeHash, #[codec(index = 22)] ParaHeadMismatch, + #[codec(index = 23)] + BitfieldReferencesFreedCore, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -19298,13 +22456,17 @@ pub mod api { ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct AvailabilityBitfieldRecord<_0> { pub bitfield: runtime_types::polkadot_primitives::v1::AvailabilityBitfield, pub submitted_at: _0, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct CandidatePendingAvailability<_0, _1> { pub core: runtime_types::polkadot_primitives::v1::CoreIndex, pub hash: runtime_types::polkadot_core_primitives::CandidateHash, @@ -19328,14 +22490,16 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] force_approve { up_to: ::core::primitive::u32 }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct BufferedSessionChange { pub validators: ::std::vec::Vec< runtime_types::polkadot_primitives::v0::validator_app::Public, @@ -19351,7 +22515,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Origin { #[codec(index = 0)] @@ -19364,12 +22528,12 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { - # [codec (index = 0)] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] 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)] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , } + # [codec (index = 0)] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] 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)] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] add_trusted_validation_code { validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 6)] poke_unused_validation_code { validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , } , # [codec (index = 7)] include_pvf_check_statement { stmt : runtime_types :: polkadot_primitives :: v2 :: PvfCheckStatement , signature : runtime_types :: polkadot_primitives :: v0 :: validator_app :: Signature , } , } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -19382,33 +22546,28 @@ pub mod api { CannotUpgrade, #[codec(index = 4)] CannotDowngrade, + #[codec(index = 5)] + PvfCheckStatementStale, + #[codec(index = 6)] + PvfCheckStatementFuture, + #[codec(index = 7)] + PvfCheckValidatorIndexOutOfBounds, + #[codec(index = 8)] + PvfCheckInvalidSignature, + #[codec(index = 9)] + PvfCheckDoubleVote, + #[codec(index = 10)] + PvfCheckSubjectInvalid, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { - #[codec(index = 0)] - CurrentCodeUpdated( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 1)] - CurrentHeadUpdated( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 2)] - CodeUpgradeScheduled( - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 3)] - NewHeadNoted(runtime_types::polkadot_parachain::primitives::Id), - #[codec(index = 4)] - ActionQueued( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ), - } + # [codec (index = 0)] CurrentCodeUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 1)] CurrentHeadUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 2)] CodeUpgradeScheduled (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 3)] NewHeadNoted (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 4)] ActionQueued (runtime_types :: polkadot_parachain :: primitives :: Id , :: core :: primitive :: u32 ,) , # [codec (index = 5)] PvfCheckStarted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 6)] PvfCheckAccepted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 7)] PvfCheckRejected (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ParaGenesisArgs { pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -19416,26 +22575,64 @@ pub mod api { runtime_types::polkadot_parachain::primitives::ValidationCode, pub parachain: ::core::primitive::bool, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum ParaLifecycle { #[codec(index = 0)] - Onboarding, + Onboarding, + #[codec(index = 1)] + Parathread, + #[codec(index = 2)] + Parachain, + #[codec(index = 3)] + UpgradingParathread, + #[codec(index = 4)] + DowngradingParachain, + #[codec(index = 5)] + OffboardingParathread, + #[codec(index = 6)] + OffboardingParachain, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct PvfCheckActiveVoteState<_0> { + pub votes_accept: ::subxt::bitvec::vec::BitVec< + ::subxt::bitvec::order::Lsb0, + ::core::primitive::u8, + >, + pub votes_reject: ::subxt::bitvec::vec::BitVec< + ::subxt::bitvec::order::Lsb0, + ::core::primitive::u8, + >, + pub age: _0, + pub created_at: _0, + pub causes: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< + _0, + >, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum PvfCheckCause<_0> { + #[codec(index = 0)] + Onboarding(runtime_types::polkadot_parachain::primitives::Id), #[codec(index = 1)] - Parathread, - #[codec(index = 2)] - Parachain, - #[codec(index = 3)] - UpgradingParathread, - #[codec(index = 4)] - DowngradingParachain, - #[codec(index = 5)] - OffboardingParathread, - #[codec(index = 6)] - OffboardingParachain, + Upgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + relay_parent_number: _0, + }, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - 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 :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct ReplacementTimes<_0> { pub expected_at: _0, pub activated_at: _0, @@ -19446,7 +22643,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] @@ -19460,7 +22657,7 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -19469,12 +22666,16 @@ pub mod api { InvalidParentHeader, #[codec(index = 2)] CandidateConcludedInvalid, + #[codec(index = 3)] + InherentOverweight, } } } pub mod scheduler { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum AssignmentKind { #[codec(index = 0)] Parachain, @@ -19484,11 +22685,17 @@ pub mod api { ::core::primitive::u32, ), } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct CoreAssignment { pub core : runtime_types :: polkadot_primitives :: v1 :: 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 :: v1 :: GroupIndex , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct QueuedParathread { pub claim: runtime_types::polkadot_primitives::v1::ParathreadEntry, pub core_offset: ::core::primitive::u32, @@ -19499,7 +22706,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call {} } @@ -19509,7 +22716,7 @@ pub mod api { pub mod pallet { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] @@ -19519,7 +22726,7 @@ pub mod api { }, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -19528,7 +22735,7 @@ pub mod api { WeightOverLimit, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] @@ -19570,7 +22777,7 @@ pub mod api { } pub mod primitive_types { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct H256(pub [::core::primitive::u8; 32usize]); } pub mod sp_arithmetic { @@ -19581,6 +22788,7 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct FixedU128(pub ::core::primitive::u128); } @@ -19590,24 +22798,28 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct PerU16(pub ::core::primitive::u16); #[derive( :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct Perbill(pub ::core::primitive::u32); #[derive( :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct Percent(pub ::core::primitive::u8); #[derive( :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct Permill(pub ::core::primitive::u32); } @@ -19616,7 +22828,9 @@ pub mod api { use super::runtime_types; pub mod app { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } } @@ -19624,12 +22838,16 @@ pub mod api { use super::runtime_types; pub mod app { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } pub mod digests { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub enum NextConfigDescriptor { #[codec(index = 1)] V1 { @@ -19638,7 +22856,7 @@ pub mod api { }, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum AllowedSlots { #[codec(index = 0)] PrimarySlots, @@ -19647,7 +22865,7 @@ pub mod api { #[codec(index = 2)] PrimaryAndSecondaryVRFSlots, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct BabeEpochConfiguration { pub c: (::core::primitive::u64, ::core::primitive::u64), pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, @@ -19655,7 +22873,7 @@ pub mod api { } pub mod sp_consensus_slots { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EquivocationProof<_0, _1> { pub offender: _1, pub slot: runtime_types::sp_consensus_slots::Slot, @@ -19666,45 +22884,54 @@ pub mod api { :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + Debug, )] pub struct Slot(pub ::core::primitive::u64); } pub mod sp_core { use super::runtime_types; - pub mod changes_trie { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct ChangesTrieConfiguration { - pub digest_interval: ::core::primitive::u32, - pub digest_levels: ::core::primitive::u32, - } - } pub mod crypto { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct AccountId32(pub [::core::primitive::u8; 32usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); } pub mod ecdsa { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Public(pub [::core::primitive::u8; 33usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Signature(pub [::core::primitive::u8; 65usize]); } pub mod ed25519 { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Signature(pub [::core::primitive::u8; 64usize]); } pub mod offchain { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct OpaqueNetworkState { pub peer_id: runtime_types::sp_core::OpaquePeerId, pub external_addresses: ::std::vec::Vec< @@ -19714,26 +22941,34 @@ pub mod api { } pub mod sr25519 { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Signature(pub [::core::primitive::u8; 64usize]); } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Void {} } pub mod sp_finality_grandpa { use super::runtime_types; pub mod app { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Public(pub runtime_types::sp_core::ed25519::Public); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum Equivocation<_0, _1> { #[codec(index = 0)] Prevote( @@ -19752,7 +22987,7 @@ pub mod api { >, ), } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct EquivocationProof<_0, _1> { pub set_id: ::core::primitive::u64, pub equivocation: @@ -19761,7 +22996,7 @@ pub mod api { } pub mod sp_npos_elections { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Support<_0> { pub total: ::core::primitive::u128, pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, @@ -19774,24 +23009,17 @@ pub mod api { pub mod digest { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, - )] - pub enum ChangesTrieSignal { - # [codec (index = 0)] NewConfiguration (:: core :: option :: Option < runtime_types :: sp_core :: changes_trie :: ChangesTrieConfiguration > ,) , } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct Digest<_0> { + pub struct Digest { pub logs: ::std::vec::Vec< - runtime_types::sp_runtime::generic::digest::DigestItem<_0>, + runtime_types::sp_runtime::generic::digest::DigestItem, >, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum DigestItem<_0> { - #[codec(index = 2)] - ChangesTrieRoot(_0), + pub enum DigestItem { #[codec(index = 6)] PreRuntime( [::core::primitive::u8; 4usize], @@ -19807,10 +23035,6 @@ pub mod api { [::core::primitive::u8; 4usize], ::std::vec::Vec<::core::primitive::u8>, ), - #[codec(index = 7)] - ChangesTrieSignal( - runtime_types::sp_runtime::generic::digest::ChangesTrieSignal, - ), #[codec(index = 0)] Other(::std::vec::Vec<::core::primitive::u8>), #[codec(index = 8)] @@ -19820,7 +23044,7 @@ pub mod api { pub mod era { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Era { #[codec(index = 0)] @@ -20337,167 +23561,938 @@ pub mod api { Mortal255(::core::primitive::u8), } } - pub mod header { + pub mod header { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Header<_0, _1> { + pub parent_hash: ::subxt::sp_core::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::sp_core::H256, + pub extrinsics_root: ::subxt::sp_core::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + } + pub mod unchecked_extrinsic { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, + ); + } + } + pub mod multiaddress { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum MultiAddress<_0, _1> { + #[codec(index = 0)] + Id(_0), + #[codec(index = 1)] + Index(#[codec(compact)] _1), + #[codec(index = 2)] + Raw(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 3)] + Address32([::core::primitive::u8; 32usize]), + #[codec(index = 4)] + Address20([::core::primitive::u8; 20usize]), + } + } + pub mod traits { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BlakeTwo256 {} + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module { + index: ::core::primitive::u8, + error: ::core::primitive::u8, + }, + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_runtime::ArithmeticError), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Signature), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum MultiSigner { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Public), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Public), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Public), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum TokenError { + #[codec(index = 0)] + NoFunds, + #[codec(index = 1)] + WouldDie, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + } + } + pub mod sp_session { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MembershipProof { + pub session: ::core::primitive::u32, + pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub validator_count: ::core::primitive::u32, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } + } + pub mod sp_version { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: ::std::vec::Vec<( + [::core::primitive::u8; 8usize], + ::core::primitive::u32, + )>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } + } + pub mod xcm { + use super::runtime_types; + pub mod double_encoded { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct DoubleEncoded { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod v0 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum BodyId { + #[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 :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum BodyPart { + #[codec(index = 0)] + Voice, + #[codec(index = 1)] + Members { + #[codec(compact)] + count: ::core::primitive::u32, + }, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 3)] + AtLeastProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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(::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 :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum NetworkId { + #[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 :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::sp_core::H256, + pub enum MultiAsset { + #[codec(index = 0)] + None, + #[codec(index = 1)] + All, + #[codec(index = 2)] + AllFungible, + #[codec(index = 3)] + AllNonFungible, + #[codec(index = 4)] + AllAbstractFungible { + id: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 5)] + AllAbstractNonFungible { + class: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 6)] + AllConcreteFungible { + id: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 7)] + AllConcreteNonFungible { + class: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 8)] + AbstractFungible { + id: ::std::vec::Vec<::core::primitive::u8>, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + AbstractNonFungible { + class: ::std::vec::Vec<::core::primitive::u8>, + instance: runtime_types::xcm::v1::multiasset::AssetInstance, + }, + #[codec(index = 10)] + ConcreteFungible { + id: runtime_types::xcm::v0::multi_location::MultiLocation, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 11)] + ConcreteNonFungible { + class: runtime_types::xcm::v0::multi_location::MultiLocation, + instance: runtime_types::xcm::v1::multiasset::AssetInstance, + }, + } + } + pub mod multi_location { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum MultiLocation { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + X1(runtime_types::xcm::v0::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + } + } + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Order { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + DepositAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 2)] + DepositReserveAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 3)] + ExchangeAsset { + give: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + receive: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + }, + #[codec(index = 4)] + InitiateReserveWithdraw { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + reserve: + runtime_types::xcm::v0::multi_location::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 5)] + InitiateTeleport { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 6)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + }, + #[codec(index = 7)] + BuyExecution { + fees: runtime_types::xcm::v0::multi_asset::MultiAsset, + weight: ::core::primitive::u64, + debt: ::core::primitive::u64, + halt_on_error: ::core::primitive::bool, + xcm: ::std::vec::Vec, + }, + } + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum OriginKind { + #[codec(index = 0)] + Native, + #[codec(index = 1)] + SovereignAccount, + #[codec(index = 2)] + Superuser, + #[codec(index = 3)] + Xcm, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Response { + #[codec(index = 0)] + Assets( + ::std::vec::Vec, + ), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Xcm { + #[codec(index = 0)] + WithdrawAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + effects: ::std::vec::Vec, + }, + #[codec(index = 1)] + ReserveAssetDeposit { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + effects: ::std::vec::Vec, + }, + #[codec(index = 2)] + TeleportAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + effects: ::std::vec::Vec, + }, + #[codec(index = 3)] + QueryResponse { #[codec(compact)] - pub number: _0, - pub state_root: ::subxt::sp_core::H256, - pub extrinsics_root: ::subxt::sp_core::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest< - ::subxt::sp_core::H256, + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v0::Response, + }, + #[codec(index = 4)] + TransferAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, >, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + effects: ::std::vec::Vec, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v0::OriginKind, + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + RelayedFrom { + who: runtime_types::xcm::v0::multi_location::MultiLocation, + message: ::std::boxed::Box, + }, + } + } + pub mod v1 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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(::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 unchecked_extrinsic { + pub mod multiasset { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v1::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract(::std::vec::Vec<::core::primitive::u8>), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum AssetInstance { + #[codec(index = 0)] + Undefined, + #[codec(index = 1)] + Index(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 2)] + Array4([::core::primitive::u8; 4usize]), + #[codec(index = 3)] + Array8([::core::primitive::u8; 8usize]), + #[codec(index = 4)] + Array16([::core::primitive::u8; 16usize]), + #[codec(index = 5)] + Array32([::core::primitive::u8; 32usize]), + #[codec(index = 6)] + Blob(::std::vec::Vec<::core::primitive::u8>), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v1::multiasset::AssetInstance), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct MultiAsset { + pub id: runtime_types::xcm::v1::multiasset::AssetId, + pub fun: runtime_types::xcm::v1::multiasset::Fungibility, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v1::multiasset::WildMultiAsset), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct MultiAssets( + pub ::std::vec::Vec< + runtime_types::xcm::v1::multiasset::MultiAsset, + >, ); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v1::multiasset::AssetId, + fun: runtime_types::xcm::v1::multiasset::WildFungibility, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v1::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v1::multilocation::Junctions, + } + } + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Order { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + DepositAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + max_assets: ::core::primitive::u32, + beneficiary: + runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 2)] + DepositReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 3)] + ExchangeAsset { + give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v1::multiasset::MultiAssets, + }, + #[codec(index = 4)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 5)] + InitiateTeleport { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 6)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + }, + #[codec(index = 7)] + BuyExecution { + fees: runtime_types::xcm::v1::multiasset::MultiAsset, + weight: ::core::primitive::u64, + debt: ::core::primitive::u64, + halt_on_error: ::core::primitive::bool, + instructions: ::std::vec::Vec, + }, + } } - } - pub mod multiaddress { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum MultiAddress<_0, _1> { + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Response { #[codec(index = 0)] - Id(_0), + Assets(runtime_types::xcm::v1::multiasset::MultiAssets), #[codec(index = 1)] - Index(#[codec(compact)] _1), + Version(::core::primitive::u32), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Xcm { + #[codec(index = 0)] + WithdrawAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + effects: ::std::vec::Vec, + }, + #[codec(index = 1)] + ReserveAssetDeposited { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + effects: ::std::vec::Vec, + }, #[codec(index = 2)] - Raw(::std::vec::Vec<::core::primitive::u8>), + ReceiveTeleportedAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + effects: ::std::vec::Vec, + }, #[codec(index = 3)] - Address32([::core::primitive::u8; 32usize]), + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v1::Response, + }, #[codec(index = 4)] - Address20([::core::primitive::u8; 20usize]), - } - } - pub mod traits { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct BlakeTwo256 {} - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum DispatchError { - #[codec(index = 0)] - Other, - #[codec(index = 1)] - CannotLookup, - #[codec(index = 2)] - BadOrigin, - #[codec(index = 3)] - Module { - index: ::core::primitive::u8, - error: ::core::primitive::u8, - }, - #[codec(index = 4)] - ConsumerRemaining, - #[codec(index = 5)] - NoProviders, - #[codec(index = 6)] - Token(runtime_types::sp_runtime::TokenError), - #[codec(index = 7)] - Arithmetic(runtime_types::sp_runtime::ArithmeticError), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum MultiSigner { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Public), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Public), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Public), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub enum TokenError { - #[codec(index = 0)] - NoFunds, - #[codec(index = 1)] - WouldDie, - #[codec(index = 2)] - BelowMinimum, - #[codec(index = 3)] - CannotCreate, - #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, - } - } - pub mod sp_session { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct MembershipProof { - pub session: ::core::primitive::u32, - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub validator_count: ::core::primitive::u32, - } - } - pub mod sp_staking { - use super::runtime_types; - pub mod offence { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, + TransferAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: ::std::vec::Vec, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v0::OriginKind, + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + RelayedFrom { + who: runtime_types::xcm::v1::multilocation::Junctions, + message: ::std::boxed::Box, + }, + #[codec(index = 11)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 12)] + UnsubscribeVersion, } } - } - pub mod sp_version { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode)] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: ::std::vec::Vec<( - [::core::primitive::u8; 8usize], - ::core::primitive::u32, - )>, - pub transaction_version: ::core::primitive::u32, - } - } - pub mod xcm { - use super::runtime_types; pub mod v2 { use super::runtime_types; pub mod traits { use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] @@ -20537,7 +24532,7 @@ pub mod api { #[codec(index = 17)] FailedToDecode, #[codec(index = 18)] - TooMuchWeightRequired, + MaxWeightInvalid, #[codec(index = 19)] NotHoldingFees, #[codec(index = 20)] @@ -20554,7 +24549,7 @@ pub mod api { WeightNotComputable, } #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Outcome { #[codec(index = 0)] @@ -20568,12 +24563,223 @@ pub mod api { Error(runtime_types::xcm::v2::traits::Error), } } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited( + runtime_types::xcm::v1::multiasset::MultiAssets, + ), + #[codec(index = 2)] + ReceiveTeleportedAsset( + runtime_types::xcm::v1::multiasset::MultiAssets, + ), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v2::Response, + #[codec(compact)] + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v0::OriginKind, + #[codec(compact)] + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v1::multilocation::Junctions), + #[codec(index = 12)] + ReportError { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v1::multiasset::MultiAssets, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 18)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v1::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v2::Xcm), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v2::Xcm), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + ticket: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 27)] + UnsubscribeVersion, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v2::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(#[codec(compact)] ::core::primitive::u64), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Xcm(pub ::std::vec::Vec); + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum VersionedMultiAssets { + #[codec(index = 0)] + V0(::std::vec::Vec), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::multiasset::MultiAssets), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum VersionedResponse { + #[codec(index = 0)] + V0(runtime_types::xcm::v0::Response), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::Response), + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Response), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum VersionedXcm { + #[codec(index = 0)] + V0(runtime_types::xcm::v0::Xcm), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::Xcm), + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Xcm), } } } #[doc = r" The default storage entry from which to fetch an account nonce, required for"] #[doc = r" constructing a transaction."] pub type DefaultAccountData = self::system::storage::Account; + #[doc = r" The default error type returned when there is a runtime issue."] + pub type DispatchError = self::runtime_types::sp_runtime::DispatchError; impl ::subxt::AccountData<::subxt::DefaultConfig> for DefaultAccountData { fn nonce( result: &::Value, @@ -20586,33 +24792,33 @@ pub mod api { Self(account_id) } } - pub struct RuntimeApi { - pub client: ::subxt::Client, - marker: ::core::marker::PhantomData, + pub struct RuntimeApi { + pub client: ::subxt::Client, + marker: ::core::marker::PhantomData, } - impl ::core::convert::From<::subxt::Client> for RuntimeApi + impl ::core::convert::From<::subxt::Client> for RuntimeApi where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, { - fn from(client: ::subxt::Client) -> Self { + fn from(client: ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, } } } - impl<'a, T, E> RuntimeApi + impl<'a, T, X> RuntimeApi where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, { pub fn storage(&'a self) -> StorageApi<'a, T> { StorageApi { client: &self.client, } } - pub fn tx(&'a self) -> TransactionApi<'a, T, E, DefaultAccountData> { + pub fn tx(&'a self) -> TransactionApi<'a, T, X, DefaultAccountData> { TransactionApi { client: &self.client, marker: ::core::marker::PhantomData, @@ -20620,7 +24826,7 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T> StorageApi<'a, T> where @@ -20632,6 +24838,9 @@ pub mod api { pub fn scheduler(&self) -> scheduler::storage::StorageApi<'a, T> { scheduler::storage::StorageApi::new(self.client) } + pub fn preimage(&self) -> preimage::storage::StorageApi<'a, T> { + preimage::storage::StorageApi::new(self.client) + } pub fn babe(&self) -> babe::storage::StorageApi<'a, T> { babe::storage::StorageApi::new(self.client) } @@ -20763,146 +24972,155 @@ pub mod api { pub fn crowdloan(&self) -> crowdloan::storage::StorageApi<'a, T> { crowdloan::storage::StorageApi::new(self.client) } + pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi<'a, T> { + xcm_pallet::storage::StorageApi::new(self.client) + } } - pub struct TransactionApi<'a, T: ::subxt::Config, E, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(E, A)>, + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - impl<'a, T, E, A> TransactionApi<'a, T, E, A> + impl<'a, T, X, A> TransactionApi<'a, T, X, A> where T: ::subxt::Config, - E: ::subxt::SignedExtra, + X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn system(&self) -> system::calls::TransactionApi<'a, T, E, A> { + pub fn system(&self) -> system::calls::TransactionApi<'a, T, X, A> { system::calls::TransactionApi::new(self.client) } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi<'a, T, E, A> { + pub fn scheduler(&self) -> scheduler::calls::TransactionApi<'a, T, X, A> { scheduler::calls::TransactionApi::new(self.client) } - pub fn babe(&self) -> babe::calls::TransactionApi<'a, T, E, A> { + pub fn preimage(&self) -> preimage::calls::TransactionApi<'a, T, X, A> { + preimage::calls::TransactionApi::new(self.client) + } + pub fn babe(&self) -> babe::calls::TransactionApi<'a, T, X, A> { babe::calls::TransactionApi::new(self.client) } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi<'a, T, E, A> { + pub fn timestamp(&self) -> timestamp::calls::TransactionApi<'a, T, X, A> { timestamp::calls::TransactionApi::new(self.client) } - pub fn indices(&self) -> indices::calls::TransactionApi<'a, T, E, A> { + pub fn indices(&self) -> indices::calls::TransactionApi<'a, T, X, A> { indices::calls::TransactionApi::new(self.client) } - pub fn balances(&self) -> balances::calls::TransactionApi<'a, T, E, A> { + pub fn balances(&self) -> balances::calls::TransactionApi<'a, T, X, A> { balances::calls::TransactionApi::new(self.client) } - pub fn authorship(&self) -> authorship::calls::TransactionApi<'a, T, E, A> { + pub fn authorship(&self) -> authorship::calls::TransactionApi<'a, T, X, A> { authorship::calls::TransactionApi::new(self.client) } - pub fn staking(&self) -> staking::calls::TransactionApi<'a, T, E, A> { + pub fn staking(&self) -> staking::calls::TransactionApi<'a, T, X, A> { staking::calls::TransactionApi::new(self.client) } - pub fn session(&self) -> session::calls::TransactionApi<'a, T, E, A> { + pub fn session(&self) -> session::calls::TransactionApi<'a, T, X, A> { session::calls::TransactionApi::new(self.client) } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi<'a, T, E, A> { + pub fn grandpa(&self) -> grandpa::calls::TransactionApi<'a, T, X, A> { grandpa::calls::TransactionApi::new(self.client) } - pub fn im_online(&self) -> im_online::calls::TransactionApi<'a, T, E, A> { + pub fn im_online(&self) -> im_online::calls::TransactionApi<'a, T, X, A> { im_online::calls::TransactionApi::new(self.client) } - pub fn democracy(&self) -> democracy::calls::TransactionApi<'a, T, E, A> { + pub fn democracy(&self) -> democracy::calls::TransactionApi<'a, T, X, A> { democracy::calls::TransactionApi::new(self.client) } - pub fn council(&self) -> council::calls::TransactionApi<'a, T, E, A> { + pub fn council(&self) -> council::calls::TransactionApi<'a, T, X, A> { council::calls::TransactionApi::new(self.client) } pub fn technical_committee( &self, - ) -> technical_committee::calls::TransactionApi<'a, T, E, A> { + ) -> technical_committee::calls::TransactionApi<'a, T, X, A> { technical_committee::calls::TransactionApi::new(self.client) } pub fn phragmen_election( &self, - ) -> phragmen_election::calls::TransactionApi<'a, T, E, A> { + ) -> phragmen_election::calls::TransactionApi<'a, T, X, A> { phragmen_election::calls::TransactionApi::new(self.client) } pub fn technical_membership( &self, - ) -> technical_membership::calls::TransactionApi<'a, T, E, A> { + ) -> technical_membership::calls::TransactionApi<'a, T, X, A> { technical_membership::calls::TransactionApi::new(self.client) } - pub fn treasury(&self) -> treasury::calls::TransactionApi<'a, T, E, A> { + pub fn treasury(&self) -> treasury::calls::TransactionApi<'a, T, X, A> { treasury::calls::TransactionApi::new(self.client) } - pub fn claims(&self) -> claims::calls::TransactionApi<'a, T, E, A> { + pub fn claims(&self) -> claims::calls::TransactionApi<'a, T, X, A> { claims::calls::TransactionApi::new(self.client) } - pub fn vesting(&self) -> vesting::calls::TransactionApi<'a, T, E, A> { + pub fn vesting(&self) -> vesting::calls::TransactionApi<'a, T, X, A> { vesting::calls::TransactionApi::new(self.client) } - pub fn utility(&self) -> utility::calls::TransactionApi<'a, T, E, A> { + pub fn utility(&self) -> utility::calls::TransactionApi<'a, T, X, A> { utility::calls::TransactionApi::new(self.client) } - pub fn identity(&self) -> identity::calls::TransactionApi<'a, T, E, A> { + pub fn identity(&self) -> identity::calls::TransactionApi<'a, T, X, A> { identity::calls::TransactionApi::new(self.client) } - pub fn proxy(&self) -> proxy::calls::TransactionApi<'a, T, E, A> { + pub fn proxy(&self) -> proxy::calls::TransactionApi<'a, T, X, A> { proxy::calls::TransactionApi::new(self.client) } - pub fn multisig(&self) -> multisig::calls::TransactionApi<'a, T, E, A> { + pub fn multisig(&self) -> multisig::calls::TransactionApi<'a, T, X, A> { multisig::calls::TransactionApi::new(self.client) } - pub fn bounties(&self) -> bounties::calls::TransactionApi<'a, T, E, A> { + pub fn bounties(&self) -> bounties::calls::TransactionApi<'a, T, X, A> { bounties::calls::TransactionApi::new(self.client) } - pub fn tips(&self) -> tips::calls::TransactionApi<'a, T, E, A> { + pub fn tips(&self) -> tips::calls::TransactionApi<'a, T, X, A> { tips::calls::TransactionApi::new(self.client) } pub fn election_provider_multi_phase( &self, - ) -> election_provider_multi_phase::calls::TransactionApi<'a, T, E, A> { + ) -> election_provider_multi_phase::calls::TransactionApi<'a, T, X, A> { election_provider_multi_phase::calls::TransactionApi::new(self.client) } - pub fn bags_list(&self) -> bags_list::calls::TransactionApi<'a, T, E, A> { + pub fn bags_list(&self) -> bags_list::calls::TransactionApi<'a, T, X, A> { bags_list::calls::TransactionApi::new(self.client) } - pub fn configuration(&self) -> configuration::calls::TransactionApi<'a, T, E, A> { + pub fn configuration(&self) -> configuration::calls::TransactionApi<'a, T, X, A> { configuration::calls::TransactionApi::new(self.client) } - pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi<'a, T, E, A> { + pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi<'a, T, X, A> { paras_shared::calls::TransactionApi::new(self.client) } pub fn para_inclusion( &self, - ) -> para_inclusion::calls::TransactionApi<'a, T, E, A> { + ) -> para_inclusion::calls::TransactionApi<'a, T, X, A> { para_inclusion::calls::TransactionApi::new(self.client) } - pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi<'a, T, E, A> { + pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi<'a, T, X, A> { para_inherent::calls::TransactionApi::new(self.client) } - pub fn paras(&self) -> paras::calls::TransactionApi<'a, T, E, A> { + pub fn paras(&self) -> paras::calls::TransactionApi<'a, T, X, A> { paras::calls::TransactionApi::new(self.client) } - pub fn initializer(&self) -> initializer::calls::TransactionApi<'a, T, E, A> { + pub fn initializer(&self) -> initializer::calls::TransactionApi<'a, T, X, A> { initializer::calls::TransactionApi::new(self.client) } - pub fn dmp(&self) -> dmp::calls::TransactionApi<'a, T, E, A> { + pub fn dmp(&self) -> dmp::calls::TransactionApi<'a, T, X, A> { dmp::calls::TransactionApi::new(self.client) } - pub fn ump(&self) -> ump::calls::TransactionApi<'a, T, E, A> { + pub fn ump(&self) -> ump::calls::TransactionApi<'a, T, X, A> { ump::calls::TransactionApi::new(self.client) } - pub fn hrmp(&self) -> hrmp::calls::TransactionApi<'a, T, E, A> { + pub fn hrmp(&self) -> hrmp::calls::TransactionApi<'a, T, X, A> { hrmp::calls::TransactionApi::new(self.client) } - pub fn registrar(&self) -> registrar::calls::TransactionApi<'a, T, E, A> { + pub fn registrar(&self) -> registrar::calls::TransactionApi<'a, T, X, A> { registrar::calls::TransactionApi::new(self.client) } - pub fn slots(&self) -> slots::calls::TransactionApi<'a, T, E, A> { + pub fn slots(&self) -> slots::calls::TransactionApi<'a, T, X, A> { slots::calls::TransactionApi::new(self.client) } - pub fn auctions(&self) -> auctions::calls::TransactionApi<'a, T, E, A> { + pub fn auctions(&self) -> auctions::calls::TransactionApi<'a, T, X, A> { auctions::calls::TransactionApi::new(self.client) } - pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi<'a, T, E, A> { + pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi<'a, T, X, A> { crowdloan::calls::TransactionApi::new(self.client) } + pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi<'a, T, X, A> { + xcm_pallet::calls::TransactionApi::new(self.client) + } } } diff --git a/tests/integration/frame/balances.rs b/tests/integration/frame/balances.rs index 449482b002..3f2bdc0b93 100644 --- a/tests/integration/frame/balances.rs +++ b/tests/integration/frame/balances.rs @@ -19,6 +19,7 @@ use crate::{ balances, runtime_types, system, + DispatchError, }, pair_signer, test_context, @@ -33,13 +34,11 @@ use subxt::{ DefaultConfig, Error, EventSubscription, - PalletError, - RuntimeError, Signer, }; #[async_std::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(); @@ -111,7 +110,7 @@ async fn storage_total_issuance() { } #[async_std::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 cxt = test_context().await; @@ -181,13 +180,9 @@ async fn transfer_error() { .wait_for_finalized_success() .await; - if let Err(Error::Runtime(RuntimeError::Module(error))) = res { - let error2 = PalletError { - pallet: "Balances".into(), - error: "InsufficientBalance".into(), - description: vec!["Balance too low to send value".to_string()], - }; - assert_eq!(error, error2); + if let Err(Error::Runtime(DispatchError::Module { index, error })) = res { + assert_eq!(index, 123); // TODO fix (original: Balances) + assert_eq!(error, 123); // TODO fix (original: InsufficientBalance) } else { panic!("expected a runtime module error"); } @@ -202,7 +197,7 @@ async fn transfer_subscription() { let cxt = test_context().await; let sub = cxt.client().rpc().subscribe_events().await.unwrap(); let decoder = cxt.client().events_decoder(); - let mut sub = EventSubscription::::new(sub, decoder); + let mut sub = EventSubscription::::new(sub, decoder); sub.filter_event::(); cxt.api diff --git a/tests/integration/frame/contracts.rs b/tests/integration/frame/contracts.rs index fd0927d84b..1d6534d948 100644 --- a/tests/integration/frame/contracts.rs +++ b/tests/integration/frame/contracts.rs @@ -25,6 +25,7 @@ use crate::{ }, system, DefaultAccountData, + DispatchError, }, test_context, NodeRuntimeSignedExtra, @@ -57,7 +58,7 @@ impl ContractsTestContext { Self { cxt, signer } } - fn client(&self) -> &Client { + fn client(&self) -> &Client { self.cxt.client() } @@ -67,7 +68,9 @@ impl ContractsTestContext { self.cxt.api.tx().contracts() } - async fn instantiate_with_code(&self) -> Result<(Hash, AccountId), Error> { + async fn instantiate_with_code( + &self, + ) -> Result<(Hash, AccountId), Error> { log::info!("instantiate_with_code:"); const CONTRACT: &str = r#" (module @@ -118,7 +121,7 @@ impl ContractsTestContext { code_hash: Hash, data: Vec, salt: Vec, - ) -> Result { + ) -> Result> { // call instantiate extrinsic let result = self .contracts_tx() @@ -147,7 +150,8 @@ impl ContractsTestContext { &self, contract: AccountId, input_data: Vec, - ) -> Result, Error> { + ) -> Result, Error> + { log::info!("call: {:?}", contract); let result = self .contracts_tx() diff --git a/tests/integration/frame/staking.rs b/tests/integration/frame/staking.rs index 8ab87507c1..a6a022e3fb 100644 --- a/tests/integration/frame/staking.rs +++ b/tests/integration/frame/staking.rs @@ -21,6 +21,7 @@ use crate::{ ValidatorPrefs, }, staking, + DispatchError, }, pair_signer, test_context, @@ -33,7 +34,6 @@ use sp_core::{ use sp_keyring::AccountKeyring; use subxt::{ Error, - RuntimeError, Signer, }; @@ -67,7 +67,7 @@ async fn validate_with_controller_account() { } #[async_std::test] -async fn validate_not_possible_for_stash_account() -> Result<(), Error> { +async fn validate_not_possible_for_stash_account() -> Result<(), Error> { let alice_stash = pair_signer(get_from_seed("Alice//stash")); let cxt = test_context().await; let announce_validator = cxt @@ -79,9 +79,9 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error> { .await? .wait_for_finalized_success() .await; - assert_matches!(announce_validator, Err(Error::Runtime(RuntimeError::Module(module_err))) => { - assert_eq!(module_err.pallet, "Staking"); - assert_eq!(module_err.error, "NotController"); + assert_matches!(announce_validator, Err(Error::Runtime(DispatchError::Module{ index, error })) => { + assert_eq!(index, 123); // TODO fix (original: Staking) + assert_eq!(error, 123); // TODO fix (original: NotAController) }); Ok(()) } @@ -105,7 +105,7 @@ async fn nominate_with_controller_account() { } #[async_std::test] -async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { +async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { let alice_stash = pair_signer(get_from_seed("Alice//stash")); let bob = pair_signer(AccountKeyring::Bob.pair()); let cxt = test_context().await; @@ -120,15 +120,15 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(nomination, Err(Error::Runtime(RuntimeError::Module(module_err))) => { - assert_eq!(module_err.pallet, "Staking"); - assert_eq!(module_err.error, "NotController"); + assert_matches!(nomination, Err(Error::Runtime(DispatchError::Module{ index, error })) => { + assert_eq!(index, 123); // TODO fix (original: Staking) + assert_eq!(error, 123); // TODO fix (original: NotAController) }); Ok(()) } #[async_std::test] -async fn chill_works_for_controller_only() -> Result<(), Error> { +async fn chill_works_for_controller_only() -> Result<(), Error> { 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()); @@ -163,9 +163,9 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(chill, Err(Error::Runtime(RuntimeError::Module(module_err))) => { - assert_eq!(module_err.pallet, "Staking"); - assert_eq!(module_err.error, "NotController"); + assert_matches!(chill, Err(Error::Runtime(DispatchError::Module{ index, error })) => { + assert_eq!(index, 123); // TODO fix (original: Staking) + assert_eq!(error, 123); // TODO fix (original: NotAController) }); let is_chilled = cxt @@ -184,7 +184,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { } #[async_std::test] -async fn tx_bond() -> Result<(), Error> { +async fn tx_bond() -> Result<(), Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let cxt = test_context().await; @@ -218,16 +218,15 @@ async fn tx_bond() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(bond_again, Err(Error::Runtime(RuntimeError::Module(module_err))) => { - assert_eq!(module_err.pallet, "Staking"); - assert_eq!(module_err.error, "AlreadyBonded"); + assert_matches!(bond_again, Err(Error::Runtime(DispatchError::Module{ index, error })) => { + assert_eq!(index, 123); // TODO fix (original: Staking) + assert_eq!(error, 123); // TODO fix (original: AlreadyBonded) }); - Ok(()) } #[async_std::test] -async fn storage_history_depth() -> Result<(), Error> { +async fn storage_history_depth() -> Result<(), Error> { let cxt = test_context().await; let history_depth = cxt.api.storage().staking().history_depth(None).await?; assert_eq!(history_depth, 84); @@ -235,7 +234,7 @@ async fn storage_history_depth() -> Result<(), Error> { } #[async_std::test] -async fn storage_current_era() -> Result<(), Error> { +async fn storage_current_era() -> Result<(), Error> { let cxt = test_context().await; let _current_era = cxt .api @@ -248,7 +247,7 @@ async fn storage_current_era() -> Result<(), Error> { } #[async_std::test] -async fn storage_era_reward_points() -> Result<(), Error> { +async fn storage_era_reward_points() -> Result<(), Error> { let cxt = test_context().await; let current_era_result = cxt .api diff --git a/tests/integration/frame/sudo.rs b/tests/integration/frame/sudo.rs index 7cfebd6a0b..eb8495c08c 100644 --- a/tests/integration/frame/sudo.rs +++ b/tests/integration/frame/sudo.rs @@ -18,6 +18,7 @@ use crate::{ node_runtime::{ runtime_types, sudo, + DispatchError, }, pair_signer, test_context, @@ -28,7 +29,7 @@ type Call = runtime_types::node_runtime::Call; type BalancesCall = runtime_types::pallet_balances::pallet::Call; #[async_std::test] -async fn test_sudo() -> Result<(), subxt::Error> { +async fn test_sudo() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id().into(); let cxt = test_context().await; @@ -54,7 +55,7 @@ async fn test_sudo() -> Result<(), subxt::Error> { } #[async_std::test] -async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> { +async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let bob = AccountKeyring::Bob.to_account_id().into(); let cxt = test_context().await; diff --git a/tests/integration/frame/system.rs b/tests/integration/frame/system.rs index 5dec4b870d..8be7a7d3b6 100644 --- a/tests/integration/frame/system.rs +++ b/tests/integration/frame/system.rs @@ -15,7 +15,10 @@ // along with subxt. If not, see . use crate::{ - node_runtime::system, + node_runtime::{ + system, + DispatchError, + }, pair_signer, test_context, }; @@ -24,7 +27,7 @@ use sp_keyring::AccountKeyring; use subxt::Signer; #[async_std::test] -async fn storage_account() -> Result<(), subxt::Error> { +async fn storage_account() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let cxt = test_context().await; @@ -40,7 +43,7 @@ async fn storage_account() -> Result<(), subxt::Error> { } #[async_std::test] -async fn tx_remark_with_event() -> Result<(), subxt::Error> { +async fn tx_remark_with_event() -> Result<(), subxt::Error> { let alice = pair_signer(AccountKeyring::Alice.pair()); let cxt = test_context().await; diff --git a/tests/integration/utils/context.rs b/tests/integration/utils/context.rs index 1a56a168c1..f976ba5b55 100644 --- a/tests/integration/utils/context.rs +++ b/tests/integration/utils/context.rs @@ -15,7 +15,10 @@ // along with subxt. If not, see . pub use crate::{ - node_runtime, + node_runtime::{ + self, + DispatchError, + }, TestNodeProcess, }; @@ -37,7 +40,7 @@ pub type NodeRuntimeSignedExtra = 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. \ @@ -46,25 +49,25 @@ 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) .scan_for_open_ports() - .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 node_proc: TestNodeProcess, pub api: node_runtime::RuntimeApi, } impl TestContext { - pub fn client(&self) -> &Client { + pub fn client(&self) -> &Client { &self.api.client } } diff --git a/tests/integration/utils/node_proc.rs b/tests/integration/utils/node_proc.rs index 60d6136f1d..aabb67b05b 100644 --- a/tests/integration/utils/node_proc.rs +++ b/tests/integration/utils/node_proc.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +use codec::Decode; use sp_keyring::AccountKeyring; use std::{ ffi::{ @@ -36,23 +37,25 @@ use subxt::{ }; /// Spawn a local substrate node for testing subxt. -pub struct TestNodeProcess { +pub struct TestNodeProcess { proc: process::Child, - client: Client, + client: Client, } -impl Drop for TestNodeProcess +impl Drop for TestNodeProcess where R: Config, + E: Decode, { fn drop(&mut self) { let _ = self.kill(); } } -impl TestNodeProcess +impl TestNodeProcess where R: Config, + E: Decode, { /// Construct a builder for spawning a test node process. pub fn build(program: S) -> TestNodeProcessBuilder @@ -74,7 +77,7 @@ where } /// Returns the subxt client connected to the running node. - pub fn client(&self) -> &Client { + pub fn client(&self) -> &Client { &self.client } } @@ -113,9 +116,10 @@ impl TestNodeProcessBuilder { } /// Spawn the substrate node at the given path, and wait for rpc to be initialized. - pub async fn spawn(&self) -> Result, String> + pub async fn spawn(&self) -> Result, String> where R: Config, + E: Decode, { let mut cmd = process::Command::new(&self.node_path); cmd.env("RUST_LOG", "error").arg("--dev").arg("--tmp"); From 940c7702757d75c144e91189e8fa45b12accba43 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 14 Jan 2022 16:35:29 +0000 Subject: [PATCH 06/21] Use our own RuntimeVersion struct (for now) to avoid error decoding into sp_version::RuntimeVersion --- src/client.rs | 4 ++-- src/extrinsic/mod.rs | 2 +- src/rpc.rs | 23 ++++++++++++++++++++++- tests/integration/frame/balances.rs | 4 ++-- tests/integration/frame/staking.rs | 16 ++++++++-------- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/src/client.rs b/src/client.rs index 0936400477..f024144341 100644 --- a/src/client.rs +++ b/src/client.rs @@ -17,7 +17,6 @@ use futures::future; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; -pub use sp_version::RuntimeVersion; use crate::{ error::Error, @@ -31,6 +30,7 @@ use crate::{ rpc::{ Rpc, RpcClient, + RuntimeVersion, SystemProperties, }, storage::StorageClient, @@ -138,7 +138,7 @@ impl std::fmt::Debug for Client { .field("metadata", &"") .field("events_decoder", &"") .field("properties", &self.properties) - .field("runtime_version", &self.runtime_version.to_string()) + .field("runtime_version", &self.runtime_version) .field("iter_page_size", &self.iter_page_size) .finish() } diff --git a/src/extrinsic/mod.rs b/src/extrinsic/mod.rs index a4fbd13d2a..100778d4b6 100644 --- a/src/extrinsic/mod.rs +++ b/src/extrinsic/mod.rs @@ -39,12 +39,12 @@ pub use self::{ }; use sp_runtime::traits::SignedExtension; -use sp_version::RuntimeVersion; use crate::{ Config, Encoded, Error, + rpc::RuntimeVersion, }; /// UncheckedExtrinsic type. diff --git a/src/rpc.rs b/src/rpc.rs index fab7645d8e..71cc4cc73d 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -79,7 +79,6 @@ use sp_runtime::generic::{ Block, SignedBlock, }; -use sp_version::RuntimeVersion; /// A number type that can be serialized both as a number or a string that encodes a number in a /// string. @@ -164,6 +163,28 @@ pub enum SubstrateTransactionStatus { Invalid, } +/// This contains the runtime version information necessary to make transactions, as obtained from +/// the RPC call `state_getRuntimeVersion`, +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct RuntimeVersion { + /// Version of the runtime specification. A full-node will not attempt to use its native + /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + /// `spec_version` and `authoring_version` are the same between Wasm and native. + pub spec_version: u32, + + /// All existing dispatches are fully compatible when this number doesn't change. If this + /// number changes, then `spec_version` must change, also. + /// + /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, + /// either through an alteration in its user-level semantics, a parameter + /// added/removed/changed, a dispatchable being removed, a module being removed, or a + /// dispatchable/module changing its index. + /// + /// It need *not* change when a new module is added or when a dispatchable is added. + pub transaction_version: u32, +} + /// Rpc client wrapper. /// This is workaround because adding generic types causes the macros to fail. #[derive(Clone)] diff --git a/tests/integration/frame/balances.rs b/tests/integration/frame/balances.rs index 3f2bdc0b93..32e4a405a8 100644 --- a/tests/integration/frame/balances.rs +++ b/tests/integration/frame/balances.rs @@ -181,8 +181,8 @@ async fn transfer_error() { .await; if let Err(Error::Runtime(DispatchError::Module { index, error })) = res { - assert_eq!(index, 123); // TODO fix (original: Balances) - assert_eq!(error, 123); // TODO fix (original: InsufficientBalance) + assert_eq!(index, 6); // Balances + assert_eq!(error, 2); // InsufficientBalance } else { panic!("expected a runtime module error"); } diff --git a/tests/integration/frame/staking.rs b/tests/integration/frame/staking.rs index a6a022e3fb..827e414e70 100644 --- a/tests/integration/frame/staking.rs +++ b/tests/integration/frame/staking.rs @@ -80,8 +80,8 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error { - assert_eq!(index, 123); // TODO fix (original: Staking) - assert_eq!(error, 123); // TODO fix (original: NotAController) + assert_eq!(index, 10); // Staking + assert_eq!(error, 0); // NotAController }); Ok(()) } @@ -121,8 +121,8 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error { - assert_eq!(index, 123); // TODO fix (original: Staking) - assert_eq!(error, 123); // TODO fix (original: NotAController) + assert_eq!(index, 10); // Staking + assert_eq!(error, 0); // NotAController }); Ok(()) } @@ -164,8 +164,8 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .await; assert_matches!(chill, Err(Error::Runtime(DispatchError::Module{ index, error })) => { - assert_eq!(index, 123); // TODO fix (original: Staking) - assert_eq!(error, 123); // TODO fix (original: NotAController) + assert_eq!(index, 10); // Staking + assert_eq!(error, 0); // NotAController }); let is_chilled = cxt @@ -219,8 +219,8 @@ async fn tx_bond() -> Result<(), Error> { .await; assert_matches!(bond_again, Err(Error::Runtime(DispatchError::Module{ index, error })) => { - assert_eq!(index, 123); // TODO fix (original: Staking) - assert_eq!(error, 123); // TODO fix (original: AlreadyBonded) + assert_eq!(index, 10); // Staking + assert_eq!(error, 2); // AlreadyBonded }); Ok(()) } From 8235ddcd3837adaeb49a102dc438670a618608af Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 14 Jan 2022 16:39:54 +0000 Subject: [PATCH 07/21] cargo fmt --- src/extrinsic/mod.rs | 2 +- src/rpc.rs | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/extrinsic/mod.rs b/src/extrinsic/mod.rs index 100778d4b6..d6bba77e95 100644 --- a/src/extrinsic/mod.rs +++ b/src/extrinsic/mod.rs @@ -41,10 +41,10 @@ pub use self::{ use sp_runtime::traits::SignedExtension; use crate::{ + rpc::RuntimeVersion, Config, Encoded, Error, - rpc::RuntimeVersion, }; /// UncheckedExtrinsic type. diff --git a/src/rpc.rs b/src/rpc.rs index 71cc4cc73d..98f5792adc 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -168,21 +168,21 @@ pub enum SubstrateTransactionStatus { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct RuntimeVersion { - /// Version of the runtime specification. A full-node will not attempt to use its native - /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, - /// `spec_version` and `authoring_version` are the same between Wasm and native. - pub spec_version: u32, - - /// All existing dispatches are fully compatible when this number doesn't change. If this - /// number changes, then `spec_version` must change, also. - /// - /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, - /// either through an alteration in its user-level semantics, a parameter - /// added/removed/changed, a dispatchable being removed, a module being removed, or a - /// dispatchable/module changing its index. - /// - /// It need *not* change when a new module is added or when a dispatchable is added. - pub transaction_version: u32, + /// Version of the runtime specification. A full-node will not attempt to use its native + /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, + /// `spec_version` and `authoring_version` are the same between Wasm and native. + pub spec_version: u32, + + /// All existing dispatches are fully compatible when this number doesn't change. If this + /// number changes, then `spec_version` must change, also. + /// + /// This number must change when an existing dispatchable (module ID, dispatch ID) is changed, + /// either through an alteration in its user-level semantics, a parameter + /// added/removed/changed, a dispatchable being removed, a module being removed, or a + /// dispatchable/module changing its index. + /// + /// It need *not* change when a new module is added or when a dispatchable is added. + pub transaction_version: u32, } /// Rpc client wrapper. From 37481602e8e9aebaad0cf731229013f90ce0ae19 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 14:33:21 +0000 Subject: [PATCH 08/21] fix docs and expose private documented thing that I think should be pub --- src/error.rs | 2 +- src/extrinsic/mod.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 675eae6194..80f9b1efa0 100644 --- a/src/error.rs +++ b/src/error.rs @@ -69,7 +69,7 @@ pub enum Error { } impl Error { - /// [`Error`] is parameterised over the type of `Runtime` error that + /// [`enum@Error`] is parameterised over the type of `Runtime` error that /// it holds. 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) -> Error diff --git a/src/extrinsic/mod.rs b/src/extrinsic/mod.rs index d6bba77e95..ce19367f7f 100644 --- a/src/extrinsic/mod.rs +++ b/src/extrinsic/mod.rs @@ -22,6 +22,7 @@ mod signer; pub use self::{ extra::{ ChargeAssetTxPayment, + ChargeTransactionPayment, CheckGenesis, CheckMortality, CheckNonce, From 63fbde86fe42ed858eedd4376f422f3f7eed4763 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 18:06:58 +0000 Subject: [PATCH 09/21] move error info to compile time so that we can make DispatchError a little nicer to work with --- codegen/src/api/errors.rs | 164 ++++++++++++++++++++++++++++ codegen/src/api/mod.rs | 11 ++ src/metadata.rs | 64 ----------- tests/integration/frame/balances.rs | 7 +- tests/integration/frame/staking.rs | 28 +++-- 5 files changed, 195 insertions(+), 79 deletions(-) create mode 100644 codegen/src/api/errors.rs diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs new file mode 100644 index 0000000000..6fa8e740a4 --- /dev/null +++ b/codegen/src/api/errors.rs @@ -0,0 +1,164 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is part of subxt. +// +// subxt is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// subxt is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with subxt. If not, see . + +use frame_metadata::{ + v14::RuntimeMetadataV14, +}; +use proc_macro2::{ + TokenStream as TokenStream2, + Span as Span2, +}; +use quote::{ + quote, +}; + +pub struct ErrorDetails { + pub type_def: TokenStream2, + pub dispatch_error_impl_fn: TokenStream2 +} + +impl ErrorDetails { + fn emit_compile_error(err: &str) -> ErrorDetails { + let err_lit_str = syn::LitStr::new(&err, Span2::call_site()); + ErrorDetails { + type_def: quote!(), + dispatch_error_impl_fn: quote!(compile_error!(#err_lit_str)) + } + } +} + +pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { + let errors = match pallet_errors(metadata) { + Ok(errors) => errors, + Err(e) => { + let err_string = format!("Failed to generate error details from metadata: {}", e); + return ErrorDetails::emit_compile_error(&err_string) + }, + }; + + let match_body_items = errors.into_iter().map(|err| { + let docs = err.description(); + let pallet_index = err.pallet_index; + let error_index = err.error_index; + let pallet_name = err.pallet; + let error_name = err.error; + + quote!{ + (#pallet_index, #error_index) => Some(ErrorDetails { + pallet: #pallet_name, + error: #error_name, + docs: #docs + }) + } + }); + + ErrorDetails { + // A type we'll be returning that needs defining at the top level: + type_def: quote!{ + pub struct ErrorDetails { + pub pallet: &'static str, + pub error: &'static str, + pub docs: &'static str, + } + }, + // A function which will live in an impl block for our DispatchError, + // to statically return details for known error types: + dispatch_error_impl_fn: quote!{ + pub fn details(&self) -> Option { + if let Self::Module { index, error } = self { + match (index, error) { + #( #match_body_items ),*, + _ => None + } + } else { + None + } + } + } + } +} + +fn pallet_errors(metadata: &RuntimeMetadataV14) -> Result, InvalidMetadataError> { + let get_type_def_variant = |type_id: u32| { + let ty = metadata + .types + .resolve(type_id) + .ok_or(InvalidMetadataError::MissingType(type_id))?; + if let scale_info::TypeDef::Variant(var) = ty.type_def() { + Ok(var) + } else { + Err(InvalidMetadataError::TypeDefNotVariant(type_id)) + } + }; + + 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 + .iter() + .flat_map(|(pallet, type_def_variant)| { + type_def_variant.variants().iter().map(move |var| { + ErrorMetadata { + pallet_index: pallet.index, + error_index: var.index(), + pallet: pallet.name.clone(), + error: var.name().clone(), + variant: var.clone(), + } + }) + }) + .collect(); + + Ok(errors) +} + +#[derive(Clone, Debug)] +pub struct ErrorMetadata { + pub pallet_index: u8, + pub error_index: u8, + pub pallet: String, + pub error: String, + variant: scale_info::Variant, +} + +impl ErrorMetadata { + pub fn description(&self) -> String { + self.variant.docs().join("\n") + } +} + +#[derive(Debug)] +pub enum InvalidMetadataError { + MissingType(u32), + TypeDefNotVariant(u32), +} + +impl std::fmt::Display for InvalidMetadataError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + InvalidMetadataError::MissingType(n) => write!(f, "Type {} missing from type registry", n), + InvalidMetadataError::TypeDefNotVariant(n) => write!(f, "Type {} was not a variant/enum type", n), + } + } +} \ No newline at end of file diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 933278f44c..0ebd9b8446 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -17,6 +17,7 @@ mod calls; mod events; mod storage; +mod errors; use super::GeneratedTypeDerives; use crate::{ @@ -216,6 +217,10 @@ impl RuntimeGenerator { pallet.calls.as_ref().map(|_| pallet_mod_name) }); + let error_details = errors::generate_error_details(&self.metadata); + let error_type = error_details.type_def; + let error_fn = error_details.dispatch_error_impl_fn; + quote! { #[allow(dead_code, unused_imports, non_camel_case_types)] pub mod #mod_ident { @@ -230,6 +235,12 @@ impl RuntimeGenerator { /// The default error type returned when there is a runtime issue. pub type DispatchError = self::runtime_types::sp_runtime::DispatchError; + // Statically generate error information so that we don't need runtime metadata for it. + #error_type + impl DispatchError { + #error_fn + } + impl ::subxt::AccountData<::subxt::DefaultConfig> for DefaultAccountData { fn nonce(result: &::Value) -> <::subxt::DefaultConfig as ::subxt::Config>::Index { result.nonce diff --git a/src/metadata.rs b/src/metadata.rs index 73d2f73e5d..553f17c8b1 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -84,7 +84,6 @@ pub struct Metadata { metadata: RuntimeMetadataLastVersion, pallets: HashMap, events: HashMap<(u8, u8), EventMetadata>, - errors: HashMap<(u8, u8), ErrorMetadata>, } impl Metadata { @@ -108,19 +107,6 @@ impl Metadata { Ok(event) } - /// Returns the metadata for the error at the given pallet and error indices. - pub fn error( - &self, - pallet_index: u8, - error_index: u8, - ) -> Result<&ErrorMetadata, MetadataError> { - let error = self - .errors - .get(&(pallet_index, error_index)) - .ok_or(MetadataError::ErrorNotFound(pallet_index, error_index))?; - Ok(error) - } - /// Resolve a type definition. pub fn resolve_type(&self, id: u32) -> Option<&Type> { self.metadata.types.resolve(id) @@ -207,30 +193,6 @@ impl EventMetadata { } } -#[derive(Clone, Debug)] -pub struct ErrorMetadata { - pallet: String, - error: String, - variant: Variant, -} - -impl ErrorMetadata { - /// Get the name of the pallet from which the error originates. - pub fn pallet(&self) -> &str { - &self.pallet - } - - /// Get the name of the specific pallet error. - pub fn error(&self) -> &str { - &self.error - } - - /// Get the description of the specific pallet error. - pub fn description(&self) -> &[String] { - self.variant.docs() - } -} - #[derive(Debug, thiserror::Error)] pub enum InvalidMetadataError { #[error("Invalid prefix")] @@ -331,36 +293,10 @@ impl TryFrom for Metadata { }) .collect(); - 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 - .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(); - Ok(Self { metadata, pallets, events, - errors, }) } } diff --git a/tests/integration/frame/balances.rs b/tests/integration/frame/balances.rs index 32e4a405a8..d2131f2f92 100644 --- a/tests/integration/frame/balances.rs +++ b/tests/integration/frame/balances.rs @@ -180,9 +180,10 @@ async fn transfer_error() { .wait_for_finalized_success() .await; - if let Err(Error::Runtime(DispatchError::Module { index, error })) = res { - assert_eq!(index, 6); // Balances - assert_eq!(error, 2); // InsufficientBalance + if let Err(Error::Runtime(err)) = res { + let details = err.details().unwrap(); + assert_eq!(details.pallet, "Balances"); + assert_eq!(details.error, "InsufficientBalance"); } else { panic!("expected a runtime module error"); } diff --git a/tests/integration/frame/staking.rs b/tests/integration/frame/staking.rs index 827e414e70..f5dbb172dc 100644 --- a/tests/integration/frame/staking.rs +++ b/tests/integration/frame/staking.rs @@ -79,9 +79,10 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error { - assert_eq!(index, 10); // Staking - assert_eq!(error, 0); // NotAController + assert_matches!(announce_validator, Err(Error::Runtime(err)) => { + let details = err.details().unwrap(); + assert_eq!(details.pallet, "Staking"); + assert_eq!(details.error, "NotController"); }); Ok(()) } @@ -120,9 +121,10 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error { - assert_eq!(index, 10); // Staking - assert_eq!(error, 0); // NotAController + assert_matches!(nomination, Err(Error::Runtime(err)) => { + let details = err.details().unwrap(); + assert_eq!(details.pallet, "Staking"); + assert_eq!(details.error, "NotController"); }); Ok(()) } @@ -163,9 +165,10 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(chill, Err(Error::Runtime(DispatchError::Module{ index, error })) => { - assert_eq!(index, 10); // Staking - assert_eq!(error, 0); // NotAController + assert_matches!(chill, Err(Error::Runtime(err)) => { + let details = err.details().unwrap(); + assert_eq!(details.pallet, "Staking"); + assert_eq!(details.error, "NotController"); }); let is_chilled = cxt @@ -218,9 +221,10 @@ async fn tx_bond() -> Result<(), Error> { .wait_for_finalized_success() .await; - assert_matches!(bond_again, Err(Error::Runtime(DispatchError::Module{ index, error })) => { - assert_eq!(index, 10); // Staking - assert_eq!(error, 2); // AlreadyBonded + assert_matches!(bond_again, Err(Error::Runtime(err)) => { + let details = err.details().unwrap(); + assert_eq!(details.pallet, "Staking"); + assert_eq!(details.error, "AlreadyBonded"); }); Ok(()) } From b6e13bd589d50b3f8de541e87a42ab4dda7e9508 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 18:07:20 +0000 Subject: [PATCH 10/21] cargo fmt --- codegen/src/api/errors.rs | 43 +++++++++++++++++++++------------------ codegen/src/api/mod.rs | 2 +- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 6fa8e740a4..280b03de7f 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -14,20 +14,16 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . -use frame_metadata::{ - v14::RuntimeMetadataV14, -}; +use frame_metadata::v14::RuntimeMetadataV14; use proc_macro2::{ - TokenStream as TokenStream2, Span as Span2, + TokenStream as TokenStream2, }; -use quote::{ - quote, -}; +use quote::quote; pub struct ErrorDetails { pub type_def: TokenStream2, - pub dispatch_error_impl_fn: TokenStream2 + pub dispatch_error_impl_fn: TokenStream2, } impl ErrorDetails { @@ -35,7 +31,7 @@ impl ErrorDetails { let err_lit_str = syn::LitStr::new(&err, Span2::call_site()); ErrorDetails { type_def: quote!(), - dispatch_error_impl_fn: quote!(compile_error!(#err_lit_str)) + dispatch_error_impl_fn: quote!(compile_error!(#err_lit_str)), } } } @@ -44,9 +40,10 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { let errors = match pallet_errors(metadata) { Ok(errors) => errors, Err(e) => { - let err_string = format!("Failed to generate error details from metadata: {}", e); + let err_string = + format!("Failed to generate error details from metadata: {}", e); return ErrorDetails::emit_compile_error(&err_string) - }, + } }; let match_body_items = errors.into_iter().map(|err| { @@ -56,7 +53,7 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { let pallet_name = err.pallet; let error_name = err.error; - quote!{ + quote! { (#pallet_index, #error_index) => Some(ErrorDetails { pallet: #pallet_name, error: #error_name, @@ -67,7 +64,7 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { ErrorDetails { // A type we'll be returning that needs defining at the top level: - type_def: quote!{ + type_def: quote! { pub struct ErrorDetails { pub pallet: &'static str, pub error: &'static str, @@ -76,7 +73,7 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { }, // A function which will live in an impl block for our DispatchError, // to statically return details for known error types: - dispatch_error_impl_fn: quote!{ + dispatch_error_impl_fn: quote! { pub fn details(&self) -> Option { if let Self::Module { index, error } = self { match (index, error) { @@ -87,11 +84,13 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { None } } - } + }, } } -fn pallet_errors(metadata: &RuntimeMetadataV14) -> Result, InvalidMetadataError> { +fn pallet_errors( + metadata: &RuntimeMetadataV14, +) -> Result, InvalidMetadataError> { let get_type_def_variant = |type_id: u32| { let ty = metadata .types @@ -113,7 +112,7 @@ fn pallet_errors(metadata: &RuntimeMetadataV14) -> Result, In Ok((pallet, type_def_variant)) }) }) - .collect::, _>>()?; + .collect::, _>>()?; let errors = pallet_errors .iter() @@ -157,8 +156,12 @@ pub enum InvalidMetadataError { impl std::fmt::Display for InvalidMetadataError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - InvalidMetadataError::MissingType(n) => write!(f, "Type {} missing from type registry", n), - InvalidMetadataError::TypeDefNotVariant(n) => write!(f, "Type {} was not a variant/enum type", n), + InvalidMetadataError::MissingType(n) => { + write!(f, "Type {} missing from type registry", n) + } + InvalidMetadataError::TypeDefNotVariant(n) => { + write!(f, "Type {} was not a variant/enum type", n) + } } } -} \ No newline at end of file +} diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 0ebd9b8446..ec6aea3626 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -15,9 +15,9 @@ // along with subxt. If not, see . mod calls; +mod errors; mod events; mod storage; -mod errors; use super::GeneratedTypeDerives; use crate::{ From a458565b4b1a6988c7929f52f298a7eb38fc359e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 18:12:06 +0000 Subject: [PATCH 11/21] clippy --- codegen/src/api/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 280b03de7f..28a19249a7 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -28,7 +28,7 @@ pub struct ErrorDetails { impl ErrorDetails { fn emit_compile_error(err: &str) -> ErrorDetails { - let err_lit_str = syn::LitStr::new(&err, Span2::call_site()); + let err_lit_str = syn::LitStr::new(err, Span2::call_site()); ErrorDetails { type_def: quote!(), dispatch_error_impl_fn: quote!(compile_error!(#err_lit_str)), From ad38bdb0f244db541543d4fd2b320969490d3fb4 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 19 Jan 2022 16:12:34 +0000 Subject: [PATCH 12/21] Rework error handling to remove param in most cases --- codegen/src/api/calls.rs | 4 +- codegen/src/api/mod.rs | 10 +- codegen/src/api/storage.rs | 10 +- examples/transfer_subscribe.rs | 2 +- src/client.rs | 43 +- src/error.rs | 149 +- src/events.rs | 60 +- src/extrinsic/mod.rs | 14 +- src/lib.rs | 1 + src/rpc.rs | 65 +- src/storage.rs | 38 +- src/subscription.rs | 43 +- src/transaction.rs | 78 +- tests/integration/codegen/polkadot.rs | 9330 ++++++++----------------- tests/integration/frame/balances.rs | 4 +- tests/integration/frame/contracts.rs | 2 +- tests/integration/frame/staking.rs | 8 +- tests/integration/utils/context.rs | 17 +- tests/integration/utils/node_proc.rs | 16 +- 19 files changed, 3258 insertions(+), 6636 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 0d607a7f29..0b2dcad341 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -86,7 +86,7 @@ pub fn generate_calls( #( #call_structs )* pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } @@ -96,7 +96,7 @@ pub fn generate_calls( X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData } } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index ec6aea3626..ea8e73c45f 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -251,16 +251,16 @@ impl RuntimeGenerator { } pub struct RuntimeApi { - pub client: ::subxt::Client, + pub client: ::subxt::Client, marker: ::core::marker::PhantomData, } - impl ::core::convert::From<::subxt::Client> for RuntimeApi + impl ::core::convert::From<::subxt::Client> for RuntimeApi where T: ::subxt::Config, X: ::subxt::SignedExtra, { - fn from(client: ::subxt::Client) -> Self { + fn from(client: ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData } } } @@ -280,7 +280,7 @@ impl RuntimeGenerator { } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T> StorageApi<'a, T> @@ -295,7 +295,7 @@ impl RuntimeGenerator { } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index a491e2ca75..56cdbb4cef 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -51,16 +51,14 @@ pub fn generate_storage( pub mod storage { use super::#types_mod_ident; - type DispatchError = #types_mod_ident::sp_runtime::DispatchError; - #( #storage_structs )* pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } @@ -198,7 +196,7 @@ fn generate_storage_entry_fns( pub async fn #fn_name_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, #entry_struct_ident, DispatchError>, ::subxt::Error> { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, #entry_struct_ident>, ::subxt::BasicError> { self.client.storage().iter(hash).await } ) @@ -214,7 +212,7 @@ fn generate_storage_entry_fns( &self, #( #key_args, )* hash: ::core::option::Option, - ) -> ::core::result::Result<#return_ty, ::subxt::Error> { + ) -> ::core::result::Result<#return_ty, ::subxt::BasicError> { let entry = #constructor; self.client.storage().#fetch(&entry, hash).await } diff --git a/examples/transfer_subscribe.rs b/examples/transfer_subscribe.rs index 30e3c02aaa..033c0533af 100644 --- a/examples/transfer_subscribe.rs +++ b/examples/transfer_subscribe.rs @@ -48,7 +48,7 @@ async fn main() -> Result<(), Box> { let sub = api.client.rpc().subscribe_events().await?; let decoder = api.client.events_decoder(); - let mut sub = EventSubscription::::new(sub, decoder); + let mut sub = EventSubscription::::new(sub, decoder); sub.filter_event::(); api.tx() diff --git a/src/client.rs b/src/client.rs index f024144341..f49b11e88f 100644 --- a/src/client.rs +++ b/src/client.rs @@ -19,7 +19,7 @@ use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; use crate::{ - error::Error, + error::BasicError, events::EventsDecoder, extrinsic::{ self, @@ -42,28 +42,23 @@ use crate::{ }; use codec::Decode; use derivative::Derivative; -use std::{ - marker::PhantomData, - sync::Arc, -}; +use std::sync::Arc; /// ClientBuilder for constructing a Client. #[derive(Default)] -pub struct ClientBuilder { +pub struct ClientBuilder { url: Option, client: Option, page_size: Option, - _error: PhantomData, } -impl ClientBuilder { +impl ClientBuilder { /// Creates a new ClientBuilder. pub fn new() -> Self { Self { url: None, client: None, page_size: None, - _error: PhantomData, } } @@ -86,7 +81,7 @@ impl ClientBuilder { } /// Creates a new Client. - pub async fn build(self) -> Result, Error> { + pub async fn build(self) -> Result, BasicError> { let client = if let Some(client) = self.client { client } else { @@ -120,17 +115,17 @@ impl ClientBuilder { /// Client to interface with a substrate node. #[derive(Derivative)] #[derivative(Clone(bound = ""))] -pub struct Client { - rpc: Rpc, +pub struct Client { + rpc: Rpc, genesis_hash: T::Hash, metadata: Arc, - events_decoder: EventsDecoder, + events_decoder: EventsDecoder, properties: SystemProperties, runtime_version: RuntimeVersion, iter_page_size: u32, } -impl std::fmt::Debug for Client { +impl std::fmt::Debug for Client { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Client") .field("rpc", &"") @@ -144,7 +139,7 @@ impl std::fmt::Debug for Client { } } -impl Client { +impl Client { /// Returns the genesis hash. pub fn genesis(&self) -> &T::Hash { &self.genesis_hash @@ -168,12 +163,12 @@ impl Client { } /// Returns the rpc client. - pub fn rpc(&self) -> &Rpc { + pub fn rpc(&self) -> &Rpc { &self.rpc } /// Create a client for accessing runtime storage - pub fn storage(&self) -> StorageClient { + pub fn storage(&self) -> StorageClient { StorageClient::new(&self.rpc, &self.metadata, self.iter_page_size) } @@ -186,14 +181,14 @@ impl Client { } /// Returns the events decoder. - pub fn events_decoder(&self) -> &EventsDecoder { + pub fn events_decoder(&self) -> &EventsDecoder { &self.events_decoder } } /// A constructed call ready to be signed and submitted. pub struct SubmittableExtrinsic<'client, T: Config, X, A, C, E: Decode> { - client: &'client Client, + client: &'client Client, call: C, marker: std::marker::PhantomData<(X, A, E)>, } @@ -207,7 +202,7 @@ where E: Decode, { /// Create a new [`SubmittableExtrinsic`]. - pub fn new(client: &'client Client, call: C) -> Self { + pub fn new(client: &'client Client, call: C) -> Self { Self { client, call, @@ -222,15 +217,17 @@ where pub async fn sign_and_submit_then_watch( self, signer: &(dyn Signer + Send + Sync), - ) -> Result, Error> + ) -> Result, BasicError> where <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, { // Sign the call data to create our extrinsic. let extrinsic = self.create_signed(signer, Default::default()).await?; + // Get a hash of the extrinsic (we'll need this later). let ext_hash = T::Hashing::hash_of(&extrinsic); + // Submit and watch for transaction progress. let sub = self.client.rpc().watch_extrinsic(extrinsic).await?; @@ -248,7 +245,7 @@ where pub async fn sign_and_submit( self, signer: &(dyn Signer + Send + Sync), - ) -> Result> + ) -> Result where <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, @@ -262,7 +259,7 @@ where &self, signer: &(dyn Signer + Send + Sync), additional_params: X::Parameters, - ) -> Result, Error> + ) -> Result, BasicError> where <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, diff --git a/src/error.rs b/src/error.rs index 80f9b1efa0..cf02e6e391 100644 --- a/src/error.rs +++ b/src/error.rs @@ -27,9 +27,17 @@ use sp_core::crypto::SecretStringError; use sp_runtime::transaction_validity::TransactionValidityError; use thiserror::Error; -/// Error enum. +/// 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 +/// using this type directly. #[derive(Debug, Error)] -pub enum Error { +pub enum GenericError { /// Io error. #[error("Io error: {0}")] Io(#[from] std::io::Error), @@ -55,7 +63,7 @@ pub enum Error { #[error("Metadata: {0}")] Metadata(#[from] MetadataError), /// Runtime error. - #[error("Runtime error")] + #[error("Runtime error: {0:?}")] Runtime(E), /// Events decoding error. #[error("Events decoding error: {0}")] @@ -68,113 +76,84 @@ pub enum Error { Other(String), } -impl Error { - /// [`enum@Error`] is parameterised over the type of `Runtime` error that - /// it holds. 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) -> Error +impl GenericError { + /// [`enum@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 { - Error::Io(e) => Error::Io(e), - Error::Codec(e) => Error::Codec(e), - Error::Rpc(e) => Error::Rpc(e), - Error::Serialization(e) => Error::Serialization(e), - Error::SecretString(e) => Error::SecretString(e), - Error::Invalid(e) => Error::Invalid(e), - Error::InvalidMetadata(e) => Error::InvalidMetadata(e), - Error::Metadata(e) => Error::Metadata(e), - Error::Runtime(e) => Error::Runtime(f(e)), - Error::EventsDecoding(e) => Error::EventsDecoding(e), - Error::Transaction(e) => Error::Transaction(e), - Error::Other(e) => Error::Other(e), + 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::Runtime(e) => GenericError::Runtime(f(e)), + GenericError::EventsDecoding(e) => GenericError::EventsDecoding(e), + GenericError::Transaction(e) => GenericError::Transaction(e), + GenericError::Other(e) => GenericError::Other(e), } } } -impl From for Error { +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 { fn from(error: SecretStringError) -> Self { - Error::SecretString(error) + GenericError::SecretString(error) } } -impl From for Error { +impl From for GenericError { fn from(error: TransactionValidityError) -> Self { - Error::Invalid(error) + GenericError::Invalid(error) } } -impl From<&str> for Error { +impl From<&str> for GenericError { fn from(error: &str) -> Self { - Error::Other(error.into()) + GenericError::Other(error.into()) } } -impl From for Error { +impl From for GenericError { fn from(error: String) -> Self { - Error::Other(error) + GenericError::Other(error) } } -// /// Runtime error. -// #[derive(Clone, Debug, Eq, Error, PartialEq)] -// pub enum RuntimeError { -// /// Module error. -// #[error("Runtime module error: {0}")] -// Module(PalletError), -// /// At least one consumer is remaining so the account cannot be destroyed. -// #[error("At least one consumer is remaining so the account cannot be destroyed.")] -// ConsumerRemaining, -// /// There are no providers so the account cannot be created. -// #[error("There are no providers so the account cannot be created.")] -// NoProviders, -// /// There are too many consumers so the account cannot be created. -// #[error("There are too many consumers so the account cannot be created.")] -// TooManyConsumers, -// /// Bad origin. -// #[error("Bad origin: throw by ensure_signed, ensure_root or ensure_none.")] -// BadOrigin, -// /// Cannot lookup. -// #[error("Cannot lookup some information required to validate the transaction.")] -// CannotLookup, -// /// Other error. -// #[error("Other error: {0}")] -// Other(String), -// } +/// 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 { -// /// Converts a `DispatchError` into a subxt error. -// pub fn from_dispatch( -// metadata: &Metadata, -// error: DispatchError, -// ) -> Result { -// match error { -// DispatchError::Module { -// index, -// error, -// message: _, -// } => { -// let error = metadata.error(index, error)?; -// Ok(Self::Module(PalletError { -// pallet: error.pallet().to_string(), -// error: error.error().to_string(), -// description: error.description().to_vec(), -// })) -// } -// DispatchError::BadOrigin => Ok(Self::BadOrigin), -// DispatchError::CannotLookup => Ok(Self::CannotLookup), -// DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining), -// DispatchError::NoProviders => Ok(Self::NoProviders), -// DispatchError::TooManyConsumers => Ok(Self::TooManyConsumers), -// DispatchError::Arithmetic(_math_error) => { -// Ok(Self::Other("math_error".into())) -// } -// DispatchError::Token(_token_error) => Ok(Self::Other("token error".into())), -// DispatchError::Other(msg) => Ok(Self::Other(msg.to_string())), -// } -// } -// } +impl RuntimeError { + /// Extract the actual runtime error from this struct. + pub fn inner(self) -> E { + self.0 + } +} /// Module error. #[derive(Clone, Debug, Eq, Error, PartialEq)] diff --git a/src/events.rs b/src/events.rs index d9bd8f900e..609af5ac99 100644 --- a/src/events.rs +++ b/src/events.rs @@ -15,12 +15,12 @@ // along with subxt. If not, see . use crate::{ + error::BasicError, metadata::{ EventMetadata, MetadataError, }, Config, - Error, Event, Metadata, PhantomDataSendSync, @@ -71,12 +71,12 @@ impl RawEvent { /// Events decoder. #[derive(Derivative)] #[derivative(Clone(bound = ""), Debug(bound = ""))] -pub struct EventsDecoder { +pub struct EventsDecoder { metadata: Metadata, - marker: PhantomDataSendSync<(T, E)>, + marker: PhantomDataSendSync, } -impl EventsDecoder { +impl EventsDecoder { /// Creates a new `EventsDecoder`. pub fn new(metadata: Metadata) -> Self { Self { @@ -89,7 +89,7 @@ impl EventsDecoder { pub fn decode_events( &self, input: &mut &[u8], - ) -> Result, Error> { + ) -> Result, BasicError> { let compact_len = >::decode(input)?; let len = compact_len.0 as usize; log::debug!("decoding {} events", len); @@ -142,7 +142,7 @@ impl EventsDecoder { event_metadata: &EventMetadata, input: &mut &[u8], output: &mut Vec, - ) -> Result<(), Error> { + ) -> Result<(), BasicError> { log::debug!( "Decoding Event '{}::{}'", event_metadata.pallet(), @@ -160,16 +160,16 @@ impl EventsDecoder { type_id: u32, input: &mut &[u8], output: &mut Vec, - ) -> Result<(), Error> { + ) -> Result<(), BasicError> { let ty = self .metadata .resolve_type(type_id) .ok_or(MetadataError::TypeNotFound(type_id))?; - fn decode_raw( + fn decode_raw( input: &mut &[u8], output: &mut Vec, - ) -> Result<(), Error> { + ) -> Result<(), BasicError> { let decoded = T::decode(input)?; decoded.encode_to(output); Ok(()) @@ -190,7 +190,7 @@ impl EventsDecoder { .iter() .find(|v| v.index() == variant_index) .ok_or_else(|| { - Error::Other(format!("Variant {} not found", variant_index)) + BasicError::Other(format!("Variant {} not found", variant_index)) })?; for field in variant.fields() { self.decode_type(field.ty().id(), input, output)?; @@ -219,30 +219,30 @@ impl EventsDecoder { } TypeDef::Primitive(primitive) => { match primitive { - TypeDefPrimitive::Bool => decode_raw::(input, output), + TypeDefPrimitive::Bool => decode_raw::(input, output), TypeDefPrimitive::Char => { Err(EventsDecodingError::UnsupportedPrimitive( TypeDefPrimitive::Char, ) .into()) } - TypeDefPrimitive::Str => decode_raw::(input, output), - TypeDefPrimitive::U8 => decode_raw::(input, output), - TypeDefPrimitive::U16 => decode_raw::(input, output), - TypeDefPrimitive::U32 => decode_raw::(input, output), - TypeDefPrimitive::U64 => decode_raw::(input, output), - TypeDefPrimitive::U128 => decode_raw::(input, output), + TypeDefPrimitive::Str => decode_raw::(input, output), + TypeDefPrimitive::U8 => decode_raw::(input, output), + TypeDefPrimitive::U16 => decode_raw::(input, output), + TypeDefPrimitive::U32 => decode_raw::(input, output), + TypeDefPrimitive::U64 => decode_raw::(input, output), + TypeDefPrimitive::U128 => decode_raw::(input, output), TypeDefPrimitive::U256 => { Err(EventsDecodingError::UnsupportedPrimitive( TypeDefPrimitive::U256, ) .into()) } - TypeDefPrimitive::I8 => decode_raw::(input, output), - TypeDefPrimitive::I16 => decode_raw::(input, output), - TypeDefPrimitive::I32 => decode_raw::(input, output), - TypeDefPrimitive::I64 => decode_raw::(input, output), - TypeDefPrimitive::I128 => decode_raw::(input, output), + TypeDefPrimitive::I8 => decode_raw::(input, output), + TypeDefPrimitive::I16 => decode_raw::(input, output), + TypeDefPrimitive::I32 => decode_raw::(input, output), + TypeDefPrimitive::I64 => decode_raw::(input, output), + TypeDefPrimitive::I128 => decode_raw::(input, output), TypeDefPrimitive::I256 => { Err(EventsDecodingError::UnsupportedPrimitive( TypeDefPrimitive::I256, @@ -258,20 +258,18 @@ impl EventsDecoder { .ok_or(MetadataError::TypeNotFound(type_id))?; let mut decode_compact_primitive = |primitive: &TypeDefPrimitive| { match primitive { - TypeDefPrimitive::U8 => { - decode_raw::, _>(input, output) - } + TypeDefPrimitive::U8 => decode_raw::>(input, output), TypeDefPrimitive::U16 => { - decode_raw::, _>(input, output) + decode_raw::>(input, output) } TypeDefPrimitive::U32 => { - decode_raw::, _>(input, output) + decode_raw::>(input, output) } TypeDefPrimitive::U64 => { - decode_raw::, _>(input, output) + decode_raw::>(input, output) } TypeDefPrimitive::U128 => { - decode_raw::, _>(input, output) + decode_raw::>(input, output) } prim => { Err(EventsDecodingError::InvalidCompactPrimitive( @@ -394,7 +392,7 @@ mod tests { } } - fn init_decoder(pallets: Vec) -> EventsDecoder { + fn init_decoder(pallets: Vec) -> EventsDecoder { let extrinsic = ExtrinsicMetadata { ty: meta_type::<()>(), version: 0, @@ -403,7 +401,7 @@ mod tests { let v14 = RuntimeMetadataLastVersion::new(pallets, extrinsic, meta_type::<()>()); let runtime_metadata: RuntimeMetadataPrefixed = v14.into(); let metadata = Metadata::try_from(runtime_metadata).unwrap(); - EventsDecoder::::new(metadata) + EventsDecoder::::new(metadata) } #[test] diff --git a/src/extrinsic/mod.rs b/src/extrinsic/mod.rs index ce19367f7f..d87d491f2f 100644 --- a/src/extrinsic/mod.rs +++ b/src/extrinsic/mod.rs @@ -42,33 +42,33 @@ pub use self::{ use sp_runtime::traits::SignedExtension; use crate::{ + error::BasicError, rpc::RuntimeVersion, Config, Encoded, - Error, }; /// UncheckedExtrinsic type. -pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic< +pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic< ::Address, Encoded, ::Signature, - >::Extra, + >::Extra, >; /// SignedPayload type. -pub type SignedPayload = - sp_runtime::generic::SignedPayload>::Extra>; +pub type SignedPayload = + sp_runtime::generic::SignedPayload>::Extra>; /// Creates a signed extrinsic -pub async fn create_signed( +pub async fn create_signed( runtime_version: &RuntimeVersion, genesis_hash: T::Hash, nonce: T::Index, call: Encoded, signer: &(dyn Signer + Send + Sync), additional_params: X::Parameters, -) -> Result, Error> +) -> Result, BasicError> where T: Config, X: SignedExtra, diff --git a/src/lib.rs b/src/lib.rs index 3ecaac4a9b..02077fcd8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,6 +79,7 @@ pub use crate::{ DefaultConfig, }, error::{ + BasicError, Error, PalletError, TransactionError, diff --git a/src/rpc.rs b/src/rpc.rs index 9dfc07ec3f..ebe2ad0741 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -27,7 +27,7 @@ use std::{ }; use crate::{ - error::Error, + error::BasicError, storage::StorageKeyPrefix, subscription::{ EventStorageSubscription, @@ -301,13 +301,13 @@ pub struct ReadProof { } /// Client for substrate rpc interfaces -pub struct Rpc { +pub struct Rpc { /// Rpc client for sending requests. pub client: RpcClient, - marker: PhantomData<(T, E)>, + marker: PhantomData, } -impl Clone for Rpc { +impl Clone for Rpc { fn clone(&self) -> Self { Self { client: self.client.clone(), @@ -316,7 +316,7 @@ impl Clone for Rpc { } } -impl Rpc { +impl Rpc { /// Create a new [`Rpc`] pub fn new(client: RpcClient) -> Self { Self { @@ -330,7 +330,7 @@ impl Rpc { &self, key: &StorageKey, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let params = &[to_json_value(key)?, to_json_value(hash)?]; let data = self.client.request("state_getStorage", params).await?; Ok(data) @@ -345,7 +345,7 @@ impl Rpc { count: u32, start_key: Option, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let prefix = prefix.map(|p| p.to_storage_key()); let params = &[ to_json_value(prefix)?, @@ -363,7 +363,7 @@ impl Rpc { keys: Vec, from: T::Hash, to: Option, - ) -> Result>, Error> { + ) -> Result>, BasicError> { let params = &[ to_json_value(keys)?, to_json_value(from)?, @@ -380,7 +380,7 @@ impl Rpc { &self, keys: &[StorageKey], at: Option, - ) -> Result>, Error> { + ) -> Result>, BasicError> { let params = &[to_json_value(keys)?, to_json_value(at)?]; self.client .request("state_queryStorageAt", params) @@ -389,7 +389,7 @@ impl Rpc { } /// Fetch the genesis hash - pub async fn genesis_hash(&self) -> Result> { + pub async fn genesis_hash(&self) -> Result { let block_zero = Some(ListOrValue::Value(NumberOrHex::Number(0))); let params = &[to_json_value(block_zero)?]; let list_or_value: ListOrValue> = @@ -403,7 +403,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", &[]).await?; let meta: RuntimeMetadataPrefixed = Decode::decode(&mut &bytes[..])?; let metadata: Metadata = meta.try_into()?; @@ -411,22 +411,22 @@ 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", &[]).await?) } /// Fetch system chain - pub async fn system_chain(&self) -> Result> { + pub async fn system_chain(&self) -> Result { Ok(self.client.request("system_chain", &[]).await?) } /// Fetch system name - pub async fn system_name(&self) -> Result> { + pub async fn system_name(&self) -> Result { Ok(self.client.request("system_name", &[]).await?) } /// Fetch system version - pub async fn system_version(&self) -> Result> { + pub async fn system_version(&self) -> Result { Ok(self.client.request("system_version", &[]).await?) } @@ -434,7 +434,7 @@ impl Rpc { pub async fn header( &self, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let params = &[to_json_value(hash)?]; let header = self.client.request("chain_getHeader", params).await?; Ok(header) @@ -444,7 +444,7 @@ impl Rpc { pub async fn block_hash( &self, block_number: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let block_number = block_number.map(ListOrValue::Value); let params = &[to_json_value(block_number)?]; let list_or_value = self.client.request("chain_getBlockHash", params).await?; @@ -455,7 +455,7 @@ impl Rpc { } /// 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", &[]).await?; Ok(hash) } @@ -464,7 +464,7 @@ impl Rpc { pub async fn block( &self, hash: Option, - ) -> Result>, Error> { + ) -> Result>, BasicError> { let params = &[to_json_value(hash)?]; let block = self.client.request("chain_getBlock", params).await?; Ok(block) @@ -475,7 +475,7 @@ impl Rpc { &self, keys: Vec, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let params = &[to_json_value(keys)?, to_json_value(hash)?]; let proof = self.client.request("state_getReadProof", params).await?; Ok(proof) @@ -485,7 +485,7 @@ impl Rpc { pub async fn runtime_version( &self, at: Option, - ) -> Result> { + ) -> Result { let params = &[to_json_value(at)?]; let version = self .client @@ -500,7 +500,7 @@ impl Rpc { /// `subscribe_finalized_events` to ensure events are finalized. pub async fn subscribe_events( &self, - ) -> Result, Error> { + ) -> Result, BasicError> { let keys = Some(vec![StorageKey::from(SystemEvents::new())]); let params = &[to_json_value(keys)?]; @@ -514,7 +514,7 @@ impl Rpc { /// Subscribe to finalized events. pub async fn subscribe_finalized_events( &self, - ) -> Result, Error> { + ) -> Result, BasicError> { Ok(EventStorageSubscription::Finalized( FinalizedEventStorageSubscription::new( self.clone(), @@ -524,7 +524,7 @@ impl Rpc { } /// Subscribe to blocks. - pub async fn subscribe_blocks(&self) -> Result, Error> { + pub async fn subscribe_blocks(&self) -> Result, BasicError> { let subscription = self .client .subscribe("chain_subscribeNewHeads", &[], "chain_unsubscribeNewHeads") @@ -536,7 +536,7 @@ impl Rpc { /// Subscribe to finalized blocks. pub async fn subscribe_finalized_blocks( &self, - ) -> Result, Error> { + ) -> Result, BasicError> { let subscription = self .client .subscribe( @@ -552,7 +552,7 @@ impl Rpc { pub async fn submit_extrinsic( &self, extrinsic: X, - ) -> Result> { + ) -> Result { let bytes: Bytes = extrinsic.encode().into(); let params = &[to_json_value(bytes)?]; let xt_hash = self @@ -566,7 +566,7 @@ impl Rpc { pub async fn watch_extrinsic( &self, extrinsic: X, - ) -> Result>, Error> + ) -> Result>, BasicError> { let bytes: Bytes = extrinsic.encode().into(); let params = &[to_json_value(bytes)?]; @@ -587,7 +587,7 @@ impl Rpc { key_type: String, suri: String, public: Bytes, - ) -> Result<(), Error> { + ) -> Result<(), BasicError> { let params = &[ to_json_value(key_type)?, to_json_value(suri)?, @@ -598,7 +598,7 @@ impl Rpc { } /// Generate new session keys and returns the corresponding public keys. - pub async fn rotate_keys(&self) -> Result> { + pub async fn rotate_keys(&self) -> Result { Ok(self.client.request("author_rotateKeys", &[]).await?) } @@ -607,7 +607,10 @@ impl Rpc { /// `session_keys` is the SCALE encoded session keys object from the runtime. /// /// Returns `true` iff all private keys could be found. - pub async fn has_session_keys(&self, session_keys: Bytes) -> Result> { + pub async fn has_session_keys( + &self, + session_keys: Bytes, + ) -> Result { let params = &[to_json_value(session_keys)?]; Ok(self.client.request("author_hasSessionKeys", params).await?) } @@ -619,7 +622,7 @@ impl Rpc { &self, public_key: Bytes, key_type: String, - ) -> Result> { + ) -> Result { let params = &[to_json_value(public_key)?, to_json_value(key_type)?]; Ok(self.client.request("author_hasKey", params).await?) } diff --git a/src/storage.rs b/src/storage.rs index 0cd552d9ba..3d1b6f11e2 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -30,14 +30,13 @@ pub use sp_version::RuntimeVersion; use std::marker::PhantomData; use crate::{ + error::BasicError, metadata::{ Metadata, MetadataError, }, rpc::Rpc, Config, - Error, - PhantomDataSendSync, StorageHasher, }; @@ -133,32 +132,29 @@ impl StorageMapKey { } /// Client for querying runtime storage. -pub struct StorageClient<'a, T: Config, E> { - rpc: &'a Rpc, +pub struct StorageClient<'a, T: Config> { + rpc: &'a Rpc, metadata: &'a Metadata, iter_page_size: u32, - _error: PhantomDataSendSync, } -impl<'a, T: Config, E> Clone for StorageClient<'a, T, E> { +impl<'a, T: Config> Clone for StorageClient<'a, T> { fn clone(&self) -> Self { Self { rpc: self.rpc, metadata: self.metadata, iter_page_size: self.iter_page_size, - _error: PhantomDataSendSync::new(), } } } -impl<'a, T: Config, E> StorageClient<'a, T, E> { +impl<'a, T: Config> StorageClient<'a, T> { /// Create a new [`StorageClient`] - pub fn new(rpc: &'a Rpc, metadata: &'a Metadata, iter_page_size: u32) -> Self { + pub fn new(rpc: &'a Rpc, metadata: &'a Metadata, iter_page_size: u32) -> Self { Self { rpc, metadata, iter_page_size, - _error: PhantomDataSendSync::new(), } } @@ -167,7 +163,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { &self, key: StorageKey, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { if let Some(data) = self.rpc.storage(&key, hash).await? { Ok(Some(Decode::decode(&mut &data.0[..])?)) } else { @@ -180,7 +176,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { &self, key: StorageKey, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { self.rpc.storage(&key, hash).await } @@ -189,7 +185,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { &self, store: &F, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let prefix = StorageKeyPrefix::new::(); let key = store.key().final_key(prefix); self.fetch_unhashed::(key, hash).await @@ -200,7 +196,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { &self, store: &F, hash: Option, - ) -> Result> { + ) -> Result { if let Some(data) = self.fetch(store, hash).await? { Ok(data) } else { @@ -218,7 +214,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { keys: Vec, from: T::Hash, to: Option, - ) -> Result>, Error> { + ) -> Result>, BasicError> { self.rpc.query_storage(keys, from, to).await } @@ -230,7 +226,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { count: u32, start_key: Option, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let prefix = StorageKeyPrefix::new::(); let keys = self .rpc @@ -243,7 +239,7 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { pub async fn iter( &self, hash: Option, - ) -> Result, Error> { + ) -> Result, BasicError> { let hash = if let Some(hash) = hash { hash } else { @@ -264,8 +260,8 @@ impl<'a, T: Config, E> StorageClient<'a, T, E> { } /// Iterates over key value pairs in a map. -pub struct KeyIter<'a, T: Config, F: StorageEntry, E> { - client: StorageClient<'a, T, E>, +pub struct KeyIter<'a, T: Config, F: StorageEntry> { + client: StorageClient<'a, T>, _marker: PhantomData, count: u32, hash: T::Hash, @@ -273,9 +269,9 @@ pub struct KeyIter<'a, T: Config, F: StorageEntry, E> { buffer: Vec<(StorageKey, StorageData)>, } -impl<'a, T: Config, F: StorageEntry, E> KeyIter<'a, T, F, E> { +impl<'a, T: Config, F: StorageEntry> KeyIter<'a, T, F> { /// Returns the next key value pair from a map. - pub async fn next(&mut self) -> Result, Error> { + 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[..])?))) diff --git a/src/subscription.rs b/src/subscription.rs index 23b79382cd..307bfea222 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -15,7 +15,7 @@ // along with subxt. If not, see . use crate::{ - error::Error, + error::BasicError, events::{ EventsDecoder, RawEvent, @@ -25,7 +25,6 @@ use crate::{ Event, Phase, }; -use codec::Decode; use jsonrpsee::core::{ client::Subscription, DeserializeOwned, @@ -42,8 +41,8 @@ use std::collections::VecDeque; /// Event subscription simplifies filtering a storage change set stream for /// events of interest. -pub struct EventSubscription<'a, T: Config, E: Decode> { - block_reader: BlockReader<'a, T, E>, +pub struct EventSubscription<'a, T: Config> { + block_reader: BlockReader<'a, T>, block: Option, extrinsic: Option, event: Option<(&'static str, &'static str)>, @@ -51,20 +50,20 @@ pub struct EventSubscription<'a, T: Config, E: Decode> { finished: bool, } -enum BlockReader<'a, T: Config, E: Decode> { +enum BlockReader<'a, T: Config> { Decoder { - subscription: EventStorageSubscription, - decoder: &'a EventsDecoder, + subscription: EventStorageSubscription, + decoder: &'a EventsDecoder, }, /// Mock event listener for unit tests #[cfg(test)] - Mock(Box, Error>)>>), + Mock(Box, BasicError>)>>), } -impl<'a, T: Config, E: Decode> BlockReader<'a, T, E> { +impl<'a, T: Config> BlockReader<'a, T> { async fn next( &mut self, - ) -> Option<(T::Hash, Result, Error>)> { + ) -> Option<(T::Hash, Result, BasicError>)> { match self { BlockReader::Decoder { subscription, @@ -88,11 +87,11 @@ impl<'a, T: Config, E: Decode> BlockReader<'a, T, E> { } } -impl<'a, T: Config, E: Decode> EventSubscription<'a, T, E> { +impl<'a, T: Config> EventSubscription<'a, T> { /// Creates a new event subscription. pub fn new( - subscription: EventStorageSubscription, - decoder: &'a EventsDecoder, + subscription: EventStorageSubscription, + decoder: &'a EventsDecoder, ) -> Self { Self { block_reader: BlockReader::Decoder { @@ -124,7 +123,7 @@ impl<'a, T: Config, E: Decode> EventSubscription<'a, T, E> { } /// Gets the next event. - pub async fn next(&mut self) -> Option>> { + pub async fn next(&mut self) -> Option> { loop { if let Some(raw_event) = self.events.pop_front() { return Some(Ok(raw_event)) @@ -183,16 +182,16 @@ impl From for StorageKey { } /// Event subscription to only fetch finalized storage changes. -pub struct FinalizedEventStorageSubscription { - rpc: Rpc, +pub struct FinalizedEventStorageSubscription { + rpc: Rpc, subscription: Subscription, storage_changes: VecDeque>, storage_key: StorageKey, } -impl FinalizedEventStorageSubscription { +impl FinalizedEventStorageSubscription { /// Creates a new finalized event storage subscription. - pub fn new(rpc: Rpc, subscription: Subscription) -> Self { + pub fn new(rpc: Rpc, subscription: Subscription) -> Self { Self { rpc, subscription, @@ -221,14 +220,14 @@ impl FinalizedEventStorageSubscription { } /// Wrapper over imported and finalized event subscriptions. -pub enum EventStorageSubscription { +pub enum EventStorageSubscription { /// Events that are InBlock Imported(Subscription>), /// Events that are Finalized - Finalized(FinalizedEventStorageSubscription), + Finalized(FinalizedEventStorageSubscription), } -impl EventStorageSubscription { +impl EventStorageSubscription { /// Gets the next change_set from the subscription. pub async fn next(&mut self) -> Option> { match self { @@ -301,7 +300,7 @@ mod tests { for block_filter in [None, Some(H256::from([1; 32]))] { for extrinsic_filter in [None, Some(1)] { for event_filter in [None, Some(("b", "b"))] { - let mut subscription: EventSubscription = + let mut subscription: EventSubscription = EventSubscription { block_reader: BlockReader::Mock(Box::new( vec![ diff --git a/src/transaction.rs b/src/transaction.rs index b9ab28a291..9b12831b6e 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -26,7 +26,9 @@ pub use sp_version::RuntimeVersion; use crate::{ client::Client, error::{ + BasicError, Error, + RuntimeError, TransactionError, }, rpc::SubstrateTransactionStatus, @@ -51,7 +53,8 @@ use jsonrpsee::core::{ pub struct TransactionProgress<'client, T: Config, E: Decode> { sub: Option>>, ext_hash: T::Hash, - client: &'client Client, + client: &'client Client, + _error: PhantomDataSendSync, } // The above type is not `Unpin` by default unless the generic param `T` is, @@ -62,13 +65,14 @@ impl<'client, T: Config, E: Decode> Unpin for TransactionProgress<'client, T, E> impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { pub(crate) fn new( sub: RpcSubscription>, - client: &'client Client, + client: &'client Client, ext_hash: T::Hash, ) -> Self { Self { sub: Some(sub), client, ext_hash, + _error: PhantomDataSendSync::new(), } } @@ -77,7 +81,7 @@ impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { /// avoid importing that trait if you don't otherwise need it. pub async fn next_item( &mut self, - ) -> Option, Error>> { + ) -> Option, BasicError>> { self.next().await } @@ -94,7 +98,7 @@ impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_in_block( mut self, - ) -> Result, Error> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. @@ -124,7 +128,7 @@ impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { /// level [`TransactionProgress::next_item()`] API if you'd like to handle these statuses yourself. pub async fn wait_for_finalized( mut self, - ) -> Result, Error> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. @@ -153,14 +157,14 @@ impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { /// 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> Stream for TransactionProgress<'client, T, E> { - type Item = Result, Error>; + type Item = Result, BasicError>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -181,11 +185,11 @@ impl<'client, T: Config, E: Decode> Stream for TransactionProgress<'client, T, E TransactionStatus::Broadcast(peers) } SubstrateTransactionStatus::InBlock(hash) => { - TransactionStatus::InBlock(TransactionInBlock { - block_hash: hash, - ext_hash: self.ext_hash, - client: self.client, - }) + TransactionStatus::InBlock(TransactionInBlock::new( + hash, + self.ext_hash, + self.client, + )) } SubstrateTransactionStatus::Retracted(hash) => { TransactionStatus::Retracted(hash) @@ -210,11 +214,11 @@ impl<'client, T: Config, E: Decode> Stream for TransactionProgress<'client, T, E } SubstrateTransactionStatus::Finalized(hash) => { self.sub = None; - TransactionStatus::Finalized(TransactionInBlock { - block_hash: hash, - ext_hash: self.ext_hash, - client: self.client, - }) + TransactionStatus::Finalized(TransactionInBlock::new( + hash, + self.ext_hash, + self.client, + )) } } }) @@ -322,10 +326,24 @@ impl<'client, T: Config, E: Decode> TransactionStatus<'client, T, E> { pub struct TransactionInBlock<'client, T: Config, E: Decode> { block_hash: T::Hash, ext_hash: T::Hash, - client: &'client Client, + client: &'client Client, + _error: PhantomDataSendSync, } impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { + pub(crate) fn new( + block_hash: T::Hash, + ext_hash: T::Hash, + client: &'client Client, + ) -> Self { + Self { + block_hash, + ext_hash, + client, + _error: PhantomDataSendSync::new(), + } + } + /// Return the hash of the block that the transaction has made it into. pub fn block_hash(&self) -> T::Hash { self.block_hash @@ -349,14 +367,14 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { /// /// **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.as_slice() { if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { let dispatch_error = E::decode(&mut &*ev.data)?; - return Err(Error::Runtime(dispatch_error)) + return Err(Error::Runtime(RuntimeError(dispatch_error))) } } @@ -369,13 +387,13 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn fetch_events(&self) -> Result, Error> { + pub async fn fetch_events(&self) -> Result, Error> { let block = self .client .rpc() .block(Some(self.block_hash)) .await? - .ok_or(Error::Transaction(TransactionError::BlockHashNotFound))?; + .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; let extrinsic_idx = block.block.extrinsics .iter() @@ -385,7 +403,7 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { }) // If we successfully obtain the block hash we think contains our // extrinsic, the extrinsic should be in there somewhere.. - .ok_or(Error::Transaction(TransactionError::BlockHashNotFound))?; + .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; let raw_events = self .client @@ -413,7 +431,6 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { block_hash: self.block_hash, ext_hash: self.ext_hash, events, - _error: PhantomDataSendSync::new(), }) } } @@ -422,14 +439,13 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { /// We can iterate over the events, or look for a specific one. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionEvents { +pub struct TransactionEvents { block_hash: T::Hash, ext_hash: T::Hash, events: Vec, - _error: PhantomDataSendSync, } -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.block_hash @@ -447,7 +463,7 @@ impl TransactionEvents { /// Find all of the events matching the event type provided as a generic parameter. This /// will return an error if a matching event is found but cannot be properly decoded. - pub fn find_events(&self) -> Result, Error> { + pub fn find_events(&self) -> Result, BasicError> { self.events .iter() .filter_map(|e| e.as_event::().map_err(Into::into).transpose()) @@ -459,7 +475,7 @@ impl TransactionEvents { /// /// Use [`TransactionEvents::find_events`], or iterate over [`TransactionEvents`] yourself /// if you'd like to handle multiple events of the same type. - pub fn find_first_event(&self) -> Result, Error> { + pub fn find_first_event(&self) -> Result, BasicError> { self.events .iter() .filter_map(|e| e.as_event::().transpose()) @@ -469,12 +485,12 @@ impl TransactionEvents { } /// Find an event. Returns true if it was found. - pub fn has_event(&self) -> Result> { + pub fn has_event(&self) -> Result { Ok(self.find_first_event::()?.is_some()) } } -impl std::ops::Deref for TransactionEvents { +impl std::ops::Deref for TransactionEvents { type Target = [crate::RawEvent]; fn deref(&self) -> &Self::Target { &self.events diff --git a/tests/integration/codegen/polkadot.rs b/tests/integration/codegen/polkadot.rs index bf942ce72b..32029ab5a4 100644 --- a/tests/integration/codegen/polkadot.rs +++ b/tests/integration/codegen/polkadot.rs @@ -6,8 +6,6 @@ pub mod api { System(system::Event), #[codec(index = 1)] Scheduler(scheduler::Event), - #[codec(index = 10)] - Preimage(preimage::Event), #[codec(index = 4)] Indices(indices::Event), #[codec(index = 5)] @@ -52,8 +50,6 @@ pub mod api { Tips(tips::Event), #[codec(index = 36)] ElectionProviderMultiPhase(election_provider_multi_phase::Event), - #[codec(index = 37)] - BagsList(bags_list::Event), #[codec(index = 53)] ParaInclusion(para_inclusion::Event), #[codec(index = 56)] @@ -70,8 +66,6 @@ pub mod api { Auctions(auctions::Event), #[codec(index = 73)] Crowdloan(crowdloan::Event), - #[codec(index = 99)] - XcmPallet(xcm_pallet::Event), } pub mod system { use super::runtime_types; @@ -119,6 +113,16 @@ pub mod api { const FUNCTION: &'static str = "set_code_without_checks"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SetChangesTrieConfig { + pub changes_trie_config: ::core::option::Option< + runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, + >, + } + impl ::subxt::Call for SetChangesTrieConfig { + const PALLET: &'static str = "System"; + const FUNCTION: &'static str = "set_changes_trie_config"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetStorage { pub items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, @@ -155,7 +159,7 @@ pub mod api { const FUNCTION: &'static str = "remark_with_event"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -164,7 +168,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -216,6 +220,24 @@ pub mod api { let call = SetCodeWithoutChecks { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn set_changes_trie_config( + &self, + changes_trie_config: ::core::option::Option< + runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, + >, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + SetChangesTrieConfig, + DispatchError, + > { + let call = SetChangesTrieConfig { + changes_trie_config, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } pub fn set_storage( &self, items: ::std::vec::Vec<( @@ -264,18 +286,18 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExtrinsicSuccess { - pub dispatch_info: runtime_types::frame_support::weights::DispatchInfo, - } + pub struct ExtrinsicSuccess( + pub runtime_types::frame_support::weights::DispatchInfo, + ); impl ::subxt::Event for ExtrinsicSuccess { const PALLET: &'static str = "System"; const EVENT: &'static str = "ExtrinsicSuccess"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExtrinsicFailed { - pub dispatch_error: runtime_types::sp_runtime::DispatchError, - pub dispatch_info: runtime_types::frame_support::weights::DispatchInfo, - } + pub struct ExtrinsicFailed( + pub runtime_types::sp_runtime::DispatchError, + pub runtime_types::frame_support::weights::DispatchInfo, + ); impl ::subxt::Event for ExtrinsicFailed { const PALLET: &'static str = "System"; const EVENT: &'static str = "ExtrinsicFailed"; @@ -287,26 +309,22 @@ pub mod api { const EVENT: &'static str = "CodeUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewAccount { - pub account: ::subxt::sp_core::crypto::AccountId32, - } + pub struct NewAccount(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for NewAccount { const PALLET: &'static str = "System"; const EVENT: &'static str = "NewAccount"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct KilledAccount { - pub account: ::subxt::sp_core::crypto::AccountId32, - } + pub struct KilledAccount(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for KilledAccount { const PALLET: &'static str = "System"; const EVENT: &'static str = "KilledAccount"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Remarked { - pub sender: ::subxt::sp_core::crypto::AccountId32, - pub hash: ::subxt::sp_core::H256, - } + pub struct Remarked( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::H256, + ); impl ::subxt::Event for Remarked { const PALLET: &'static str = "System"; const EVENT: &'static str = "Remarked"; @@ -314,7 +332,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Account(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Account { const PALLET: &'static str = "System"; @@ -405,7 +422,9 @@ pub mod api { impl ::subxt::StorageEntry for Digest { const PALLET: &'static str = "System"; const STORAGE: &'static str = "Digest"; - type Value = runtime_types::sp_runtime::generic::digest::Digest; + type Value = runtime_types::sp_runtime::generic::digest::Digest< + ::subxt::sp_core::H256, + >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -483,10 +502,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn account( @@ -500,7 +519,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Account(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -509,8 +528,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Account, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Account>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -519,7 +538,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ExtrinsicCount; self.client.storage().fetch(&entry, hash).await @@ -531,7 +550,7 @@ pub mod api { runtime_types::frame_support::weights::PerDispatchClass< ::core::primitive::u64, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = BlockWeight; self.client.storage().fetch_or_default(&entry, hash).await @@ -541,7 +560,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = AllExtrinsicsLen; self.client.storage().fetch(&entry, hash).await @@ -550,10 +569,8 @@ pub mod api { &self, _0: ::core::primitive::u32, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::sp_core::H256, - ::subxt::Error, - > { + ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::BasicError> + { let entry = BlockHash(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -561,8 +578,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BlockHash, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, BlockHash>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -572,7 +589,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ExtrinsicData(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -581,28 +598,24 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ExtrinsicData, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ExtrinsicData>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn number( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = Number; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn parent_hash( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::sp_core::H256, - ::subxt::Error, - > { + ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::BasicError> + { let entry = ParentHash; self.client.storage().fetch_or_default(&entry, hash).await } @@ -610,8 +623,10 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::sp_runtime::generic::digest::Digest, - ::subxt::Error, + runtime_types::sp_runtime::generic::digest::Digest< + ::subxt::sp_core::H256, + >, + ::subxt::BasicError, > { let entry = Digest; self.client.storage().fetch_or_default(&entry, hash).await @@ -626,7 +641,7 @@ pub mod api { ::subxt::sp_core::H256, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Events; self.client.storage().fetch_or_default(&entry, hash).await @@ -634,10 +649,8 @@ pub mod api { pub async fn event_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = EventCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -647,7 +660,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = EventTopics(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -656,8 +669,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, EventTopics, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, EventTopics>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -668,7 +681,7 @@ pub mod api { ::core::option::Option< runtime_types::frame_system::LastRuntimeUpgradeInfo, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = LastRuntimeUpgrade; self.client.storage().fetch(&entry, hash).await @@ -676,20 +689,16 @@ pub mod api { pub async fn upgraded_to_u32_ref_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = UpgradedToU32RefCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn upgraded_to_triple_ref_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = UpgradedToTripleRefCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -698,7 +707,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ExecutionPhase; self.client.storage().fetch(&entry, hash).await @@ -719,10 +728,7 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + pub call: runtime_types::polkadot_runtime::Call, } impl ::subxt::Call for Schedule { const PALLET: &'static str = "Scheduler"; @@ -746,10 +752,7 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + pub call: runtime_types::polkadot_runtime::Call, } impl ::subxt::Call for ScheduleNamed { const PALLET: &'static str = "Scheduler"; @@ -771,10 +774,7 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + pub call: runtime_types::polkadot_runtime::Call, } impl ::subxt::Call for ScheduleAfter { const PALLET: &'static str = "Scheduler"; @@ -789,17 +789,14 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + pub call: runtime_types::polkadot_runtime::Call, } 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, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -808,7 +805,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -822,10 +819,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + call: runtime_types::polkadot_runtime::Call, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Schedule, DispatchError> { let call = Schedule { @@ -854,10 +848,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + call: runtime_types::polkadot_runtime::Call, ) -> ::subxt::SubmittableExtrinsic< 'a, T, @@ -891,10 +882,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + call: runtime_types::polkadot_runtime::Call, ) -> ::subxt::SubmittableExtrinsic< 'a, T, @@ -920,10 +908,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, + call: runtime_types::polkadot_runtime::Call, ) -> ::subxt::SubmittableExtrinsic< 'a, T, @@ -947,59 +932,38 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Scheduled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } + pub struct Scheduled(pub ::core::primitive::u32, pub ::core::primitive::u32); impl ::subxt::Event for Scheduled { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Scheduled"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Canceled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } + pub struct Canceled(pub ::core::primitive::u32, pub ::core::primitive::u32); impl ::subxt::Event for Canceled { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Canceled"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Dispatched { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct Dispatched( + pub (::core::primitive::u32, ::core::primitive::u32), + pub ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for Dispatched { const PALLET: &'static str = "Scheduler"; const EVENT: &'static str = "Dispatched"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - 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 { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "CallLookupFailed"; - } } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Agenda(pub ::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, - >, + runtime_types::pallet_scheduler::ScheduledV2< + runtime_types::polkadot_runtime::Call, ::core::primitive::u32, runtime_types::polkadot_runtime::OriginCaller, ::subxt::sp_core::crypto::AccountId32, @@ -1035,12 +999,29 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn agenda (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: 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 :: Error < DispatchError >>{ + } + pub async fn agenda( + &self, + _0: ::core::primitive::u32, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec< + ::core::option::Option< + runtime_types::pallet_scheduler::ScheduledV2< + runtime_types::polkadot_runtime::Call, + ::core::primitive::u32, + runtime_types::polkadot_runtime::OriginCaller, + ::subxt::sp_core::crypto::AccountId32, + >, + >, + >, + ::subxt::BasicError, + > { let entry = Agenda(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -1048,8 +1029,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Agenda, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Agenda>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -1062,7 +1043,7 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Lookup(_0); self.client.storage().fetch(&entry, hash).await @@ -1071,8 +1052,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Lookup, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Lookup>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -1081,7 +1062,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_scheduler::Releases, - ::subxt::Error, + ::subxt::BasicError, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -1089,45 +1070,54 @@ pub mod api { } } } - pub mod preimage { + pub mod babe { use super::runtime_types; pub mod calls { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct UnnotePreimage { - pub hash: ::subxt::sp_core::H256, + pub struct ReportEquivocation { + pub 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, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for UnnotePreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "unnote_preimage"; + impl ::subxt::Call for ReportEquivocation { + const PALLET: &'static str = "Babe"; + const FUNCTION: &'static str = "report_equivocation"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RequestPreimage { - pub hash: ::subxt::sp_core::H256, + pub struct ReportEquivocationUnsigned { + pub 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, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for RequestPreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "request_preimage"; + impl ::subxt::Call for ReportEquivocationUnsigned { + const PALLET: &'static str = "Babe"; + const FUNCTION: &'static str = "report_equivocation_unsigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct UnrequestPreimage { - pub hash: ::subxt::sp_core::H256, + pub struct PlanConfigChange { + pub config: + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, } - impl ::subxt::Call for UnrequestPreimage { - const PALLET: &'static str = "Preimage"; - const FUNCTION: &'static str = "unrequest_preimage"; + 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, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -1136,335 +1126,100 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, } } - pub fn note_preimage( - &self, - bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NotePreimage, DispatchError> - { - let call = NotePreimage { bytes }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn unnote_preimage( + pub fn report_equivocation( &self, - hash: ::subxt::sp_core::H256, + 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::SubmittableExtrinsic< 'a, T, X, A, - UnnotePreimage, + ReportEquivocation, DispatchError, > { - let call = UnnotePreimage { hash }; + let call = ReportEquivocation { + equivocation_proof, + key_owner_proof, + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn request_preimage( + pub fn report_equivocation_unsigned( &self, - hash: ::subxt::sp_core::H256, + 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::SubmittableExtrinsic< 'a, T, X, A, - RequestPreimage, + ReportEquivocationUnsigned, DispatchError, > { - let call = RequestPreimage { hash }; + let call = ReportEquivocationUnsigned { + equivocation_proof, + key_owner_proof, + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn unrequest_preimage( + pub fn plan_config_change( &self, - hash: ::subxt::sp_core::H256, + config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - UnrequestPreimage, + PlanConfigChange, DispatchError, > { - let call = UnrequestPreimage { hash }; + let call = PlanConfigChange { config }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub type Event = runtime_types::pallet_preimage::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Noted { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Event for Noted { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Noted"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Requested { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Event for Requested { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Requested"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Cleared { - pub hash: ::subxt::sp_core::H256, - } - impl ::subxt::Event for Cleared { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Cleared"; - } - } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct StatusFor(pub ::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, - >; + 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::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) + ::subxt::StorageEntryKey::Plain } } - pub struct PreimageFor(pub ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for PreimageFor { - const PALLET: &'static str = "Preimage"; - const STORAGE: &'static str = "PreimageFor"; - type Value = - runtime_types::frame_support::storage::bounded_vec::BoundedVec< - ::core::primitive::u8, - >; + pub struct Authorities; + impl ::subxt::StorageEntry for Authorities { + const PALLET: &'static str = "Babe"; + const STORAGE: &'static str = "Authorities"; + type Value = runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > ; fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) + ::subxt::StorageEntryKey::Plain } } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + 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 + } } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn status_for( - &self, - _0: ::subxt::sp_core::H256, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_preimage::RequestStatus< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::Error, - > { - let entry = StatusFor(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn status_for_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, StatusFor, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn preimage_for( - &self, - _0: ::subxt::sp_core::H256, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option< - runtime_types::frame_support::storage::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::Error, - > { - let entry = PreimageFor(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn preimage_for_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PreimageFor, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - } - } - } - pub mod babe { - use super::runtime_types; - pub mod calls { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReportEquivocation { - pub 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, - >, - 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReportEquivocationUnsigned { - pub 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, - >, - 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 :: Encode, :: subxt :: codec :: Decode, 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, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(X, A)>, - } - impl<'a, T, X, A> TransactionApi<'a, T, X, A> - where - T: ::subxt::Config, - X: ::subxt::SignedExtra, - A: ::subxt::AccountData, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - pub fn report_equivocation( - &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::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReportEquivocation, - DispatchError, - > { - let call = ReportEquivocation { - equivocation_proof, - key_owner_proof, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn report_equivocation_unsigned( - &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::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReportEquivocationUnsigned, - DispatchError, - > { - let call = ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn plan_config_change( - &self, - config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - PlanConfigChange, - DispatchError, - > { - let call = PlanConfigChange { config }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - } - } - pub mod storage { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - 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 = runtime_types :: frame_support :: storage :: 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 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; @@ -1583,22 +1338,20 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn epoch_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u64, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { let entry = EpochIndex; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: Error < DispatchError >>{ + } pub async fn authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: BasicError >{ let entry = Authorities; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1607,7 +1360,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_consensus_slots::Slot, - ::subxt::Error, + ::subxt::BasicError, > { let entry = GenesisSlot; self.client.storage().fetch_or_default(&entry, hash).await @@ -1617,7 +1370,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_consensus_slots::Slot, - ::subxt::Error, + ::subxt::BasicError, > { let entry = CurrentSlot; self.client.storage().fetch_or_default(&entry, hash).await @@ -1627,7 +1380,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< [::core::primitive::u8; 32usize], - ::subxt::Error, + ::subxt::BasicError, > { let entry = Randomness; self.client.storage().fetch_or_default(&entry, hash).await @@ -1639,7 +1392,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PendingEpochConfigChange; self.client.storage().fetch(&entry, hash).await @@ -1649,21 +1402,19 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< [::core::primitive::u8; 32usize], - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextRandomness; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn next_authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: Error < DispatchError >>{ + } pub async fn next_authorities (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_consensus_babe :: app :: Public , :: core :: primitive :: u64 ,) > , :: subxt :: BasicError >{ let entry = NextAuthorities; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn segment_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = SegmentIndex; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1675,7 +1426,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< [::core::primitive::u8; 32usize], >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = UnderConstruction(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -1684,8 +1435,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UnderConstruction, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UnderConstruction>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -1696,7 +1447,7 @@ pub mod api { ::core::option::Option< ::core::option::Option<[::core::primitive::u8; 32usize]>, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Initialized; self.client.storage().fetch(&entry, hash).await @@ -1706,7 +1457,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<[::core::primitive::u8; 32usize]>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = AuthorVrfRandomness; self.client.storage().fetch_or_default(&entry, hash).await @@ -1716,7 +1467,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< (::core::primitive::u32, ::core::primitive::u32), - ::subxt::Error, + ::subxt::BasicError, > { let entry = EpochStart; self.client.storage().fetch_or_default(&entry, hash).await @@ -1724,10 +1475,8 @@ pub mod api { pub async fn lateness( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = Lateness; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1738,7 +1487,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_consensus_babe::BabeEpochConfiguration, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = EpochConfig; self.client.storage().fetch(&entry, hash).await @@ -1750,7 +1499,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_consensus_babe::BabeEpochConfiguration, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextEpochConfig; self.client.storage().fetch(&entry, hash).await @@ -1773,7 +1522,7 @@ pub mod api { const FUNCTION: &'static str = "set"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -1782,7 +1531,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -1800,7 +1549,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Now; impl ::subxt::StorageEntry for Now { const PALLET: &'static str = "Timestamp"; @@ -1820,29 +1568,25 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn now( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u64, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { let entry = Now; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn did_update( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = DidUpdate; self.client.storage().fetch_or_default(&entry, hash).await } @@ -1898,7 +1642,7 @@ pub mod api { const FUNCTION: &'static str = "freeze"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -1907,7 +1651,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -1968,27 +1712,25 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IndexAssigned { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub index: ::core::primitive::u32, - } + pub struct IndexAssigned( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for IndexAssigned { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexAssigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IndexFreed { - pub index: ::core::primitive::u32, - } + pub struct IndexFreed(pub ::core::primitive::u32); impl ::subxt::Event for IndexFreed { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexFreed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IndexFrozen { - pub index: ::core::primitive::u32, - pub who: ::subxt::sp_core::crypto::AccountId32, - } + pub struct IndexFrozen( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, + ); impl ::subxt::Event for IndexFrozen { const PALLET: &'static str = "Indices"; const EVENT: &'static str = "IndexFrozen"; @@ -1996,7 +1738,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Accounts(pub ::core::primitive::u32); impl ::subxt::StorageEntry for Accounts { const PALLET: &'static str = "Indices"; @@ -2014,10 +1755,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn accounts( @@ -2030,7 +1771,7 @@ pub mod api { ::core::primitive::u128, ::core::primitive::bool, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Accounts(_0); self.client.storage().fetch(&entry, hash).await @@ -2039,8 +1780,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Accounts, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Accounts>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -2135,7 +1876,7 @@ pub mod api { const FUNCTION: &'static str = "force_unreserve"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -2144,7 +1885,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -2259,104 +2000,84 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Endowed { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub free_balance: ::core::primitive::u128, - } + pub struct Endowed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for Endowed { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Endowed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct DustLost { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } + pub struct DustLost( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for DustLost { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "DustLost"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Transfer { - pub from: ::subxt::sp_core::crypto::AccountId32, - pub to: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } + pub struct Transfer( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for Transfer { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BalanceSet { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub free: ::core::primitive::u128, - pub reserved: ::core::primitive::u128, - } + pub struct BalanceSet( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + pub ::core::primitive::u128, + ); impl ::subxt::Event for BalanceSet { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "BalanceSet"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Reserved { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, + pub struct Deposit( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Deposit { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Deposit"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Reserved( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for Reserved { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Reserved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Unreserved { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } + pub struct Unreserved( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for Unreserved { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "Unreserved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReserveRepatriated { - pub from: ::subxt::sp_core::crypto::AccountId32, - pub to: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - pub destination_status: - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - } + pub struct ReserveRepatriated( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + pub runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + ); impl ::subxt::Event for ReserveRepatriated { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "ReserveRepatriated"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Deposit { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::Event for Deposit { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Deposit"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Withdraw { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::Event for Withdraw { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Withdraw"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Slashed { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::Event for Slashed { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Slashed"; - } } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TotalIssuance; impl ::subxt::StorageEntry for TotalIssuance { const PALLET: &'static str = "Balances"; @@ -2419,19 +2140,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn total_issuance( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u128, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { let entry = TotalIssuance; self.client.storage().fetch_or_default(&entry, hash).await } @@ -2441,7 +2160,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_balances::AccountData<::core::primitive::u128>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Account(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -2450,11 +2169,11 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Account, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Account>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await - } pub async fn locks (& self , _0 : :: subxt :: sp_core :: crypto :: AccountId32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > , :: subxt :: Error < DispatchError >>{ + } pub async fn locks (& self , _0 : :: subxt :: sp_core :: crypto :: AccountId32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_balances :: BalanceLock < :: core :: primitive :: u128 > > , :: subxt :: BasicError >{ let entry = Locks(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -2462,8 +2181,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Locks, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Locks>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -2478,7 +2197,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Reserves(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -2487,8 +2206,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reserves, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Reserves>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -2497,7 +2216,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_balances::Releases, - ::subxt::Error, + ::subxt::BasicError, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -2509,7 +2228,6 @@ pub mod api { use super::runtime_types; pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct NextFeeMultiplier; impl ::subxt::StorageEntry for NextFeeMultiplier { const PALLET: &'static str = "TransactionPayment"; @@ -2529,10 +2247,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn next_fee_multiplier( @@ -2540,7 +2258,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_arithmetic::fixed_point::FixedU128, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextFeeMultiplier; self.client.storage().fetch_or_default(&entry, hash).await @@ -2550,7 +2268,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_transaction_payment::Releases, - ::subxt::Error, + ::subxt::BasicError, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -2577,7 +2295,7 @@ pub mod api { const FUNCTION: &'static str = "set_uncles"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -2586,7 +2304,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -2609,7 +2327,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Uncles; impl ::subxt::StorageEntry for Uncles { const PALLET: &'static str = "Authorship"; @@ -2644,10 +2361,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn uncles( @@ -2661,7 +2378,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Uncles; self.client.storage().fetch_or_default(&entry, hash).await @@ -2671,7 +2388,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Author; self.client.storage().fetch(&entry, hash).await @@ -2679,10 +2396,8 @@ pub mod api { pub async fn did_set_uncles( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = DidSetUncles; self.client.storage().fetch_or_default(&entry, hash).await } @@ -2906,19 +2621,18 @@ pub mod api { const FUNCTION: &'static str = "kick"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetStakingConfigs { + pub struct SetStakingLimits { pub min_nominator_bond: ::core::primitive::u128, pub min_validator_bond: ::core::primitive::u128, pub max_nominator_count: ::core::option::Option<::core::primitive::u32>, pub max_validator_count: ::core::option::Option<::core::primitive::u32>, - pub chill_threshold: ::core::option::Option< + pub threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - pub min_commission: runtime_types::sp_arithmetic::per_things::Perbill, } - impl ::subxt::Call for SetStakingConfigs { + impl ::subxt::Call for SetStakingLimits { const PALLET: &'static str = "Staking"; - const FUNCTION: &'static str = "set_staking_configs"; + const FUNCTION: &'static str = "set_staking_limits"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ChillOther { @@ -2929,7 +2643,7 @@ pub mod api { const FUNCTION: &'static str = "chill_other"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -2938,7 +2652,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -3227,31 +2941,29 @@ pub mod api { let call = Kick { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_staking_configs( + pub fn set_staking_limits( &self, min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, max_nominator_count: ::core::option::Option<::core::primitive::u32>, max_validator_count: ::core::option::Option<::core::primitive::u32>, - chill_threshold: ::core::option::Option< + threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - min_commission: runtime_types::sp_arithmetic::per_things::Perbill, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - SetStakingConfigs, + SetStakingLimits, DispatchError, > { - let call = SetStakingConfigs { + let call = SetStakingLimits { min_nominator_bond, min_validator_bond, max_nominator_count, max_validator_count, - chill_threshold, - min_commission, + threshold, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -3368,7 +3080,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HistoryDepth; impl ::subxt::StorageEntry for HistoryDepth { const PALLET: &'static str = "Staking"; @@ -3435,15 +3146,6 @@ pub mod api { ::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(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Ledger { const PALLET: &'static str = "Staking"; @@ -3818,16 +3520,6 @@ pub mod api { ::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"; @@ -3847,39 +3539,33 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn history_depth( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = HistoryDepth; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn validator_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = ValidatorCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn minimum_validator_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = MinimumValidatorCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -3888,7 +3574,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Invulnerables; self.client.storage().fetch_or_default(&entry, hash).await @@ -3899,7 +3585,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Bonded(_0); self.client.storage().fetch(&entry, hash).await @@ -3908,41 +3594,27 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Bonded, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Bonded>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn min_nominator_bond( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u128, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { let entry = MinNominatorBond; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn min_validator_bond( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u128, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { let entry = MinValidatorBond; self.client.storage().fetch_or_default(&entry, hash).await } - pub async fn min_commission( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::Error, - > { - let entry = MinCommission; - self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn ledger( &self, _0: ::subxt::sp_core::crypto::AccountId32, @@ -3954,7 +3626,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Ledger(_0); self.client.storage().fetch(&entry, hash).await @@ -3963,8 +3635,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Ledger, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Ledger>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -3976,7 +3648,7 @@ pub mod api { runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Payee(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -3985,8 +3657,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Payee, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Payee>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -3996,7 +3668,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Validators(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -4005,18 +3677,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Validators, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Validators>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn counter_for_validators( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = CounterForValidators; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4025,7 +3695,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = MaxValidatorsCount; self.client.storage().fetch(&entry, hash).await @@ -4040,7 +3710,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Nominators(_0); self.client.storage().fetch(&entry, hash).await @@ -4049,18 +3719,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Nominators, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Nominators>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn counter_for_nominators( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = CounterForNominators; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4069,7 +3737,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = MaxNominatorsCount; self.client.storage().fetch(&entry, hash).await @@ -4079,7 +3747,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = CurrentEra; self.client.storage().fetch(&entry, hash).await @@ -4089,7 +3757,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ActiveEra; self.client.storage().fetch(&entry, hash).await @@ -4100,7 +3768,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ErasStartSessionIndex(_0); self.client.storage().fetch(&entry, hash).await @@ -4109,8 +3777,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStartSessionIndex, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasStartSessionIndex>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4124,7 +3792,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ErasStakers(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -4133,8 +3801,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakers, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasStakers>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4148,7 +3816,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ErasStakersClipped(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -4157,8 +3825,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakersClipped, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasStakersClipped>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4169,7 +3837,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ErasValidatorPrefs(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -4178,8 +3846,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorPrefs, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasValidatorPrefs>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4189,7 +3857,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ErasValidatorReward(_0); self.client.storage().fetch(&entry, hash).await @@ -4198,8 +3866,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorReward, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasValidatorReward>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4211,7 +3879,7 @@ pub mod api { runtime_types::pallet_staking::EraRewardPoints< ::subxt::sp_core::crypto::AccountId32, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ErasRewardPoints(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -4220,8 +3888,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasRewardPoints, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasRewardPoints>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4229,10 +3897,8 @@ pub mod api { &self, _0: ::core::primitive::u32, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u128, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { let entry = ErasTotalStake(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -4240,8 +3906,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasTotalStake, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ErasTotalStake>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4250,7 +3916,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::Forcing, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ForceEra; self.client.storage().fetch_or_default(&entry, hash).await @@ -4260,7 +3926,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::sp_arithmetic::per_things::Perbill, - ::subxt::Error, + ::subxt::BasicError, > { let entry = SlashRewardFraction; self.client.storage().fetch_or_default(&entry, hash).await @@ -4268,10 +3934,8 @@ pub mod api { pub async fn canceled_slash_payout( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u128, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { let entry = CanceledSlashPayout; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4286,7 +3950,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = UnappliedSlashes(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -4295,8 +3959,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UnappliedSlashes, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UnappliedSlashes>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4305,7 +3969,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = BondedEras; self.client.storage().fetch_or_default(&entry, hash).await @@ -4320,7 +3984,7 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Perbill, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ValidatorSlashInEra(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -4329,8 +3993,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ValidatorSlashInEra, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ValidatorSlashInEra>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4341,7 +4005,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NominatorSlashInEra(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -4350,8 +4014,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, NominatorSlashInEra, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, NominatorSlashInEra>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4363,7 +4027,7 @@ pub mod api { ::core::option::Option< runtime_types::pallet_staking::slashing::SlashingSpans, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = SlashingSpans(_0); self.client.storage().fetch(&entry, hash).await @@ -4372,8 +4036,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SlashingSpans, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SlashingSpans>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4386,7 +4050,7 @@ pub mod api { runtime_types::pallet_staking::slashing::SpanRecord< ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = SpanSlash(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -4395,8 +4059,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SpanSlash, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SpanSlash>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4405,7 +4069,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = EarliestUnappliedSlash; self.client.storage().fetch(&entry, hash).await @@ -4413,29 +4077,17 @@ pub mod api { pub async fn current_planned_session( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = CurrentPlannedSession; self.client.storage().fetch_or_default(&entry, hash).await } - pub async fn offending_validators( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, - ::subxt::Error, - > { - let entry = OffendingValidators; - self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn storage_version( &self, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_staking::Releases, - ::subxt::Error, + ::subxt::BasicError, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -4447,7 +4099,7 @@ pub mod api { ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ChillThreshold; self.client.storage().fetch(&entry, hash).await @@ -4461,10 +4113,10 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Offence { - pub kind: [::core::primitive::u8; 16usize], - pub timeslot: ::std::vec::Vec<::core::primitive::u8>, - } + pub struct Offence( + pub [::core::primitive::u8; 16usize], + pub ::std::vec::Vec<::core::primitive::u8>, + ); impl ::subxt::Event for Offence { const PALLET: &'static str = "Offences"; const EVENT: &'static str = "Offence"; @@ -4472,7 +4124,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Reports(pub ::subxt::sp_core::H256); impl ::subxt::StorageEntry for Reports { const PALLET: &'static str = "Offences"; @@ -4528,10 +4179,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn reports( @@ -4551,7 +4202,7 @@ pub mod api { ), >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Reports(_0); self.client.storage().fetch(&entry, hash).await @@ -4560,8 +4211,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reports, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Reports>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4572,7 +4223,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::H256>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ConcurrentReportsIndex(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await @@ -4581,8 +4232,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ConcurrentReportsIndex, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ConcurrentReportsIndex>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4592,7 +4243,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ReportsByKindIndex(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -4601,8 +4252,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReportsByKindIndex, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReportsByKindIndex>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4633,7 +4284,7 @@ pub mod api { const FUNCTION: &'static str = "purge_keys"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -4642,7 +4293,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -4670,9 +4321,7 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewSession { - pub session_index: ::core::primitive::u32, - } + pub struct NewSession(pub ::core::primitive::u32); impl ::subxt::Event for NewSession { const PALLET: &'static str = "Session"; const EVENT: &'static str = "NewSession"; @@ -4680,7 +4329,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Validators; impl ::subxt::StorageEntry for Validators { const PALLET: &'static str = "Session"; @@ -4757,10 +4405,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn validators( @@ -4768,7 +4416,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Validators; self.client.storage().fetch_or_default(&entry, hash).await @@ -4776,20 +4424,16 @@ pub mod api { pub async fn current_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = CurrentIndex; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn queued_changed( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = QueuedChanged; self.client.storage().fetch_or_default(&entry, hash).await } @@ -4801,7 +4445,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, runtime_types::polkadot_runtime::SessionKeys, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = QueuedKeys; self.client.storage().fetch_or_default(&entry, hash).await @@ -4811,7 +4455,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = DisabledValidators; self.client.storage().fetch_or_default(&entry, hash).await @@ -4822,7 +4466,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextKeys(_0); self.client.storage().fetch(&entry, hash).await @@ -4831,8 +4475,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, NextKeys, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, NextKeys>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4843,7 +4487,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = KeyOwner(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -4852,8 +4496,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, KeyOwner, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, KeyOwner>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -4901,7 +4545,7 @@ pub mod api { const FUNCTION: &'static str = "note_stalled"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -4910,7 +4554,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -4970,12 +4614,12 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewAuthorities { - pub authority_set: ::std::vec::Vec<( + pub struct NewAuthorities( + pub ::std::vec::Vec<( runtime_types::sp_finality_grandpa::app::Public, ::core::primitive::u64, )>, - } + ); impl ::subxt::Event for NewAuthorities { const PALLET: &'static str = "Grandpa"; const EVENT: &'static str = "NewAuthorities"; @@ -4995,7 +4639,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct State; impl ::subxt::StorageEntry for State { const PALLET: &'static str = "Grandpa"; @@ -5057,10 +4700,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn state( @@ -5068,7 +4711,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = State; self.client.storage().fetch_or_default(&entry, hash).await @@ -5082,7 +4725,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PendingChange; self.client.storage().fetch(&entry, hash).await @@ -5092,7 +4735,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextForced; self.client.storage().fetch(&entry, hash).await @@ -5105,7 +4748,7 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Stalled; self.client.storage().fetch(&entry, hash).await @@ -5113,10 +4756,8 @@ pub mod api { pub async fn current_set_id( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u64, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { let entry = CurrentSetId; self.client.storage().fetch_or_default(&entry, hash).await } @@ -5126,7 +4767,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = SetIdSession(_0); self.client.storage().fetch(&entry, hash).await @@ -5135,8 +4776,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SetIdSession, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SetIdSession>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -5160,7 +4801,7 @@ pub mod api { const FUNCTION: &'static str = "heartbeat"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -5169,7 +4810,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -5195,10 +4836,9 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct HeartbeatReceived { - pub authority_id: - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - } + pub struct HeartbeatReceived( + pub runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + ); impl ::subxt::Event for HeartbeatReceived { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "HeartbeatReceived"; @@ -5210,15 +4850,15 @@ pub mod api { const EVENT: &'static str = "AllGood"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SomeOffline { - pub offline: ::std::vec::Vec<( + pub struct SomeOffline( + pub ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_staking::Exposure< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, )>, - } + ); impl ::subxt::Event for SomeOffline { const PALLET: &'static str = "ImOnline"; const EVENT: &'static str = "SomeOffline"; @@ -5226,7 +4866,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HeartbeatAfter; impl ::subxt::StorageEntry for HeartbeatAfter { const PALLET: &'static str = "ImOnline"; @@ -5287,22 +4926,20 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn heartbeat_after( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = HeartbeatAfter; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn keys (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Public > , :: subxt :: Error < DispatchError >>{ + } pub async fn keys (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Public > , :: subxt :: BasicError >{ let entry = Keys; self.client.storage().fetch_or_default(&entry, hash).await } @@ -5317,7 +4954,7 @@ pub mod api { runtime_types::pallet_im_online::BoundedOpaqueNetworkState, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ReceivedHeartbeats(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -5326,8 +4963,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReceivedHeartbeats, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReceivedHeartbeats>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -5336,10 +4973,8 @@ pub mod api { _0: ::core::primitive::u32, _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = AuthoredBlocks(_0, _1); self.client.storage().fetch_or_default(&entry, hash).await } @@ -5347,8 +4982,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AuthoredBlocks, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, AuthoredBlocks>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -5580,7 +5215,7 @@ pub mod api { const FUNCTION: &'static str = "cancel_proposal"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -5589,7 +5224,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -5907,20 +5542,17 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - pub deposit: ::core::primitive::u128, - } + pub struct Proposed(pub ::core::primitive::u32, pub ::core::primitive::u128); impl ::subxt::Event for Proposed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Proposed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - 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 struct Tabled( + pub ::core::primitive::u32, + pub ::core::primitive::u128, + pub ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ); impl ::subxt::Event for Tabled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Tabled"; @@ -5932,158 +5564,124 @@ pub mod api { const EVENT: &'static str = "ExternalTabled"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Started { - pub ref_index: ::core::primitive::u32, - pub threshold: - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - } + pub struct Started( + pub ::core::primitive::u32, + pub runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + ); impl ::subxt::Event for Started { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Started"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Passed { - pub ref_index: ::core::primitive::u32, - } + pub struct Passed(pub ::core::primitive::u32); impl ::subxt::Event for Passed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Passed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotPassed { - pub ref_index: ::core::primitive::u32, - } + pub struct NotPassed(pub ::core::primitive::u32); impl ::subxt::Event for NotPassed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "NotPassed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Cancelled { - pub ref_index: ::core::primitive::u32, - } + pub struct Cancelled(pub ::core::primitive::u32); impl ::subxt::Event for Cancelled { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Cancelled"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Executed { - pub ref_index: ::core::primitive::u32, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct Executed( + pub ::core::primitive::u32, + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for Executed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Executed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Delegated { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub target: ::subxt::sp_core::crypto::AccountId32, - } + pub struct Delegated( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + ); impl ::subxt::Event for Delegated { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Delegated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Undelegated { - pub account: ::subxt::sp_core::crypto::AccountId32, - } + pub struct Undelegated(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for Undelegated { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Undelegated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Vetoed { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::sp_core::H256, - pub until: ::core::primitive::u32, - } + pub struct Vetoed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Vetoed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Vetoed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PreimageNoted { - pub proposal_hash: ::subxt::sp_core::H256, - pub who: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct PreimageNoted( + pub ::subxt::sp_core::H256, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for PreimageNoted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageNoted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PreimageUsed { - pub proposal_hash: ::subxt::sp_core::H256, - pub provider: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct PreimageUsed( + pub ::subxt::sp_core::H256, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for PreimageUsed { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageUsed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PreimageInvalid { - pub proposal_hash: ::subxt::sp_core::H256, - pub ref_index: ::core::primitive::u32, - } + pub struct PreimageInvalid( + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + ); impl ::subxt::Event for PreimageInvalid { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageInvalid"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PreimageMissing { - pub proposal_hash: ::subxt::sp_core::H256, - pub ref_index: ::core::primitive::u32, - } + pub struct PreimageMissing( + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + ); impl ::subxt::Event for PreimageMissing { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageMissing"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PreimageReaped { - pub proposal_hash: ::subxt::sp_core::H256, - pub provider: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - pub reaper: ::subxt::sp_core::crypto::AccountId32, - } + pub struct PreimageReaped( + pub ::subxt::sp_core::H256, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + pub ::subxt::sp_core::crypto::AccountId32, + ); impl ::subxt::Event for PreimageReaped { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "PreimageReaped"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Blacklisted { - pub proposal_hash: ::subxt::sp_core::H256, - } + pub struct Blacklisted(pub ::subxt::sp_core::H256); impl ::subxt::Event for Blacklisted { const PALLET: &'static str = "Democracy"; const EVENT: &'static str = "Blacklisted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Voted { - pub voter: ::subxt::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 { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Voted"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Seconded { - pub seconder: ::subxt::sp_core::crypto::AccountId32, - pub prop_index: ::core::primitive::u32, - } - impl ::subxt::Event for Seconded { - const PALLET: &'static str = "Democracy"; - const EVENT: &'static str = "Seconded"; - } } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct PublicPropCount; impl ::subxt::StorageEntry for PublicPropCount { const PALLET: &'static str = "Democracy"; @@ -6257,19 +5855,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn public_prop_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = PublicPropCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6282,7 +5878,7 @@ pub mod api { ::subxt::sp_core::H256, ::subxt::sp_core::crypto::AccountId32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PublicProps; self.client.storage().fetch_or_default(&entry, hash).await @@ -6296,7 +5892,7 @@ pub mod api { ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = DepositOf(_0); self.client.storage().fetch(&entry, hash).await @@ -6305,8 +5901,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DepositOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, DepositOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -6322,7 +5918,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Preimages(_0); self.client.storage().fetch(&entry, hash).await @@ -6331,28 +5927,24 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Preimages, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Preimages>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn referendum_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = ReferendumCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn lowest_unbaked( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = LowestUnbaked; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6368,7 +5960,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ReferendumInfoOf(_0); self.client.storage().fetch(&entry, hash).await @@ -6377,8 +5969,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReferendumInfoOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReferendumInfoOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -6392,7 +5984,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = VotingOf(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -6401,8 +5993,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, VotingOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, VotingOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -6412,7 +6004,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Locks(_0); self.client.storage().fetch(&entry, hash).await @@ -6421,18 +6013,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Locks, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Locks>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn last_tabled_was_external( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = LastTabledWasExternal; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6444,7 +6034,7 @@ pub mod api { ::subxt::sp_core::H256, runtime_types::pallet_democracy::vote_threshold::VoteThreshold, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextExternal; self.client.storage().fetch(&entry, hash).await @@ -6458,7 +6048,7 @@ pub mod api { ::core::primitive::u32, ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Blacklist(_0); self.client.storage().fetch(&entry, hash).await @@ -6467,8 +6057,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Blacklist, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Blacklist>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -6476,10 +6066,8 @@ pub mod api { &self, _0: ::subxt::sp_core::H256, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { let entry = Cancellations(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -6487,8 +6075,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Cancellations, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Cancellations>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -6497,7 +6085,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::BasicError, > { let entry = StorageVersion; self.client.storage().fetch(&entry, hash).await @@ -6576,7 +6164,7 @@ pub mod api { const FUNCTION: &'static str = "disapprove_proposal"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -6585,7 +6173,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -6681,70 +6269,64 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::sp_core::H256, - pub threshold: ::core::primitive::u32, - } + pub struct Proposed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Proposed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Proposed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Voted { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::sp_core::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } + pub struct Voted( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::H256, + pub ::core::primitive::bool, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Voted { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Voted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Approved { - pub proposal_hash: ::subxt::sp_core::H256, - } + pub struct Approved(pub ::subxt::sp_core::H256); impl ::subxt::Event for Approved { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Approved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Disapproved { - pub proposal_hash: ::subxt::sp_core::H256, - } + pub struct Disapproved(pub ::subxt::sp_core::H256); impl ::subxt::Event for Disapproved { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Disapproved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Executed { - pub proposal_hash: ::subxt::sp_core::H256, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct Executed( + pub ::subxt::sp_core::H256, + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for Executed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Executed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MemberExecuted { - pub proposal_hash: ::subxt::sp_core::H256, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct MemberExecuted( + pub ::subxt::sp_core::H256, + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for MemberExecuted { const PALLET: &'static str = "Council"; const EVENT: &'static str = "MemberExecuted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Closed { - pub proposal_hash: ::subxt::sp_core::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } + pub struct Closed( + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Closed { const PALLET: &'static str = "Council"; const EVENT: &'static str = "Closed"; @@ -6752,7 +6334,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Proposals; impl ::subxt::StorageEntry for Proposals { const PALLET: &'static str = "Council"; @@ -6820,10 +6401,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proposals( @@ -6833,7 +6414,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< ::subxt::sp_core::H256, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Proposals; self.client.storage().fetch_or_default(&entry, hash).await @@ -6844,7 +6425,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ProposalOf(_0); self.client.storage().fetch(&entry, hash).await @@ -6853,8 +6434,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ProposalOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -6869,7 +6450,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Voting(_0); self.client.storage().fetch(&entry, hash).await @@ -6878,18 +6459,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Voting, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Voting>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn proposal_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = ProposalCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -6898,7 +6477,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -6908,7 +6487,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Prime; self.client.storage().fetch(&entry, hash).await @@ -6987,7 +6566,7 @@ pub mod api { const FUNCTION: &'static str = "disapprove_proposal"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -6996,7 +6575,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -7092,70 +6671,64 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub proposal_index: ::core::primitive::u32, - pub proposal_hash: ::subxt::sp_core::H256, - pub threshold: ::core::primitive::u32, - } + pub struct Proposed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Proposed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Proposed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Voted { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub proposal_hash: ::subxt::sp_core::H256, - pub voted: ::core::primitive::bool, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } + pub struct Voted( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::H256, + pub ::core::primitive::bool, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Voted { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Voted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Approved { - pub proposal_hash: ::subxt::sp_core::H256, - } + pub struct Approved(pub ::subxt::sp_core::H256); impl ::subxt::Event for Approved { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Approved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Disapproved { - pub proposal_hash: ::subxt::sp_core::H256, - } + pub struct Disapproved(pub ::subxt::sp_core::H256); impl ::subxt::Event for Disapproved { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Disapproved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Executed { - pub proposal_hash: ::subxt::sp_core::H256, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct Executed( + pub ::subxt::sp_core::H256, + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for Executed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Executed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MemberExecuted { - pub proposal_hash: ::subxt::sp_core::H256, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct MemberExecuted( + pub ::subxt::sp_core::H256, + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for MemberExecuted { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "MemberExecuted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Closed { - pub proposal_hash: ::subxt::sp_core::H256, - pub yes: ::core::primitive::u32, - pub no: ::core::primitive::u32, - } + pub struct Closed( + pub ::subxt::sp_core::H256, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for Closed { const PALLET: &'static str = "TechnicalCommittee"; const EVENT: &'static str = "Closed"; @@ -7163,7 +6736,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Proposals; impl ::subxt::StorageEntry for Proposals { const PALLET: &'static str = "TechnicalCommittee"; @@ -7231,10 +6803,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proposals( @@ -7244,7 +6816,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< ::subxt::sp_core::H256, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Proposals; self.client.storage().fetch_or_default(&entry, hash).await @@ -7255,7 +6827,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ProposalOf(_0); self.client.storage().fetch(&entry, hash).await @@ -7264,8 +6836,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ProposalOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -7280,7 +6852,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Voting(_0); self.client.storage().fetch(&entry, hash).await @@ -7289,18 +6861,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Voting, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Voting>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn proposal_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = ProposalCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -7309,7 +6879,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -7319,7 +6889,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Prime; self.client.storage().fetch(&entry, hash).await @@ -7387,7 +6957,7 @@ pub mod api { const FUNCTION: &'static str = "clean_defunct_voters"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -7396,7 +6966,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -7485,12 +7055,12 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewTerm { - pub new_members: ::std::vec::Vec<( + pub struct NewTerm( + pub ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - } + ); impl ::subxt::Event for NewTerm { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "NewTerm"; @@ -7508,35 +7078,31 @@ pub mod api { const EVENT: &'static str = "ElectionError"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MemberKicked { - pub member: ::subxt::sp_core::crypto::AccountId32, - } + pub struct MemberKicked(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for MemberKicked { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "MemberKicked"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Renounced { - pub candidate: ::subxt::sp_core::crypto::AccountId32, - } + pub struct Renounced(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for Renounced { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "Renounced"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CandidateSlashed { - pub candidate: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } + pub struct CandidateSlashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for CandidateSlashed { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "CandidateSlashed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SeatHolderSlashed { - pub seat_holder: ::subxt::sp_core::crypto::AccountId32, - pub amount: ::core::primitive::u128, - } + pub struct SeatHolderSlashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for SeatHolderSlashed { const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "SeatHolderSlashed"; @@ -7544,7 +7110,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Members; impl ::subxt::StorageEntry for Members { const PALLET: &'static str = "PhragmenElection"; @@ -7610,10 +7175,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn members( @@ -7626,7 +7191,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -7641,7 +7206,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = RunnersUp; self.client.storage().fetch_or_default(&entry, hash).await @@ -7654,7 +7219,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Candidates; self.client.storage().fetch_or_default(&entry, hash).await @@ -7662,10 +7227,8 @@ pub mod api { pub async fn election_rounds( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = ElectionRounds; self.client.storage().fetch_or_default(&entry, hash).await } @@ -7678,7 +7241,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Voting(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -7687,8 +7250,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Voting, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Voting>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -7756,7 +7319,7 @@ pub mod api { const FUNCTION: &'static str = "clear_prime"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -7765,7 +7328,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -7871,7 +7434,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Members; impl ::subxt::StorageEntry for Members { const PALLET: &'static str = "TechnicalMembership"; @@ -7891,10 +7453,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn members( @@ -7902,7 +7464,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Members; self.client.storage().fetch_or_default(&entry, hash).await @@ -7912,7 +7474,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Prime; self.client.storage().fetch(&entry, hash).await @@ -7957,7 +7519,7 @@ pub mod api { const FUNCTION: &'static str = "approve_proposal"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -7966,7 +7528,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8018,60 +7580,47 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed { - pub proposal_index: ::core::primitive::u32, - } + pub struct Proposed(pub ::core::primitive::u32); impl ::subxt::Event for Proposed { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Proposed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Spending { - pub budget_remaining: ::core::primitive::u128, - } + pub struct Spending(pub ::core::primitive::u128); impl ::subxt::Event for Spending { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Spending"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Awarded { - pub proposal_index: ::core::primitive::u32, - pub award: ::core::primitive::u128, - pub account: ::subxt::sp_core::crypto::AccountId32, - } + pub struct Awarded( + pub ::core::primitive::u32, + pub ::core::primitive::u128, + pub ::subxt::sp_core::crypto::AccountId32, + ); impl ::subxt::Event for Awarded { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Awarded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rejected { - pub proposal_index: ::core::primitive::u32, - pub slashed: ::core::primitive::u128, - } + pub struct Rejected(pub ::core::primitive::u32, pub ::core::primitive::u128); impl ::subxt::Event for Rejected { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Rejected"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Burnt { - pub burnt_funds: ::core::primitive::u128, - } + pub struct Burnt(pub ::core::primitive::u128); impl ::subxt::Event for Burnt { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Burnt"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rollover { - pub rollover_balance: ::core::primitive::u128, - } + pub struct Rollover(pub ::core::primitive::u128); impl ::subxt::Event for Rollover { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Rollover"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Deposit { - pub value: ::core::primitive::u128, - } + pub struct Deposit(pub ::core::primitive::u128); impl ::subxt::Event for Deposit { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Deposit"; @@ -8079,7 +7628,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ProposalCount; impl ::subxt::StorageEntry for ProposalCount { const PALLET: &'static str = "Treasury"; @@ -8117,19 +7665,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proposal_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = ProposalCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -8144,7 +7690,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Proposals(_0); self.client.storage().fetch(&entry, hash).await @@ -8153,8 +7699,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Proposals, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Proposals>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -8165,7 +7711,7 @@ pub mod api { runtime_types::frame_support::storage::bounded_vec::BoundedVec< ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Approvals; self.client.storage().fetch_or_default(&entry, hash).await @@ -8236,7 +7782,7 @@ pub mod api { const FUNCTION: &'static str = "move_claim"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -8245,7 +7791,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8341,7 +7887,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Claims( pub runtime_types::polkadot_runtime_common::claims::EthereumAddress, ); @@ -8412,10 +7957,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn claims( @@ -8424,7 +7969,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Claims(_0); self.client.storage().fetch(&entry, hash).await @@ -8433,18 +7978,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Claims, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Claims>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn total( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u128, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { let entry = Total; self.client.storage().fetch_or_default(&entry, hash).await } @@ -8458,7 +8001,7 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Vesting(_0); self.client.storage().fetch(&entry, hash).await @@ -8467,8 +8010,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Vesting, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Vesting>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -8480,7 +8023,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Signing(_0); self.client.storage().fetch(&entry, hash).await @@ -8489,8 +8032,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Signing, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Signing>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -8502,7 +8045,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Preclaims(_0); self.client.storage().fetch(&entry, hash).await @@ -8511,8 +8054,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Preclaims, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Preclaims>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -8585,7 +8128,7 @@ pub mod api { const FUNCTION: &'static str = "merge_schedules"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -8594,7 +8137,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8692,18 +8235,16 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct VestingUpdated { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub unvested: ::core::primitive::u128, - } + pub struct VestingUpdated( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for VestingUpdated { const PALLET: &'static str = "Vesting"; const EVENT: &'static str = "VestingUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct VestingCompleted { - pub account: ::subxt::sp_core::crypto::AccountId32, - } + pub struct VestingCompleted(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for VestingCompleted { const PALLET: &'static str = "Vesting"; const EVENT: &'static str = "VestingCompleted"; @@ -8711,7 +8252,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Vesting(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Vesting { const PALLET: &'static str = "Vesting"; @@ -8740,10 +8280,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn vesting( @@ -8759,7 +8299,7 @@ pub mod api { >, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Vesting(_0); self.client.storage().fetch(&entry, hash).await @@ -8768,8 +8308,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Vesting, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Vesting>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -8778,7 +8318,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::pallet_vesting::Releases, - ::subxt::Error, + ::subxt::BasicError, > { let entry = StorageVersion; self.client.storage().fetch_or_default(&entry, hash).await @@ -8816,17 +8356,8 @@ pub mod api { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "batch_all"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct DispatchAs { - pub as_origin: runtime_types::polkadot_runtime::OriginCaller, - pub call: runtime_types::polkadot_runtime::Call, - } - impl ::subxt::Call for DispatchAs { - const PALLET: &'static str = "Utility"; - const FUNCTION: &'static str = "dispatch_as"; - } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -8835,7 +8366,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -8866,25 +8397,16 @@ pub mod api { let call = BatchAll { calls }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn dispatch_as( - &self, - as_origin: runtime_types::polkadot_runtime::OriginCaller, - call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, DispatchAs, DispatchError> - { - let call = DispatchAs { as_origin, call }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } } } pub type Event = runtime_types::pallet_utility::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BatchInterrupted { - pub index: ::core::primitive::u32, - pub error: runtime_types::sp_runtime::DispatchError, - } + pub struct BatchInterrupted( + pub ::core::primitive::u32, + pub runtime_types::sp_runtime::DispatchError, + ); impl ::subxt::Event for BatchInterrupted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "BatchInterrupted"; @@ -8901,15 +8423,6 @@ pub mod api { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "ItemCompleted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct DispatchedAs { - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::Event for DispatchedAs { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "DispatchedAs"; - } } } pub mod identity { @@ -9071,7 +8584,7 @@ pub mod api { const FUNCTION: &'static str = "quit_sub"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -9080,7 +8593,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -9268,92 +8781,88 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IdentitySet { - pub who: ::subxt::sp_core::crypto::AccountId32, - } + pub struct IdentitySet(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for IdentitySet { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentitySet"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IdentityCleared { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct IdentityCleared( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for IdentityCleared { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentityCleared"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IdentityKilled { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct IdentityKilled( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for IdentityKilled { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "IdentityKilled"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct JudgementRequested { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub registrar_index: ::core::primitive::u32, - } + pub struct JudgementRequested( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for JudgementRequested { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementRequested"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct JudgementUnrequested { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub registrar_index: ::core::primitive::u32, - } + pub struct JudgementUnrequested( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for JudgementUnrequested { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementUnrequested"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct JudgementGiven { - pub target: ::subxt::sp_core::crypto::AccountId32, - pub registrar_index: ::core::primitive::u32, - } + pub struct JudgementGiven( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, + ); impl ::subxt::Event for JudgementGiven { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "JudgementGiven"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RegistrarAdded { - pub registrar_index: ::core::primitive::u32, - } + pub struct RegistrarAdded(pub ::core::primitive::u32); impl ::subxt::Event for RegistrarAdded { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "RegistrarAdded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SubIdentityAdded { - pub sub: ::subxt::sp_core::crypto::AccountId32, - pub main: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct SubIdentityAdded( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for SubIdentityAdded { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityAdded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SubIdentityRemoved { - pub sub: ::subxt::sp_core::crypto::AccountId32, - pub main: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct SubIdentityRemoved( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for SubIdentityRemoved { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityRemoved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SubIdentityRevoked { - pub sub: ::subxt::sp_core::crypto::AccountId32, - pub main: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct SubIdentityRevoked( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for SubIdentityRevoked { const PALLET: &'static str = "Identity"; const EVENT: &'static str = "SubIdentityRevoked"; @@ -9361,7 +8870,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct IdentityOf(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for IdentityOf { const PALLET: &'static str = "Identity"; @@ -9426,10 +8934,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn identity_of( @@ -9442,7 +8950,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = IdentityOf(_0); self.client.storage().fetch(&entry, hash).await @@ -9451,8 +8959,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, IdentityOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, IdentityOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -9465,7 +8973,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = SuperOf(_0); self.client.storage().fetch(&entry, hash).await @@ -9474,8 +8982,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SuperOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SuperOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -9490,7 +8998,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, ), - ::subxt::Error, + ::subxt::BasicError, > { let entry = SubsOf(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -9499,8 +9007,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SubsOf, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SubsOf>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -9516,7 +9024,7 @@ pub mod api { >, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Registrars; self.client.storage().fetch_or_default(&entry, hash).await @@ -9630,7 +9138,7 @@ pub mod api { const FUNCTION: &'static str = "proxy_announced"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -9639,7 +9147,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -9812,42 +9320,41 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProxyExecuted { - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct ProxyExecuted( + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for ProxyExecuted { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyExecuted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AnonymousCreated { - pub anonymous: ::subxt::sp_core::crypto::AccountId32, - pub who: ::subxt::sp_core::crypto::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub disambiguation_index: ::core::primitive::u16, - } + pub struct AnonymousCreated( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::polkadot_runtime::ProxyType, + pub ::core::primitive::u16, + ); impl ::subxt::Event for AnonymousCreated { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "AnonymousCreated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - 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 struct Announced( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::H256, + ); impl ::subxt::Event for Announced { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "Announced"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProxyAdded { - pub delegator: ::subxt::sp_core::crypto::AccountId32, - pub delegatee: ::subxt::sp_core::crypto::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } + pub struct ProxyAdded( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::polkadot_runtime::ProxyType, + pub ::core::primitive::u32, + ); impl ::subxt::Event for ProxyAdded { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyAdded"; @@ -9855,7 +9362,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Proxies(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for Proxies { const PALLET: &'static str = "Proxy"; @@ -9899,10 +9405,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn proxies( @@ -9920,7 +9426,7 @@ pub mod api { >, ::core::primitive::u128, ), - ::subxt::Error, + ::subxt::BasicError, > { let entry = Proxies(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -9929,8 +9435,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Proxies, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Proxies>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -9949,7 +9455,7 @@ pub mod api { >, ::core::primitive::u128, ), - ::subxt::Error, + ::subxt::BasicError, > { let entry = Announcements(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -9958,8 +9464,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Announcements, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Announcements>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -9989,8 +9495,7 @@ pub mod api { pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - pub call: - ::subxt::WrapperKeepOpaque, + pub call: ::std::vec::Vec<::core::primitive::u8>, pub store_call: ::core::primitive::bool, pub max_weight: ::core::primitive::u64, } @@ -10027,7 +9532,7 @@ pub mod api { const FUNCTION: &'static str = "cancel_as_multi"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -10036,7 +9541,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -10071,9 +9576,7 @@ pub mod api { maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - call: ::subxt::WrapperKeepOpaque< - runtime_types::polkadot_runtime::Call, - >, + call: ::std::vec::Vec<::core::primitive::u8>, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AsMulti, DispatchError> @@ -10148,49 +9651,45 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewMultisig { - pub approving: ::subxt::sp_core::crypto::AccountId32, - pub multisig: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } + pub struct NewMultisig( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub [::core::primitive::u8; 32usize], + ); impl ::subxt::Event for NewMultisig { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "NewMultisig"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MultisigApproval { - pub approving: ::subxt::sp_core::crypto::AccountId32, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } + pub struct MultisigApproval( + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub ::subxt::sp_core::crypto::AccountId32, + pub [::core::primitive::u8; 32usize], + ); impl ::subxt::Event for MultisigApproval { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigApproval"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MultisigExecuted { - pub approving: ::subxt::sp_core::crypto::AccountId32, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } + pub struct MultisigExecuted( + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub ::subxt::sp_core::crypto::AccountId32, + pub [::core::primitive::u8; 32usize], + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); impl ::subxt::Event for MultisigExecuted { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigExecuted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MultisigCancelled { - pub cancelling: ::subxt::sp_core::crypto::AccountId32, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::sp_core::crypto::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } + pub struct MultisigCancelled( + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub ::subxt::sp_core::crypto::AccountId32, + pub [::core::primitive::u8; 32usize], + ); impl ::subxt::Event for MultisigCancelled { const PALLET: &'static str = "Multisig"; const EVENT: &'static str = "MultisigCancelled"; @@ -10198,7 +9697,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Multisigs( ::subxt::sp_core::crypto::AccountId32, [::core::primitive::u8; 32usize], @@ -10229,7 +9727,7 @@ pub mod api { const PALLET: &'static str = "Multisig"; const STORAGE: &'static str = "Calls"; type Value = ( - ::subxt::WrapperKeepOpaque, + ::std::vec::Vec<::core::primitive::u8>, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ); @@ -10241,10 +9739,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn multisigs( @@ -10260,7 +9758,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Multisigs(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -10269,8 +9767,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Multisigs, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Multisigs>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -10280,11 +9778,11 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( - ::subxt::WrapperKeepOpaque, + ::std::vec::Vec<::core::primitive::u8>, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Calls(_0); self.client.storage().fetch(&entry, hash).await @@ -10293,8 +9791,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Calls, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Calls>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -10400,7 +9898,7 @@ pub mod api { const FUNCTION: &'static str = "extend_bounty_expiry"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -10409,7 +9907,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -10547,61 +10045,53 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyProposed { - pub index: ::core::primitive::u32, - } + pub struct BountyProposed(pub ::core::primitive::u32); impl ::subxt::Event for BountyProposed { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyProposed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyRejected { - pub index: ::core::primitive::u32, - pub bond: ::core::primitive::u128, - } + pub struct BountyRejected( + pub ::core::primitive::u32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for BountyRejected { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyRejected"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyBecameActive { - pub index: ::core::primitive::u32, - } + pub struct BountyBecameActive(pub ::core::primitive::u32); impl ::subxt::Event for BountyBecameActive { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyBecameActive"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyAwarded { - pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, - } + pub struct BountyAwarded( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, + ); impl ::subxt::Event for BountyAwarded { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyAwarded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyClaimed { - pub index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::sp_core::crypto::AccountId32, - } + pub struct BountyClaimed( + pub ::core::primitive::u32, + pub ::core::primitive::u128, + pub ::subxt::sp_core::crypto::AccountId32, + ); impl ::subxt::Event for BountyClaimed { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyClaimed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyCanceled { - pub index: ::core::primitive::u32, - } + pub struct BountyCanceled(pub ::core::primitive::u32); impl ::subxt::Event for BountyCanceled { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyCanceled"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BountyExtended { - pub index: ::core::primitive::u32, - } + pub struct BountyExtended(pub ::core::primitive::u32); impl ::subxt::Event for BountyExtended { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyExtended"; @@ -10609,7 +10099,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct BountyCount; impl ::subxt::StorageEntry for BountyCount { const PALLET: &'static str = "Bounties"; @@ -10657,19 +10146,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn bounty_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = BountyCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -10685,7 +10172,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Bounties(_0); self.client.storage().fetch(&entry, hash).await @@ -10694,8 +10181,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Bounties, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Bounties>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -10705,7 +10192,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = BountyDescriptions(_0); self.client.storage().fetch(&entry, hash).await @@ -10714,8 +10201,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BountyDescriptions, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, BountyDescriptions>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -10724,7 +10211,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = BountyApprovals; self.client.storage().fetch_or_default(&entry, hash).await @@ -10792,7 +10279,7 @@ pub mod api { const FUNCTION: &'static str = "slash_tip"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -10801,7 +10288,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -10875,45 +10362,39 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewTip { - pub tip_hash: ::subxt::sp_core::H256, - } + pub struct NewTip(pub ::subxt::sp_core::H256); impl ::subxt::Event for NewTip { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "NewTip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TipClosing { - pub tip_hash: ::subxt::sp_core::H256, - } + pub struct TipClosing(pub ::subxt::sp_core::H256); impl ::subxt::Event for TipClosing { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipClosing"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TipClosed { - pub tip_hash: ::subxt::sp_core::H256, - pub who: ::subxt::sp_core::crypto::AccountId32, - pub payout: ::core::primitive::u128, - } + pub struct TipClosed( + pub ::subxt::sp_core::H256, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for TipClosed { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipClosed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TipRetracted { - pub tip_hash: ::subxt::sp_core::H256, - } + pub struct TipRetracted(pub ::subxt::sp_core::H256); impl ::subxt::Event for TipRetracted { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipRetracted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TipSlashed { - pub tip_hash: ::subxt::sp_core::H256, - pub finder: ::subxt::sp_core::crypto::AccountId32, - pub deposit: ::core::primitive::u128, - } + pub struct TipSlashed( + pub ::subxt::sp_core::H256, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for TipSlashed { const PALLET: &'static str = "Tips"; const EVENT: &'static str = "TipSlashed"; @@ -10921,7 +10402,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Tips(pub ::subxt::sp_core::H256); impl ::subxt::StorageEntry for Tips { const PALLET: &'static str = "Tips"; @@ -10952,10 +10432,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn tips( @@ -10971,7 +10451,7 @@ pub mod api { ::subxt::sp_core::H256, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Tips(_0); self.client.storage().fetch(&entry, hash).await @@ -10980,8 +10460,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Tips, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Tips>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -10991,7 +10471,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Reasons(_0); self.client.storage().fetch(&entry, hash).await @@ -11000,8 +10480,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reasons, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Reasons>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -11054,7 +10534,7 @@ pub mod api { const FUNCTION: &'static str = "submit"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -11063,7 +10543,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -11141,55 +10621,50 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SolutionStored { - pub election_compute: - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub prev_ejected: ::core::primitive::bool, - } + pub struct SolutionStored( + pub runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub ::core::primitive::bool, + ); impl ::subxt::Event for SolutionStored { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "SolutionStored"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ElectionFinalized { - pub election_compute: ::core::option::Option< + pub struct ElectionFinalized( + pub ::core::option::Option< runtime_types::pallet_election_provider_multi_phase::ElectionCompute, >, - } + ); impl ::subxt::Event for ElectionFinalized { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "ElectionFinalized"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rewarded { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub value: ::core::primitive::u128, - } + pub struct Rewarded( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for Rewarded { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "Rewarded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Slashed { - pub account: ::subxt::sp_core::crypto::AccountId32, - pub value: ::core::primitive::u128, - } + pub struct Slashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); impl ::subxt::Event for Slashed { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "Slashed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SignedPhaseStarted { - pub round: ::core::primitive::u32, - } + pub struct SignedPhaseStarted(pub ::core::primitive::u32); impl ::subxt::Event for SignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "SignedPhaseStarted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct UnsignedPhaseStarted { - pub round: ::core::primitive::u32, - } + pub struct UnsignedPhaseStarted(pub ::core::primitive::u32); impl ::subxt::Event for UnsignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "UnsignedPhaseStarted"; @@ -11197,7 +10672,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Round; impl ::subxt::StorageEntry for Round { const PALLET: &'static str = "ElectionProviderMultiPhase"; @@ -11300,19 +10774,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn round( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = Round; self.client.storage().fetch_or_default(&entry, hash).await } @@ -11323,14 +10795,14 @@ pub mod api { runtime_types::pallet_election_provider_multi_phase::Phase< ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = CurrentPhase; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn queued_solution (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: Error < DispatchError >>{ + } pub async fn queued_solution (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: BasicError >{ let entry = QueuedSolution; self.client.storage().fetch(&entry, hash).await - } pub async fn snapshot (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: Error < DispatchError >>{ + } pub async fn snapshot (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot < :: subxt :: sp_core :: crypto :: AccountId32 > > , :: subxt :: BasicError >{ let entry = Snapshot; self.client.storage().fetch(&entry, hash).await } @@ -11339,36 +10811,34 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = DesiredTargets; self.client.storage().fetch(&entry, hash).await - } pub async fn snapshot_metadata (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: Error < DispatchError >>{ + } pub async fn snapshot_metadata (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: BasicError >{ let entry = SnapshotMetadata; self.client.storage().fetch(&entry, hash).await } pub async fn signed_submission_next_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = SignedSubmissionNextIndex; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn signed_submission_indices (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: bounded_btree_map :: BoundedBTreeMap < [:: core :: primitive :: u128 ; 3usize] , :: core :: primitive :: u32 > , :: subxt :: Error < DispatchError >>{ + } pub async fn signed_submission_indices (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: frame_support :: storage :: bounded_btree_map :: BoundedBTreeMap < [:: core :: primitive :: u128 ; 3usize] , :: core :: primitive :: u32 > , :: subxt :: BasicError >{ let entry = SignedSubmissionIndices; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn signed_submissions_map (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: 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 :: Error < DispatchError >>{ + } pub async fn signed_submissions_map (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > , :: subxt :: BasicError >{ let entry = SignedSubmissionsMap(_0); - self.client.storage().fetch(&entry, hash).await + self.client.storage().fetch_or_default(&entry, hash).await } pub async fn signed_submissions_map_iter( &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SignedSubmissionsMap, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, SignedSubmissionsMap>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -11377,7 +10847,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<[::core::primitive::u128; 3usize]>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = MinimumUntrustedScore; self.client.storage().fetch(&entry, hash).await @@ -11385,171 +10855,6 @@ pub mod api { } } } - pub mod bags_list { - use super::runtime_types; - pub mod calls { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rebag { - pub dislocated: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for Rebag { - const PALLET: &'static str = "BagsList"; - const FUNCTION: &'static str = "rebag"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PutInFrontOf { - pub lighter: ::subxt::sp_core::crypto::AccountId32, - } - impl ::subxt::Call for PutInFrontOf { - const PALLET: &'static str = "BagsList"; - const FUNCTION: &'static str = "put_in_front_of"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(X, A)>, - } - impl<'a, T, X, A> TransactionApi<'a, T, X, A> - where - T: ::subxt::Config, - X: ::subxt::SignedExtra, - A: ::subxt::AccountData, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - pub fn rebag( - &self, - dislocated: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Rebag, DispatchError> - { - let call = Rebag { dislocated }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn put_in_front_of( - &self, - lighter: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, PutInFrontOf, DispatchError> - { - let call = PutInFrontOf { lighter }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - } - } - pub type Event = runtime_types::pallet_bags_list::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rebagged { - pub who: ::subxt::sp_core::crypto::AccountId32, - pub from: ::core::primitive::u64, - pub to: ::core::primitive::u64, - } - impl ::subxt::Event for Rebagged { - const PALLET: &'static str = "BagsList"; - const EVENT: &'static str = "Rebagged"; - } - } - pub mod storage { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct ListNodes(pub ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for ListNodes { - const PALLET: &'static str = "BagsList"; - 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 = "BagsList"; - const STORAGE: &'static str = "CounterForListNodes"; - type Value = ::core::primitive::u32; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct ListBags(pub ::core::primitive::u64); - impl ::subxt::StorageEntry for ListBags { - const PALLET: &'static str = "BagsList"; - 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 async fn list_nodes( - &self, - _0: ::subxt::sp_core::crypto::AccountId32, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option, - ::subxt::Error, - > { - let entry = ListNodes(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn list_nodes_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ListNodes, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn counter_for_list_nodes( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { - let entry = CounterForListNodes; - self.client.storage().fetch_or_default(&entry, hash).await - } - pub async fn list_bags( - &self, - _0: ::core::primitive::u64, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option, - ::subxt::Error, - > { - let entry = ListBags(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn list_bags_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ListBags, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - } - } - } pub mod parachains_origin { use super::runtime_types; } @@ -11559,12 +10864,12 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetValidationUpgradeCooldown { + pub struct SetValidationUpgradeFrequency { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidationUpgradeCooldown { + impl ::subxt::Call for SetValidationUpgradeFrequency { const PALLET: &'static str = "Configuration"; - const FUNCTION: &'static str = "set_validation_upgrade_cooldown"; + const FUNCTION: &'static str = "set_validation_upgrade_frequency"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetValidationUpgradeDelay { @@ -11889,40 +11194,8 @@ pub mod api { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_ump_max_individual_weight"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -11931,13 +11204,13 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, } } - pub fn set_validation_upgrade_cooldown( + pub fn set_validation_upgrade_frequency( &self, new: ::core::primitive::u32, ) -> ::subxt::SubmittableExtrinsic< @@ -11945,10 +11218,10 @@ pub mod api { T, X, A, - SetValidationUpgradeCooldown, + SetValidationUpgradeFrequency, DispatchError, > { - let call = SetValidationUpgradeCooldown { new }; + let call = SetValidationUpgradeFrequency { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_validation_upgrade_delay( @@ -12511,67 +11784,10 @@ pub mod api { let call = SetUmpMaxIndividualWeight { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_pvf_checking_enabled( - &self, - new: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetPvfCheckingEnabled, - DispatchError, - > { - let call = SetPvfCheckingEnabled { new }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn set_pvf_voting_ttl( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetPvfVotingTtl, - DispatchError, - > { - let call = SetPvfVotingTtl { new }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn set_minimum_validation_upgrade_delay( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetMinimumValidationUpgradeDelay, - DispatchError, - > { - let call = SetMinimumValidationUpgradeDelay { new }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn set_bypass_consistency_check( - &self, - new: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetBypassConsistencyCheck, - DispatchError, - > { - let call = SetBypassConsistencyCheck { new }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } } } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ActiveConfig; impl ::subxt::StorageEntry for ActiveConfig { const PALLET: &'static str = "Configuration"; @@ -12585,7 +11801,7 @@ pub mod api { impl ::subxt::StorageEntry for PendingConfig { const PALLET: &'static str = "Configuration"; const STORAGE: &'static str = "PendingConfig"; - type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: migration :: v1 :: HostConfiguration < :: core :: primitive :: u32 > ; + type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -12593,34 +11809,16 @@ pub mod api { )]) } } - 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, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn active_config (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , :: subxt :: Error < DispatchError >>{ + } pub async fn active_config (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , :: subxt :: BasicError >{ let entry = ActiveConfig; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn pending_config (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: configuration :: migration :: v1 :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ + } pub async fn pending_config (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ let entry = PendingConfig(_0); self.client.storage().fetch(&entry, hash).await } @@ -12628,23 +11826,10 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingConfig, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingConfig>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await - } pub async fn pending_configs (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: Error < DispatchError >>{ - let entry = PendingConfigs; - self.client.storage().fetch_or_default(&entry, hash).await - } - pub async fn bypass_consistency_check( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::bool, - ::subxt::Error, - > { - let entry = BypassConsistencyCheck; - self.client.storage().fetch_or_default(&entry, hash).await } } } @@ -12655,7 +11840,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -12664,7 +11849,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -12674,7 +11859,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct CurrentSessionIndex; impl ::subxt::StorageEntry for CurrentSessionIndex { const PALLET: &'static str = "ParasShared"; @@ -12707,19 +11891,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn current_session_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = CurrentSessionIndex; self.client.storage().fetch_or_default(&entry, hash).await } @@ -12730,7 +11912,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_primitives::v0::ValidatorIndex, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ActiveValidatorIndices; self.client.storage().fetch_or_default(&entry, hash).await @@ -12742,7 +11924,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_primitives::v0::validator_app::Public, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ActiveValidatorKeys; self.client.storage().fetch_or_default(&entry, hash).await @@ -12756,7 +11938,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -12765,7 +11947,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -12818,7 +12000,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct AvailabilityBitfields( pub runtime_types::polkadot_primitives::v0::ValidatorIndex, ); @@ -12864,12 +12045,12 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn availability_bitfields (& self , _0 : runtime_types :: polkadot_primitives :: v0 :: ValidatorIndex , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ + } pub async fn availability_bitfields (& self , _0 : runtime_types :: polkadot_primitives :: v0 :: ValidatorIndex , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ let entry = AvailabilityBitfields(_0); self.client.storage().fetch(&entry, hash).await } @@ -12877,11 +12058,11 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AvailabilityBitfields, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, AvailabilityBitfields>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await - } pub async fn pending_availability (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ + } pub async fn pending_availability (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: sp_core :: H256 , :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ let entry = PendingAvailability(_0); self.client.storage().fetch(&entry, hash).await } @@ -12889,8 +12070,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingAvailability, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingAvailability>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -12904,7 +12085,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PendingAvailabilityCommitments(_0); self.client.storage().fetch(&entry, hash).await @@ -12913,13 +12094,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter< - 'a, - T, - PendingAvailabilityCommitments, - DispatchError, - >, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingAvailabilityCommitments>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -12945,7 +12121,7 @@ pub mod api { const FUNCTION: &'static str = "enter"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -12954,7 +12130,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -12977,7 +12153,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Included; impl ::subxt::StorageEntry for Included { const PALLET: &'static str = "ParaInherent"; @@ -12987,48 +12162,21 @@ pub mod api { ::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::v1::ScrapedOnChainVotes< - ::subxt::sp_core::H256, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn included( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<()>, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::BasicError> + { let entry = Included; self.client.storage().fetch(&entry, hash).await } - pub async fn on_chain_votes( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option< - runtime_types::polkadot_primitives::v1::ScrapedOnChainVotes< - ::subxt::sp_core::H256, - >, - >, - ::subxt::Error, - > { - let entry = OnChainVotes; - self.client.storage().fetch(&entry, hash).await - } } } } @@ -13036,7 +12184,6 @@ pub mod api { use super::runtime_types; pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct ValidatorGroups; impl ::subxt::StorageEntry for ValidatorGroups { const PALLET: &'static str = "ParaScheduler"; @@ -13103,10 +12250,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn validator_groups( @@ -13118,11 +12265,11 @@ pub mod api { runtime_types::polkadot_primitives::v0::ValidatorIndex, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ValidatorGroups; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn parathread_queue (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , :: subxt :: Error < DispatchError >>{ + } pub async fn parathread_queue (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , :: subxt :: BasicError >{ let entry = ParathreadQueue; self.client.storage().fetch_or_default(&entry, hash).await } @@ -13135,7 +12282,7 @@ pub mod api { runtime_types::polkadot_primitives::v1::CoreOccupied, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = AvailabilityCores; self.client.storage().fetch_or_default(&entry, hash).await @@ -13145,7 +12292,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ParathreadClaimIndex; self.client.storage().fetch_or_default(&entry, hash).await @@ -13153,13 +12300,11 @@ pub mod api { pub async fn session_start_block( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = SessionStartBlock; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn scheduled (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , :: subxt :: Error < DispatchError >>{ + } pub async fn scheduled (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , :: subxt :: BasicError >{ let entry = Scheduled; self.client.storage().fetch_or_default(&entry, hash).await } @@ -13218,36 +12363,8 @@ pub mod api { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_queue_action"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IncludePvfCheckStatement { - pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - pub signature: - runtime_types::polkadot_primitives::v0::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, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -13256,7 +12373,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -13341,51 +12458,6 @@ pub mod api { let call = ForceQueueAction { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn add_trusted_validation_code( - &self, - validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AddTrustedValidationCode, - DispatchError, - > { - let call = AddTrustedValidationCode { validation_code }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn poke_unused_validation_code( - &self, - validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - PokeUnusedValidationCode, - DispatchError, - > { - let call = PokeUnusedValidationCode { - validation_code_hash, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn include_pvf_check_statement( - &self, - stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - signature : runtime_types :: polkadot_primitives :: v0 :: validator_app :: Signature, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - IncludePvfCheckStatement, - DispatchError, - > { - let call = IncludePvfCheckStatement { stmt, signature }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } } } pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; @@ -13432,62 +12504,9 @@ pub mod api { const PALLET: &'static str = "Paras"; const EVENT: &'static str = "ActionQueued"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PvfCheckStarted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::Event for PvfCheckStarted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckStarted"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PvfCheckAccepted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::Event for PvfCheckAccepted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckAccepted"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PvfCheckRejected( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::Event for PvfCheckRejected { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckRejected"; - } } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct PvfActiveVoteMap( - pub 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"; @@ -13724,42 +12743,18 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn pvf_active_vote_map (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , :: subxt :: Error < DispatchError >>{ - let entry = PvfActiveVoteMap(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn pvf_active_vote_map_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PvfActiveVoteMap, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn pvf_active_vote_list( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ::subxt::Error, - > { - let entry = PvfActiveVoteList; - self.client.storage().fetch_or_default(&entry, hash).await } pub async fn parachains( &self, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Parachains; self.client.storage().fetch_or_default(&entry, hash).await @@ -13772,7 +12767,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ParaLifecycles(_0); self.client.storage().fetch(&entry, hash).await @@ -13781,8 +12776,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ParaLifecycles, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ParaLifecycles>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13794,7 +12789,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::HeadData, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Heads(_0); self.client.storage().fetch(&entry, hash).await @@ -13803,8 +12798,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Heads, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Heads>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13816,7 +12811,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = CurrentCodeHash(_0); self.client.storage().fetch(&entry, hash).await @@ -13825,8 +12820,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, CurrentCodeHash, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, CurrentCodeHash>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13839,7 +12834,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PastCodeHash(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -13848,8 +12843,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PastCodeHash, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PastCodeHash>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13861,7 +12856,7 @@ pub mod api { runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< ::core::primitive::u32, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PastCodeMeta(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -13870,8 +12865,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PastCodeMeta, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PastCodeMeta>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13883,7 +12878,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PastCodePruning; self.client.storage().fetch_or_default(&entry, hash).await @@ -13894,7 +12889,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = FutureCodeUpgrades(_0); self.client.storage().fetch(&entry, hash).await @@ -13903,8 +12898,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, FutureCodeUpgrades, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, FutureCodeUpgrades>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13916,7 +12911,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = FutureCodeHash(_0); self.client.storage().fetch(&entry, hash).await @@ -13925,8 +12920,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, FutureCodeHash, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, FutureCodeHash>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13938,7 +12933,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_primitives::v1::UpgradeGoAhead, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = UpgradeGoAheadSignal(_0); self.client.storage().fetch(&entry, hash).await @@ -13947,8 +12942,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UpgradeGoAheadSignal, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UpgradeGoAheadSignal>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13960,7 +12955,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_primitives::v1::UpgradeRestriction, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = UpgradeRestrictionSignal(_0); self.client.storage().fetch(&entry, hash).await @@ -13969,8 +12964,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UpgradeRestrictionSignal, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UpgradeRestrictionSignal>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -13982,7 +12977,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = UpgradeCooldowns; self.client.storage().fetch_or_default(&entry, hash).await @@ -13995,7 +12990,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = UpcomingUpgrades; self.client.storage().fetch_or_default(&entry, hash).await @@ -14006,7 +13001,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ActionsQueue(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -14015,11 +13010,11 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ActionsQueue, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ActionsQueue>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await - } pub async fn upcoming_paras_genesis (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: Error < DispatchError >>{ + } pub async fn upcoming_paras_genesis (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: Id , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: BasicError >{ let entry = UpcomingParasGenesis(_0); self.client.storage().fetch(&entry, hash).await } @@ -14027,8 +13022,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UpcomingParasGenesis, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, UpcomingParasGenesis>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14036,10 +13031,8 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = CodeByHashRefs(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -14047,8 +13040,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, CodeByHashRefs, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, CodeByHashRefs>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14060,7 +13053,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::ValidationCode, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = CodeByHash(_0); self.client.storage().fetch(&entry, hash).await @@ -14069,8 +13062,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, CodeByHash, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, CodeByHash>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14091,7 +13084,7 @@ pub mod api { const FUNCTION: &'static str = "force_approve"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -14100,7 +13093,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14118,7 +13111,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HasInitialized; impl ::subxt::StorageEntry for HasInitialized { const PALLET: &'static str = "Initializer"; @@ -14138,22 +13130,20 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn has_initialized( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<()>, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::BasicError> + { let entry = HasInitialized; self.client.storage().fetch(&entry, hash).await - } pub async fn buffered_session_changes (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: Error < DispatchError >>{ + } pub async fn buffered_session_changes (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: BasicError >{ let entry = BufferedSessionChanges; self.client.storage().fetch_or_default(&entry, hash).await } @@ -14166,7 +13156,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -14175,7 +13165,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14185,7 +13175,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct DownwardMessageQueues( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -14219,10 +13208,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn downward_message_queues( @@ -14235,7 +13224,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = DownwardMessageQueues(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -14244,8 +13233,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DownwardMessageQueues, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, DownwardMessageQueues>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14253,10 +13242,8 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::sp_core::H256, - ::subxt::Error, - > { + ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::BasicError> + { let entry = DownwardMessageQueueHeads(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -14264,8 +13251,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DownwardMessageQueueHeads, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, DownwardMessageQueueHeads>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14287,7 +13274,7 @@ pub mod api { const FUNCTION: &'static str = "service_overweight"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -14296,7 +13283,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14389,7 +13376,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct RelayDispatchQueues( pub runtime_types::polkadot_parachain::primitives::Id, ); @@ -14462,10 +13448,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn relay_dispatch_queues( @@ -14474,7 +13460,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = RelayDispatchQueues(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -14483,8 +13469,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayDispatchQueues, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, RelayDispatchQueues>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14494,7 +13480,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< (::core::primitive::u32, ::core::primitive::u32), - ::subxt::Error, + ::subxt::BasicError, > { let entry = RelayDispatchQueueSize(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -14503,8 +13489,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayDispatchQueueSize, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, RelayDispatchQueueSize>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14513,7 +13499,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NeedsDispatch; self.client.storage().fetch_or_default(&entry, hash).await @@ -14525,7 +13511,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::Id, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextDispatchRoundStartWith; self.client.storage().fetch(&entry, hash).await @@ -14539,7 +13525,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, ::std::vec::Vec<::core::primitive::u8>, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Overweight(_0); self.client.storage().fetch(&entry, hash).await @@ -14548,18 +13534,16 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Overweight, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Overweight>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn overweight_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u64, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { let entry = OverweightCount; self.client.storage().fetch_or_default(&entry, hash).await } @@ -14628,7 +13612,7 @@ pub mod api { const FUNCTION: &'static str = "hrmp_cancel_open_request"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -14637,7 +13621,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -14791,7 +13775,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct HrmpOpenChannelRequests( pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, ); @@ -14965,12 +13948,12 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn hrmp_open_channel_requests (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: Error < DispatchError >>{ + } pub async fn hrmp_open_channel_requests (& self , _0 : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: BasicError >{ let entry = HrmpOpenChannelRequests(_0); self.client.storage().fetch(&entry, hash).await } @@ -14978,8 +13961,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpOpenChannelRequests, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpOpenChannelRequests>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -14990,7 +13973,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpOpenChannelRequestsList; self.client.storage().fetch_or_default(&entry, hash).await @@ -14999,10 +13982,8 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = HrmpOpenChannelRequestCount(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -15010,8 +13991,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpOpenChannelRequestCount, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpOpenChannelRequestCount>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15019,10 +14000,8 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = HrmpAcceptedChannelRequestCount(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -15030,13 +14009,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter< - 'a, - T, - HrmpAcceptedChannelRequestCount, - DispatchError, - >, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpAcceptedChannelRequestCount>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15044,10 +14018,8 @@ pub mod api { &self, _0: runtime_types::polkadot_parachain::primitives::HrmpChannelId, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<()>, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::BasicError> + { let entry = HrmpCloseChannelRequests(_0); self.client.storage().fetch(&entry, hash).await } @@ -15055,8 +14027,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpCloseChannelRequests, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpCloseChannelRequests>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15067,7 +14039,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpCloseChannelRequestsList; self.client.storage().fetch_or_default(&entry, hash).await @@ -15078,7 +14050,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpWatermarks(_0); self.client.storage().fetch(&entry, hash).await @@ -15087,8 +14059,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpWatermarks, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpWatermarks>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15100,7 +14072,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpChannels(_0); self.client.storage().fetch(&entry, hash).await @@ -15109,8 +14081,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannels, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpChannels>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15120,7 +14092,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpIngressChannelsIndex(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -15129,8 +14101,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpIngressChannelsIndex, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpIngressChannelsIndex>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15140,7 +14112,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpEgressChannelsIndex(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -15149,8 +14121,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpEgressChannelsIndex, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpEgressChannelsIndex>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15164,7 +14136,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpChannelContents(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -15173,8 +14145,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannelContents, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpChannelContents>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15189,7 +14161,7 @@ pub mod api { runtime_types::polkadot_parachain::primitives::Id, >, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = HrmpChannelDigests(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -15198,8 +14170,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, HrmpChannelDigests, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, HrmpChannelDigests>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15210,7 +14182,6 @@ pub mod api { use super::runtime_types; pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct AssignmentKeysUnsafe; impl ::subxt::StorageEntry for AssignmentKeysUnsafe { const PALLET: &'static str = "ParaSessionInfo"; @@ -15235,7 +14206,7 @@ pub mod api { impl ::subxt::StorageEntry for Sessions { const PALLET: &'static str = "ParaSessionInfo"; const STORAGE: &'static str = "Sessions"; - type Value = runtime_types::polkadot_primitives::v2::SessionInfo; + type Value = runtime_types::polkadot_primitives::v1::SessionInfo; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -15244,10 +14215,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn assignment_keys_unsafe( @@ -15257,7 +14228,7 @@ pub mod api { ::std::vec::Vec< runtime_types::polkadot_primitives::v1::assignment_app::Public, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = AssignmentKeysUnsafe; self.client.storage().fetch_or_default(&entry, hash).await @@ -15265,10 +14236,8 @@ pub mod api { pub async fn earliest_stored_session( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = EarliestStoredSession; self.client.storage().fetch_or_default(&entry, hash).await } @@ -15278,9 +14247,9 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v2::SessionInfo, + runtime_types::polkadot_primitives::v1::SessionInfo, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Sessions(_0); self.client.storage().fetch(&entry, hash).await @@ -15289,8 +14258,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Sessions, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Sessions>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15358,7 +14327,7 @@ pub mod api { const FUNCTION: &'static str = "reserve"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -15367,7 +14336,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -15484,7 +14453,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct PendingSwap(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::StorageEntry for PendingSwap { const PALLET: &'static str = "Registrar"; @@ -15523,10 +14491,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn pending_swap( @@ -15537,7 +14505,7 @@ pub mod api { ::core::option::Option< runtime_types::polkadot_parachain::primitives::Id, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = PendingSwap(_0); self.client.storage().fetch(&entry, hash).await @@ -15546,8 +14514,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingSwap, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, PendingSwap>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15562,7 +14530,7 @@ pub mod api { ::core::primitive::u128, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Paras(_0); self.client.storage().fetch(&entry, hash).await @@ -15571,8 +14539,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Paras, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Paras>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15581,7 +14549,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::polkadot_parachain::primitives::Id, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NextFreeParaId; self.client.storage().fetch_or_default(&entry, hash).await @@ -15623,7 +14591,7 @@ pub mod api { const FUNCTION: &'static str = "trigger_onboard"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -15632,7 +14600,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -15711,7 +14679,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Leases(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::StorageEntry for Leases { const PALLET: &'static str = "Slots"; @@ -15730,10 +14697,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn leases( @@ -15747,7 +14714,7 @@ pub mod api { ::core::primitive::u128, )>, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Leases(_0); self.client.storage().fetch_or_default(&entry, hash).await @@ -15756,8 +14723,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Leases, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Leases>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -15804,7 +14771,7 @@ pub mod api { const FUNCTION: &'static str = "cancel_auction"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -15813,7 +14780,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -15936,7 +14903,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct AuctionCounter; impl ::subxt::StorageEntry for AuctionCounter { const PALLET: &'static str = "Auctions"; @@ -15987,19 +14953,17 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn auction_counter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = AuctionCounter; self.client.storage().fetch_or_default(&entry, hash).await } @@ -16011,7 +14975,7 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, )>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = AuctionInfo; self.client.storage().fetch(&entry, hash).await @@ -16023,7 +14987,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, - ::subxt::Error, + ::subxt::BasicError, > { let entry = ReservedAmounts(_0, _1); self.client.storage().fetch(&entry, hash).await @@ -16032,8 +14996,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReservedAmounts, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, ReservedAmounts>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -16049,7 +15013,7 @@ pub mod api { ::core::primitive::u128, )>; 36usize], >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Winning(_0); self.client.storage().fetch(&entry, hash).await @@ -16058,8 +15022,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Winning, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Winning>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -16167,19 +15131,8 @@ pub mod api { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "poke"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -16188,7 +15141,7 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -16296,23 +15249,6 @@ pub mod api { let call = Poke { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn contribute_all( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ContributeAll, - DispatchError, - > { - let call = ContributeAll { index, signature }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } } } pub type Event = runtime_types::polkadot_runtime_common::crowdloan::pallet::Event; @@ -16400,7 +15336,6 @@ pub mod api { } pub mod storage { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct Funds(pub runtime_types::polkadot_parachain::primitives::Id); impl ::subxt::StorageEntry for Funds { const PALLET: &'static str = "Crowdloan"; @@ -16447,10 +15382,10 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { + pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } pub async fn funds( @@ -16466,7 +15401,7 @@ pub mod api { ::core::primitive::u32, >, >, - ::subxt::Error, + ::subxt::BasicError, > { let entry = Funds(_0); self.client.storage().fetch(&entry, hash).await @@ -16475,8 +15410,8 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Funds, DispatchError>, - ::subxt::Error, + ::subxt::KeyIter<'a, T, Funds>, + ::subxt::BasicError, > { self.client.storage().iter(hash).await } @@ -16485,7 +15420,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec, - ::subxt::Error, + ::subxt::BasicError, > { let entry = NewRaise; self.client.storage().fetch_or_default(&entry, hash).await @@ -16493,1081 +15428,773 @@ pub mod api { pub async fn endings_count( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = EndingsCount; self.client.storage().fetch_or_default(&entry, hash).await } pub async fn next_trie_index( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { let entry = NextTrieIndex; self.client.storage().fetch_or_default(&entry, hash).await } } } } - pub mod xcm_pallet { + pub mod runtime_types { use super::runtime_types; - pub mod calls { + pub mod bitvec { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Send { - pub dest: runtime_types::xcm::VersionedMultiLocation, - pub message: runtime_types::xcm::VersionedXcm, - } - impl ::subxt::Call for Send { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "send"; + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Lsb0 {} } + } + pub mod finality_grandpa { + use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TeleportAssets { - pub dest: runtime_types::xcm::VersionedMultiLocation, - pub beneficiary: runtime_types::xcm::VersionedMultiLocation, - pub assets: runtime_types::xcm::VersionedMultiAssets, - pub fee_asset_item: ::core::primitive::u32, - } - impl ::subxt::Call for TeleportAssets { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "teleport_assets"; + 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReserveTransferAssets { - pub dest: runtime_types::xcm::VersionedMultiLocation, - pub beneficiary: runtime_types::xcm::VersionedMultiLocation, - pub assets: runtime_types::xcm::VersionedMultiAssets, - pub fee_asset_item: ::core::primitive::u32, - } - impl ::subxt::Call for ReserveTransferAssets { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "reserve_transfer_assets"; + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Execute { - pub message: runtime_types::xcm::VersionedXcm, - pub max_weight: ::core::primitive::u64, - } - impl ::subxt::Call for Execute { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "execute"; + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceXcmVersion { - pub location: 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 :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceSubscribeVersionNotify { - pub location: runtime_types::xcm::VersionedMultiLocation, - } - impl ::subxt::Call for ForceSubscribeVersionNotify { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "force_subscribe_version_notify"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceUnsubscribeVersionNotify { - pub location: runtime_types::xcm::VersionedMultiLocation, - } - impl ::subxt::Call for ForceUnsubscribeVersionNotify { - const PALLET: &'static str = "XcmPallet"; - const FUNCTION: &'static str = "force_unsubscribe_version_notify"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct LimitedReserveTransferAssets { - pub dest: runtime_types::xcm::VersionedMultiLocation, - pub beneficiary: runtime_types::xcm::VersionedMultiLocation, - pub assets: runtime_types::xcm::VersionedMultiAssets, - 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct LimitedTeleportAssets { - pub dest: runtime_types::xcm::VersionedMultiLocation, - pub beneficiary: runtime_types::xcm::VersionedMultiLocation, - pub assets: runtime_types::xcm::VersionedMultiAssets, - 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, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(X, A)>, - } - impl<'a, T, X, A> TransactionApi<'a, T, X, A> - where - T: ::subxt::Config, - X: ::subxt::SignedExtra, - A: ::subxt::AccountData, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } + } + pub mod frame_support { + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BoundedBTreeMap<_0, _1>( + pub ::std::collections::BTreeMap<_0, _1>, + ); } - pub fn send( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - message: runtime_types::xcm::VersionedXcm, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Send, DispatchError> - { - let call = Send { dest, message }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); } - pub fn teleport_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - TeleportAssets, - DispatchError, - > { - let call = TeleportAssets { - dest, - beneficiary, - assets, - fee_asset_item, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); } - pub fn reserve_transfer_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReserveTransferAssets, - DispatchError, - > { - let call = ReserveTransferAssets { - dest, - beneficiary, - assets, - fee_asset_item, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub mod traits { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WrapperOpaque<_0>( + #[codec(compact)] ::core::primitive::u32, + pub _0, + ); } - pub fn execute( - &self, - message: runtime_types::xcm::VersionedXcm, - max_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Execute, DispatchError> - { - let call = Execute { - message, - max_weight, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } } - pub fn force_xcm_version( - &self, - location: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm_version: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceXcmVersion, - DispatchError, - > { - let call = ForceXcmVersion { - location, - xcm_version, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub mod weights { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, } - pub fn force_default_xcm_version( - &self, - maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceDefaultXcmVersion, - DispatchError, - > { - let call = ForceDefaultXcmVersion { maybe_xcm_version }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct DispatchInfo { + pub weight: ::core::primitive::u64, + pub class: runtime_types::frame_support::weights::DispatchClass, + pub pays_fee: runtime_types::frame_support::weights::Pays, } - pub fn force_subscribe_version_notify( - &self, - location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceSubscribeVersionNotify, - DispatchError, - > { - let call = ForceSubscribeVersionNotify { location }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, } - pub fn force_unsubscribe_version_notify( - &self, - location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceUnsubscribeVersionNotify, - DispatchError, - > { - let call = ForceUnsubscribeVersionNotify { location }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, } - pub fn limited_reserve_transfer_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - LimitedReserveTransferAssets, - DispatchError, - > { - let call = LimitedReserveTransferAssets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, } - pub fn limited_teleport_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - LimitedTeleportAssets, - DispatchError, - > { - let call = LimitedTeleportAssets { - dest, - beneficiary, - assets, - fee_asset_item, - weight_limit, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WeightToFeeCoefficient<_0> { + pub coeff_integer: _0, + pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, + pub negative: ::core::primitive::bool, + pub degree: ::core::primitive::u8, } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub type Event = runtime_types::pallet_xcm::pallet::Event; - pub mod events { + pub mod frame_system { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Attempted(pub runtime_types::xcm::v2::traits::Outcome); - impl ::subxt::Event for Attempted { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Attempted"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Sent( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::v2::Xcm, - ); - impl ::subxt::Event for Sent { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Sent"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct UnexpectedResponse( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::Event for UnexpectedResponse { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "UnexpectedResponse"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ResponseReady( - pub ::core::primitive::u64, - pub runtime_types::xcm::v2::Response, - ); - impl ::subxt::Event for ResponseReady { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "ResponseReady"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Notified( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::Event for Notified { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Notified"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotifyOverweight( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - pub ::core::primitive::u64, - pub ::core::primitive::u64, - ); - impl ::subxt::Event for NotifyOverweight { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyOverweight"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotifyDispatchError( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::Event for NotifyDispatchError { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyDispatchError"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotifyDecodeFailed( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::Event for NotifyDecodeFailed { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyDecodeFailed"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct InvalidResponder( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub ::core::option::Option< - runtime_types::xcm::v1::multilocation::MultiLocation, - >, - ); - impl ::subxt::Event for InvalidResponder { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidResponder"; + pub mod extensions { + use super::runtime_types; + pub mod check_genesis { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckGenesis {} + } + pub mod check_mortality { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckMortality( + pub runtime_types::sp_runtime::generic::era::Era, + ); + } + pub mod check_nonce { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckSpecVersion {} + } + pub mod check_tx_version { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckTxVersion {} + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct CheckWeight {} + } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct InvalidResponderVersion( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::Event for InvalidResponderVersion { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidResponderVersion"; + pub mod limits { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BlockLength { + pub max: runtime_types::frame_support::weights::PerDispatchClass< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct BlockWeights { + pub base_block: ::core::primitive::u64, + pub max_block: ::core::primitive::u64, + pub per_class: + runtime_types::frame_support::weights::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WeightsPerClass { + pub base_extrinsic: ::core::primitive::u64, + pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, + pub max_total: ::core::option::Option<::core::primitive::u64>, + pub reserved: ::core::option::Option<::core::primitive::u64>, + } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ResponseTaken(pub ::core::primitive::u64); - impl ::subxt::Event for ResponseTaken { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "ResponseTaken"; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + # [codec (index = 0)] fill_block { ratio : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 1)] remark { remark : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 2)] set_heap_pages { pages : :: core :: primitive :: u64 , } , # [codec (index = 3)] set_code { code : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] set_code_without_checks { code : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 5)] set_changes_trie_config { changes_trie_config : :: core :: option :: Option < runtime_types :: sp_core :: changes_trie :: ChangesTrieConfiguration > , } , # [codec (index = 6)] set_storage { items : :: std :: vec :: Vec < (:: std :: vec :: Vec < :: core :: primitive :: u8 > , :: std :: vec :: Vec < :: core :: primitive :: u8 > ,) > , } , # [codec (index = 7)] kill_storage { keys : :: std :: vec :: Vec < :: std :: vec :: Vec < :: core :: primitive :: u8 > > , } , # [codec (index = 8)] kill_prefix { prefix : :: std :: vec :: Vec < :: core :: primitive :: u8 > , subkeys : :: core :: primitive :: u32 , } , # [codec (index = 9)] remark_with_event { remark : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidSpecName, + #[codec(index = 1)] + SpecVersionNeedsToIncrease, + #[codec(index = 2)] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + NonDefaultComposite, + #[codec(index = 4)] + NonZeroRefCount, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + ExtrinsicSuccess(runtime_types::frame_support::weights::DispatchInfo), + #[codec(index = 1)] + ExtrinsicFailed( + runtime_types::sp_runtime::DispatchError, + runtime_types::frame_support::weights::DispatchInfo, + ), + #[codec(index = 2)] + CodeUpdated, + #[codec(index = 3)] + NewAccount(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + KilledAccount(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 5)] + Remarked( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ), + } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AssetsTrapped( - pub ::subxt::sp_core::H256, - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - impl ::subxt::Event for AssetsTrapped { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "AssetsTrapped"; + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct VersionChangeNotified( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u32, - ); - impl ::subxt::Event for VersionChangeNotified { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "VersionChangeNotified"; + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SupportedVersionChanged( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u32, - ); - impl ::subxt::Event for SupportedVersionChanged { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "SupportedVersionChanged"; + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotifyTargetSendFail( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub runtime_types::xcm::v2::traits::Error, - ); - impl ::subxt::Event for NotifyTargetSendFail { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyTargetSendFail"; + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotifyTargetMigrationFail( - pub runtime_types::xcm::VersionedMultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::Event for NotifyTargetMigrationFail { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyTargetMigrationFail"; + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, } } - pub mod storage { + pub mod pallet_authorship { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - 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 mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, } - } - pub struct Queries(pub ::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, - )]) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidUncleParent, + #[codec(index = 1)] + UnclesAlreadySet, + #[codec(index = 2)] + TooManyUncles, + #[codec(index = 3)] + GenesisUncle, + #[codec(index = 4)] + TooHighUncle, + #[codec(index = 5)] + UncleAlreadyIncluded, + #[codec(index = 6)] + OldUncle, } } - pub struct AssetTraps(pub ::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, - )]) - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum UncleEntryItem<_0, _1, _2> { + #[codec(index = 0)] + InclusionHeight(_0), + #[codec(index = 1)] + Uncle(_1, ::core::option::Option<_2>), } - 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 mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + # [codec (index = 0)] 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)] 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)] plan_config_change { config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor , } , } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidEquivocationProof, + #[codec(index = 1)] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + DuplicateOffenceReport, } } - pub struct SupportedVersion( - ::core::primitive::u32, - 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 mod pallet_balances { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + transfer { + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + set_balance { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + new_free: ::core::primitive::u128, + #[codec(compact)] + new_reserved: ::core::primitive::u128, + }, + #[codec(index = 2)] + force_transfer { + source: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + transfer_keep_alive { + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + transfer_all { + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + keep_alive: ::core::primitive::bool, + }, + #[codec(index = 5)] + force_unreserve { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + amount: ::core::primitive::u128, + }, } - } - pub struct VersionNotifiers( - ::core::primitive::u32, - 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, - ), - ]) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + VestingBalance, + #[codec(index = 1)] + LiquidityRestrictions, + #[codec(index = 2)] + InsufficientBalance, + #[codec(index = 3)] + ExistentialDeposit, + #[codec(index = 4)] + KeepAlive, + #[codec(index = 5)] + ExistingVestingSchedule, + #[codec(index = 6)] + DeadAccount, + #[codec(index = 7)] + TooManyReserves, } - } - pub struct VersionNotifyTargets( - ::core::primitive::u32, - 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, - ), - ]) + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + Endowed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 1)] + DustLost( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 2)] + Transfer( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 3)] + BalanceSet( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u128, + ), + #[codec(index = 4)] + Deposit( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 5)] + Reserved( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 6)] + Unreserved( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 7)] + ReserveRepatriated( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + ), } } - pub struct VersionDiscoveryQueue; - impl ::subxt::StorageEntry for VersionDiscoveryQueue { - const PALLET: &'static str = "XcmPallet"; - const STORAGE: &'static str = "VersionDiscoveryQueue"; - type Value = - runtime_types::frame_support::storage::bounded_vec::BoundedVec<( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - )>; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub misc_frozen: _0, + pub fee_frozen: _0, } - 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 - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::Reasons, } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn query_counter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u64, - ::subxt::Error, - > { - let entry = QueryCounter; - self.client.storage().fetch_or_default(&entry, hash).await - } - pub async fn queries( - &self, - _0: ::core::primitive::u64, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum Releases { + #[codec(index = 0)] + V1_0_0, + #[codec(index = 1)] + V2_0_0, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + pub mod pallet_bounties { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Call { + #[codec(index = 0)] + propose_bounty { + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + approve_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 2)] + propose_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + curator: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), >, - >, - ::subxt::Error, - > { - let entry = Queries(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn queries_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Queries, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn asset_traps( - &self, - _0: ::subxt::sp_core::H256, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::primitive::u32, - ::subxt::Error, - > { - let entry = AssetTraps(_0); - self.client.storage().fetch_or_default(&entry, hash).await - } - pub async fn asset_traps_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AssetTraps, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn safe_xcm_version( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, - > { - let entry = SafeXcmVersion; - self.client.storage().fetch(&entry, hash).await - } - pub async fn supported_version( - &self, - _0: ::core::primitive::u32, - _1: runtime_types::xcm::VersionedMultiLocation, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u32>, - ::subxt::Error, - > { - let entry = SupportedVersion(_0, _1); - self.client.storage().fetch(&entry, hash).await - } - pub async fn supported_version_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SupportedVersion, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn version_notifiers( - &self, - _0: ::core::primitive::u32, - _1: runtime_types::xcm::VersionedMultiLocation, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u64>, - ::subxt::Error, - > { - let entry = VersionNotifiers(_0, _1); - self.client.storage().fetch(&entry, hash).await - } - pub async fn version_notifiers_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, VersionNotifiers, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn version_notify_targets( - &self, - _0: ::core::primitive::u32, - _1: runtime_types::xcm::VersionedMultiLocation, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<( - ::core::primitive::u64, - ::core::primitive::u64, - ::core::primitive::u32, - )>, - ::subxt::Error, - > { - let entry = VersionNotifyTargets(_0, _1); - self.client.storage().fetch(&entry, hash).await - } - pub async fn version_notify_targets_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, VersionNotifyTargets, DispatchError>, - ::subxt::Error, - > { - self.client.storage().iter(hash).await - } - pub async fn version_discovery_queue( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - runtime_types::frame_support::storage::bounded_vec::BoundedVec<( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - )>, - ::subxt::Error, - > { - let entry = VersionDiscoveryQueue; - self.client.storage().fetch_or_default(&entry, hash).await + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 3)] + unassign_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + accept_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 5)] + award_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + }, + #[codec(index = 6)] + claim_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 7)] + close_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + extend_bounty_expiry { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + }, } - pub async fn current_migration( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option< - runtime_types::pallet_xcm::pallet::VersionMigrationStage, - >, - ::subxt::Error, - > { - let entry = CurrentMigration; - self.client.storage().fetch(&entry, hash).await + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InsufficientProposersBalance, + #[codec(index = 1)] + InvalidIndex, + #[codec(index = 2)] + ReasonTooBig, + #[codec(index = 3)] + UnexpectedStatus, + #[codec(index = 4)] + RequireCurator, + #[codec(index = 5)] + InvalidValue, + #[codec(index = 6)] + InvalidFee, + #[codec(index = 7)] + PendingPayout, + #[codec(index = 8)] + Premature, } - } - } - } - pub mod runtime_types { - use super::runtime_types; - pub mod bitvec { - use super::runtime_types; - pub mod order { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct Lsb0 {} - } - } - pub mod finality_grandpa { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Equivocation<_0, _1, _2> { - pub round_number: ::core::primitive::u64, - pub identity: _0, - pub first: (_1, _2), - pub second: (_1, _2), + pub enum Event { + #[codec(index = 0)] + BountyProposed(::core::primitive::u32), + #[codec(index = 1)] + BountyRejected(::core::primitive::u32, ::core::primitive::u128), + #[codec(index = 2)] + BountyBecameActive(::core::primitive::u32), + #[codec(index = 3)] + BountyAwarded( + ::core::primitive::u32, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 4)] + BountyClaimed( + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 5)] + BountyCanceled(::core::primitive::u32), + #[codec(index = 6)] + BountyExtended(::core::primitive::u32), + } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + pub struct Bounty<_0, _1, _2> { + pub proposer: _0, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub bond: _1, + pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Prevote<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + pub enum BountyStatus<_0, _1> { + #[codec(index = 0)] + Proposed, + #[codec(index = 1)] + Approved, + #[codec(index = 2)] + Funded, + #[codec(index = 3)] + CuratorProposed { curator: _0 }, + #[codec(index = 4)] + Active { curator: _0, update_due: _1 }, + #[codec(index = 5)] + PendingPayout { + curator: _0, + beneficiary: _0, + unlock_at: _1, + }, } } - pub mod frame_support { + pub mod pallet_collective { use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct BoundedBTreeMap<_0, _1>( - pub ::std::collections::BTreeMap<_0, _1>, - ); - } - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - } - pub mod traits { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct WrapperKeepOpaque<_0>( - #[codec(compact)] ::core::primitive::u32, - pub _0, - ); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct WrapperOpaque<_0>( - #[codec(compact)] ::core::primitive::u32, - pub _0, - ); - } - pub mod schedule { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum LookupError { - #[codec(index = 0)] - Unknown, - #[codec(index = 1)] - BadFormat, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum MaybeHashed<_0, _1> { - #[codec(index = 0)] - Value(_0), - #[codec(index = 1)] - Hash(_1), - } - } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - } - } - } - pub mod weights { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum DispatchClass { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct DispatchInfo { - pub weight: ::core::primitive::u64, - pub class: runtime_types::frame_support::weights::DispatchClass, - pub pays_fee: runtime_types::frame_support::weights::Pays, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Pays { - #[codec(index = 0)] - Yes, - #[codec(index = 1)] - No, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct WeightToFeeCoefficient<_0> { - pub coeff_integer: _0, - pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, - pub negative: ::core::primitive::bool, - pub degree: ::core::primitive::u8, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); - } - pub mod frame_system { - use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckGenesis {} - } - pub mod check_mortality { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckMortality( - pub runtime_types::sp_runtime::generic::era::Era, - ); - } - pub mod check_non_zero_sender { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckNonZeroSender {} - } - pub mod check_nonce { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod check_spec_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckSpecVersion {} - } - pub mod check_tx_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckTxVersion {} - } - pub mod check_weight { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct CheckWeight {} - } - } - pub mod limits { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct BlockLength { - pub max: runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct BlockWeights { - pub base_block: ::core::primitive::u64, - pub max_block: ::core::primitive::u64, - pub per_class: - runtime_types::frame_support::weights::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct WeightsPerClass { - pub base_extrinsic: ::core::primitive::u64, - pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, - pub max_total: ::core::option::Option<::core::primitive::u64>, - pub reserved: ::core::option::Option<::core::primitive::u64>, - } - } - pub mod pallet { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] - fill_block { - ratio: runtime_types::sp_arithmetic::per_things::Perbill, + set_members { + new_members: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + prime: + ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + old_count: ::core::primitive::u32, }, #[codec(index = 1)] - remark { - remark: ::std::vec::Vec<::core::primitive::u8>, + execute { + proposal: + ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, }, #[codec(index = 2)] - set_heap_pages { pages: ::core::primitive::u64 }, + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: + ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, #[codec(index = 3)] - set_code { - code: ::std::vec::Vec<::core::primitive::u8>, + vote { + proposal: ::subxt::sp_core::H256, + #[codec(compact)] + index: ::core::primitive::u32, + approve: ::core::primitive::bool, }, #[codec(index = 4)] - set_code_without_checks { - code: ::std::vec::Vec<::core::primitive::u8>, + close { + proposal_hash: ::subxt::sp_core::H256, + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + proposal_weight_bound: ::core::primitive::u64, + #[codec(compact)] + length_bound: ::core::primitive::u32, }, #[codec(index = 5)] - set_storage { - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - }, - #[codec(index = 6)] - kill_storage { - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - }, - #[codec(index = 7)] - kill_prefix { - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - }, - #[codec(index = 8)] - remark_with_event { - remark: ::std::vec::Vec<::core::primitive::u8>, + disapprove_proposal { + proposal_hash: ::subxt::sp_core::H256, }, } #[derive( @@ -17575,223 +16202,115 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InvalidSpecName, + NotMember, #[codec(index = 1)] - SpecVersionNeedsToIncrease, + DuplicateProposal, #[codec(index = 2)] - FailedToExtractRuntimeVersion, + ProposalMissing, #[codec(index = 3)] - NonDefaultComposite, + WrongIndex, #[codec(index = 4)] - NonZeroRefCount, + DuplicateVote, #[codec(index = 5)] - CallFiltered, + AlreadyInitialized, + #[codec(index = 6)] + TooEarly, + #[codec(index = 7)] + TooManyProposals, + #[codec(index = 8)] + WrongProposalWeight, + #[codec(index = 9)] + WrongProposalLength, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] - ExtrinsicSuccess { - dispatch_info: - runtime_types::frame_support::weights::DispatchInfo, - }, + Proposed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::subxt::sp_core::H256, + ::core::primitive::u32, + ), #[codec(index = 1)] - ExtrinsicFailed { - dispatch_error: runtime_types::sp_runtime::DispatchError, - dispatch_info: - runtime_types::frame_support::weights::DispatchInfo, - }, - #[codec(index = 2)] - CodeUpdated, - #[codec(index = 3)] - NewAccount { - account: ::subxt::sp_core::crypto::AccountId32, - }, + Voted( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ::core::primitive::bool, + ::core::primitive::u32, + ::core::primitive::u32, + ), + #[codec(index = 2)] + Approved(::subxt::sp_core::H256), + #[codec(index = 3)] + Disapproved(::subxt::sp_core::H256), #[codec(index = 4)] - KilledAccount { - account: ::subxt::sp_core::crypto::AccountId32, - }, + Executed( + ::subxt::sp_core::H256, + ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + ), #[codec(index = 5)] - Remarked { - sender: ::subxt::sp_core::crypto::AccountId32, - hash: ::subxt::sp_core::H256, - }, + MemberExecuted( + ::subxt::sp_core::H256, + ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + ), + #[codec(index = 6)] + Closed( + ::subxt::sp_core::H256, + ::core::primitive::u32, + ::core::primitive::u32, + ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, - pub data: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Phase { + pub enum RawOrigin<_0> { #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), + Members(::core::primitive::u32, ::core::primitive::u32), #[codec(index = 1)] - Finalization, + Member(_0), #[codec(index = 2)] - Initialization, + _Phantom, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, + pub struct Votes<_0, _1> { + pub index: _1, + pub threshold: _1, + pub ayes: ::std::vec::Vec<_0>, + pub nays: ::std::vec::Vec<_0>, + pub end: _1, } } - pub mod pallet_authorship { + pub mod pallet_democracy { use super::runtime_types; - pub mod pallet { + pub mod conviction { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Call { - #[codec(index = 0)] - set_uncles { - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { + pub enum Conviction { #[codec(index = 0)] - InvalidUncleParent, + None, #[codec(index = 1)] - UnclesAlreadySet, + Locked1x, #[codec(index = 2)] - TooManyUncles, + Locked2x, #[codec(index = 3)] - GenesisUncle, + Locked3x, #[codec(index = 4)] - TooHighUncle, + Locked4x, #[codec(index = 5)] - UncleAlreadyIncluded, + Locked5x, #[codec(index = 6)] - OldUncle, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), - } - } - pub mod pallet_babe { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Call { - # [codec (index = 0)] 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)] 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)] plan_config_change { config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor , } , } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - InvalidEquivocationProof, - #[codec(index = 1)] - InvalidKeyOwnershipProof, - #[codec(index = 2)] - DuplicateOffenceReport, - } - } - } - pub mod pallet_bags_list { - use super::runtime_types; - pub mod list { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Bag { - pub head: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - pub tail: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 bag_upper: ::core::primitive::u64, - } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Call { - #[codec(index = 0)] - rebag { - dislocated: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 1)] - put_in_front_of { - lighter: ::subxt::sp_core::crypto::AccountId32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - NotInSameBag, - #[codec(index = 1)] - IdNotFound, - #[codec(index = 2)] - NotHeavier, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - Rebagged { - who: ::subxt::sp_core::crypto::AccountId32, - from: ::core::primitive::u64, - to: ::core::primitive::u64, - }, + Locked6x, } } - } - pub mod pallet_balances { - use super::runtime_types; pub mod pallet { use super::runtime_types; #[derive( @@ -17799,190 +16318,115 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - transfer { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + propose { + proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 1)] - set_balance { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + second { #[codec(compact)] - new_free: ::core::primitive::u128, + proposal: ::core::primitive::u32, #[codec(compact)] - new_reserved: ::core::primitive::u128, + seconds_upper_bound: ::core::primitive::u32, }, #[codec(index = 2)] - force_transfer { - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + vote { #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 3)] - transfer_keep_alive { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, >, - #[codec(compact)] - value: ::core::primitive::u128, }, + #[codec(index = 3)] + emergency_cancel { ref_index: ::core::primitive::u32 }, #[codec(index = 4)] - transfer_all { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - keep_alive: ::core::primitive::bool, + external_propose { + proposal_hash: ::subxt::sp_core::H256, }, #[codec(index = 5)] - force_unreserve { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - amount: ::core::primitive::u128, + external_propose_majority { + proposal_hash: ::subxt::sp_core::H256, }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - VestingBalance, - #[codec(index = 1)] - LiquidityRestrictions, - #[codec(index = 2)] - InsufficientBalance, - #[codec(index = 3)] - ExistentialDeposit, - #[codec(index = 4)] - KeepAlive, - #[codec(index = 5)] - ExistingVestingSchedule, #[codec(index = 6)] - DeadAccount, + external_propose_default { + proposal_hash: ::subxt::sp_core::H256, + }, #[codec(index = 7)] - TooManyReserves, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - # [codec (index = 0)] Endowed { account : :: subxt :: sp_core :: crypto :: AccountId32 , free_balance : :: core :: primitive :: u128 , } , # [codec (index = 1)] DustLost { account : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] Transfer { from : :: subxt :: sp_core :: crypto :: AccountId32 , to : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 3)] BalanceSet { who : :: subxt :: sp_core :: crypto :: AccountId32 , free : :: core :: primitive :: u128 , reserved : :: core :: primitive :: u128 , } , # [codec (index = 4)] Reserved { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 5)] Unreserved { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 6)] 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)] Deposit { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 8)] Withdraw { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 9)] Slashed { who : :: subxt :: sp_core :: crypto :: AccountId32 , amount : :: core :: primitive :: u128 , } , } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub misc_frozen: _0, - pub fee_frozen: _0, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BalanceLock<_0> { - pub id: [::core::primitive::u8; 8usize], - pub amount: _0, - pub reasons: runtime_types::pallet_balances::Reasons, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Releases { - #[codec(index = 0)] - V1_0_0, - #[codec(index = 1)] - V2_0_0, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, - } - } - pub mod pallet_bounties { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Call { - #[codec(index = 0)] - propose_bounty { - #[codec(compact)] - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, + fast_track { + proposal_hash: ::subxt::sp_core::H256, + voting_period: ::core::primitive::u32, + delay: ::core::primitive::u32, }, - #[codec(index = 1)] - approve_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + #[codec(index = 8)] + veto_external { + proposal_hash: ::subxt::sp_core::H256, }, - #[codec(index = 2)] - propose_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + #[codec(index = 9)] + cancel_referendum { #[codec(compact)] - fee: ::core::primitive::u128, + ref_index: ::core::primitive::u32, }, - #[codec(index = 3)] - unassign_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + #[codec(index = 10)] + cancel_queued { which: ::core::primitive::u32 }, + #[codec(index = 11)] + delegate { + to: ::subxt::sp_core::crypto::AccountId32, + conviction: + runtime_types::pallet_democracy::conviction::Conviction, + balance: ::core::primitive::u128, }, - #[codec(index = 4)] - accept_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + #[codec(index = 12)] + undelegate, + #[codec(index = 13)] + clear_public_proposals, + #[codec(index = 14)] + note_preimage { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, }, - #[codec(index = 5)] - award_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + #[codec(index = 15)] + note_preimage_operational { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, }, - #[codec(index = 6)] - claim_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + #[codec(index = 16)] + note_imminent_preimage { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, }, - #[codec(index = 7)] - close_bounty { + #[codec(index = 17)] + note_imminent_preimage_operational { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 18)] + reap_preimage { + proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] - bounty_id: ::core::primitive::u32, + proposal_len_upper_bound: ::core::primitive::u32, }, - #[codec(index = 8)] - extend_bounty_expiry { + #[codec(index = 19)] + unlock { + target: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 20)] + remove_vote { index: ::core::primitive::u32 }, + #[codec(index = 21)] + remove_other_vote { + target: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 22)] + enact_proposal { + proposal_hash: ::subxt::sp_core::H256, + index: ::core::primitive::u32, + }, + #[codec(index = 23)] + blacklist { + proposal_hash: ::subxt::sp_core::H256, + maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 24)] + cancel_proposal { #[codec(compact)] - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, + prop_index: ::core::primitive::u32, }, } #[derive( @@ -17990,257 +16434,377 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InsufficientProposersBalance, + ValueLow, #[codec(index = 1)] - InvalidIndex, + ProposalMissing, #[codec(index = 2)] - ReasonTooBig, + AlreadyCanceled, #[codec(index = 3)] - UnexpectedStatus, + DuplicateProposal, #[codec(index = 4)] - RequireCurator, + ProposalBlacklisted, #[codec(index = 5)] - InvalidValue, + NotSimpleMajority, #[codec(index = 6)] - InvalidFee, + InvalidHash, #[codec(index = 7)] - PendingPayout, + NoProposal, #[codec(index = 8)] - Premature, + AlreadyVetoed, #[codec(index = 9)] - HasActiveChildBounty, + DuplicatePreimage, + #[codec(index = 10)] + NotImminent, + #[codec(index = 11)] + TooEarly, + #[codec(index = 12)] + Imminent, + #[codec(index = 13)] + PreimageMissing, + #[codec(index = 14)] + ReferendumInvalid, + #[codec(index = 15)] + PreimageInvalid, + #[codec(index = 16)] + NoneWaiting, + #[codec(index = 17)] + NotVoter, + #[codec(index = 18)] + NoPermission, + #[codec(index = 19)] + AlreadyDelegating, + #[codec(index = 20)] + InsufficientFunds, + #[codec(index = 21)] + NotDelegating, + #[codec(index = 22)] + VotesExist, + #[codec(index = 23)] + InstantNotAllowed, + #[codec(index = 24)] + Nonsense, + #[codec(index = 25)] + WrongUpperBound, + #[codec(index = 26)] + MaxVotesReached, + #[codec(index = 27)] + TooManyProposals, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] - BountyProposed { index: ::core::primitive::u32 }, + Proposed(::core::primitive::u32, ::core::primitive::u128), #[codec(index = 1)] - BountyRejected { - index: ::core::primitive::u32, - bond: ::core::primitive::u128, - }, + Tabled( + ::core::primitive::u32, + ::core::primitive::u128, + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ), #[codec(index = 2)] - BountyBecameActive { index: ::core::primitive::u32 }, + ExternalTabled, #[codec(index = 3)] - BountyAwarded { - index: ::core::primitive::u32, - beneficiary: ::subxt::sp_core::crypto::AccountId32, - }, + Started( + ::core::primitive::u32, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + ), #[codec(index = 4)] - BountyClaimed { - index: ::core::primitive::u32, - payout: ::core::primitive::u128, - beneficiary: ::subxt::sp_core::crypto::AccountId32, - }, + Passed(::core::primitive::u32), #[codec(index = 5)] - BountyCanceled { index: ::core::primitive::u32 }, + NotPassed(::core::primitive::u32), #[codec(index = 6)] - BountyExtended { index: ::core::primitive::u32 }, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Bounty<_0, _1, _2> { - pub proposer: _0, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub bond: _1, - pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum BountyStatus<_0, _1> { - #[codec(index = 0)] - Proposed, - #[codec(index = 1)] - Approved, - #[codec(index = 2)] - Funded, - #[codec(index = 3)] - CuratorProposed { curator: _0 }, - #[codec(index = 4)] - Active { curator: _0, update_due: _1 }, - #[codec(index = 5)] - PendingPayout { - curator: _0, - beneficiary: _0, - unlock_at: _1, - }, - } - } - pub mod pallet_collective { - use super::runtime_types; - pub mod pallet { + Cancelled(::core::primitive::u32), + #[codec(index = 7)] + Executed( + ::core::primitive::u32, + ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + ), + #[codec(index = 8)] + Delegated( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 9)] + Undelegated(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 10)] + Vetoed( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ::core::primitive::u32, + ), + #[codec(index = 11)] + PreimageNoted( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 12)] + PreimageUsed( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 13)] + PreimageInvalid(::subxt::sp_core::H256, ::core::primitive::u32), + #[codec(index = 14)] + PreimageMissing(::subxt::sp_core::H256, ::core::primitive::u32), + #[codec(index = 15)] + PreimageReaped( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 16)] + Blacklisted(::subxt::sp_core::H256), + } + } + pub mod types { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Call { + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] - set_members { - new_members: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - prime: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - old_count: ::core::primitive::u32, - }, + Ongoing( + runtime_types::pallet_democracy::types::ReferendumStatus< + _0, + _1, + _2, + >, + ), #[codec(index = 1)] - execute { - proposal: - ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - propose { - #[codec(compact)] - threshold: ::core::primitive::u32, - proposal: - ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 3)] - vote { - proposal: ::subxt::sp_core::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 4)] - close { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - proposal_weight_bound: ::core::primitive::u64, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 5)] - disapprove_proposal { - proposal_hash: ::subxt::sp_core::H256, + Finished { + approved: ::core::primitive::bool, + end: _0, }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Error { + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal_hash: _1, + pub threshold: + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum AccountVote<_0> { #[codec(index = 0)] - NotMember, + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, + }, #[codec(index = 1)] - DuplicateProposal, - #[codec(index = 2)] - ProposalMissing, - #[codec(index = 3)] - WrongIndex, - #[codec(index = 4)] - DuplicateVote, - #[codec(index = 5)] - AlreadyInitialized, - #[codec(index = 6)] - TooEarly, - #[codec(index = 7)] - TooManyProposals, - #[codec(index = 8)] - WrongProposalWeight, - #[codec(index = 9)] - WrongProposalLength, + Split { aye: _0, nay: _0 }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Event { + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: codec :: CompactAs, + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + )] + pub struct Vote(::core::primitive::u8); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Voting<_0, _1, _2> { #[codec(index = 0)] - Proposed { - account: ::subxt::sp_core::crypto::AccountId32, - proposal_index: ::core::primitive::u32, - proposal_hash: ::subxt::sp_core::H256, - threshold: ::core::primitive::u32, + Direct { + votes: ::std::vec::Vec<( + _2, + runtime_types::pallet_democracy::vote::AccountVote<_0>, + )>, + delegations: + runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, }, #[codec(index = 1)] - Voted { - account: ::subxt::sp_core::crypto::AccountId32, - proposal_hash: ::subxt::sp_core::H256, - voted: ::core::primitive::bool, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, + Delegating { + balance: _0, + target: _1, + conviction: + runtime_types::pallet_democracy::conviction::Conviction, + delegations: + runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, }, + } + } + pub mod vote_threshold { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum VoteThreshold { + #[codec(index = 0)] + SuperMajorityApprove, + #[codec(index = 1)] + SuperMajorityAgainst, #[codec(index = 2)] - Approved { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 3)] - Disapproved { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 4)] - Executed { - proposal_hash: ::subxt::sp_core::H256, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 5)] - MemberExecuted { - proposal_hash: ::subxt::sp_core::H256, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 6)] - Closed { - proposal_hash: ::subxt::sp_core::H256, - yes: ::core::primitive::u32, - no: ::core::primitive::u32, - }, + SimpleMajority, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum RawOrigin<_0> { + pub enum PreimageStatus<_0, _1, _2> { #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), + Missing(_2), #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, + Available { + data: ::std::vec::Vec<::core::primitive::u8>, + provider: _0, + deposit: _1, + since: _2, + expiry: ::core::option::Option<_2>, + }, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Votes<_0, _1> { - pub index: _1, - pub threshold: _1, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, + pub enum Releases { + #[codec(index = 0)] + V1, } } - pub mod pallet_democracy { + pub mod pallet_election_provider_multi_phase { use super::runtime_types; - pub mod conviction { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Conviction { + pub enum Call { + # [codec (index = 0)] 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)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < [:: core :: primitive :: u128 ; 3usize] > , } , # [codec (index = 2)] 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)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , num_signed_submissions : :: core :: primitive :: u32 , } , } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { #[codec(index = 0)] - None, + PreDispatchEarlySubmission, #[codec(index = 1)] - Locked1x, + PreDispatchWrongWinnerCount, #[codec(index = 2)] - Locked2x, + PreDispatchWeakSubmission, #[codec(index = 3)] - Locked3x, + SignedQueueFull, #[codec(index = 4)] - Locked4x, + SignedCannotPayDeposit, #[codec(index = 5)] - Locked5x, + SignedInvalidWitness, #[codec(index = 6)] - Locked6x, + SignedTooMuchWeight, + #[codec(index = 7)] + OcwCallWrongEra, + #[codec(index = 8)] + MissingSnapshotMetadata, + #[codec(index = 9)] + InvalidSubmissionIndex, + #[codec(index = 10)] + CallNotAllowed, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + # [codec (index = 0)] SolutionStored (runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , :: core :: primitive :: bool ,) , # [codec (index = 1)] ElectionFinalized (:: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute > ,) , # [codec (index = 2)] Rewarded (:: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 ,) , # [codec (index = 3)] Slashed (:: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 ,) , # [codec (index = 4)] SignedPhaseStarted (:: core :: primitive :: u32 ,) , # [codec (index = 5)] UnsignedPhaseStarted (:: core :: primitive :: u32 ,) , } + } + pub mod signed { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct SignedSubmission<_0, _1, _2> { + pub who: _0, + pub deposit: _1, + pub raw_solution: + runtime_types::pallet_election_provider_multi_phase::RawSolution< + _2, + >, + pub reward: _1, } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct RawSolution<_0> { + pub solution: _0, + pub score: [::core::primitive::u128; 3usize], + pub round: ::core::primitive::u32, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ReadySolution<_0> { + pub supports: + ::std::vec::Vec<(_0, runtime_types::sp_npos_elections::Support<_0>)>, + pub score: [::core::primitive::u128; 3usize], + pub compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct RoundSnapshot<_0> { + pub voters: + ::std::vec::Vec<(_0, ::core::primitive::u64, ::std::vec::Vec<_0>)>, + pub targets: ::std::vec::Vec<_0>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, + } + } + pub mod pallet_elections_phragmen { + use super::runtime_types; pub mod pallet { use super::runtime_types; #[derive( @@ -18248,115 +16812,34 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - propose { - proposal_hash: ::subxt::sp_core::H256, + vote { + votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 1)] - second { - #[codec(compact)] - proposal: ::core::primitive::u32, - #[codec(compact)] - seconds_upper_bound: ::core::primitive::u32, - }, + remove_voter, #[codec(index = 2)] - vote { + submit_candidacy { #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, + candidate_count: ::core::primitive::u32, }, #[codec(index = 3)] - emergency_cancel { ref_index: ::core::primitive::u32 }, + renounce_candidacy { + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + }, #[codec(index = 4)] - external_propose { - proposal_hash: ::subxt::sp_core::H256, + remove_member { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + has_replacement: ::core::primitive::bool, }, #[codec(index = 5)] - external_propose_majority { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 6)] - external_propose_default { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 7)] - fast_track { - proposal_hash: ::subxt::sp_core::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - }, - #[codec(index = 8)] - veto_external { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 9)] - cancel_referendum { - #[codec(compact)] - ref_index: ::core::primitive::u32, - }, - #[codec(index = 10)] - cancel_queued { which: ::core::primitive::u32 }, - #[codec(index = 11)] - delegate { - to: ::subxt::sp_core::crypto::AccountId32, - conviction: - runtime_types::pallet_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 12)] - undelegate, - #[codec(index = 13)] - clear_public_proposals, - #[codec(index = 14)] - note_preimage { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 15)] - note_preimage_operational { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 16)] - note_imminent_preimage { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 17)] - note_imminent_preimage_operational { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 18)] - reap_preimage { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - proposal_len_upper_bound: ::core::primitive::u32, - }, - #[codec(index = 19)] - unlock { - target: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 20)] - remove_vote { index: ::core::primitive::u32 }, - #[codec(index = 21)] - remove_other_vote { - target: ::subxt::sp_core::crypto::AccountId32, - index: ::core::primitive::u32, - }, - #[codec(index = 22)] - enact_proposal { - proposal_hash: ::subxt::sp_core::H256, - index: ::core::primitive::u32, - }, - #[codec(index = 23)] - blacklist { - proposal_hash: ::subxt::sp_core::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 24)] - cancel_proposal { - #[codec(compact)] - prop_index: ::core::primitive::u32, + clean_defunct_voters { + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, }, } #[derive( @@ -18364,200 +16847,178 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - ValueLow, + UnableToVote, #[codec(index = 1)] - ProposalMissing, + NoVotes, #[codec(index = 2)] - AlreadyCanceled, + TooManyVotes, #[codec(index = 3)] - DuplicateProposal, + MaximumVotesExceeded, #[codec(index = 4)] - ProposalBlacklisted, + LowBalance, #[codec(index = 5)] - NotSimpleMajority, + UnableToPayBond, #[codec(index = 6)] - InvalidHash, + MustBeVoter, #[codec(index = 7)] - NoProposal, + ReportSelf, #[codec(index = 8)] - AlreadyVetoed, + DuplicatedCandidate, #[codec(index = 9)] - DuplicatePreimage, + MemberSubmit, #[codec(index = 10)] - NotImminent, + RunnerUpSubmit, #[codec(index = 11)] - TooEarly, + InsufficientCandidateFunds, #[codec(index = 12)] - Imminent, + NotMember, #[codec(index = 13)] - PreimageMissing, + InvalidWitnessData, #[codec(index = 14)] - ReferendumInvalid, + InvalidVoteCount, #[codec(index = 15)] - PreimageInvalid, + InvalidRenouncing, #[codec(index = 16)] - NoneWaiting, - #[codec(index = 17)] - NotVoter, - #[codec(index = 18)] - NoPermission, - #[codec(index = 19)] - AlreadyDelegating, - #[codec(index = 20)] - InsufficientFunds, - #[codec(index = 21)] - NotDelegating, - #[codec(index = 22)] - VotesExist, - #[codec(index = 23)] - InstantNotAllowed, - #[codec(index = 24)] - Nonsense, - #[codec(index = 25)] - WrongUpperBound, - #[codec(index = 26)] - MaxVotesReached, - #[codec(index = 27)] - TooManyProposals, + InvalidReplacement, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { - # [codec (index = 0)] Proposed { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 1)] Tabled { proposal_index : :: core :: primitive :: u32 , deposit : :: core :: primitive :: u128 , depositors : :: std :: vec :: Vec < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 2)] ExternalTabled , # [codec (index = 3)] Started { ref_index : :: core :: primitive :: u32 , threshold : runtime_types :: pallet_democracy :: vote_threshold :: VoteThreshold , } , # [codec (index = 4)] Passed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 5)] NotPassed { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 6)] Cancelled { ref_index : :: core :: primitive :: u32 , } , # [codec (index = 7)] Executed { ref_index : :: core :: primitive :: u32 , result : :: core :: result :: Result < () , runtime_types :: sp_runtime :: DispatchError > , } , # [codec (index = 8)] Delegated { who : :: subxt :: sp_core :: crypto :: AccountId32 , target : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 9)] Undelegated { account : :: subxt :: sp_core :: crypto :: AccountId32 , } , # [codec (index = 10)] Vetoed { who : :: subxt :: sp_core :: crypto :: AccountId32 , proposal_hash : :: subxt :: sp_core :: H256 , until : :: core :: primitive :: u32 , } , # [codec (index = 11)] PreimageNoted { proposal_hash : :: subxt :: sp_core :: H256 , who : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 12)] PreimageUsed { proposal_hash : :: subxt :: sp_core :: H256 , provider : :: subxt :: sp_core :: crypto :: AccountId32 , deposit : :: core :: primitive :: u128 , } , # [codec (index = 13)] PreimageInvalid { proposal_hash : :: subxt :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 14)] PreimageMissing { proposal_hash : :: subxt :: sp_core :: H256 , ref_index : :: core :: primitive :: u32 , } , # [codec (index = 15)] 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)] Blacklisted { proposal_hash : :: subxt :: sp_core :: H256 , } , # [codec (index = 17)] 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)] Seconded { seconder : :: subxt :: sp_core :: crypto :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] - Ongoing( - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >, + NewTerm( + ::std::vec::Vec<( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, ), #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal_hash: _1, - pub threshold: - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::pallet_democracy::types::Tally<_2>, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, + EmptyTerm, + #[codec(index = 2)] + ElectionError, + #[codec(index = 3)] + MemberKicked(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + Renounced(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 5)] + CandidateSlashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 6)] + SeatHolderSlashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), } } - pub mod vote { + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum Renouncing { + #[codec(index = 0)] + Member, + #[codec(index = 1)] + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::core::primitive::u32), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct Voter<_0, _1> { + pub votes: ::std::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, + } + } + pub mod pallet_grandpa { + use super::runtime_types; + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum AccountVote<_0> { + pub enum Call { #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_democracy::vote::Vote, - balance: _0, + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::sp_core::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, }, #[codec(index = 1)] - Split { aye: _0, nay: _0 }, + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::sp_core::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 2)] + note_stalled { + delay: ::core::primitive::u32, + best_finalized_block_number: ::core::primitive::u32, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - )] - pub struct Vote(::core::primitive::u8); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Voting<_0, _1, _2> { + pub enum Error { #[codec(index = 0)] - Direct { - votes: ::std::vec::Vec<( - _2, - runtime_types::pallet_democracy::vote::AccountVote<_0>, - )>, - delegations: - runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, + PauseFailed, #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: - runtime_types::pallet_democracy::conviction::Conviction, - delegations: - runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, + ResumeFailed, + #[codec(index = 2)] + ChangePending, + #[codec(index = 3)] + TooSoon, + #[codec(index = 4)] + InvalidKeyOwnershipProof, + #[codec(index = 5)] + InvalidEquivocationProof, + #[codec(index = 6)] + DuplicateOffenceReport, } - } - pub mod vote_threshold { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum VoteThreshold { + pub enum Event { #[codec(index = 0)] - SuperMajorityApprove, + NewAuthorities( + ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + ), #[codec(index = 1)] - SuperMajorityAgainst, + Paused, #[codec(index = 2)] - SimpleMajority, + Resumed, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum PreimageStatus<_0, _1, _2> { - #[codec(index = 0)] - Missing(_2), - #[codec(index = 1)] - Available { - data: ::std::vec::Vec<::core::primitive::u8>, - provider: _0, - deposit: _1, - since: _2, - expiry: ::core::option::Option<_2>, - }, - } + pub struct StoredPendingChange < _0 > { pub scheduled_at : _0 , pub delay : _0 , pub next_authorities : runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_finality_grandpa :: app :: Public , :: core :: primitive :: u64 ,) > , pub forced : :: core :: option :: Option < _0 > , } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Releases { + pub enum StoredState<_0> { #[codec(index = 0)] - V1, + Live, + #[codec(index = 1)] + PendingPause { scheduled_at: _0, delay: _0 }, + #[codec(index = 2)] + Paused, + #[codec(index = 3)] + PendingResume { scheduled_at: _0, delay: _0 }, } } - pub mod pallet_election_provider_multi_phase { + pub mod pallet_identity { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -18565,538 +17026,206 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { - # [codec (index = 0)] 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)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < [:: core :: primitive :: u128 ; 3usize] > , } , # [codec (index = 2)] 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)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , num_signed_submissions : :: core :: primitive :: u32 , } , } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { #[codec(index = 0)] - PreDispatchEarlySubmission, + add_registrar { + account: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 1)] - PreDispatchWrongWinnerCount, + set_identity { + info: ::std::boxed::Box< + runtime_types::pallet_identity::types::IdentityInfo, + >, + }, #[codec(index = 2)] - PreDispatchWeakSubmission, + set_subs { + subs: ::std::vec::Vec<( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + }, #[codec(index = 3)] - SignedQueueFull, + clear_identity, #[codec(index = 4)] - SignedCannotPayDeposit, + request_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + #[codec(compact)] + max_fee: ::core::primitive::u128, + }, #[codec(index = 5)] - SignedInvalidWitness, + cancel_request { reg_index: ::core::primitive::u32 }, #[codec(index = 6)] - SignedTooMuchWeight, + set_fee { + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + fee: ::core::primitive::u128, + }, #[codec(index = 7)] - OcwCallWrongEra, + set_account_id { + #[codec(compact)] + index: ::core::primitive::u32, + new: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 8)] - MissingSnapshotMetadata, + set_fields { + #[codec(compact)] + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + }, #[codec(index = 9)] - InvalidSubmissionIndex, - #[codec(index = 10)] - CallNotAllowed, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - # [codec (index = 0)] SolutionStored { election_compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , prev_ejected : :: core :: primitive :: bool , } , # [codec (index = 1)] ElectionFinalized { election_compute : :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute > , } , # [codec (index = 2)] Rewarded { account : :: subxt :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 3)] Slashed { account : :: subxt :: sp_core :: crypto :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 4)] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 5)] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } - } - pub mod signed { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct SignedSubmission<_0, _1, _2> { - pub who: _0, - pub deposit: _1, - pub raw_solution: - runtime_types::pallet_election_provider_multi_phase::RawSolution< - _2, - >, - pub reward: _1, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum ElectionCompute { - #[codec(index = 0)] - OnChain, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned, - #[codec(index = 3)] - Fallback, - #[codec(index = 4)] - Emergency, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Phase<_0> { - #[codec(index = 0)] - Off, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned((::core::primitive::bool, _0)), - #[codec(index = 3)] - Emergency, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RawSolution<_0> { - pub solution: _0, - pub score: [::core::primitive::u128; 3usize], - pub round: ::core::primitive::u32, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReadySolution<_0> { - pub supports: - ::std::vec::Vec<(_0, runtime_types::sp_npos_elections::Support<_0>)>, - pub score: [::core::primitive::u128; 3usize], - pub compute: - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RoundSnapshot<_0> { - pub voters: - ::std::vec::Vec<(_0, ::core::primitive::u64, ::std::vec::Vec<_0>)>, - pub targets: ::std::vec::Vec<_0>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SolutionOrSnapshotSize { - #[codec(compact)] - pub voters: ::core::primitive::u32, - #[codec(compact)] - pub targets: ::core::primitive::u32, - } - } - pub mod pallet_elections_phragmen { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Call { - #[codec(index = 0)] - vote { - votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + provide_judgement { #[codec(compact)] - value: ::core::primitive::u128, + reg_index: ::core::primitive::u32, + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, + >, }, - #[codec(index = 1)] - remove_voter, - #[codec(index = 2)] - submit_candidacy { - #[codec(compact)] - candidate_count: ::core::primitive::u32, + #[codec(index = 10)] + kill_identity { + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, }, - #[codec(index = 3)] - renounce_candidacy { - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + #[codec(index = 11)] + add_sub { + sub: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + data: runtime_types::pallet_identity::types::Data, }, - #[codec(index = 4)] - remove_member { - who: ::subxt::sp_runtime::MultiAddress< + #[codec(index = 12)] + rename_sub { + sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, - has_replacement: ::core::primitive::bool, + data: runtime_types::pallet_identity::types::Data, }, - #[codec(index = 5)] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, + #[codec(index = 13)] + remove_sub { + sub: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, }, + #[codec(index = 14)] + quit_sub, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] - UnableToVote, + TooManySubAccounts, #[codec(index = 1)] - NoVotes, + NotFound, #[codec(index = 2)] - TooManyVotes, + NotNamed, #[codec(index = 3)] - MaximumVotesExceeded, + EmptyIndex, #[codec(index = 4)] - LowBalance, + FeeChanged, #[codec(index = 5)] - UnableToPayBond, + NoIdentity, #[codec(index = 6)] - MustBeVoter, + StickyJudgement, #[codec(index = 7)] - ReportSelf, + JudgementGiven, #[codec(index = 8)] - DuplicatedCandidate, + InvalidJudgement, #[codec(index = 9)] - MemberSubmit, + InvalidIndex, #[codec(index = 10)] - RunnerUpSubmit, + InvalidTarget, #[codec(index = 11)] - InsufficientCandidateFunds, + TooManyFields, #[codec(index = 12)] - NotMember, + TooManyRegistrars, #[codec(index = 13)] - InvalidWitnessData, + AlreadyClaimed, #[codec(index = 14)] - InvalidVoteCount, + NotSub, #[codec(index = 15)] - InvalidRenouncing, - #[codec(index = 16)] - InvalidReplacement, + NotOwned, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] - NewTerm { - new_members: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - }, + IdentitySet(::subxt::sp_core::crypto::AccountId32), #[codec(index = 1)] - EmptyTerm, + IdentityCleared( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 2)] - ElectionError, + IdentityKilled( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 3)] - MemberKicked { - member: ::subxt::sp_core::crypto::AccountId32, - }, + JudgementRequested( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ), #[codec(index = 4)] - Renounced { - candidate: ::subxt::sp_core::crypto::AccountId32, - }, + JudgementUnrequested( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ), #[codec(index = 5)] - CandidateSlashed { - candidate: ::subxt::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, + JudgementGiven( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ), #[codec(index = 6)] - SeatHolderSlashed { - seat_holder: ::subxt::sp_core::crypto::AccountId32, - amount: ::core::primitive::u128, - }, + RegistrarAdded(::core::primitive::u32), + #[codec(index = 7)] + SubIdentityAdded( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 8)] + SubIdentityRemoved( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 9)] + SubIdentityRevoked( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Renouncing { - #[codec(index = 0)] - Member, - #[codec(index = 1)] - RunnerUp, - #[codec(index = 2)] - Candidate(#[codec(compact)] ::core::primitive::u32), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, - } - } - pub mod pallet_grandpa { - use super::runtime_types; - pub mod pallet { + pub mod types { use super::runtime_types; + #[derive( + :: subxt :: codec :: CompactAs, + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + )] + pub struct BitFlags<_0>( + pub ::core::primitive::u64, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Call { - #[codec(index = 0)] - report_equivocation { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::sp_core::H256, - ::core::primitive::u32, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 1)] - report_equivocation_unsigned { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::sp_core::H256, - ::core::primitive::u32, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 2)] - note_stalled { - delay: ::core::primitive::u32, - best_finalized_block_number: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - PauseFailed, - #[codec(index = 1)] - ResumeFailed, - #[codec(index = 2)] - ChangePending, - #[codec(index = 3)] - TooSoon, - #[codec(index = 4)] - InvalidKeyOwnershipProof, - #[codec(index = 5)] - InvalidEquivocationProof, - #[codec(index = 6)] - DuplicateOffenceReport, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - NewAuthorities { - authority_set: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - }, - #[codec(index = 1)] - Paused, - #[codec(index = 2)] - Resumed, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct StoredPendingChange < _0 > { pub scheduled_at : _0 , pub delay : _0 , pub next_authorities : runtime_types :: frame_support :: storage :: weak_bounded_vec :: WeakBoundedVec < (runtime_types :: sp_finality_grandpa :: app :: Public , :: core :: primitive :: u64 ,) > , pub forced : :: core :: option :: Option < _0 > , } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum StoredState<_0> { - #[codec(index = 0)] - Live, - #[codec(index = 1)] - PendingPause { scheduled_at: _0, delay: _0 }, - #[codec(index = 2)] - Paused, - #[codec(index = 3)] - PendingResume { scheduled_at: _0, delay: _0 }, - } - } - pub mod pallet_identity { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Call { - #[codec(index = 0)] - add_registrar { - account: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 1)] - set_identity { - info: ::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - >, - }, - #[codec(index = 2)] - set_subs { - subs: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, - }, - #[codec(index = 3)] - clear_identity, - #[codec(index = 4)] - request_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - #[codec(compact)] - max_fee: ::core::primitive::u128, - }, - #[codec(index = 5)] - cancel_request { reg_index: ::core::primitive::u32 }, - #[codec(index = 6)] - set_fee { - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 7)] - set_account_id { - #[codec(compact)] - index: ::core::primitive::u32, - new: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 8)] - set_fields { - #[codec(compact)] - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - }, - #[codec(index = 9)] - provide_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, - >, - }, - #[codec(index = 10)] - kill_identity { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - }, - #[codec(index = 11)] - add_sub { - sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 12)] - rename_sub { - sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 13)] - remove_sub { - sub: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - }, - #[codec(index = 14)] - quit_sub, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - TooManySubAccounts, - #[codec(index = 1)] - NotFound, - #[codec(index = 2)] - NotNamed, - #[codec(index = 3)] - EmptyIndex, - #[codec(index = 4)] - FeeChanged, - #[codec(index = 5)] - NoIdentity, - #[codec(index = 6)] - StickyJudgement, - #[codec(index = 7)] - JudgementGiven, - #[codec(index = 8)] - InvalidJudgement, - #[codec(index = 9)] - InvalidIndex, - #[codec(index = 10)] - InvalidTarget, - #[codec(index = 11)] - TooManyFields, - #[codec(index = 12)] - TooManyRegistrars, - #[codec(index = 13)] - AlreadyClaimed, - #[codec(index = 14)] - NotSub, - #[codec(index = 15)] - NotOwned, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - IdentitySet { - who: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 1)] - IdentityCleared { - who: ::subxt::sp_core::crypto::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - IdentityKilled { - who: ::subxt::sp_core::crypto::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 3)] - JudgementRequested { - who: ::subxt::sp_core::crypto::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 4)] - JudgementUnrequested { - who: ::subxt::sp_core::crypto::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 5)] - JudgementGiven { - target: ::subxt::sp_core::crypto::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 6)] - RegistrarAdded { - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 7)] - SubIdentityAdded { - sub: ::subxt::sp_core::crypto::AccountId32, - main: ::subxt::sp_core::crypto::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 8)] - SubIdentityRemoved { - sub: ::subxt::sp_core::crypto::AccountId32, - main: ::subxt::sp_core::crypto::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 9)] - SubIdentityRevoked { - sub: ::subxt::sp_core::crypto::AccountId32, - main: ::subxt::sp_core::crypto::AccountId32, - deposit: ::core::primitive::u128, - }, - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: codec :: CompactAs, - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - )] - pub struct BitFlags<_0>( - pub ::core::primitive::u64, - #[codec(skip)] pub ::core::marker::PhantomData<_0>, - ); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Data { + pub enum Data { #[codec(index = 0)] None, #[codec(index = 1)] @@ -19280,22 +17409,21 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - HeartbeatReceived { - authority_id: - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - }, + HeartbeatReceived( + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + ), #[codec(index = 1)] AllGood, #[codec(index = 2)] - SomeOffline { - offline: ::std::vec::Vec<( + SomeOffline( + ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_staking::Exposure< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, )>, - }, + ), } } pub mod sr25519 { @@ -19369,17 +17497,17 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - IndexAssigned { - who: ::subxt::sp_core::crypto::AccountId32, - index: ::core::primitive::u32, - }, + IndexAssigned( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ), #[codec(index = 1)] - IndexFreed { index: ::core::primitive::u32 }, + IndexFreed(::core::primitive::u32), #[codec(index = 2)] - IndexFrozen { - index: ::core::primitive::u32, - who: ::subxt::sp_core::crypto::AccountId32, - }, + IndexFrozen( + ::core::primitive::u32, + ::subxt::sp_core::crypto::AccountId32, + ), } } } @@ -19471,9 +17599,7 @@ pub mod api { ::core::primitive::u32, >, >, - call: ::subxt::WrapperKeepOpaque< - runtime_types::polkadot_runtime::Call, - >, + call: ::std::vec::Vec<::core::primitive::u8>, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, }, @@ -19539,42 +17665,36 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - NewMultisig { - approving: ::subxt::sp_core::crypto::AccountId32, - multisig: ::subxt::sp_core::crypto::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, + NewMultisig( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + [::core::primitive::u8; 32usize], + ), #[codec(index = 1)] - MultisigApproval { - approving: ::subxt::sp_core::crypto::AccountId32, - timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - multisig: ::subxt::sp_core::crypto::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, + MultisigApproval( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + ::subxt::sp_core::crypto::AccountId32, + [::core::primitive::u8; 32usize], + ), #[codec(index = 2)] - MultisigExecuted { - approving: ::subxt::sp_core::crypto::AccountId32, - timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - multisig: ::subxt::sp_core::crypto::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - result: ::core::result::Result< + MultisigExecuted( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + ::subxt::sp_core::crypto::AccountId32, + [::core::primitive::u8; 32usize], + ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - }, + ), #[codec(index = 3)] - MultisigCancelled { - cancelling: ::subxt::sp_core::crypto::AccountId32, - timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - multisig: ::subxt::sp_core::crypto::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, + MultisigCancelled( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + ::subxt::sp_core::crypto::AccountId32, + [::core::primitive::u8; 32usize], + ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -19599,68 +17719,12 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Offence { - kind: [::core::primitive::u8; 16usize], - timeslot: ::std::vec::Vec<::core::primitive::u8>, - }, - } - } - } - pub mod pallet_preimage { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Call { - #[codec(index = 0)] - note_preimage { - bytes: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - unnote_preimage { hash: ::subxt::sp_core::H256 }, - #[codec(index = 2)] - request_preimage { hash: ::subxt::sp_core::H256 }, - #[codec(index = 3)] - unrequest_preimage { hash: ::subxt::sp_core::H256 }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - TooLarge, - #[codec(index = 1)] - AlreadyNoted, - #[codec(index = 2)] - NotAuthorized, - #[codec(index = 3)] - NotNoted, - #[codec(index = 4)] - Requested, - #[codec(index = 5)] - NotRequested, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - Noted { hash: ::subxt::sp_core::H256 }, - #[codec(index = 1)] - Requested { hash: ::subxt::sp_core::H256 }, - #[codec(index = 2)] - Cleared { hash: ::subxt::sp_core::H256 }, + Offence( + [::core::primitive::u8; 16usize], + ::std::vec::Vec<::core::primitive::u8>, + ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum RequestStatus<_0, _1> { - #[codec(index = 0)] - Unrequested(::core::option::Option<(_0, _1)>), - #[codec(index = 1)] - Requested(::core::primitive::u32), - } } pub mod pallet_proxy { use super::runtime_types; @@ -19759,32 +17823,32 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - ProxyExecuted { - result: ::core::result::Result< + ProxyExecuted( + ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - }, + ), #[codec(index = 1)] - AnonymousCreated { - anonymous: ::subxt::sp_core::crypto::AccountId32, - who: ::subxt::sp_core::crypto::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - disambiguation_index: ::core::primitive::u16, - }, + AnonymousCreated( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u16, + ), #[codec(index = 2)] - Announced { - real: ::subxt::sp_core::crypto::AccountId32, - proxy: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, - }, + Announced( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ), #[codec(index = 3)] - ProxyAdded { - delegator: ::subxt::sp_core::crypto::AccountId32, - delegatee: ::subxt::sp_core::crypto::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, + ProxyAdded( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -19816,12 +17880,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box< - runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - >, + call: ::std::boxed::Box, }, #[codec(index = 1)] cancel { @@ -19837,12 +17896,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box< - runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - >, + call: ::std::boxed::Box, }, #[codec(index = 3)] cancel_named { @@ -19856,12 +17910,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box< - runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - >, + call: ::std::boxed::Box, }, #[codec(index = 5)] schedule_named_after { @@ -19872,12 +17921,7 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: ::std::boxed::Box< - runtime_types::frame_support::traits::schedule::MaybeHashed< - runtime_types::polkadot_runtime::Call, - ::subxt::sp_core::H256, - >, - >, + call: ::std::boxed::Box, }, } #[derive( @@ -19898,35 +17942,18 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Scheduled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, + Scheduled(::core::primitive::u32, ::core::primitive::u32), #[codec(index = 1)] - Canceled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, + Canceled(::core::primitive::u32, ::core::primitive::u32), #[codec(index = 2)] - Dispatched { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option< - ::std::vec::Vec<::core::primitive::u8>, - >, - result: ::core::result::Result< + Dispatched( + (::core::primitive::u32, ::core::primitive::u32), + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, >, - }, - #[codec(index = 3)] - CallLookupFailed { - task: (::core::primitive::u32, ::core::primitive::u32), - id: ::core::option::Option< - ::std::vec::Vec<::core::primitive::u8>, - >, - error: - runtime_types::frame_support::traits::schedule::LookupError, - }, + ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -19935,11 +17962,9 @@ pub mod api { V1, #[codec(index = 1)] V2, - #[codec(index = 2)] - V3, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ScheduledV3<_0, _1, _2, _3> { + pub struct ScheduledV2<_0, _1, _2, _3> { pub maybe_id: ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, pub priority: ::core::primitive::u8, @@ -19986,9 +18011,7 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - NewSession { - session_index: ::core::primitive::u32, - }, + NewSession(::core::primitive::u32), } } } @@ -20123,18 +18146,16 @@ pub mod api { >, }, #[codec(index = 23)] - set_staking_configs { + set_staking_limits { min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, max_nominator_count: ::core::option::Option<::core::primitive::u32>, max_validator_count: ::core::option::Option<::core::primitive::u32>, - chill_threshold: ::core::option::Option< + threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - min_commission: - runtime_types::sp_arithmetic::per_things::Perbill, }, #[codec(index = 24)] chill_other { @@ -20191,8 +18212,6 @@ pub mod api { TooManyNominators, #[codec(index = 22)] TooManyValidators, - #[codec(index = 23)] - CommissionTooLow, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -20448,23 +18467,23 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - NewTip { tip_hash: ::subxt::sp_core::H256 }, + NewTip(::subxt::sp_core::H256), #[codec(index = 1)] - TipClosing { tip_hash: ::subxt::sp_core::H256 }, + TipClosing(::subxt::sp_core::H256), #[codec(index = 2)] - TipClosed { - tip_hash: ::subxt::sp_core::H256, - who: ::subxt::sp_core::crypto::AccountId32, - payout: ::core::primitive::u128, - }, + TipClosed( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 3)] - TipRetracted { tip_hash: ::subxt::sp_core::H256 }, + TipRetracted(::subxt::sp_core::H256), #[codec(index = 4)] - TipSlashed { - tip_hash: ::subxt::sp_core::H256, - finder: ::subxt::sp_core::crypto::AccountId32, - deposit: ::core::primitive::u128, - }, + TipSlashed( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -20536,34 +18555,23 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Proposed { - proposal_index: ::core::primitive::u32, - }, + Proposed(::core::primitive::u32), #[codec(index = 1)] - Spending { - budget_remaining: ::core::primitive::u128, - }, + Spending(::core::primitive::u128), #[codec(index = 2)] - Awarded { - proposal_index: ::core::primitive::u32, - award: ::core::primitive::u128, - account: ::subxt::sp_core::crypto::AccountId32, - }, + Awarded( + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), #[codec(index = 3)] - Rejected { - proposal_index: ::core::primitive::u32, - slashed: ::core::primitive::u128, - }, + Rejected(::core::primitive::u32, ::core::primitive::u128), #[codec(index = 4)] - Burnt { - burnt_funds: ::core::primitive::u128, - }, + Burnt(::core::primitive::u128), #[codec(index = 5)] - Rollover { - rollover_balance: ::core::primitive::u128, - }, + Rollover(::core::primitive::u128), #[codec(index = 6)] - Deposit { value: ::core::primitive::u128 }, + Deposit(::core::primitive::u128), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -20595,13 +18603,6 @@ pub mod api { batch_all { calls: ::std::vec::Vec, }, - #[codec(index = 3)] - dispatch_as { - as_origin: ::std::boxed::Box< - runtime_types::polkadot_runtime::OriginCaller, - >, - call: ::std::boxed::Box, - }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -20615,21 +18616,14 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - BatchInterrupted { - index: ::core::primitive::u32, - error: runtime_types::sp_runtime::DispatchError, - }, + BatchInterrupted( + ::core::primitive::u32, + runtime_types::sp_runtime::DispatchError, + ), #[codec(index = 1)] BatchCompleted, #[codec(index = 2)] ItemCompleted, - #[codec(index = 3)] - DispatchedAs { - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, } } } @@ -20704,14 +18698,12 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - VestingUpdated { - account: ::subxt::sp_core::crypto::AccountId32, - unvested: ::core::primitive::u128, - }, + VestingUpdated( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 1)] - VestingCompleted { - account: ::subxt::sp_core::crypto::AccountId32, - }, + VestingCompleted(::subxt::sp_core::crypto::AccountId32), } } pub mod vesting_info { @@ -20733,289 +18725,34 @@ pub mod api { V1, } } - pub mod pallet_xcm { + pub mod polkadot_core_primitives { use super::runtime_types; - pub mod pallet { + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct CandidateHash(pub ::subxt::sp_core::H256); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct InboundDownwardMessage<_0> { + pub sent_at: _0, + pub msg: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct InboundHrmpMessage<_0> { + pub sent_at: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct OutboundHrmpMessage<_0> { + pub recipient: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod polkadot_parachain { + use super::runtime_types; + pub mod primitives { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Call { - #[codec(index = 0)] - send { - dest: - ::std::boxed::Box, - message: ::std::boxed::Box, - }, - #[codec(index = 1)] - teleport_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 2)] - reserve_transfer_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 3)] - execute { - message: ::std::boxed::Box, - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - force_xcm_version { - location: ::std::boxed::Box< - runtime_types::xcm::v1::multilocation::MultiLocation, - >, - xcm_version: ::core::primitive::u32, - }, - #[codec(index = 5)] - force_default_xcm_version { - maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 6)] - force_subscribe_version_notify { - location: - ::std::boxed::Box, - }, - #[codec(index = 7)] - force_unsubscribe_version_notify { - location: - ::std::boxed::Box, - }, - #[codec(index = 8)] - limited_reserve_transfer_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 9)] - limited_teleport_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - Unreachable, - #[codec(index = 1)] - SendFailure, - #[codec(index = 2)] - Filtered, - #[codec(index = 3)] - UnweighableMessage, - #[codec(index = 4)] - DestinationNotInvertible, - #[codec(index = 5)] - Empty, - #[codec(index = 6)] - CannotReanchor, - #[codec(index = 7)] - TooManyAssets, - #[codec(index = 8)] - InvalidOrigin, - #[codec(index = 9)] - BadVersion, - #[codec(index = 10)] - BadLocation, - #[codec(index = 11)] - NoSubscription, - #[codec(index = 12)] - AlreadySubscribed, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - Attempted(runtime_types::xcm::v2::traits::Outcome), - #[codec(index = 1)] - Sent( - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::v2::Xcm, - ), - #[codec(index = 2)] - UnexpectedResponse( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 3)] - ResponseReady( - ::core::primitive::u64, - runtime_types::xcm::v2::Response, - ), - #[codec(index = 4)] - Notified( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 5)] - NotifyOverweight( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ::core::primitive::u64, - ::core::primitive::u64, - ), - #[codec(index = 6)] - NotifyDispatchError( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 7)] - NotifyDecodeFailed( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 8)] - InvalidResponder( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - ::core::option::Option< - runtime_types::xcm::v1::multilocation::MultiLocation, - >, - ), - #[codec(index = 9)] - InvalidResponderVersion( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 10)] - ResponseTaken(::core::primitive::u64), - #[codec(index = 11)] - AssetsTrapped( - ::subxt::sp_core::H256, - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - #[codec(index = 12)] - VersionChangeNotified( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u32, - ), - #[codec(index = 13)] - SupportedVersionChanged( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u32, - ), - #[codec(index = 14)] - NotifyTargetSendFail( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v2::traits::Error, - ), - #[codec(index = 15)] - NotifyTargetMigrationFail( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u64, - ), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Origin { - #[codec(index = 0)] - Xcm(runtime_types::xcm::v1::multilocation::MultiLocation), - #[codec(index = 1)] - Response(runtime_types::xcm::v1::multilocation::MultiLocation), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum QueryStatus<_0> { - #[codec(index = 0)] - Pending { - responder: runtime_types::xcm::VersionedMultiLocation, - maybe_notify: ::core::option::Option<( - ::core::primitive::u8, - ::core::primitive::u8, - )>, - timeout: _0, - }, - #[codec(index = 1)] - VersionNotifier { - origin: runtime_types::xcm::VersionedMultiLocation, - is_active: ::core::primitive::bool, - }, - #[codec(index = 2)] - Ready { - response: runtime_types::xcm::VersionedResponse, - at: _0, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum VersionMigrationStage { - #[codec(index = 0)] - MigrateSupportedVersion, - #[codec(index = 1)] - MigrateVersionNotifiers, - #[codec(index = 2)] - NotifyCurrentTargets( - ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ), - #[codec(index = 3)] - MigrateAndNotifyOldTargets, - } - } - } - pub mod polkadot_core_primitives { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CandidateHash(pub ::subxt::sp_core::H256); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct InboundDownwardMessage<_0> { - pub sent_at: _0, - pub msg: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct InboundHrmpMessage<_0> { - pub sent_at: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct OutboundHrmpMessage<_0> { - pub recipient: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - } - pub mod polkadot_parachain { - use super::runtime_types; - pub mod primitives { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); + pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] @@ -21268,18 +19005,27 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct ScrapedOnChainVotes<_0> { - pub session: ::core::primitive::u32, - pub backing_validators_per_candidate: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v1::CandidateReceipt<_0>, - ::std::vec::Vec<( + pub struct SessionInfo { + pub validators: ::std::vec::Vec< + runtime_types::polkadot_primitives::v0::validator_app::Public, + >, + pub discovery_keys: ::std::vec::Vec< + runtime_types::sp_authority_discovery::app::Public, + >, + pub assignment_keys: ::std::vec::Vec< + runtime_types::polkadot_primitives::v1::assignment_app::Public, + >, + pub validator_groups: ::std::vec::Vec< + ::std::vec::Vec< runtime_types::polkadot_primitives::v0::ValidatorIndex, - runtime_types::polkadot_primitives::v0::ValidityAttestation, - )>, - )>, - pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::DisputeStatementSet, + >, >, + pub n_cores: ::core::primitive::u32, + pub zeroth_delay_tranche_width: ::core::primitive::u32, + pub relay_vrf_modulo_samples: ::core::primitive::u32, + pub n_delay_tranches: ::core::primitive::u32, + pub no_show_slots: ::core::primitive::u32, + pub needed_approvals: ::core::primitive::u32, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -21311,59 +19057,15 @@ pub mod api { ApprovalChecking, } } - pub mod v2 { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct PvfCheckStatement { - pub accept: ::core::primitive::bool, - pub subject: - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub session_index: ::core::primitive::u32, - pub validator_index: - runtime_types::polkadot_primitives::v0::ValidatorIndex, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct SessionInfo { - pub active_validator_indices: ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::ValidatorIndex, - >, - pub random_seed: [::core::primitive::u8; 32usize], - pub dispute_period: ::core::primitive::u32, - pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::validator_app::Public, - >, - pub discovery_keys: ::std::vec::Vec< - runtime_types::sp_authority_discovery::app::Public, - >, - pub assignment_keys: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::assignment_app::Public, - >, - pub validator_groups: ::std::vec::Vec< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::ValidatorIndex, - >, - >, - pub n_cores: ::core::primitive::u32, - pub zeroth_delay_tranche_width: ::core::primitive::u32, - pub relay_vrf_modulo_samples: ::core::primitive::u32, - pub n_delay_tranches: ::core::primitive::u32, - pub no_show_slots: ::core::primitive::u32, - pub needed_approvals: ::core::primitive::u32, - } - } } pub mod polkadot_runtime { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] BagsList (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 = 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 ,) , } + # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Call ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: 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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: 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 = 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 ,) , } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 = 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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] BagsList (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 = 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 ,) , } + # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Event ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: 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 = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: 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 = 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 ,) , } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NposCompactSolution16 { votes1: ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u16)>, @@ -21512,9 +19214,7 @@ pub mod api { ParachainsOrigin( runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, ), - #[codec(index = 99)] - XcmPallet(runtime_types::pallet_xcm::pallet::Origin), - #[codec(index = 5)] + #[codec(index = 4)] Void(runtime_types::sp_core::Void), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -21773,14 +19473,6 @@ pub mod api { poke { index: runtime_types::polkadot_parachain::primitives::Id, }, - #[codec(index = 8)] - contribute_all { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -21934,8 +19626,6 @@ pub mod api { ParaLocked, #[codec(index = 11)] NotReserved, - #[codec(index = 12)] - EmptyCode, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -22021,59 +19711,6 @@ pub mod api { use super::runtime_types; pub mod configuration { use super::runtime_types; - pub mod migration { - use super::runtime_types; - pub mod v1 { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - )] - pub struct HostConfiguration<_0> { - pub max_code_size: _0, - pub max_head_data_size: _0, - pub max_upward_queue_count: _0, - pub max_upward_queue_size: _0, - pub max_upward_message_size: _0, - pub max_upward_message_num_per_candidate: _0, - pub hrmp_max_message_num_per_candidate: _0, - pub validation_upgrade_frequency: _0, - pub validation_upgrade_delay: _0, - pub max_pov_size: _0, - pub max_downward_message_size: _0, - pub ump_service_total_weight: ::core::primitive::u64, - pub hrmp_max_parachain_outbound_channels: _0, - pub hrmp_max_parathread_outbound_channels: _0, - pub hrmp_sender_deposit: ::core::primitive::u128, - pub hrmp_recipient_deposit: ::core::primitive::u128, - pub hrmp_channel_max_capacity: _0, - pub hrmp_channel_max_total_size: _0, - pub hrmp_max_parachain_inbound_channels: _0, - pub hrmp_max_parathread_inbound_channels: _0, - pub hrmp_channel_max_message_size: _0, - pub code_retention_period: _0, - pub parathread_cores: _0, - pub parathread_retries: _0, - pub group_rotation_frequency: _0, - pub chain_availability_period: _0, - pub thread_availability_period: _0, - pub scheduling_lookahead: _0, - pub max_validators_per_core: ::core::option::Option<_0>, - pub max_validators: ::core::option::Option<_0>, - pub dispute_period: _0, - pub dispute_post_conclusion_acceptance_period: _0, - pub dispute_max_spam_slots: _0, - pub dispute_conclusion_by_time_out_period: _0, - pub no_show_slots: _0, - pub n_delay_tranches: _0, - pub zeroth_delay_tranche_width: _0, - pub needed_approvals: _0, - pub relay_vrf_modulo_samples: _0, - pub ump_max_individual_weight: ::core::primitive::u64, - } - } - } pub mod pallet { use super::runtime_types; #[derive( @@ -22081,7 +19718,7 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - set_validation_upgrade_cooldown { new: ::core::primitive::u32 }, + set_validation_upgrade_frequency { new: ::core::primitive::u32 }, #[codec(index = 1)] set_validation_upgrade_delay { new: ::core::primitive::u32 }, #[codec(index = 2)] @@ -22182,16 +19819,6 @@ pub mod api { }, #[codec(index = 40)] set_ump_max_individual_weight { new: ::core::primitive::u64 }, - #[codec(index = 41)] - set_pvf_checking_enabled { new: ::core::primitive::bool }, - #[codec(index = 42)] - set_pvf_voting_ttl { new: ::core::primitive::u32 }, - #[codec(index = 43)] - set_minimum_validation_upgrade_delay { - new: ::core::primitive::u32, - }, - #[codec(index = 44)] - set_bypass_consistency_check { new: ::core::primitive::bool }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -22212,7 +19839,7 @@ pub mod api { pub max_upward_message_size: _0, pub max_upward_message_num_per_candidate: _0, pub hrmp_max_message_num_per_candidate: _0, - pub validation_upgrade_cooldown: _0, + pub validation_upgrade_frequency: _0, pub validation_upgrade_delay: _0, pub max_pov_size: _0, pub max_downward_message_size: _0, @@ -22245,9 +19872,6 @@ pub mod api { pub needed_approvals: _0, pub relay_vrf_modulo_samples: _0, pub ump_max_individual_weight: ::core::primitive::u64, - pub pvf_checking_enabled: ::core::primitive::bool, - pub pvf_voting_ttl: _0, - pub minimum_validation_upgrade_delay: _0, } } pub mod dmp { @@ -22400,29 +20024,31 @@ pub mod api { #[codec(index = 11)] CandidateNotInParentContext, #[codec(index = 12)] - InvalidGroupIndex, + UnoccupiedBitInBitfield, #[codec(index = 13)] - InsufficientBacking, + InvalidGroupIndex, #[codec(index = 14)] - InvalidBacking, + InsufficientBacking, #[codec(index = 15)] - NotCollatorSigned, + InvalidBacking, #[codec(index = 16)] - ValidationDataHashMismatch, + NotCollatorSigned, #[codec(index = 17)] - IncorrectDownwardMessageHandling, + ValidationDataHashMismatch, #[codec(index = 18)] - InvalidUpwardMessages, + InternalError, #[codec(index = 19)] - HrmpWatermarkMishandling, + IncorrectDownwardMessageHandling, #[codec(index = 20)] - InvalidOutboundHrmp, + InvalidUpwardMessages, #[codec(index = 21)] - InvalidValidationCodeHash, + HrmpWatermarkMishandling, #[codec(index = 22)] - ParaHeadMismatch, + InvalidOutboundHrmp, #[codec(index = 23)] - BitfieldReferencesFreedCore, + InvalidValidationCodeHash, + #[codec(index = 24)] + ParaHeadMismatch, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -22531,7 +20157,7 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { - # [codec (index = 0)] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] 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)] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] add_trusted_validation_code { validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 6)] poke_unused_validation_code { validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , } , # [codec (index = 7)] include_pvf_check_statement { stmt : runtime_types :: polkadot_primitives :: v2 :: PvfCheckStatement , signature : runtime_types :: polkadot_primitives :: v0 :: validator_app :: Signature , } , } + # [codec (index = 0)] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] 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)] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] @@ -22546,33 +20172,40 @@ pub mod api { CannotUpgrade, #[codec(index = 4)] CannotDowngrade, - #[codec(index = 5)] - PvfCheckStatementStale, - #[codec(index = 6)] - PvfCheckStatementFuture, - #[codec(index = 7)] - PvfCheckValidatorIndexOutOfBounds, - #[codec(index = 8)] - PvfCheckInvalidSignature, - #[codec(index = 9)] - PvfCheckDoubleVote, - #[codec(index = 10)] - PvfCheckSubjectInvalid, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { - # [codec (index = 0)] CurrentCodeUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 1)] CurrentHeadUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 2)] CodeUpgradeScheduled (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 3)] NewHeadNoted (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 4)] ActionQueued (runtime_types :: polkadot_parachain :: primitives :: Id , :: core :: primitive :: u32 ,) , # [codec (index = 5)] PvfCheckStarted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 6)] PvfCheckAccepted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 7)] PvfCheckRejected (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , } - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct ParaGenesisArgs { - pub genesis_head: - runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, + #[codec(index = 0)] + CurrentCodeUpdated( + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 1)] + CurrentHeadUpdated( + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 2)] + CodeUpgradeScheduled( + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 3)] + NewHeadNoted(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 4)] + ActionQueued( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ), + } + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct ParaGenesisArgs { + pub genesis_head: + runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, pub parachain: ::core::primitive::bool, } #[derive( @@ -22601,38 +20234,6 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct PvfCheckActiveVoteState<_0> { - pub votes_accept: ::subxt::bitvec::vec::BitVec< - ::subxt::bitvec::order::Lsb0, - ::core::primitive::u8, - >, - pub votes_reject: ::subxt::bitvec::vec::BitVec< - ::subxt::bitvec::order::Lsb0, - ::core::primitive::u8, - >, - pub age: _0, - pub created_at: _0, - pub causes: ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum PvfCheckCause<_0> { - #[codec(index = 0)] - Onboarding(runtime_types::polkadot_parachain::primitives::Id), - #[codec(index = 1)] - Upgrade { - id: runtime_types::polkadot_parachain::primitives::Id, - relay_parent_number: _0, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] pub struct ReplacementTimes<_0> { pub expected_at: _0, pub activated_at: _0, @@ -22666,8 +20267,6 @@ pub mod api { InvalidParentHeader, #[codec(index = 2)] CandidateConcludedInvalid, - #[codec(index = 3)] - InherentOverweight, } } } @@ -22890,6 +20489,16 @@ pub mod api { } pub mod sp_core { use super::runtime_types; + pub mod changes_trie { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct ChangesTrieConfiguration { + pub digest_interval: ::core::primitive::u32, + pub digest_levels: ::core::primitive::u32, + } + } pub mod crypto { use super::runtime_types; #[derive( @@ -23011,15 +20620,22 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct Digest { + pub enum ChangesTrieSignal { + # [codec (index = 0)] NewConfiguration (:: core :: option :: Option < runtime_types :: sp_core :: changes_trie :: ChangesTrieConfiguration > ,) , } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Digest<_0> { pub logs: ::std::vec::Vec< - runtime_types::sp_runtime::generic::digest::DigestItem, + runtime_types::sp_runtime::generic::digest::DigestItem<_0>, >, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum DigestItem { + pub enum DigestItem<_0> { + #[codec(index = 2)] + ChangesTrieRoot(_0), #[codec(index = 6)] PreRuntime( [::core::primitive::u8; 4usize], @@ -23035,6 +20651,10 @@ pub mod api { [::core::primitive::u8; 4usize], ::std::vec::Vec<::core::primitive::u8>, ), + #[codec(index = 7)] + ChangesTrieSignal( + runtime_types::sp_runtime::generic::digest::ChangesTrieSignal, + ), #[codec(index = 0)] Other(::std::vec::Vec<::core::primitive::u8>), #[codec(index = 8)] @@ -23542,951 +21162,186 @@ pub mod api { #[codec(index = 246)] Mortal246(::core::primitive::u8), #[codec(index = 247)] - Mortal247(::core::primitive::u8), - #[codec(index = 248)] - Mortal248(::core::primitive::u8), - #[codec(index = 249)] - Mortal249(::core::primitive::u8), - #[codec(index = 250)] - Mortal250(::core::primitive::u8), - #[codec(index = 251)] - Mortal251(::core::primitive::u8), - #[codec(index = 252)] - Mortal252(::core::primitive::u8), - #[codec(index = 253)] - Mortal253(::core::primitive::u8), - #[codec(index = 254)] - Mortal254(::core::primitive::u8), - #[codec(index = 255)] - Mortal255(::core::primitive::u8), - } - } - pub mod header { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::sp_core::H256, - #[codec(compact)] - pub number: _0, - pub state_root: ::subxt::sp_core::H256, - pub extrinsics_root: ::subxt::sp_core::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, - } - } - pub mod unchecked_extrinsic { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, - ); - } - } - pub mod multiaddress { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum MultiAddress<_0, _1> { - #[codec(index = 0)] - Id(_0), - #[codec(index = 1)] - Index(#[codec(compact)] _1), - #[codec(index = 2)] - Raw(::std::vec::Vec<::core::primitive::u8>), - #[codec(index = 3)] - Address32([::core::primitive::u8; 32usize]), - #[codec(index = 4)] - Address20([::core::primitive::u8; 20usize]), - } - } - pub mod traits { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct BlakeTwo256 {} - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum DispatchError { - #[codec(index = 0)] - Other, - #[codec(index = 1)] - CannotLookup, - #[codec(index = 2)] - BadOrigin, - #[codec(index = 3)] - Module { - index: ::core::primitive::u8, - error: ::core::primitive::u8, - }, - #[codec(index = 4)] - ConsumerRemaining, - #[codec(index = 5)] - NoProviders, - #[codec(index = 6)] - TooManyConsumers, - #[codec(index = 7)] - Token(runtime_types::sp_runtime::TokenError), - #[codec(index = 8)] - Arithmetic(runtime_types::sp_runtime::ArithmeticError), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum MultiSigner { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Public), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Public), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Public), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum TokenError { - #[codec(index = 0)] - NoFunds, - #[codec(index = 1)] - WouldDie, - #[codec(index = 2)] - BelowMinimum, - #[codec(index = 3)] - CannotCreate, - #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, - } - } - pub mod sp_session { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MembershipProof { - pub session: ::core::primitive::u32, - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub validator_count: ::core::primitive::u32, - } - } - pub mod sp_staking { - use super::runtime_types; - pub mod offence { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, - } - } - } - pub mod sp_version { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: ::std::vec::Vec<( - [::core::primitive::u8; 8usize], - ::core::primitive::u32, - )>, - pub transaction_version: ::core::primitive::u32, - pub state_version: ::core::primitive::u8, - } - } - pub mod xcm { - use super::runtime_types; - pub mod double_encoded { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct DoubleEncoded { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, - } - } - pub mod v0 { - use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum BodyId { - #[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 :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum BodyPart { - #[codec(index = 0)] - Voice, - #[codec(index = 1)] - Members { - #[codec(compact)] - count: ::core::primitive::u32, - }, - #[codec(index = 2)] - Fraction { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 3)] - AtLeastProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 4)] - MoreThanProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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(::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 :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum NetworkId { - #[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 :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum MultiAsset { - #[codec(index = 0)] - None, - #[codec(index = 1)] - All, - #[codec(index = 2)] - AllFungible, - #[codec(index = 3)] - AllNonFungible, - #[codec(index = 4)] - AllAbstractFungible { - id: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 5)] - AllAbstractNonFungible { - class: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 6)] - AllConcreteFungible { - id: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 7)] - AllConcreteNonFungible { - class: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 8)] - AbstractFungible { - id: ::std::vec::Vec<::core::primitive::u8>, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - AbstractNonFungible { - class: ::std::vec::Vec<::core::primitive::u8>, - instance: runtime_types::xcm::v1::multiasset::AssetInstance, - }, - #[codec(index = 10)] - ConcreteFungible { - id: runtime_types::xcm::v0::multi_location::MultiLocation, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 11)] - ConcreteNonFungible { - class: runtime_types::xcm::v0::multi_location::MultiLocation, - instance: runtime_types::xcm::v1::multiasset::AssetInstance, - }, + Mortal247(::core::primitive::u8), + #[codec(index = 248)] + Mortal248(::core::primitive::u8), + #[codec(index = 249)] + Mortal249(::core::primitive::u8), + #[codec(index = 250)] + Mortal250(::core::primitive::u8), + #[codec(index = 251)] + Mortal251(::core::primitive::u8), + #[codec(index = 252)] + Mortal252(::core::primitive::u8), + #[codec(index = 253)] + Mortal253(::core::primitive::u8), + #[codec(index = 254)] + Mortal254(::core::primitive::u8), + #[codec(index = 255)] + Mortal255(::core::primitive::u8), } } - pub mod multi_location { + pub mod header { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum MultiLocation { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - X1(runtime_types::xcm::v0::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), + pub struct Header<_0, _1> { + pub parent_hash: ::subxt::sp_core::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::sp_core::H256, + pub extrinsics_root: ::subxt::sp_core::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest< + ::subxt::sp_core::H256, + >, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, } } - pub mod order { + pub mod unchecked_extrinsic { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Order { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - DepositAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 2)] - DepositReserveAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 3)] - ExchangeAsset { - give: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - receive: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - }, - #[codec(index = 4)] - InitiateReserveWithdraw { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - reserve: - runtime_types::xcm::v0::multi_location::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 5)] - InitiateTeleport { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 6)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - }, - #[codec(index = 7)] - BuyExecution { - fees: runtime_types::xcm::v0::multi_asset::MultiAsset, - weight: ::core::primitive::u64, - debt: ::core::primitive::u64, - halt_on_error: ::core::primitive::bool, - xcm: ::std::vec::Vec, - }, - } - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum OriginKind { - #[codec(index = 0)] - Native, - #[codec(index = 1)] - SovereignAccount, - #[codec(index = 2)] - Superuser, - #[codec(index = 3)] - Xcm, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Response { - #[codec(index = 0)] - Assets( - ::std::vec::Vec, - ), + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, + ); } + } + pub mod multiaddress { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Xcm { + pub enum MultiAddress<_0, _1> { #[codec(index = 0)] - WithdrawAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - effects: ::std::vec::Vec, - }, + Id(_0), #[codec(index = 1)] - ReserveAssetDeposit { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - effects: ::std::vec::Vec, - }, + Index(#[codec(compact)] _1), #[codec(index = 2)] - TeleportAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - effects: ::std::vec::Vec, - }, + Raw(::std::vec::Vec<::core::primitive::u8>), #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v0::Response, - }, + Address32([::core::primitive::u8; 32usize]), #[codec(index = 4)] - TransferAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - RelayedFrom { - who: runtime_types::xcm::v0::multi_location::MultiLocation, - message: ::std::boxed::Box, - }, + Address20([::core::primitive::u8; 20usize]), } } - pub mod v1 { + pub mod traits { use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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(::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 :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum AssetId { - #[codec(index = 0)] - Concrete(runtime_types::xcm::v1::multilocation::MultiLocation), - #[codec(index = 1)] - Abstract(::std::vec::Vec<::core::primitive::u8>), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum AssetInstance { - #[codec(index = 0)] - Undefined, - #[codec(index = 1)] - Index(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 2)] - Array4([::core::primitive::u8; 4usize]), - #[codec(index = 3)] - Array8([::core::primitive::u8; 8usize]), - #[codec(index = 4)] - Array16([::core::primitive::u8; 16usize]), - #[codec(index = 5)] - Array32([::core::primitive::u8; 32usize]), - #[codec(index = 6)] - Blob(::std::vec::Vec<::core::primitive::u8>), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Fungibility { - #[codec(index = 0)] - Fungible(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 1)] - NonFungible(runtime_types::xcm::v1::multiasset::AssetInstance), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct MultiAsset { - pub id: runtime_types::xcm::v1::multiasset::AssetId, - pub fun: runtime_types::xcm::v1::multiasset::Fungibility, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum MultiAssetFilter { - #[codec(index = 0)] - Definite(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - Wild(runtime_types::xcm::v1::multiasset::WildMultiAsset), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct MultiAssets( - pub ::std::vec::Vec< - runtime_types::xcm::v1::multiasset::MultiAsset, - >, - ); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum WildFungibility { - #[codec(index = 0)] - Fungible, - #[codec(index = 1)] - NonFungible, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum WildMultiAsset { - #[codec(index = 0)] - All, - #[codec(index = 1)] - AllOf { - id: runtime_types::xcm::v1::multiasset::AssetId, - fun: runtime_types::xcm::v1::multiasset::WildFungibility, - }, - } - } - pub mod multilocation { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Junctions { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - X1(runtime_types::xcm::v1::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v1::multilocation::Junctions, - } - } - pub mod order { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Order { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - DepositAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - max_assets: ::core::primitive::u32, - beneficiary: - runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 2)] - DepositReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 3)] - ExchangeAsset { - give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v1::multiasset::MultiAssets, - }, - #[codec(index = 4)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 5)] - InitiateTeleport { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 6)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - }, - #[codec(index = 7)] - BuyExecution { - fees: runtime_types::xcm::v1::multiasset::MultiAsset, - weight: ::core::primitive::u64, - debt: ::core::primitive::u64, - halt_on_error: ::core::primitive::bool, - instructions: ::std::vec::Vec, - }, - } - } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Response { - #[codec(index = 0)] - Assets(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - Version(::core::primitive::u32), - } + pub struct BlakeTwo256 {} + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module { + index: ::core::primitive::u8, + error: ::core::primitive::u8, + }, + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 7)] + Arithmetic(runtime_types::sp_runtime::ArithmeticError), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Signature), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum MultiSigner { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Public), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Public), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Public), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum TokenError { + #[codec(index = 0)] + NoFunds, + #[codec(index = 1)] + WouldDie, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + } + } + pub mod sp_session { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct MembershipProof { + pub session: ::core::primitive::u32, + pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub validator_count: ::core::primitive::u32, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Xcm { - #[codec(index = 0)] - WithdrawAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - effects: ::std::vec::Vec, - }, - #[codec(index = 1)] - ReserveAssetDeposited { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - effects: ::std::vec::Vec, - }, - #[codec(index = 2)] - ReceiveTeleportedAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - effects: ::std::vec::Vec, - }, - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v1::Response, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - RelayedFrom { - who: runtime_types::xcm::v1::multilocation::Junctions, - message: ::std::boxed::Box, - }, - #[codec(index = 11)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 12)] - UnsubscribeVersion, + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, } } + } + pub mod sp_version { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: ::std::vec::Vec<( + [::core::primitive::u8; 8usize], + ::core::primitive::u32, + )>, + pub transaction_version: ::core::primitive::u32, + } + } + pub mod xcm { + use super::runtime_types; pub mod v2 { use super::runtime_types; pub mod traits { @@ -24532,7 +21387,7 @@ pub mod api { #[codec(index = 17)] FailedToDecode, #[codec(index = 18)] - MaxWeightInvalid, + TooMuchWeightRequired, #[codec(index = 19)] NotHoldingFees, #[codec(index = 20)] @@ -24563,215 +21418,6 @@ pub mod api { Error(runtime_types::xcm::v2::traits::Error), } } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Instruction { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited( - runtime_types::xcm::v1::multiasset::MultiAssets, - ), - #[codec(index = 2)] - ReceiveTeleportedAsset( - runtime_types::xcm::v1::multiasset::MultiAssets, - ), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v2::Response, - #[codec(compact)] - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - #[codec(compact)] - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - ClearOrigin, - #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v1::multilocation::Junctions), - #[codec(index = 12)] - ReportError { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v1::multiasset::MultiAssets, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 18)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v1::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v2::Xcm), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v2::Xcm), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - ticket: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 27)] - UnsubscribeVersion, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Response { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - Assets(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 2)] - ExecutionResult( - ::core::option::Option<( - ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, - )>, - ), - #[codec(index = 3)] - Version(::core::primitive::u32), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum WeightLimit { - #[codec(index = 0)] - Unlimited, - #[codec(index = 1)] - Limited(#[codec(compact)] ::core::primitive::u64), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Xcm(pub ::std::vec::Vec); - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum VersionedMultiAssets { - #[codec(index = 0)] - V0(::std::vec::Vec), - #[codec(index = 1)] - V1(runtime_types::xcm::v1::multiasset::MultiAssets), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, 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 :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum VersionedResponse { - #[codec(index = 0)] - V0(runtime_types::xcm::v0::Response), - #[codec(index = 1)] - V1(runtime_types::xcm::v1::Response), - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Response), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum VersionedXcm { - #[codec(index = 0)] - V0(runtime_types::xcm::v0::Xcm), - #[codec(index = 1)] - V1(runtime_types::xcm::v1::Xcm), - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Xcm), } } } @@ -24780,6 +21426,20 @@ pub mod api { pub type DefaultAccountData = self::system::storage::Account; #[doc = r" The default error type returned when there is a runtime issue."] pub type DispatchError = self::runtime_types::sp_runtime::DispatchError; + pub struct ErrorDetails { + pub pallet: &'static str, + pub error: &'static str, + pub docs: &'static str, + } + impl DispatchError { + pub fn details(&self) -> Option { + if let Self::Module { index, error } = self { + match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (2u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (2u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (2u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotAssigned" , docs : "The index was not already assigned." }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotOwner" , docs : "The index is assigned to another account." }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Indices" , error : "InUse" , docs : "The index was not available." }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotTransfer" , docs : "The source and destination accounts are identical." }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Indices" , error : "Permanent" , docs : "The index is permanent and may not be freed/changed." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (6u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (6u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (6u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (6u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (6u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (6u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (6u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (7u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Can not bond with value less than minimum required." }) , (7u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (7u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (7u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (7u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (7u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (7u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (7u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (7u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (7u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (7u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (7u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (7u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (7u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (7u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (7u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (11u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (11u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (11u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (11u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (11u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (11u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (11u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ValueLow" , docs : "Value too low" }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalMissing" , docs : "Proposal does not exist" }) , (14u8 , 2u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyCanceled" , docs : "Cannot cancel the same proposal twice" }) , (14u8 , 3u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicateProposal" , docs : "Proposal already made" }) , (14u8 , 4u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalBlacklisted" , docs : "Proposal still blacklisted" }) , (14u8 , 5u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotSimpleMajority" , docs : "Next external proposal not simple majority" }) , (14u8 , 6u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InvalidHash" , docs : "Invalid hash" }) , (14u8 , 7u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoProposal" , docs : "No external proposal" }) , (14u8 , 8u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyVetoed" , docs : "Identity may not veto a proposal twice" }) , (14u8 , 9u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicatePreimage" , docs : "Preimage already noted" }) , (14u8 , 10u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotImminent" , docs : "Not imminent" }) , (14u8 , 11u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooEarly" , docs : "Too early" }) , (14u8 , 12u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Imminent" , docs : "Imminent" }) , (14u8 , 13u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageMissing" , docs : "Preimage not found" }) , (14u8 , 14u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ReferendumInvalid" , docs : "Vote given for invalid referendum" }) , (14u8 , 15u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageInvalid" , docs : "Invalid preimage" }) , (14u8 , 16u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoneWaiting" , docs : "No proposals waiting" }) , (14u8 , 17u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotVoter" , docs : "The given account did not vote on the referendum." }) , (14u8 , 18u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoPermission" , docs : "The actor has no permission to conduct the action." }) , (14u8 , 19u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyDelegating" , docs : "The account is already delegating." }) , (14u8 , 20u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InsufficientFunds" , docs : "Too high a balance was provided that the account cannot afford." }) , (14u8 , 21u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotDelegating" , docs : "The account is not currently delegating." }) , (14u8 , 22u8) => Some (ErrorDetails { pallet : "Democracy" , error : "VotesExist" , docs : "The account currently has votes attached to it and the operation cannot succeed until\nthese are removed, either through `unvote` or `reap_vote`." }) , (14u8 , 23u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InstantNotAllowed" , docs : "The instant referendum origin is currently disallowed." }) , (14u8 , 24u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Nonsense" , docs : "Delegation to oneself makes no sense." }) , (14u8 , 25u8) => Some (ErrorDetails { pallet : "Democracy" , error : "WrongUpperBound" , docs : "Invalid upper bound." }) , (14u8 , 26u8) => Some (ErrorDetails { pallet : "Democracy" , error : "MaxVotesReached" , docs : "Maximum number of votes reached." }) , (14u8 , 27u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooManyProposals" , docs : "Maximum number of proposals reached." }) , (15u8 , 0u8) => Some (ErrorDetails { pallet : "Council" , error : "NotMember" , docs : "Account is not a member" }) , (15u8 , 1u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (15u8 , 2u8) => Some (ErrorDetails { pallet : "Council" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (15u8 , 3u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongIndex" , docs : "Mismatched index" }) , (15u8 , 4u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (15u8 , 5u8) => Some (ErrorDetails { pallet : "Council" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (15u8 , 6u8) => Some (ErrorDetails { pallet : "Council" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (15u8 , 7u8) => Some (ErrorDetails { pallet : "Council" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (15u8 , 8u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (15u8 , 9u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "NotMember" , docs : "Account is not a member" }) , (16u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (16u8 , 2u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (16u8 , 3u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongIndex" , docs : "Mismatched index" }) , (16u8 , 4u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (16u8 , 5u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (16u8 , 6u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (16u8 , 7u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (16u8 , 8u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (16u8 , 9u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToVote" , docs : "Cannot vote when no candidates or members exist." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NoVotes" , docs : "Must vote for at least one candidate." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "TooManyVotes" , docs : "Cannot vote more than candidates." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MaximumVotesExceeded" , docs : "Cannot vote more than maximum allowed." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "LowBalance" , docs : "Cannot vote with stake less than minimum balance." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToPayBond" , docs : "Voter can not pay voting bond." }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MustBeVoter" , docs : "Must be a voter." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "ReportSelf" , docs : "Cannot report self." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "DuplicatedCandidate" , docs : "Duplicated candidate submission." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MemberSubmit" , docs : "Member cannot re-submit candidacy." }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "RunnerUpSubmit" , docs : "Runner cannot re-submit candidacy." }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InsufficientCandidateFunds" , docs : "Candidate does not have enough funds." }) , (17u8 , 12u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NotMember" , docs : "Not a member." }) , (17u8 , 13u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidWitnessData" , docs : "The provided count of number of candidates is incorrect." }) , (17u8 , 14u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidVoteCount" , docs : "The provided count of number of votes is incorrect." }) , (17u8 , 15u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidRenouncing" , docs : "The renouncing origin presented a wrong `Renouncing` parameter." }) , (17u8 , 16u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidReplacement" , docs : "Prediction regarding replacement after member removal is wrong." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "AlreadyMember" , docs : "Already a member." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "NotMember" , docs : "Not a member." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidEthereumSignature" , docs : "Invalid Ethereum signature." }) , (24u8 , 1u8) => Some (ErrorDetails { pallet : "Claims" , error : "SignerHasNoClaim" , docs : "Ethereum address has no claim." }) , (24u8 , 2u8) => Some (ErrorDetails { pallet : "Claims" , error : "SenderHasNoClaim" , docs : "Account ID sending transaction has no claim." }) , (24u8 , 3u8) => Some (ErrorDetails { pallet : "Claims" , error : "PotUnderflow" , docs : "There's not enough in the pot to pay out some unvested amount. Generally implies a logic\nerror." }) , (24u8 , 4u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidStatement" , docs : "A needed statement was not included." }) , (24u8 , 5u8) => Some (ErrorDetails { pallet : "Claims" , error : "VestedBalanceExists" , docs : "The account already has a vested balance." }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "Vesting" , error : "NotVesting" , docs : "The account given is not vesting." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AtMaxVestingSchedules" , docs : "The account already has `MaxVestingSchedules` count of schedules and thus\ncannot add another one. Consider merging existing schedules in order to add another." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AmountLow" , docs : "Amount being transferred is too low to create a vesting schedule." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "Vesting" , error : "ScheduleIndexOutOfBounds" , docs : "An index was out of bounds of the vesting schedules." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "Vesting" , error : "InvalidScheduleParams" , docs : "Failed to create a new schedule because some parameter was invalid." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManySubAccounts" , docs : "Too many subs-accounts." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotFound" , docs : "Account isn't found." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotNamed" , docs : "Account isn't named." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Identity" , error : "EmptyIndex" , docs : "Empty index." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Identity" , error : "FeeChanged" , docs : "Fee is changed." }) , (28u8 , 5u8) => Some (ErrorDetails { pallet : "Identity" , error : "NoIdentity" , docs : "No identity found." }) , (28u8 , 6u8) => Some (ErrorDetails { pallet : "Identity" , error : "StickyJudgement" , docs : "Sticky judgement." }) , (28u8 , 7u8) => Some (ErrorDetails { pallet : "Identity" , error : "JudgementGiven" , docs : "Judgement given." }) , (28u8 , 8u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidJudgement" , docs : "Invalid judgement." }) , (28u8 , 9u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidIndex" , docs : "The index is invalid." }) , (28u8 , 10u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidTarget" , docs : "The target is invalid." }) , (28u8 , 11u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyFields" , docs : "Too many additional fields." }) , (28u8 , 12u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyRegistrars" , docs : "Maximum amount of registrars reached. Cannot add any more." }) , (28u8 , 13u8) => Some (ErrorDetails { pallet : "Identity" , error : "AlreadyClaimed" , docs : "Account ID is already named." }) , (28u8 , 14u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotSub" , docs : "Sender is not a sub-account." }) , (28u8 , 15u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotOwned" , docs : "Sub-account isn't owned by sender." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (29u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (29u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (29u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (29u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (29u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (29u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (30u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (30u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (30u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (30u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (30u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (30u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (30u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (30u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (30u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (30u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (34u8 , 0u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (34u8 , 1u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (34u8 , 2u8) => Some (ErrorDetails { pallet : "Bounties" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (34u8 , 3u8) => Some (ErrorDetails { pallet : "Bounties" , error : "UnexpectedStatus" , docs : "The bounty status is unexpected." }) , (34u8 , 4u8) => Some (ErrorDetails { pallet : "Bounties" , error : "RequireCurator" , docs : "Require bounty curator." }) , (34u8 , 5u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidValue" , docs : "Invalid bounty value." }) , (34u8 , 6u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidFee" , docs : "Invalid bounty fee." }) , (34u8 , 7u8) => Some (ErrorDetails { pallet : "Bounties" , error : "PendingPayout" , docs : "A bounty payout is pending.\nTo cancel the bounty, you must unassign and slash the curator." }) , (34u8 , 8u8) => Some (ErrorDetails { pallet : "Bounties" , error : "Premature" , docs : "The bounties cannot be claimed/closed because it's still in the countdown period." }) , (35u8 , 0u8) => Some (ErrorDetails { pallet : "Tips" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (35u8 , 1u8) => Some (ErrorDetails { pallet : "Tips" , error : "AlreadyKnown" , docs : "The tip was already found/started." }) , (35u8 , 2u8) => Some (ErrorDetails { pallet : "Tips" , error : "UnknownTip" , docs : "The tip hash is unknown." }) , (35u8 , 3u8) => Some (ErrorDetails { pallet : "Tips" , error : "NotFinder" , docs : "The account attempting to retract the tip is not the finder of the tip." }) , (35u8 , 4u8) => Some (ErrorDetails { pallet : "Tips" , error : "StillOpen" , docs : "The tip cannot be claimed/closed because there are not enough tippers yet." }) , (35u8 , 5u8) => Some (ErrorDetails { pallet : "Tips" , error : "Premature" , docs : "The tip cannot be claimed/closed because it's still in the countdown period." }) , (36u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (36u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (36u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (36u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (36u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (36u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (36u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (36u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (36u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (36u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (36u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (51u8 , 0u8) => Some (ErrorDetails { pallet : "Configuration" , error : "InvalidNewValue" , docs : "The new value for a configuration parameter is invalid." }) , (53u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongBitfieldSize" , docs : "Availability bitfield has unexpected size." }) , (53u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldDuplicateOrUnordered" , docs : "Multiple bitfields submitted by same validator or validators out of order by index." }) , (53u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index out of bounds." }) , (53u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBitfieldSignature" , docs : "Invalid signature" }) , (53u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnscheduledCandidate" , docs : "Candidate submitted but para not scheduled." }) , (53u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateScheduledBeforeParaFree" , docs : "Candidate scheduled despite pending candidate already existing for the para." }) , (53u8 , 6u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongCollator" , docs : "Candidate included with the wrong collator." }) , (53u8 , 7u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ScheduledOutOfOrder" , docs : "Scheduled cores out of order." }) , (53u8 , 8u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HeadDataTooLarge" , docs : "Head data exceeds the configured maximum." }) , (53u8 , 9u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "PrematureCodeUpgrade" , docs : "Code upgrade prematurely." }) , (53u8 , 10u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NewCodeTooLarge" , docs : "Output code is too large" }) , (53u8 , 11u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateNotInParentContext" , docs : "Candidate not in parent context." }) , (53u8 , 12u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnoccupiedBitInBitfield" , docs : "The bitfield contains a bit relating to an unassigned availability core." }) , (53u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (53u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (53u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (53u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (53u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (53u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InternalError" , docs : "Internal error only returned when compiled with debug assertions." }) , (53u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (53u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (53u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (53u8 , 22u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (53u8 , 23u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (53u8 , 24u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ParaHeadMismatch" , docs : "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the\ncommitments." }) , (54u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "TooManyInclusionInherents" , docs : "Inclusion inherent called more than once per block." }) , (54u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InvalidParentHeader" , docs : "The hash of the submitted parent header doesn't correspond to the saved block hash of\nthe parent." }) , (54u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "CandidateConcludedInvalid" , docs : "Disputed candidate that was concluded invalid." }) , (56u8 , 0u8) => Some (ErrorDetails { pallet : "Paras" , error : "NotRegistered" , docs : "Para is not registered in our system." }) , (56u8 , 1u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOnboard" , docs : "Para cannot be onboarded because it is already tracked by our system." }) , (56u8 , 2u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOffboard" , docs : "Para cannot be offboarded at this time." }) , (56u8 , 3u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotUpgrade" , docs : "Para cannot be upgraded to a parachain." }) , (56u8 , 4u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotDowngrade" , docs : "Para cannot be downgraded to a parathread." }) , (59u8 , 0u8) => Some (ErrorDetails { pallet : "Ump" , error : "UnknownMessageIndex" , docs : "The message index given is unknown." }) , (59u8 , 1u8) => Some (ErrorDetails { pallet : "Ump" , error : "WeightOverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (60u8 , 0u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelToSelf" , docs : "The sender tried to open a channel to themselves." }) , (60u8 , 1u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelInvalidRecipient" , docs : "The recipient is not a valid para." }) , (60u8 , 2u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroCapacity" , docs : "The requested capacity is zero." }) , (60u8 , 3u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelCapacityExceedsLimit" , docs : "The requested capacity exceeds the global limit." }) , (60u8 , 4u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroMessageSize" , docs : "The requested maximum message size is 0." }) , (60u8 , 5u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelMessageSizeExceedsLimit" , docs : "The open request requested the message size that exceeds the global limit." }) , (60u8 , 6u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyExists" , docs : "The channel already exists" }) , (60u8 , 7u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyRequested" , docs : "There is already a request to open the same channel." }) , (60u8 , 8u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelLimitExceeded" , docs : "The sender already has the maximum number of allowed outbound channels." }) , (60u8 , 9u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelDoesntExist" , docs : "The channel from the sender to the origin doesn't exist." }) , (60u8 , 10u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelAlreadyConfirmed" , docs : "The channel is already confirmed." }) , (60u8 , 11u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelLimitExceeded" , docs : "The recipient already has the maximum number of allowed inbound channels." }) , (60u8 , 12u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelUnauthorized" , docs : "The origin tries to close a channel where it is neither the sender nor the recipient." }) , (60u8 , 13u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelDoesntExist" , docs : "The channel to be closed doesn't exist." }) , (60u8 , 14u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelAlreadyUnderway" , docs : "The channel close request is already requested." }) , (60u8 , 15u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CancelHrmpOpenChannelUnauthorized" , docs : "Canceling is requested by neither the sender nor recipient of the open channel request." }) , (60u8 , 16u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelDoesntExist" , docs : "The open request doesn't exist." }) , (60u8 , 17u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyConfirmed" , docs : "Cannot cancel an HRMP open channel request because it is already confirmed." }) , (70u8 , 0u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotRegistered" , docs : "The ID is not registered." }) , (70u8 , 1u8) => Some (ErrorDetails { pallet : "Registrar" , error : "AlreadyRegistered" , docs : "The ID is already registered." }) , (70u8 , 2u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotOwner" , docs : "The caller is not the owner of this Id." }) , (70u8 , 3u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CodeTooLarge" , docs : "Invalid para code size." }) , (70u8 , 4u8) => Some (ErrorDetails { pallet : "Registrar" , error : "HeadDataTooLarge" , docs : "Invalid para head data size." }) , (70u8 , 5u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParachain" , docs : "Para is not a Parachain." }) , (70u8 , 6u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParathread" , docs : "Para is not a Parathread." }) , (70u8 , 7u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDeregister" , docs : "Cannot deregister para" }) , (70u8 , 8u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDowngrade" , docs : "Cannot schedule downgrade of parachain to parathread" }) , (70u8 , 9u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotUpgrade" , docs : "Cannot schedule upgrade of parathread to parachain" }) , (70u8 , 10u8) => Some (ErrorDetails { pallet : "Registrar" , error : "ParaLocked" , docs : "Para is locked from manipulation by the manager. Must use parachain or relay chain governance." }) , (70u8 , 11u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotReserved" , docs : "The ID given for registration has not been reserved." }) , (71u8 , 0u8) => Some (ErrorDetails { pallet : "Slots" , error : "ParaNotOnboarding" , docs : "The parachain ID is not onboarding." }) , (71u8 , 1u8) => Some (ErrorDetails { pallet : "Slots" , error : "LeaseError" , docs : "There was an error with the lease." }) , (72u8 , 0u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionInProgress" , docs : "This auction is already in progress." }) , (72u8 , 1u8) => Some (ErrorDetails { pallet : "Auctions" , error : "LeasePeriodInPast" , docs : "The lease period is in the past." }) , (72u8 , 2u8) => Some (ErrorDetails { pallet : "Auctions" , error : "ParaNotRegistered" , docs : "Para is not registered" }) , (72u8 , 3u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotCurrentAuction" , docs : "Not a current auction." }) , (72u8 , 4u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotAuction" , docs : "Not an auction." }) , (72u8 , 5u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionEnded" , docs : "Auction has already ended." }) , (72u8 , 6u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AlreadyLeasedOut" , docs : "The para is already leased out for part of this range." }) , (73u8 , 0u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodInPast" , docs : "The current lease period is more than the first lease period." }) , (73u8 , 1u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodTooFarInFuture" , docs : "The first lease period needs to at least be less than 3 `max_value`." }) , (73u8 , 2u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodBeforeFirstPeriod" , docs : "Last lease period must be greater than first lease period." }) , (73u8 , 3u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodTooFarInFuture" , docs : "The last lease period cannot be more than 3 periods after the first period." }) , (73u8 , 4u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CannotEndInPast" , docs : "The campaign ends before the current block number. The end must be in the future." }) , (73u8 , 5u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "EndTooFarInFuture" , docs : "The end date for this crowdloan is not sensible." }) , (73u8 , 6u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "Overflow" , docs : "There was an overflow." }) , (73u8 , 7u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionTooSmall" , docs : "The contribution was below the minimum, `MinContribution`." }) , (73u8 , 8u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidParaId" , docs : "Invalid fund index." }) , (73u8 , 9u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CapExceeded" , docs : "Contributions exceed maximum amount." }) , (73u8 , 10u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionPeriodOver" , docs : "The contribution period has already ended." }) , (73u8 , 11u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidOrigin" , docs : "The origin of this call is invalid." }) , (73u8 , 12u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotParachain" , docs : "This crowdloan does not correspond to a parachain." }) , (73u8 , 13u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LeaseActive" , docs : "This parachain lease is still active and retirement cannot yet begin." }) , (73u8 , 14u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "BidOrLeaseActive" , docs : "This parachain's bid or lease is still active and withdraw cannot yet begin." }) , (73u8 , 15u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FundNotEnded" , docs : "The crowdloan has not yet ended." }) , (73u8 , 16u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoContributions" , docs : "There are no contributions stored in this crowdloan." }) , (73u8 , 17u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotReadyToDissolve" , docs : "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period." }) , (73u8 , 18u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidSignature" , docs : "Invalid signature." }) , (73u8 , 19u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "MemoTooLarge" , docs : "The provided memo is too large." }) , (73u8 , 20u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "AlreadyInNewRaise" , docs : "The fund is already in `NewRaise`" }) , (73u8 , 21u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "VrfDelayInProgress" , docs : "No contributions allowed during the VRF delay" }) , (73u8 , 22u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoLeasePeriod" , docs : "A lease period has not started yet, due to an offset in the starting block." }) , _ => None } + } else { + None + } + } + } impl ::subxt::AccountData<::subxt::DefaultConfig> for DefaultAccountData { fn nonce( result: &::Value, @@ -24793,15 +21453,15 @@ pub mod api { } } pub struct RuntimeApi { - pub client: ::subxt::Client, + pub client: ::subxt::Client, marker: ::core::marker::PhantomData, } - impl ::core::convert::From<::subxt::Client> for RuntimeApi + impl ::core::convert::From<::subxt::Client> for RuntimeApi where T: ::subxt::Config, X: ::subxt::SignedExtra, { - fn from(client: ::subxt::Client) -> Self { + fn from(client: ::subxt::Client) -> Self { Self { client, marker: ::core::marker::PhantomData, @@ -24826,7 +21486,7 @@ pub mod api { } } pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, } impl<'a, T> StorageApi<'a, T> where @@ -24838,9 +21498,6 @@ pub mod api { pub fn scheduler(&self) -> scheduler::storage::StorageApi<'a, T> { scheduler::storage::StorageApi::new(self.client) } - pub fn preimage(&self) -> preimage::storage::StorageApi<'a, T> { - preimage::storage::StorageApi::new(self.client) - } pub fn babe(&self) -> babe::storage::StorageApi<'a, T> { babe::storage::StorageApi::new(self.client) } @@ -24924,9 +21581,6 @@ pub mod api { ) -> election_provider_multi_phase::storage::StorageApi<'a, T> { election_provider_multi_phase::storage::StorageApi::new(self.client) } - pub fn bags_list(&self) -> bags_list::storage::StorageApi<'a, T> { - bags_list::storage::StorageApi::new(self.client) - } pub fn configuration(&self) -> configuration::storage::StorageApi<'a, T> { configuration::storage::StorageApi::new(self.client) } @@ -24972,12 +21626,9 @@ pub mod api { pub fn crowdloan(&self) -> crowdloan::storage::StorageApi<'a, T> { crowdloan::storage::StorageApi::new(self.client) } - pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi<'a, T> { - xcm_pallet::storage::StorageApi::new(self.client) - } } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, + client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, } impl<'a, T, X, A> TransactionApi<'a, T, X, A> @@ -24992,9 +21643,6 @@ pub mod api { pub fn scheduler(&self) -> scheduler::calls::TransactionApi<'a, T, X, A> { scheduler::calls::TransactionApi::new(self.client) } - pub fn preimage(&self) -> preimage::calls::TransactionApi<'a, T, X, A> { - preimage::calls::TransactionApi::new(self.client) - } pub fn babe(&self) -> babe::calls::TransactionApi<'a, T, X, A> { babe::calls::TransactionApi::new(self.client) } @@ -25075,9 +21723,6 @@ pub mod api { ) -> election_provider_multi_phase::calls::TransactionApi<'a, T, X, A> { election_provider_multi_phase::calls::TransactionApi::new(self.client) } - pub fn bags_list(&self) -> bags_list::calls::TransactionApi<'a, T, X, A> { - bags_list::calls::TransactionApi::new(self.client) - } pub fn configuration(&self) -> configuration::calls::TransactionApi<'a, T, X, A> { configuration::calls::TransactionApi::new(self.client) } @@ -25119,8 +21764,5 @@ pub mod api { pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi<'a, T, X, A> { crowdloan::calls::TransactionApi::new(self.client) } - pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi<'a, T, X, A> { - xcm_pallet::calls::TransactionApi::new(self.client) - } } } diff --git a/tests/integration/frame/balances.rs b/tests/integration/frame/balances.rs index d2131f2f92..91dbcc353e 100644 --- a/tests/integration/frame/balances.rs +++ b/tests/integration/frame/balances.rs @@ -181,7 +181,7 @@ async fn transfer_error() { .await; if let Err(Error::Runtime(err)) = res { - let details = err.details().unwrap(); + let details = err.inner().details().unwrap(); assert_eq!(details.pallet, "Balances"); assert_eq!(details.error, "InsufficientBalance"); } else { @@ -198,7 +198,7 @@ async fn transfer_subscription() { let cxt = test_context().await; let sub = cxt.client().rpc().subscribe_events().await.unwrap(); let decoder = cxt.client().events_decoder(); - let mut sub = EventSubscription::::new(sub, decoder); + let mut sub = EventSubscription::::new(sub, decoder); sub.filter_event::(); cxt.api diff --git a/tests/integration/frame/contracts.rs b/tests/integration/frame/contracts.rs index 1d6534d948..72b106f8bc 100644 --- a/tests/integration/frame/contracts.rs +++ b/tests/integration/frame/contracts.rs @@ -58,7 +58,7 @@ impl ContractsTestContext { Self { cxt, signer } } - fn client(&self) -> &Client { + fn client(&self) -> &Client { self.cxt.client() } diff --git a/tests/integration/frame/staking.rs b/tests/integration/frame/staking.rs index f5dbb172dc..b34ae5fcca 100644 --- a/tests/integration/frame/staking.rs +++ b/tests/integration/frame/staking.rs @@ -80,7 +80,7 @@ async fn validate_not_possible_for_stash_account() -> Result<(), Error { - let details = err.details().unwrap(); + let details = err.inner().details().unwrap(); assert_eq!(details.pallet, "Staking"); assert_eq!(details.error, "NotController"); }); @@ -122,7 +122,7 @@ async fn nominate_not_possible_for_stash_account() -> Result<(), Error { - let details = err.details().unwrap(); + let details = err.inner().details().unwrap(); assert_eq!(details.pallet, "Staking"); assert_eq!(details.error, "NotController"); }); @@ -166,7 +166,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .await; assert_matches!(chill, Err(Error::Runtime(err)) => { - let details = err.details().unwrap(); + let details = err.inner().details().unwrap(); assert_eq!(details.pallet, "Staking"); assert_eq!(details.error, "NotController"); }); @@ -222,7 +222,7 @@ async fn tx_bond() -> Result<(), Error> { .await; assert_matches!(bond_again, Err(Error::Runtime(err)) => { - let details = err.details().unwrap(); + let details = err.inner().details().unwrap(); assert_eq!(details.pallet, "Staking"); assert_eq!(details.error, "AlreadyBonded"); }); diff --git a/tests/integration/utils/context.rs b/tests/integration/utils/context.rs index f976ba5b55..1a56a168c1 100644 --- a/tests/integration/utils/context.rs +++ b/tests/integration/utils/context.rs @@ -15,10 +15,7 @@ // along with subxt. If not, see . pub use crate::{ - node_runtime::{ - self, - DispatchError, - }, + node_runtime, TestNodeProcess, }; @@ -40,7 +37,7 @@ pub type NodeRuntimeSignedExtra = 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. \ @@ -49,25 +46,25 @@ 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) .scan_for_open_ports() - .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 node_proc: TestNodeProcess, pub api: node_runtime::RuntimeApi, } impl TestContext { - pub fn client(&self) -> &Client { + pub fn client(&self) -> &Client { &self.api.client } } diff --git a/tests/integration/utils/node_proc.rs b/tests/integration/utils/node_proc.rs index aabb67b05b..60d6136f1d 100644 --- a/tests/integration/utils/node_proc.rs +++ b/tests/integration/utils/node_proc.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . -use codec::Decode; use sp_keyring::AccountKeyring; use std::{ ffi::{ @@ -37,25 +36,23 @@ use subxt::{ }; /// Spawn a local substrate node for testing subxt. -pub struct TestNodeProcess { +pub struct TestNodeProcess { proc: process::Child, - client: Client, + client: Client, } -impl Drop for TestNodeProcess +impl Drop for TestNodeProcess where R: Config, - E: Decode, { fn drop(&mut self) { let _ = self.kill(); } } -impl TestNodeProcess +impl TestNodeProcess where R: Config, - E: Decode, { /// Construct a builder for spawning a test node process. pub fn build(program: S) -> TestNodeProcessBuilder @@ -77,7 +74,7 @@ where } /// Returns the subxt client connected to the running node. - pub fn client(&self) -> &Client { + pub fn client(&self) -> &Client { &self.client } } @@ -116,10 +113,9 @@ impl TestNodeProcessBuilder { } /// Spawn the substrate node at the given path, and wait for rpc to be initialized. - pub async fn spawn(&self) -> Result, String> + pub async fn spawn(&self) -> Result, String> where R: Config, - E: Decode, { let mut cmd = process::Command::new(&self.node_path); cmd.env("RUST_LOG", "error").arg("--dev").arg("--tmp"); From 8c7a2071d030594802c430044b6144f638ff7c9c Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 19 Jan 2022 16:16:38 +0000 Subject: [PATCH 13/21] fix Error doc ambiguity (hopefully) --- src/error.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/error.rs b/src/error.rs index cf02e6e391..0492c633c4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -25,7 +25,6 @@ use core::fmt::Debug; use jsonrpsee::core::error::Error as RequestError; use sp_core::crypto::SecretStringError; use sp_runtime::transaction_validity::TransactionValidityError; -use thiserror::Error; /// An error that may contain some runtime error `E` pub type Error = GenericError>; @@ -36,7 +35,7 @@ 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 /// using this type directly. -#[derive(Debug, Error)] +#[derive(Debug, thiserror::Error)] pub enum GenericError { /// Io error. #[error("Io error: {0}")] @@ -156,7 +155,7 @@ impl RuntimeError { } /// Module error. -#[derive(Clone, Debug, Eq, Error, PartialEq)] +#[derive(Clone, Debug, Eq, thiserror::Error, PartialEq)] #[error("{error} from {pallet}")] pub struct PalletError { /// The module where the error originated. @@ -168,7 +167,7 @@ pub struct PalletError { } /// Transaction error. -#[derive(Clone, Debug, Eq, Error, PartialEq)] +#[derive(Clone, Debug, Eq, thiserror::Error, PartialEq)] pub enum TransactionError { /// The finality subscription expired (after ~512 blocks we give up if the /// block hasn't yet been finalized). From 6309a1ffc889932133467f2ab86ef0bc242ae1af Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 19 Jan 2022 16:22:26 +0000 Subject: [PATCH 14/21] doc tweaks --- codegen/src/api/errors.rs | 4 ++++ src/error.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 28a19249a7..7343098876 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -36,6 +36,10 @@ impl ErrorDetails { } } +/// The purpose of this is to enumerate all of the possible `(module_index, error_index)` error +/// variants, so that we can convert `u8` error codes inside a generated `DispatchError` into +/// nicer error strings with documentation. To do this, we emit the type we'll return instances of, +/// and a function that returns such an instance for all of the error codes seen in the metadata. pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { let errors = match pallet_errors(metadata) { Ok(errors) => errors, diff --git a/src/error.rs b/src/error.rs index 0492c633c4..ac5e1a0da0 100644 --- a/src/error.rs +++ b/src/error.rs @@ -140,7 +140,7 @@ impl From for GenericError { /// 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>`. +/// `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`. From 19fe2050c3ae262a4f8d9a8debc0c3848a438d95 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 10:19:18 +0000 Subject: [PATCH 15/21] docs: remove dismbiguation thing that isn't needed now --- src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index ac5e1a0da0..8d6d5dc666 100644 --- a/src/error.rs +++ b/src/error.rs @@ -76,7 +76,7 @@ pub enum GenericError { } impl GenericError { - /// [`enum@GenericError`] is parameterised over the type that it holds in the `Runtime` + /// [`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 From 5e6b82f33bf59fe3d69ddca82b00686a591edc08 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 11:55:43 +0000 Subject: [PATCH 16/21] One more Error that can be a BasicError --- src/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction.rs b/src/transaction.rs index c6900da7fc..ff0d3132cb 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -388,7 +388,7 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { /// /// **Note:** This has to download block details from the node and decode events /// from them. - pub async fn fetch_events(&self) -> Result, Error> { + pub async fn fetch_events(&self) -> Result, BasicError> { let block = self .client .rpc() From 19df387ac11cc3805f567ce349620b60482b5fa2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 12:19:15 +0000 Subject: [PATCH 17/21] rewrite pallet errors thing into normal loops to tidy --- codegen/src/api/errors.rs | 43 ++++++++++++++++----------------------- src/error.rs | 3 ++- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 7343098876..56413ca452 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -107,33 +107,26 @@ fn pallet_errors( } }; - 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 mut pallet_errors = vec![]; + for pallet in &metadata.pallets { + let error = match &pallet.error { + Some(err) => err, + None => continue + }; - let errors = pallet_errors - .iter() - .flat_map(|(pallet, type_def_variant)| { - type_def_variant.variants().iter().map(move |var| { - ErrorMetadata { - pallet_index: pallet.index, - error_index: var.index(), - pallet: pallet.name.clone(), - error: var.name().clone(), - variant: var.clone(), - } - }) - }) - .collect(); + let type_def_variant = get_type_def_variant(error.ty.id())?; + for var in type_def_variant.variants().iter() { + pallet_errors.push(ErrorMetadata { + pallet_index: pallet.index, + error_index: var.index(), + pallet: pallet.name.clone(), + error: var.name().clone(), + variant: var.clone(), + }); + } + } - Ok(errors) + Ok(pallet_errors) } #[derive(Clone, Debug)] diff --git a/src/error.rs b/src/error.rs index 8d6d5dc666..650f091536 100644 --- a/src/error.rs +++ b/src/error.rs @@ -92,10 +92,11 @@ impl GenericError { GenericError::Invalid(e) => GenericError::Invalid(e), GenericError::InvalidMetadata(e) => GenericError::InvalidMetadata(e), GenericError::Metadata(e) => GenericError::Metadata(e), - GenericError::Runtime(e) => GenericError::Runtime(f(e)), GenericError::EventsDecoding(e) => GenericError::EventsDecoding(e), GenericError::Transaction(e) => GenericError::Transaction(e), GenericError::Other(e) => GenericError::Other(e), + // This is the only branch we really care about: + GenericError::Runtime(e) => GenericError::Runtime(f(e)), } } } From e1918eb8340779a1b2fadf9af570ffbd99a01f4d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 12:32:17 +0000 Subject: [PATCH 18/21] tidy errors codegen a little --- codegen/src/api/errors.rs | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index 56413ca452..bc8b3c4137 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -21,8 +21,13 @@ use proc_macro2::{ }; use quote::quote; +/// Tokens which allow us to provide static error information in the generated output. pub struct ErrorDetails { + /// This type definition will be used in the `dispatch_error_impl_fn` and is + /// expected to be generated somewhere in scope for that to be possible. pub type_def: TokenStream2, + // A function which will live in an impl block for our `DispatchError`, + // to statically return details for known error types: pub dispatch_error_impl_fn: TokenStream2, } @@ -51,7 +56,7 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { }; let match_body_items = errors.into_iter().map(|err| { - let docs = err.description(); + let docs = err.docs; let pallet_index = err.pallet_index; let error_index = err.error_index; let pallet_name = err.pallet; @@ -67,7 +72,6 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { }); ErrorDetails { - // A type we'll be returning that needs defining at the top level: type_def: quote! { pub struct ErrorDetails { pub pallet: &'static str, @@ -75,8 +79,6 @@ pub fn generate_error_details(metadata: &RuntimeMetadataV14) -> ErrorDetails { pub docs: &'static str, } }, - // A function which will live in an impl block for our DispatchError, - // to statically return details for known error types: dispatch_error_impl_fn: quote! { pub fn details(&self) -> Option { if let Self::Module { index, error } = self { @@ -121,7 +123,7 @@ fn pallet_errors( error_index: var.index(), pallet: pallet.name.clone(), error: var.name().clone(), - variant: var.clone(), + docs: var.docs().join("\n"), }); } } @@ -129,23 +131,19 @@ fn pallet_errors( Ok(pallet_errors) } +/// Information about each error that we find in the metadata; +/// used to generate the static error information. #[derive(Clone, Debug)] -pub struct ErrorMetadata { +struct ErrorMetadata { pub pallet_index: u8, pub error_index: u8, pub pallet: String, pub error: String, - variant: scale_info::Variant, -} - -impl ErrorMetadata { - pub fn description(&self) -> String { - self.variant.docs().join("\n") - } + pub docs: String, } #[derive(Debug)] -pub enum InvalidMetadataError { +enum InvalidMetadataError { MissingType(u32), TypeDefNotVariant(u32), } From d8e40fa02b84e7f7553d32ef0519cf5171cc3098 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 12:32:36 +0000 Subject: [PATCH 19/21] tidy examples/custom_type_derives.rs a little --- examples/custom_type_derives.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/custom_type_derives.rs b/examples/custom_type_derives.rs index c02807e99a..7cf4ebcf3b 100644 --- a/examples/custom_type_derives.rs +++ b/examples/custom_type_derives.rs @@ -16,7 +16,9 @@ #[subxt::subxt( runtime_metadata_path = "examples/polkadot_metadata.scale", - generated_type_derives = "Clone" + // We can add (certain) custom derives to the generated types by providing + // a comma separated list to the below attribute. Most useful for adding `Clone`: + generated_type_derives = "Clone, Hash" )] pub mod polkadot {} @@ -25,6 +27,6 @@ use polkadot::runtime_types::frame_support::PalletId; #[async_std::main] async fn main() -> Result<(), Box> { let pallet_id = PalletId([1u8; 8]); - let _ = ::clone(&pallet_id); + let _ = pallet_id.clone(); Ok(()) } From 424acb503d467d24cc1e10adf5a67d66c8ce2693 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 12:33:50 +0000 Subject: [PATCH 20/21] cargo fmt --- codegen/src/api/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/src/api/errors.rs b/codegen/src/api/errors.rs index bc8b3c4137..e2034c7e2d 100644 --- a/codegen/src/api/errors.rs +++ b/codegen/src/api/errors.rs @@ -113,7 +113,7 @@ fn pallet_errors( for pallet in &metadata.pallets { let error = match &pallet.error { Some(err) => err, - None => continue + None => continue, }; let type_def_variant = get_type_def_variant(error.ty.id())?; From d7e5914e39d832584a7ba132b94b701d7009fc8b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 20 Jan 2022 13:57:38 +0000 Subject: [PATCH 21/21] silcnce clippy in example --- examples/custom_type_derives.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/custom_type_derives.rs b/examples/custom_type_derives.rs index 7cf4ebcf3b..a09c3d56e6 100644 --- a/examples/custom_type_derives.rs +++ b/examples/custom_type_derives.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +#![allow(clippy::redundant_clone)] + #[subxt::subxt( runtime_metadata_path = "examples/polkadot_metadata.scale", // We can add (certain) custom derives to the generated types by providing