diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 96fc12fc9c8..868b47205aa 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -90,7 +90,7 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, #call_struct_name, DispatchError> { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, #call_struct_name, DispatchError, root_mod::Event> { let call = #call_struct_name { #( #call_args, )* }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -101,6 +101,7 @@ pub fn generate_calls( quote! { pub mod calls { + use super::root_mod; use super::#types_mod_ident; type DispatchError = #types_mod_ident::sp_runtime::DispatchError; diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index d11071f156c..d273bd5452b 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -209,6 +209,7 @@ impl RuntimeGenerator { quote! { pub mod #mod_name { + use super::root_mod; use super::#types_mod_ident; #calls #event @@ -275,6 +276,9 @@ impl RuntimeGenerator { quote! { #[allow(dead_code, unused_imports, non_camel_case_types)] pub mod #mod_ident { + // Make it easy to access the root via `root_mod` at different levels: + use super::#mod_ident as root_mod; + #outer_event #( #modules )* #types_mod @@ -323,12 +327,33 @@ impl RuntimeGenerator { pub fn tx(&'a self) -> TransactionApi<'a, T, X, A> { TransactionApi { client: &self.client, marker: ::core::marker::PhantomData } } + + pub fn events(&'a self) -> EventsApi<'a, T> { + EventsApi { client: &self.client } + } + } + + pub struct EventsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + + impl <'a, T: ::subxt::Config> EventsApi<'a, T> { + pub async fn at(&self, block_hash: T::Hash) -> Result<::subxt::events::Events<'a, T, Event>, ::subxt::BasicError> { + ::subxt::events::at::(self.client, block_hash).await + } + + pub async fn subscribe(&self) -> Result<::subxt::events::EventSubscription<'a, T, Event>, ::subxt::BasicError> { + ::subxt::events::subscribe::(self.client).await + } + + pub async fn subscribe_finalized(&self) -> Result<::subxt::events::EventSubscription<'a, T, Event>, ::subxt::BasicError> { + ::subxt::events::subscribe_finalized::(self.client).await + } } pub struct ConstantsApi; - impl ConstantsApi - { + impl ConstantsApi { #( pub fn #pallets_with_constants(&self) -> #pallets_with_constants::constants::ConstantsApi { #pallets_with_constants::constants::ConstantsApi diff --git a/examples/examples/polkadot_balance_transfer.rs b/examples/examples/balance_transfer.rs similarity index 92% rename from examples/examples/polkadot_balance_transfer.rs rename to examples/examples/balance_transfer.rs index d5effa3a3c2..50e24dbd5c3 100644 --- a/examples/examples/polkadot_balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -14,11 +14,11 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . -//! To run this example, a local polkadot node should be running. +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.11/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index 55fb16880b4..ad2b9d0a30f 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -14,6 +14,14 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + use sp_keyring::AccountKeyring; use subxt::{ ClientBuilder, diff --git a/examples/examples/custom_type_derives.rs b/examples/examples/custom_type_derives.rs index a09c3d56e6f..5c071be250d 100644 --- a/examples/examples/custom_type_derives.rs +++ b/examples/examples/custom_type_derives.rs @@ -14,13 +14,17 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +//! Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. + #![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 - // a comma separated list to the below attribute. Most useful for adding `Clone`: - generated_type_derives = "Clone, Hash" + // a comma separated list to the below attribute. Most useful for adding `Clone`. + // The derives that we can add ultiamtely is limited to the traits that the base + // types relied upon by the codegen implement. + generated_type_derives = "Clone, PartialEq" )] pub mod polkadot {} diff --git a/examples/examples/fetch_all_accounts.rs b/examples/examples/fetch_all_accounts.rs index 17aecc8a6c0..46bac8eb5a6 100644 --- a/examples/examples/fetch_all_accounts.rs +++ b/examples/examples/fetch_all_accounts.rs @@ -14,11 +14,11 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . -//! To run this example, a local polkadot node should be running. +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.11/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` diff --git a/examples/examples/polkadot_metadata.scale b/examples/examples/polkadot_metadata.scale index 678aba31610..73177314a1b 100644 Binary files a/examples/examples/polkadot_metadata.scale and b/examples/examples/polkadot_metadata.scale differ diff --git a/examples/examples/fetch_remote.rs b/examples/examples/rpc_call.rs similarity index 75% rename from examples/examples/fetch_remote.rs rename to examples/examples/rpc_call.rs index 7b41dc18625..2763ba97ba6 100644 --- a/examples/examples/fetch_remote.rs +++ b/examples/examples/rpc_call.rs @@ -14,6 +14,14 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + use subxt::{ ClientBuilder, DefaultConfig, @@ -42,9 +50,9 @@ async fn main() -> Result<(), Box> { .await?; if let Some(hash) = block_hash { - println!("Block hash for block number {}: {}", block_number, hash); + println!("Block hash for block number {block_number}: {hash}"); } else { - println!("Block number {} not found.", block_number); + println!("Block number {block_number} not found."); } Ok(()) diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index d8a2b8d4a13..c1d72ca2fea 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -14,11 +14,11 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . -//! To run this example, a local polkadot node should be running. +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. //! //! E.g. //! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.11/polkadot" --output /usr/local/bin/polkadot --location +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location //! polkadot --dev --tmp //! ``` @@ -70,7 +70,7 @@ async fn simple_transfer() -> Result<(), Box> { balance_transfer.find_first_event::()?; if let Some(event) = transfer_event { - println!("Balance transfer success: value: {:?}", event.2); + println!("Balance transfer success: {event:?}"); } else { println!("Failed to find Balances::Transfer Event"); } @@ -119,7 +119,7 @@ async fn simple_transfer_separate_events() -> Result<(), Box()?; if let Some(event) = transfer_event { - println!("Balance transfer success: value: {:?}", event.2); + println!("Balance transfer success: {event:?}"); } else { println!("Failed to find Balances::Transfer Event"); } @@ -165,8 +165,7 @@ async fn handle_transfer_events() -> Result<(), Box> { if let Some(event) = transfer_event { println!( - "Balance transfer is now in block (but not finalized): value: {:?}", - event.2 + "Balance transfer is now in block (but not finalized): {event:?}" ); } else { println!("Failed to find Balances::Transfer Event"); @@ -185,7 +184,7 @@ async fn handle_transfer_events() -> Result<(), Box> { events.find_first_event::()?; if let Some(event) = transfer_event { - println!("Balance transfer success: value: {:?}", event.2); + println!("Balance transfer success: {event:?}"); } else { println!("Failed to find Balances::Transfer Event"); } diff --git a/examples/examples/subscribe_all_events.rs b/examples/examples/subscribe_all_events.rs new file mode 100644 index 00000000000..92b5cae1b1a --- /dev/null +++ b/examples/examples/subscribe_all_events.rs @@ -0,0 +1,116 @@ +// 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 . + +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + +use futures::StreamExt; +use sp_keyring::AccountKeyring; +use std::time::Duration; +use subxt::{ + ClientBuilder, + DefaultConfig, + DefaultExtra, + PairSigner, +}; + +#[subxt::subxt(runtime_metadata_path = "examples/polkadot_metadata.scale")] +pub mod polkadot {} + +/// Subscribe to all events, and then manually look through them and +/// pluck out the events that we care about. +#[async_std::main] +async fn main() -> Result<(), Box> { + env_logger::init(); + + let api = ClientBuilder::new() + .build() + .await? + .to_runtime_api::>>(); + + // Subscribe to any events that occur: + let mut event_sub = api.events().subscribe().await?; + + // While this subscription is active, balance transfers are made somewhere: + async_std::task::spawn(async { + let signer = PairSigner::new(AccountKeyring::Alice.pair()); + let api = ClientBuilder::new() + .build() + .await + .unwrap() + .to_runtime_api::>>(); + + let mut transfer_amount = 1_000_000_000; + + // Make small balance transfers from Alice to Bob in a loop: + loop { + api.tx() + .balances() + .transfer(AccountKeyring::Bob.to_account_id().into(), transfer_amount) + .sign_and_submit(&signer) + .await + .unwrap(); + + async_std::task::sleep(Duration::from_secs(10)).await; + transfer_amount += 100_000_000; + } + }); + + // Our subscription will see the events emitted as a result of this: + while let Some(events) = event_sub.next().await { + let events = events?; + let block_hash = events.block_hash(); + + // We can iterate, statically decoding all events if we want: + println!("All events in block {block_hash:?}:"); + println!(" Static event details:"); + for event in events.iter() { + let event = event?; + println!(" {event:?}"); + } + + // Or we can dynamically decode events: + println!(" Dynamic event details: {block_hash:?}:"); + for event in events.iter_raw() { + let event = event?; + let is_balance_transfer = event + .as_event::()? + .is_some(); + let pallet = event.pallet; + let variant = event.variant; + println!( + " {pallet}::{variant} (is balance transfer? {is_balance_transfer})" + ); + } + + // Or we can dynamically find the first transfer event, ignoring any others: + let transfer_event = + events.find_first_event::()?; + + if let Some(ev) = transfer_event { + println!(" - Balance transfer success: value: {:?}", ev.amount); + } else { + println!(" - No balance transfer event found in this block"); + } + } + + Ok(()) +} diff --git a/examples/examples/subscribe_one_event.rs b/examples/examples/subscribe_one_event.rs new file mode 100644 index 00000000000..e58a92dba05 --- /dev/null +++ b/examples/examples/subscribe_one_event.rs @@ -0,0 +1,97 @@ +// 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 . + +//! To run this example, a local polkadot node should be running. Example verified against polkadot 0.9.13-82616422d0-aarch64-macos. +//! +//! E.g. +//! ```bash +//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.13/polkadot" --output /usr/local/bin/polkadot --location +//! polkadot --dev --tmp +//! ``` + +use futures::{ + future, + stream, + StreamExt, +}; +use sp_keyring::AccountKeyring; +use std::time::Duration; +use subxt::{ + ClientBuilder, + DefaultConfig, + DefaultExtra, + PairSigner, +}; + +#[subxt::subxt(runtime_metadata_path = "examples/polkadot_metadata.scale")] +pub mod polkadot {} + +/// Subscribe to all events, and then manually look through them and +/// pluck out the events that we care about. +#[async_std::main] +async fn main() -> Result<(), Box> { + env_logger::init(); + + // Subscribe to any events that occur: + let api = ClientBuilder::new() + .build() + .await? + .to_runtime_api::>>(); + + // Subscribe to just balance transfer events, making use of `flat_map` and + // `filter_map` from the StreamExt trait to filter everything else out. + let mut transfer_events = api + .events() + .subscribe() + .await? + // Ignore errors returning events: + .filter_map(|events| future::ready(events.ok())) + // Map events to just the one we care about: + .flat_map(|events| { + let transfer_events = events + .find::() + .collect::>(); + stream::iter(transfer_events) + }); + + // While this subscription is active, we imagine some balance transfers are made somewhere else: + async_std::task::spawn(async { + let signer = PairSigner::new(AccountKeyring::Alice.pair()); + let api = ClientBuilder::new() + .build() + .await + .unwrap() + .to_runtime_api::>>(); + + // Make small balance transfers from Alice to Bob in a loop: + loop { + api.tx() + .balances() + .transfer(AccountKeyring::Bob.to_account_id().into(), 1_000_000_000) + .sign_and_submit(&signer) + .await + .unwrap(); + async_std::task::sleep(Duration::from_secs(10)).await; + } + }); + + // Our subscription will see all of the transfer events emitted as a result of this: + while let Some(transfer_event) = transfer_events.next().await { + println!("Balance transfer event: {transfer_event:?}"); + } + + Ok(()) +} diff --git a/examples/examples/transfer_subscribe.rs b/examples/examples/transfer_subscribe.rs deleted file mode 100644 index 316d27248bc..00000000000 --- a/examples/examples/transfer_subscribe.rs +++ /dev/null @@ -1,70 +0,0 @@ -// 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 . - -//! To run this example, a local polkadot node should be running. -//! -//! E.g. -//! ```bash -//! curl "https://github.com/paritytech/polkadot/releases/download/v0.9.11/polkadot" --output /usr/local/bin/polkadot --location -//! polkadot --dev --tmp -//! ``` - -use sp_keyring::AccountKeyring; -use subxt::{ - ClientBuilder, - DefaultConfig, - DefaultExtra, - EventSubscription, - PairSigner, -}; - -#[subxt::subxt(runtime_metadata_path = "examples/polkadot_metadata.scale")] -pub mod polkadot {} - -#[async_std::main] -async fn main() -> Result<(), Box> { - env_logger::init(); - - let signer = PairSigner::new(AccountKeyring::Alice.pair()); - let dest = AccountKeyring::Bob.to_account_id().into(); - - let api = ClientBuilder::new() - .build() - .await? - .to_runtime_api::>>(); - - let sub = api.client.rpc().subscribe_events().await?; - let decoder = api.client.events_decoder(); - let mut sub = EventSubscription::::new(sub, decoder); - sub.filter_event::(); - - api.tx() - .balances() - .transfer(dest, 10_000) - .sign_and_submit(&signer) - .await?; - - let raw = sub.next().await.unwrap().unwrap(); - let event = ::decode( - &mut &raw.data[..], - ); - if let Ok(e) = event { - println!("Balance transfer success: value: {:?}", e.2); - } else { - println!("Failed to subscribe to Balances::Transfer Event"); - } - Ok(()) -} diff --git a/subxt/src/client.rs b/subxt/src/client.rs index bd1d6298e62..7eb8935c6ff 100644 --- a/subxt/src/client.rs +++ b/subxt/src/client.rs @@ -20,7 +20,6 @@ pub use sp_runtime::traits::SignedExtension; use crate::{ error::BasicError, - events::EventsDecoder, extrinsic::{ self, SignedExtra, @@ -98,13 +97,10 @@ impl ClientBuilder { .await; let metadata = metadata?; - let events_decoder = EventsDecoder::new(metadata.clone()); - Ok(Client { rpc, genesis_hash: genesis_hash?, metadata: Arc::new(metadata), - events_decoder, properties: properties.unwrap_or_else(|_| Default::default()), runtime_version: runtime_version?, iter_page_size: self.page_size.unwrap_or(10), @@ -119,7 +115,6 @@ pub struct Client { rpc: Rpc, genesis_hash: T::Hash, metadata: Arc, - events_decoder: EventsDecoder, properties: SystemProperties, runtime_version: RuntimeVersion, iter_page_size: u32, @@ -179,27 +174,23 @@ impl Client { pub fn to_runtime_api>(self) -> R { self.into() } - - /// Returns the events decoder. - 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> { +pub struct SubmittableExtrinsic<'client, T: Config, X, A, C, E: Decode, Evs: Decode> { client: &'client Client, call: C, - marker: std::marker::PhantomData<(X, A, E)>, + marker: std::marker::PhantomData<(X, A, E, Evs)>, } -impl<'client, T, X, A, C, E> SubmittableExtrinsic<'client, T, X, A, C, E> +impl<'client, T, X, A, C, E, Evs> SubmittableExtrinsic<'client, T, X, A, C, E, Evs> where T: Config, X: SignedExtra, A: AccountData, C: Call + Send + Sync, E: Decode, + Evs: Decode, { /// Create a new [`SubmittableExtrinsic`]. pub fn new(client: &'client Client, call: C) -> Self { @@ -217,7 +208,7 @@ where pub async fn sign_and_submit_then_watch( self, signer: &(dyn Signer + Send + Sync), - ) -> Result, BasicError> + ) -> Result, BasicError> where <>::Extra as SignedExtension>::AdditionalSigned: Send + Sync + 'static, diff --git a/subxt/src/events.rs b/subxt/src/events.rs index e637774d9a0..a650b80b4cc 100644 --- a/subxt/src/events.rs +++ b/subxt/src/events.rs @@ -14,16 +14,15 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . +//! For working with events. + use crate::{ error::BasicError, - metadata::{ - EventMetadata, - MetadataError, - }, + metadata::MetadataError, + Client, Config, Event, Metadata, - PhantomDataSendSync, Phase, }; use bitvec::{ @@ -38,17 +37,371 @@ use codec::{ Input, }; use derivative::Derivative; +use futures::{ + Future, + FutureExt, + Stream, + StreamExt, +}; +use jsonrpsee::core::client::Subscription; use scale_info::{ PortableRegistry, TypeDef, TypeDefPrimitive, }; -use sp_core::Bytes; +use sp_core::{ + storage::StorageKey, + twox_128, + Bytes, +}; +use std::{ + marker::Unpin, + task::Poll, +}; + +/// Obtain events at some block hash. The generic parameter is what we +/// will attempt to decode each event into if using [`Events::iter()`], +/// and is expected to be the outermost event enum that contains all of +/// the possible events across all pallets. +/// +/// **Note:** This function is hidden from the documentation +/// and is exposed only to be called via the codegen. Thus, prefer to use +/// `api.events().at(block_hash)` over calling this directly. +#[doc(hidden)] +pub async fn at( + client: &'_ Client, + block_hash: T::Hash, +) -> Result, BasicError> { + let mut event_bytes = client + .rpc() + .storage(&system_events_key(), Some(block_hash)) + .await? + .map(|s| s.0) + .unwrap_or_else(Vec::new); + + // event_bytes is a SCALE encoded vector of events. So, pluck the + // compact encoded length from the front, leaving the remaining bytes + // for our iterating to decode. + // + // Note: if we get no bytes back, avoid an error reading vec length + // and default to 0 events. + let cursor = &mut &*event_bytes; + let num_events = >::decode(cursor).unwrap_or(Compact(0)).0; + let event_bytes_len = event_bytes.len(); + let remaining_len = cursor.len(); + event_bytes.drain(0..event_bytes_len - remaining_len); + + Ok(Events { + metadata: client.metadata(), + block_hash, + event_bytes, + num_events, + _event_type: std::marker::PhantomData, + }) +} + +/// Subscribe to events from blocks. +/// +/// **Note:** these blocks haven't necessarily been finalised yet; prefer +/// [`Events::subscribe_finalized()`] if that is important. +/// +/// **Note:** This function is hidden from the documentation +/// and is exposed only to be called via the codegen. Thus, prefer to use +/// `api.events().subscribe()` over calling this directly. +#[doc(hidden)] +pub async fn subscribe( + client: &'_ Client, +) -> Result, BasicError> { + let block_subscription = client.rpc().subscribe_blocks().await?; + Ok(EventSubscription::new(client, block_subscription)) +} + +/// Subscribe to events from finalized blocks. +/// +/// **Note:** This function is hidden from the documentation +/// and is exposed only to be called via the codegen. Thus, prefer to use +/// `api.events().subscribe_finalized()` over calling this directly. +#[doc(hidden)] +pub async fn subscribe_finalized( + client: &'_ Client, +) -> Result, BasicError> { + let block_subscription = client.rpc().subscribe_finalized_blocks().await?; + Ok(EventSubscription::new(client, block_subscription)) +} + +/// A subscription to events that implements [`Stream`], and returns [`Events`] objects for each block. +#[derive(Derivative)] +#[derivative(Debug(bound = ""))] +pub struct EventSubscription<'a, T: Config, Evs: Decode + 'static> { + finished: bool, + client: &'a Client, + block_header_subscription: Subscription, + #[derivative(Debug = "ignore")] + at: Option< + std::pin::Pin< + Box, BasicError>> + 'a>, + >, + >, + _event_type: std::marker::PhantomData, +} + +impl<'a, T: Config, Evs: Decode> EventSubscription<'a, T, Evs> { + fn new( + client: &'a Client, + block_header_subscription: Subscription, + ) -> Self { + EventSubscription { + finished: false, + client, + block_header_subscription, + at: None, + _event_type: std::marker::PhantomData, + } + } +} + +impl<'a, T: Config, Evs: Decode> Unpin for EventSubscription<'a, T, Evs> {} + +// We want `EventSubscription` to implement Stream. The below implementation is the rather verbose +// way to roughly implement the following function: +// +// ``` +// fn subscribe_events(client: &'_ Client, block_sub: Subscription) -> impl Stream, BasicError>> + '_ { +// use futures::StreamExt; +// block_sub.then(move |block_header_res| async move { +// use sp_runtime::traits::Header; +// let block_header = block_header_res?; +// let block_hash = block_header.hash(); +// at(client, block_hash).await +// }) +// } +// ``` +// +// The advantage of this manual implementation is that we have a named type that we (and others) +// can derive things on, store away, alias etc. +impl<'a, T: Config, Evs: Decode> Stream for EventSubscription<'a, T, Evs> { + type Item = Result, BasicError>; + + fn poll_next( + mut self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + // We are finished; return None. + if self.finished { + return Poll::Ready(None) + } + + // If there isn't an `at` function yet that's busy resolving a block hash into + // some event details, then poll the block header subscription to get one. + if self.at.is_none() { + match futures::ready!(self.block_header_subscription.poll_next_unpin(cx)) { + None => { + self.finished = true; + return Poll::Ready(None) + } + Some(Err(e)) => { + self.finished = true; + return Poll::Ready(Some(Err(e.into()))) + } + Some(Ok(block_header)) => { + use sp_runtime::traits::Header; + // Note [jsdw]: We may be able to get rid of the per-item allocation + // with https://github.com/oblique/reusable-box-future. + self.at = Some(Box::pin(at(self.client, block_header.hash()))); + // Continue, so that we poll this function future we've just created. + } + } + } + + // If we get here, there will be an `at` function stored. Unwrap it and poll it to + // completion to get our events, throwing it away as soon as it is ready. + let at_fn = self + .at + .as_mut() + .expect("'at' function should have been set above'"); + let events = futures::ready!(at_fn.poll_unpin(cx)); + self.at = None; + Poll::Ready(Some(events)) + } +} + +/// A collection of events obtained from a block, bundled with the necessary +/// information needed to decode and iterate over them. +#[derive(Derivative)] +#[derivative(Debug(bound = ""))] +pub struct Events<'a, T: Config, Evs: Decode> { + metadata: &'a Metadata, + block_hash: T::Hash, + // Note; raw event bytes are prefixed with a Compact containing + // the number of events to be decoded. We should have stripped that off + // before storing the bytes here. + event_bytes: Vec, + num_events: u32, + _event_type: std::marker::PhantomData, +} -/// Raw bytes for an Event -#[derive(Debug)] -#[cfg_attr(test, derive(PartialEq, Clone))] -pub struct RawEvent { +impl<'a, T: Config, Evs: Decode> Events<'a, T, Evs> { + /// The number of events. + pub fn len(&self) -> u32 { + self.num_events + } + + /// Are there no events in this block? + // Note: mainly here to satisfy clippy. + pub fn is_empty(&self) -> bool { + self.num_events == 0 + } + + /// Return the block hash that these events are from. + pub fn block_hash(&self) -> T::Hash { + self.block_hash + } + + /// Iterate over the events, statically decoding them as we go. + /// If an event is encountered that cannot be statically decoded, + /// a [`codec::Error`] will be returned. + /// + /// If the generated code does not know about all of the pallets that exist + /// in the runtime being targeted, it may not know about all of the + /// events either, and so this method should be avoided in favout of [`Events::iter_raw()`], + /// which uses runtime metadata to skip over unknown events. + pub fn iter( + &self, + ) -> impl Iterator, BasicError>> + '_ { + let event_bytes = &self.event_bytes; + + let mut pos = 0; + let mut index = 0; + std::iter::from_fn(move || { + let cursor = &mut &event_bytes[pos..]; + let start_len = cursor.len(); + + if start_len == 0 || self.num_events == index { + None + } else { + let mut decode_one_event = || -> Result<_, BasicError> { + let phase = Phase::decode(cursor)?; + let ev = Evs::decode(cursor)?; + let _topics = Vec::::decode(cursor)?; + Ok((phase, ev)) + }; + match decode_one_event() { + Ok((phase, event)) => { + // Skip over decoded bytes in next iteration: + pos += start_len - cursor.len(); + // Gather the event details before incrementing the index for the next iter. + let res = Some(Ok(EventDetails { + phase, + index, + event, + })); + index += 1; + res + } + Err(e) => { + // By setting the position to the "end" of the event bytes, + // the cursor len will become 0 and the iterator will return `None` + // from now on: + pos = event_bytes.len(); + Some(Err(e)) + } + } + } + }) + } + + /// Iterate over all of the events, using metadata to dynamically + /// decode them as we go, and returning the raw bytes and other associated + /// details. If an error occurs, all subsequent iterations return `None`. + /// + /// This method is safe to use even if you do not statically know about + /// all of the possible events; it splits events up using the metadata + /// obtained at runtime, which does. + pub fn iter_raw( + &self, + ) -> impl Iterator> + '_ { + let event_bytes = &self.event_bytes; + + let mut pos = 0; + let mut index = 0; + std::iter::from_fn(move || { + let cursor = &mut &event_bytes[pos..]; + let start_len = cursor.len(); + + if start_len == 0 || self.num_events == index { + None + } else { + match decode_raw_event_details::(self.metadata, index, cursor) { + Ok(raw_event) => { + // Skip over decoded bytes in next iteration: + pos += start_len - cursor.len(); + // Increment the index: + index += 1; + // Return the event details: + Some(Ok(raw_event)) + } + Err(e) => { + // By setting the position to the "end" of the event bytes, + // the cursor len will become 0 and the iterator will return `None` + // from now on: + pos = event_bytes.len(); + Some(Err(e)) + } + } + } + }) + } + + /// Iterate through the events using metadata to dynamically decode and skip + /// them, and return only those which should decode to the provided `Ev` type. + /// If an error occurs, all subsequent iterations return `None`. + /// + /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to + /// use even if you do not statically know about all of the possible events. + pub fn find(&self) -> impl Iterator> + '_ { + self.iter_raw().filter_map(|ev| { + ev.and_then(|ev| ev.as_event::().map_err(Into::into)) + .transpose() + }) + } + + /// Iterate through the events using metadata to dynamically decode and skip + /// them, and return the first event found which decodes to the provided `Ev` type. + /// + /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to + /// use even if you do not statically know about all of the possible events. + pub fn find_first_event(&self) -> Result, BasicError> { + self.find::().next().transpose() + } + + /// Find an event that decodes to the type provided. Returns true if it was found. + /// + /// **Note:** This method internally uses [`Events::iter_raw()`], so it is safe to + /// use even if you do not statically know about all of the possible events. + pub fn has(&self) -> Result { + Ok(self.find::().next().transpose()?.is_some()) + } +} + +/// A decoded event and associated details. +#[derive(Debug, Clone, PartialEq)] +pub struct EventDetails { + /// During which [`Phase`] was the event produced? + pub phase: Phase, + /// What index is this event in the stored events for this block. + pub index: u32, + /// The event itself. + pub event: Evs, +} + +/// The raw bytes for an event with associated details about +/// where and when it was emitted. +#[derive(Debug, Clone, PartialEq)] +pub struct RawEventDetails { + /// When was the event produced? + pub phase: Phase, + /// What index is this event in the stored events for this block. + pub index: u32, /// The name of the pallet from whence the Event originated. pub pallet: String, /// The index of the pallet from whence the Event originated. @@ -61,8 +414,8 @@ pub struct RawEvent { pub data: Bytes, } -impl RawEvent { - /// Attempt to decode this [`RawEvent`] into a specific event. +impl RawEventDetails { + /// Attempt to decode this [`RawEventDetails`] into a specific event. pub fn as_event(&self) -> Result, CodecError> { if self.pallet == E::PALLET && self.variant == E::EVENT { Ok(Some(E::decode(&mut &self.data[..])?)) @@ -72,108 +425,66 @@ impl RawEvent { } } -/// Events decoder. -#[derive(Derivative)] -#[derivative(Clone(bound = ""), Debug(bound = ""))] -pub struct EventsDecoder { - metadata: Metadata, - marker: PhantomDataSendSync, -} - -impl EventsDecoder { - /// Creates a new `EventsDecoder`. - pub fn new(metadata: Metadata) -> Self { - Self { - metadata, - marker: Default::default(), - } - } - - /// Decode events. - pub fn decode_events( - &self, - input: &mut &[u8], - ) -> Result, BasicError> { - let compact_len = >::decode(input)?; - let len = compact_len.0 as usize; - log::debug!("decoding {} events", len); - - let mut r = Vec::new(); - for _ in 0..len { - // decode EventRecord - let phase = Phase::decode(input)?; - let pallet_index = input.read_byte()?; - let variant_index = input.read_byte()?; - log::debug!( - "phase {:?}, pallet_index {}, event_variant: {}", - phase, - pallet_index, - variant_index - ); - log::debug!("remaining input: {}", hex::encode(&input)); - - let event_metadata = self.metadata.event(pallet_index, variant_index)?; - - let mut event_data = Vec::::new(); - let result = self.decode_raw_event(event_metadata, input, &mut event_data); - let raw = match result { - Ok(()) => { - log::debug!("raw bytes: {}", hex::encode(&event_data),); - - let event = RawEvent { - pallet: event_metadata.pallet().to_string(), - pallet_index, - variant: event_metadata.event().to_string(), - variant_index, - data: event_data.into(), - }; - - // topics come after the event data in EventRecord - let topics = Vec::::decode(input)?; - log::debug!("topics: {:?}", topics); - - event - } - Err(err) => return Err(err), - }; - r.push((phase.clone(), raw)); - } - Ok(r) - } - - fn decode_raw_event( - &self, - event_metadata: &EventMetadata, - input: &mut &[u8], - output: &mut Vec, - ) -> Result<(), BasicError> { - log::debug!( - "Decoding Event '{}::{}'", - event_metadata.pallet(), - event_metadata.event() - ); - for arg in event_metadata.variant().fields() { - let type_id = arg.ty().id(); - self.decode_type(type_id, input, output)? - } - Ok(()) - } - - fn decode_type( - &self, - type_id: u32, - input: &mut &[u8], - output: &mut Vec, - ) -> Result<(), BasicError> { +// Attempt to dynamically decode a single event from our events input. +fn decode_raw_event_details( + metadata: &Metadata, + index: u32, + input: &mut &[u8], +) -> Result { + // Decode basic event details: + let phase = Phase::decode(input)?; + let pallet_index = input.read_byte()?; + let variant_index = input.read_byte()?; + log::debug!( + "phase {:?}, pallet_index {}, event_variant: {}", + phase, + pallet_index, + variant_index + ); + log::debug!("remaining input: {}", hex::encode(&input)); + + // Get metadata for the event: + let event_metadata = metadata.event(pallet_index, variant_index)?; + log::debug!( + "Decoding Event '{}::{}'", + event_metadata.pallet(), + event_metadata.event() + ); + + // Use metadata to figure out which bytes belong to this event: + let mut event_bytes = Vec::new(); + for arg in event_metadata.variant().fields() { + let type_id = arg.ty().id(); let all_bytes = *input; // consume some bytes, moving the cursor forward: - decode_and_consume_type(type_id, &self.metadata.runtime_metadata().types, input)?; + decode_and_consume_type(type_id, &metadata.runtime_metadata().types, input)?; // count how many bytes were consumed based on remaining length: let consumed_len = all_bytes.len() - input.len(); // move those consumed bytes to the output vec unaltered: - output.extend(&all_bytes[0..consumed_len]); - Ok(()) + event_bytes.extend(&all_bytes[0..consumed_len]); } + + // topics come after the event data in EventRecord. They aren't used for + // anything at the moment, so just decode and throw them away. + let topics = Vec::::decode(input)?; + log::debug!("topics: {:?}", topics); + + Ok(RawEventDetails { + phase, + index, + pallet_index, + pallet: event_metadata.pallet().to_string(), + variant_index, + variant: event_metadata.event().to_string(), + data: event_bytes.into(), + }) +} + +// The storage key needed to access events. +fn system_events_key() -> StorageKey { + let mut storage_key = twox_128(b"System").to_vec(); + storage_key.extend(twox_128(b"Events").to_vec()); + StorageKey(storage_key) } // Given a type Id and a type registry, attempt to consume the bytes @@ -353,6 +664,7 @@ fn decode_and_consume_type( } } +/// The possible errors that we can run into attempting to decode events. #[derive(Debug, thiserror::Error)] pub enum EventsDecodingError { /// Unsupported primitive type @@ -402,23 +714,32 @@ mod tests { type TypeId = scale_info::interner::UntrackedSymbol; + /// An "outer" events enum containing exactly one event. + #[derive(Encode, Decode, TypeInfo, Clone, Debug, PartialEq)] + pub enum AllEvents { + E(Ev), + } + + /// This encodes to the same format an event is expected to encode to + /// in node System.Events storage. #[derive(Encode)] pub struct EventRecord { phase: Phase, - pallet_index: u8, - event: E, + event: AllEvents, topics: Vec<::Hash>, } - fn event_record(pallet_index: u8, event: E) -> EventRecord { + /// Build an EventRecord, which encoded events in the format expected + /// to be handed back from storage queries to System.Events. + fn event_record(phase: Phase, event: E) -> EventRecord { EventRecord { - phase: Phase::Finalization, - pallet_index, - event, + phase, + event: AllEvents::E(event), topics: vec![], } } + /// Build a type registry that knows about the single type provided. fn singleton_type_registry( ) -> (TypeId, PortableRegistry) { let m = scale_info::MetaType::new::(); @@ -429,31 +750,61 @@ mod tests { (id, portable_registry) } - fn pallet_metadata(pallet_index: u8) -> PalletMetadata { - let event = PalletEventMetadata { - ty: meta_type::(), - }; - PalletMetadata { + /// Build fake metadata consisting of a single pallet that knows + /// about the event type provided. + fn metadata() -> Metadata { + let pallets = vec![PalletMetadata { name: "Test", storage: None, calls: None, - event: Some(event), + event: Some(PalletEventMetadata { + ty: meta_type::(), + }), constants: vec![], error: None, - index: pallet_index, - } - } + index: 0, + }]; - fn init_decoder(pallets: Vec) -> EventsDecoder { let extrinsic = ExtrinsicMetadata { ty: meta_type::<()>(), version: 0, signed_extensions: vec![], }; + 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) + + Metadata::try_from(runtime_metadata).unwrap() + } + + /// Build an `Events` object for test purposes, based on the details provided, + /// and with a default block hash. + fn events( + metadata: &'_ Metadata, + event_records: Vec>, + ) -> Events<'_, DefaultConfig, AllEvents> { + let num_events = event_records.len() as u32; + let mut event_bytes = Vec::new(); + for ev in event_records { + ev.encode_to(&mut event_bytes); + } + events_raw(metadata, event_bytes, num_events) + } + + /// Much like [`events`], but takes pre-encoded events and event count, so that we can + /// mess with the bytes in tests if we need to. + fn events_raw( + metadata: &'_ Metadata, + event_bytes: Vec, + num_events: u32, + ) -> Events<'_, DefaultConfig, AllEvents> { + Events { + block_hash: ::Hash::default(), + event_bytes, + metadata, + num_events, + _event_type: std::marker::PhantomData, + } } fn decode_and_consume_type_consumes_all_bytes< @@ -470,152 +821,478 @@ mod tests { } #[test] - fn decode_single_event() { - #[derive(Clone, Encode, TypeInfo)] + fn statically_decode_single_event() { + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] enum Event { A(u8), } - let pallet_index = 0; - let pallet = pallet_metadata::(pallet_index); - let decoder = init_decoder(vec![pallet]); + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); - let event = Event::A(1); - let encoded_event = event.encode(); - let event_records = vec![event_record(pallet_index, event)]; + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let events = events::( + &metadata, + vec![event_record(Phase::Finalization, Event::A(1))], + ); - let mut input = Vec::new(); - event_records.encode_to(&mut input); + let event_details: Vec>> = + events.iter().collect::>().unwrap(); + assert_eq!( + event_details, + vec![EventDetails { + index: 0, + phase: Phase::Finalization, + event: AllEvents::E(Event::A(1)) + }] + ); + } - let events = decoder.decode_events(&mut &input[..]).unwrap(); + #[test] + fn statically_decode_multiple_events() { + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] + enum Event { + A(u8), + B(bool), + } + + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); + + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let events = events::( + &metadata, + vec![ + event_record(Phase::Initialization, Event::A(1)), + event_record(Phase::ApplyExtrinsic(123), Event::B(true)), + event_record(Phase::Finalization, Event::A(234)), + ], + ); - assert_eq!(events[0].1.variant_index, encoded_event[0]); - assert_eq!(events[0].1.data.0, encoded_event[1..]); + let event_details: Vec>> = + events.iter().collect::>().unwrap(); + assert_eq!( + event_details, + vec![ + EventDetails { + index: 0, + phase: Phase::Initialization, + event: AllEvents::E(Event::A(1)) + }, + EventDetails { + index: 1, + phase: Phase::ApplyExtrinsic(123), + event: AllEvents::E(Event::B(true)) + }, + EventDetails { + index: 2, + phase: Phase::Finalization, + event: AllEvents::E(Event::A(234)) + }, + ] + ); } #[test] - fn decode_multiple_events() { - #[derive(Clone, Encode, TypeInfo)] + fn statically_decode_multiple_events_until_error() { + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] enum Event { A(u8), - B, - C { a: u32 }, + B(bool), } - let pallet_index = 0; - let pallet = pallet_metadata::(pallet_index); - let decoder = init_decoder(vec![pallet]); + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); + // Encode 2 events: + let mut event_bytes = vec![]; + event_record(Phase::Initialization, Event::A(1)).encode_to(&mut event_bytes); + event_record(Phase::ApplyExtrinsic(123), Event::B(true)) + .encode_to(&mut event_bytes); + + // Push a few naff bytes to the end (a broken third event): + event_bytes.extend_from_slice(&[3, 127, 45, 0, 2]); + + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let events = events_raw::( + &metadata, + event_bytes, + 3, // 2 "good" events, and then it'll hit the naff bytes. + ); + + let mut events_iter = events.iter(); + assert_eq!( + events_iter.next().unwrap().unwrap(), + EventDetails { + index: 0, + phase: Phase::Initialization, + event: AllEvents::E(Event::A(1)) + } + ); + assert_eq!( + events_iter.next().unwrap().unwrap(), + EventDetails { + index: 1, + phase: Phase::ApplyExtrinsic(123), + event: AllEvents::E(Event::B(true)) + } + ); + + // We'll hit an error trying to decode the third event: + assert!(events_iter.next().unwrap().is_err()); + // ... and then "None" from then on. + assert!(events_iter.next().is_none()); + assert!(events_iter.next().is_none()); + } + + #[test] + fn dynamically_decode_single_event() { + #[derive(Clone, Copy, Debug, PartialEq, Decode, Encode, TypeInfo)] + enum Event { + A(u8), + } + + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); + + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let event = Event::A(1); + let events = events::( + &metadata, + vec![event_record(Phase::ApplyExtrinsic(123), event)], + ); + + let event_details: Vec = + events.iter_raw().collect::>().unwrap(); + let expected_event_data = { + let mut bytes = event.encode(); + // Strip variant tag off event bytes: + bytes.drain(0..1); + bytes + }; + + assert_eq!( + event_details, + vec![RawEventDetails { + index: 0, + phase: Phase::ApplyExtrinsic(123), + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: expected_event_data.into() + }] + ); + } + + #[test] + fn dynamically_decode_multiple_events() { + #[derive(Clone, Copy, Debug, PartialEq, Decode, Encode, TypeInfo)] + enum Event { + A(u8), + B(bool), + } + + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); + + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: let event1 = Event::A(1); - let event2 = Event::B; - let event3 = Event::C { a: 3 }; + let event2 = Event::B(true); + let event3 = Event::A(234); + + let events = events::( + &metadata, + vec![ + event_record(Phase::Initialization, event1), + event_record(Phase::ApplyExtrinsic(123), event2), + event_record(Phase::Finalization, event3), + ], + ); - let encoded_event1 = event1.encode(); - let encoded_event2 = event2.encode(); - let encoded_event3 = event3.encode(); + let event_details: Vec = + events.iter_raw().collect::>().unwrap(); + let event_bytes = |ev: Event| { + let mut bytes = ev.encode(); + // Strip variant tag off event bytes: + bytes.drain(0..1); + bytes.into() + }; - let event_records = vec![ - event_record(pallet_index, event1), - event_record(pallet_index, event2), - event_record(pallet_index, event3), - ]; + assert_eq!( + event_details, + vec![ + RawEventDetails { + index: 0, + phase: Phase::Initialization, + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: event_bytes(event1) + }, + RawEventDetails { + index: 1, + phase: Phase::ApplyExtrinsic(123), + pallet: "Test".to_string(), + pallet_index: 0, + variant: "B".to_string(), + variant_index: 1, + data: event_bytes(event2) + }, + RawEventDetails { + index: 2, + phase: Phase::Finalization, + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: event_bytes(event3) + }, + ] + ); + } - let mut input = Vec::new(); - event_records.encode_to(&mut input); + #[test] + fn dynamically_decode_multiple_events_until_error() { + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] + enum Event { + A(u8), + B(bool), + } + + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); - let events = decoder.decode_events(&mut &input[..]).unwrap(); + // Encode 2 events: + let mut event_bytes = vec![]; + event_record(Phase::Initialization, Event::A(1)).encode_to(&mut event_bytes); + event_record(Phase::ApplyExtrinsic(123), Event::B(true)) + .encode_to(&mut event_bytes); - assert_eq!(events[0].1.variant_index, encoded_event1[0]); - assert_eq!(events[0].1.data.0, encoded_event1[1..]); + // Push a few naff bytes to the end (a broken third event): + event_bytes.extend_from_slice(&[3, 127, 45, 0, 2]); - assert_eq!(events[1].1.variant_index, encoded_event2[0]); - assert_eq!(events[1].1.data.0, encoded_event2[1..]); + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let events = events_raw::( + &metadata, + event_bytes, + 3, // 2 "good" events, and then it'll hit the naff bytes. + ); - assert_eq!(events[2].1.variant_index, encoded_event3[0]); - assert_eq!(events[2].1.data.0, encoded_event3[1..]); + let event_bytes = |ev: Event| { + let mut bytes = ev.encode(); + // Strip variant tag off event bytes: + bytes.drain(0..1); + bytes.into() + }; + + let mut events_iter = events.iter_raw(); + assert_eq!( + events_iter.next().unwrap().unwrap(), + RawEventDetails { + index: 0, + phase: Phase::Initialization, + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: event_bytes(Event::A(1)) + } + ); + assert_eq!( + events_iter.next().unwrap().unwrap(), + RawEventDetails { + index: 1, + phase: Phase::ApplyExtrinsic(123), + pallet: "Test".to_string(), + pallet_index: 0, + variant: "B".to_string(), + variant_index: 1, + data: event_bytes(Event::B(true)) + } + ); + + // We'll hit an error trying to decode the third event: + assert!(events_iter.next().unwrap().is_err()); + // ... and then "None" from then on. + assert!(events_iter.next().is_none()); + assert!(events_iter.next().is_none()); } #[test] fn compact_event_field() { - #[derive(Clone, Encode, TypeInfo)] + #[derive(Clone, Debug, PartialEq, Encode, Decode, TypeInfo)] enum Event { A(#[codec(compact)] u32), } - let pallet_index = 0; - let pallet = pallet_metadata::(pallet_index); - let decoder = init_decoder(vec![pallet]); + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); - let event = Event::A(u32::MAX); - let encoded_event = event.encode(); - let event_records = vec![event_record(pallet_index, event)]; - - let mut input = Vec::new(); - event_records.encode_to(&mut input); + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let events = events::( + &metadata, + vec![event_record(Phase::Finalization, Event::A(1))], + ); - let events = decoder.decode_events(&mut &input[..]).unwrap(); + // Statically decode: + let event_details: Vec>> = + events.iter().collect::>().unwrap(); + assert_eq!( + event_details, + vec![EventDetails { + index: 0, + phase: Phase::Finalization, + event: AllEvents::E(Event::A(1)) + }] + ); - assert_eq!(events[0].1.variant_index, encoded_event[0]); - assert_eq!(events[0].1.data.0, encoded_event[1..]); + // Dynamically decode: + let event_details: Vec = + events.iter_raw().collect::>().unwrap(); + let expected_event_data = { + let mut bytes = Event::A(1).encode(); + // Strip variant tag off event bytes: + bytes.drain(0..1); + bytes + }; + assert_eq!( + event_details, + vec![RawEventDetails { + index: 0, + phase: Phase::Finalization, + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: expected_event_data.into() + }] + ); } #[test] fn compact_wrapper_struct_field() { - #[derive(Clone, Encode, TypeInfo)] + #[derive(Clone, Decode, Debug, PartialEq, Encode, TypeInfo)] enum Event { A(#[codec(compact)] CompactWrapper), } - #[derive(Clone, codec::CompactAs, Encode, TypeInfo)] + #[derive(Clone, Decode, Debug, PartialEq, codec::CompactAs, Encode, TypeInfo)] struct CompactWrapper(u64); - let pallet_index = 0; - let pallet = pallet_metadata::(pallet_index); - let decoder = init_decoder(vec![pallet]); - - let event = Event::A(CompactWrapper(0)); - let encoded_event = event.encode(); - let event_records = vec![event_record(pallet_index, event)]; - - let mut input = Vec::new(); - event_records.encode_to(&mut input); + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); + + // Encode our events in the format we expect back from a node, and + // construct an Events object to iterate them: + let events = events::( + &metadata, + vec![event_record( + Phase::Finalization, + Event::A(CompactWrapper(1)), + )], + ); - let events = decoder.decode_events(&mut &input[..]).unwrap(); + // Statically decode: + let event_details: Vec>> = + events.iter().collect::>().unwrap(); + assert_eq!( + event_details, + vec![EventDetails { + index: 0, + phase: Phase::Finalization, + event: AllEvents::E(Event::A(CompactWrapper(1))) + }] + ); - assert_eq!(events[0].1.variant_index, encoded_event[0]); - assert_eq!(events[0].1.data.0, encoded_event[1..]); + // Dynamically decode: + let event_details: Vec = + events.iter_raw().collect::>().unwrap(); + let expected_event_data = { + let mut bytes = Event::A(CompactWrapper(1)).encode(); + // Strip variant tag off event bytes: + bytes.drain(0..1); + bytes + }; + assert_eq!( + event_details, + vec![RawEventDetails { + index: 0, + phase: Phase::Finalization, + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: expected_event_data.into() + }] + ); } #[test] fn event_containing_explicit_index() { - #[derive(Clone, Encode, TypeInfo)] + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] #[repr(u8)] #[allow(trivial_numeric_casts, clippy::unnecessary_cast)] // required because the Encode derive produces a warning otherwise pub enum MyType { B = 10u8, } - #[derive(Clone, Encode, TypeInfo)] + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] enum Event { A(MyType), } - let pallet_index = 0; - let pallet = pallet_metadata::(pallet_index); - let decoder = init_decoder(vec![pallet]); + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); - let event = Event::A(MyType::B); - let encoded_event = event.encode(); - let event_records = vec![event_record(pallet_index, event)]; - - let mut input = Vec::new(); - event_records.encode_to(&mut input); + // Encode our events in the format we expect back from a node, and + // construct an Events object to iterate them: + let events = events::( + &metadata, + vec![event_record(Phase::Finalization, Event::A(MyType::B))], + ); - // this would panic if the explicit enum item index were not correctly used - let events = decoder.decode_events(&mut &input[..]).unwrap(); + // Statically decode: + let event_details: Vec>> = + events.iter().collect::>().unwrap(); + assert_eq!( + event_details, + vec![EventDetails { + index: 0, + phase: Phase::Finalization, + event: AllEvents::E(Event::A(MyType::B)) + }] + ); - assert_eq!(events[0].1.variant_index, encoded_event[0]); - assert_eq!(events[0].1.data.0, encoded_event[1..]); + // Dynamically decode: + let event_details: Vec = + events.iter_raw().collect::>().unwrap(); + let expected_event_data = { + let mut bytes = Event::A(MyType::B).encode(); + // Strip variant tag off event bytes: + bytes.drain(0..1); + bytes + }; + assert_eq!( + event_details, + vec![RawEventDetails { + index: 0, + phase: Phase::Finalization, + pallet: "Test".to_string(), + pallet_index: 0, + variant: "A".to_string(), + variant_index: 0, + data: expected_event_data.into() + }] + ); } #[test] diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 50aac736925..cf8890fe815 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -59,12 +59,11 @@ use derivative::Derivative; mod client; mod config; mod error; -mod events; +pub mod events; pub mod extrinsic; mod metadata; pub mod rpc; pub mod storage; -mod subscription; mod transaction; pub use crate::{ @@ -86,8 +85,9 @@ pub use crate::{ TransactionError, }, events::{ - EventsDecoder, - RawEvent, + EventDetails, + Events, + RawEventDetails, }, extrinsic::{ DefaultExtra, @@ -114,11 +114,6 @@ pub use crate::{ StorageEntryKey, StorageMapKey, }, - subscription::{ - EventStorageSubscription, - EventSubscription, - FinalizedEventStorageSubscription, - }, transaction::{ TransactionEvents, TransactionInBlock, diff --git a/subxt/src/rpc.rs b/subxt/src/rpc.rs index 0cec6a634bc..8f439e0e2d7 100644 --- a/subxt/src/rpc.rs +++ b/subxt/src/rpc.rs @@ -29,11 +29,6 @@ use std::{ use crate::{ error::BasicError, storage::StorageKeyPrefix, - subscription::{ - EventStorageSubscription, - FinalizedEventStorageSubscription, - SystemEvents, - }, Config, Metadata, }; @@ -406,35 +401,6 @@ impl Rpc { Ok(version) } - /// Subscribe to System Events that are imported into blocks. - /// - /// *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, BasicError> { - let keys = Some(vec![StorageKey::from(SystemEvents::new())]); - let params = rpc_params![keys]; - - let subscription = self - .client - .subscribe("state_subscribeStorage", params, "state_unsubscribeStorage") - .await?; - Ok(EventStorageSubscription::Imported(subscription)) - } - - /// Subscribe to finalized events. - pub async fn subscribe_finalized_events( - &self, - ) -> Result, BasicError> { - Ok(EventStorageSubscription::Finalized( - FinalizedEventStorageSubscription::new( - self.clone(), - self.subscribe_finalized_blocks().await?, - ), - )) - } - /// Subscribe to blocks. pub async fn subscribe_blocks(&self) -> Result, BasicError> { let subscription = self diff --git a/subxt/src/subscription.rs b/subxt/src/subscription.rs deleted file mode 100644 index 0adc6f929ad..00000000000 --- a/subxt/src/subscription.rs +++ /dev/null @@ -1,481 +0,0 @@ -// 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 crate::{ - error::BasicError, - events::{ - EventsDecoder, - RawEvent, - }, - rpc::Rpc, - Config, - Event, - Phase, -}; -use jsonrpsee::core::{ - client::Subscription, - DeserializeOwned, -}; -use sp_core::{ - storage::{ - StorageChangeSet, - StorageKey, - }, - twox_128, -}; -use sp_runtime::traits::Header; -use std::collections::VecDeque; - -/// Raw bytes for an Event, including the block hash where it occurred and its -/// corresponding event index. -#[derive(Debug)] -#[cfg_attr(test, derive(PartialEq, Clone))] -pub struct EventContext { - pub block_hash: Hash, - pub event_idx: usize, - pub event: RawEvent, -} - -/// Event subscription simplifies filtering a storage change set stream for -/// events of interest. -pub struct EventSubscription<'a, T: Config> { - block_reader: BlockReader<'a, T>, - block: Option, - extrinsic: Option, - event: Option<(&'static str, &'static str)>, - events: VecDeque>, - finished: bool, -} - -enum BlockReader<'a, T: Config> { - Decoder { - subscription: EventStorageSubscription, - decoder: &'a EventsDecoder, - }, - /// Mock event listener for unit tests - #[cfg(test)] - Mock( - Box< - dyn Iterator< - Item = (T::Hash, Result, BasicError>), - >, - >, - ), -} - -impl<'a, T: Config> BlockReader<'a, T> { - async fn next( - &mut self, - ) -> Option<(T::Hash, Result, BasicError>)> { - match self { - BlockReader::Decoder { - subscription, - decoder, - } => { - let change_set = subscription.next().await?; - let events: Result, _> = change_set - .changes - .into_iter() - .filter_map(|(_key, change)| { - Some(decoder.decode_events(&mut change?.0.as_slice())) - }) - .collect(); - - let flattened_events = events.map(|x| { - x.into_iter() - .flatten() - .enumerate() - .map(|(event_idx, (phase, raw))| (phase, event_idx, raw)) - .collect() - }); - Some((change_set.block, flattened_events)) - } - #[cfg(test)] - BlockReader::Mock(it) => it.next(), - } - } -} - -impl<'a, T: Config> EventSubscription<'a, T> { - /// Creates a new event subscription. - pub fn new( - subscription: EventStorageSubscription, - decoder: &'a EventsDecoder, - ) -> Self { - Self { - block_reader: BlockReader::Decoder { - subscription, - decoder, - }, - block: None, - extrinsic: None, - event: None, - events: Default::default(), - finished: false, - } - } - - /// Only returns events contained in the block with the given hash. - pub fn filter_block(&mut self, block: T::Hash) { - self.block = Some(block); - } - - /// Only returns events from block emitted by extrinsic with index. - pub fn filter_extrinsic(&mut self, block: T::Hash, ext_index: usize) { - self.block = Some(block); - self.extrinsic = Some(ext_index); - } - - /// Filters events by type. - pub fn filter_event(&mut self) { - self.event = Some((Ev::PALLET, Ev::EVENT)); - } - - /// Gets the next event. - pub async fn next(&mut self) -> Option> { - self.next_context() - .await - .map(|res| res.map(|ctx| ctx.event)) - } - /// Gets the next event with the associated block hash and its corresponding - /// event index. - pub async fn next_context( - &mut self, - ) -> Option, BasicError>> { - loop { - if let Some(raw_event) = self.events.pop_front() { - return Some(Ok(raw_event)) - } - if self.finished { - return None - } - // always return None if subscription has closed - let (received_hash, events) = self.block_reader.next().await?; - if let Some(hash) = self.block.as_ref() { - if &received_hash == hash { - self.finished = true; - } else { - continue - } - } - - match events { - Err(err) => return Some(Err(err)), - Ok(raw_events) => { - for (phase, event_idx, raw) in raw_events { - if let Some(ext_index) = self.extrinsic { - if !matches!(phase, Phase::ApplyExtrinsic(i) if i as usize == ext_index) - { - continue - } - } - if let Some((module, variant)) = self.event { - if raw.pallet != module || raw.variant != variant { - continue - } - } - self.events.push_back(EventContext { - block_hash: received_hash, - event_idx, - event: raw, - }); - } - } - } - } - } -} - -pub(crate) struct SystemEvents(StorageKey); - -impl SystemEvents { - pub(crate) fn new() -> Self { - let mut storage_key = twox_128(b"System").to_vec(); - storage_key.extend(twox_128(b"Events").to_vec()); - log::debug!("Events storage key {:?}", hex::encode(&storage_key)); - Self(StorageKey(storage_key)) - } -} - -impl From for StorageKey { - fn from(key: SystemEvents) -> Self { - key.0 - } -} - -/// Event subscription to only fetch finalized storage changes. -pub struct FinalizedEventStorageSubscription { - rpc: Rpc, - subscription: Subscription, - storage_changes: VecDeque>, - storage_key: StorageKey, -} - -impl FinalizedEventStorageSubscription { - /// Creates a new finalized event storage subscription. - pub fn new(rpc: Rpc, subscription: Subscription) -> Self { - Self { - rpc, - subscription, - storage_changes: Default::default(), - storage_key: SystemEvents::new().into(), - } - } - - /// Gets the next change_set. - pub async fn next(&mut self) -> Option> { - loop { - if let Some(storage_change) = self.storage_changes.pop_front() { - return Some(storage_change) - } - let header: T::Header = - read_subscription_response("HeaderSubscription", &mut self.subscription) - .await?; - self.storage_changes.extend( - self.rpc - .query_storage_at(&[self.storage_key.clone()], Some(header.hash())) - .await - .ok()?, - ); - } - } -} - -/// Wrapper over imported and finalized event subscriptions. -pub enum EventStorageSubscription { - /// Events that are InBlock - Imported(Subscription>), - /// Events that are Finalized - Finalized(FinalizedEventStorageSubscription), -} - -impl EventStorageSubscription { - /// Gets the next change_set from the subscription. - pub async fn next(&mut self) -> Option> { - match self { - Self::Imported(event_sub) => { - read_subscription_response("StorageChangeSetSubscription", event_sub) - .await - } - Self::Finalized(event_sub) => event_sub.next().await, - } - } -} - -async fn read_subscription_response( - sub_name: &str, - sub: &mut Subscription, -) -> Option -where - T: DeserializeOwned, -{ - match sub.next().await { - Some(Ok(next)) => Some(next), - Some(Err(e)) => { - log::error!("Subscription {} failed: {:?} dropping", sub_name, e); - None - } - None => None, - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::DefaultConfig; - use sp_core::H256; - - fn named_event(event_name: &str) -> RawEvent { - RawEvent { - data: sp_core::Bytes::from(Vec::new()), - pallet: event_name.to_string(), - variant: event_name.to_string(), - pallet_index: 0, - variant_index: 0, - } - } - - #[async_std::test] - /// test that filters work correctly, and are independent of each other - async fn test_filters() { - let mut events: Vec<(H256, Phase, usize, RawEvent)> = vec![]; - // create all events - for block_hash in [H256::from([0; 32]), H256::from([1; 32])] { - for phase in [ - Phase::Initialization, - Phase::ApplyExtrinsic(0), - Phase::ApplyExtrinsic(1), - Phase::Finalization, - ] { - [named_event("a"), named_event("b")] - .iter() - .enumerate() - .for_each(|(idx, event)| { - events.push(( - block_hash, - phase.clone(), - // The event index - idx, - event.clone(), - )) - }); - } - } - - // set variant index so we can uniquely identify the event - events.iter_mut().enumerate().for_each(|(idx, event)| { - event.3.variant_index = idx as u8; - }); - - let half_len = events.len() / 2; - - 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 = - EventSubscription { - block_reader: BlockReader::Mock(Box::new( - vec![ - ( - events[0].0, - Ok(events - .iter() - .take(half_len) - .map(|(_, phase, idx, event)| { - (phase.clone(), *idx, event.clone()) - }) - .collect()), - ), - ( - events[half_len].0, - Ok(events - .iter() - .skip(half_len) - .map(|(_, phase, idx, event)| { - (phase.clone(), *idx, event.clone()) - }) - .collect()), - ), - ] - .into_iter(), - )), - block: block_filter, - extrinsic: extrinsic_filter, - event: event_filter, - events: Default::default(), - finished: false, - }; - - let mut expected_events: Vec<(H256, Phase, usize, RawEvent)> = - events.clone(); - - if let Some(hash) = block_filter { - expected_events.retain(|(h, _, _, _)| h == &hash); - } - if let Some(idx) = extrinsic_filter { - expected_events.retain(|(_, phase, _, _)| matches!(phase, Phase::ApplyExtrinsic(i) if *i as usize == idx)); - } - if let Some(name) = event_filter { - expected_events.retain(|(_, _, _, event)| event.pallet == name.0); - } - - for expected_event in expected_events { - assert_eq!( - subscription.next().await.unwrap().unwrap(), - expected_event.3 - ); - } - assert!(subscription.next().await.is_none()); - } - } - } - } - - #[async_std::test] - async fn test_context() { - let mut events = vec![]; - // create all events - for block_hash in [H256::from([0; 32]), H256::from([1; 32])] { - for phase in [ - Phase::Initialization, - Phase::ApplyExtrinsic(0), - Phase::ApplyExtrinsic(1), - Phase::Finalization, - ] { - [named_event("a"), named_event("b")] - .iter() - .enumerate() - .for_each(|(idx, event)| { - events.push(( - phase.clone(), - EventContext { - block_hash, - event_idx: idx, - event: event.clone(), - }, - )); - }); - } - } - - // set variant index so we can uniquely identify the event - events.iter_mut().enumerate().for_each(|(idx, (_, ctx))| { - ctx.event.variant_index = idx as u8; - }); - - let half_len = events.len() / 2; - - let mut subscription: EventSubscription = EventSubscription { - block_reader: BlockReader::Mock(Box::new( - vec![ - ( - events[0].1.block_hash, - Ok(events - .iter() - .take(half_len) - .map(|(phase, ctx)| { - (phase.clone(), ctx.event_idx, ctx.event.clone()) - }) - .collect()), - ), - ( - events[half_len].1.block_hash, - Ok(events - .iter() - .skip(half_len) - .map(|(phase, ctx)| { - (phase.clone(), ctx.event_idx, ctx.event.clone()) - }) - .collect()), - ), - ] - .into_iter(), - )), - block: None, - extrinsic: None, - event: None, - events: Default::default(), - finished: false, - }; - - let expected_events = events.clone(); - - for exp in expected_events { - assert_eq!(subscription.next_context().await.unwrap().unwrap(), exp.1); - } - assert!(subscription.next().await.is_none()); - } -} diff --git a/subxt/src/transaction.rs b/subxt/src/transaction.rs index ff0d3132cb9..71d169c8f13 100644 --- a/subxt/src/transaction.rs +++ b/subxt/src/transaction.rs @@ -18,7 +18,6 @@ use std::task::Poll; use crate::PhantomDataSendSync; use codec::Decode; -use sp_core::storage::StorageKey; use sp_runtime::traits::Hash; pub use sp_runtime::traits::SignedExtension; pub use sp_version::RuntimeVersion; @@ -31,8 +30,13 @@ use crate::{ RuntimeError, TransactionError, }, + events::{ + self, + EventDetails, + Events, + RawEventDetails, + }, rpc::SubstrateTransactionStatus, - subscription::SystemEvents, Config, Phase, }; @@ -50,19 +54,22 @@ use jsonrpsee::core::{ /// returned from [`crate::SubmittableExtrinsic::sign_and_submit_then_watch()`]. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionProgress<'client, T: Config, E: Decode> { +pub struct TransactionProgress<'client, T: Config, E: Decode, Evs: Decode> { sub: Option>>, ext_hash: T::Hash, client: &'client Client, - _error: PhantomDataSendSync, + _error: PhantomDataSendSync<(E, Evs)>, } // The above type is not `Unpin` by default unless the generic param `T` is, // so we manually make it clear that Unpin is actually fine regardless of `T` // (we don't care if this moves around in memory while it's "pinned"). -impl<'client, T: Config, E: Decode> Unpin for TransactionProgress<'client, T, E> {} +impl<'client, T: Config, E: Decode, Evs: Decode> Unpin + for TransactionProgress<'client, T, E, Evs> +{ +} -impl<'client, T: Config, E: Decode> TransactionProgress<'client, T, E> { +impl<'client, T: Config, E: Decode, Evs: Decode> TransactionProgress<'client, T, E, Evs> { /// Instantiate a new [`TransactionProgress`] from a custom subscription. pub fn new( sub: RpcSubscription>, @@ -82,7 +89,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, BasicError>> { + ) -> Option, BasicError>> { self.next().await } @@ -99,7 +106,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, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized or otherwise in a block! Return. @@ -129,7 +136,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, BasicError> { + ) -> Result, BasicError> { while let Some(status) = self.next_item().await { match status? { // Finalized! Return. @@ -158,14 +165,16 @@ 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, BasicError>; +impl<'client, T: Config, E: Decode, Evs: Decode> Stream + for TransactionProgress<'client, T, E, Evs> +{ + type Item = Result, BasicError>; fn poll_next( mut self: std::pin::Pin<&mut Self>, @@ -274,7 +283,7 @@ impl<'client, T: Config, E: Decode> Stream for TransactionProgress<'client, T, E /// or that finality gadget is lagging behind. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub enum TransactionStatus<'client, T: Config, E: Decode> { +pub enum TransactionStatus<'client, T: Config, E: Decode, Evs: Decode> { /// The transaction is part of the "future" queue. Future, /// The transaction is part of the "ready" queue. @@ -282,7 +291,7 @@ pub enum TransactionStatus<'client, T: Config, E: Decode> { /// The transaction has been broadcast to the given peers. Broadcast(Vec), /// The transaction has been included in a block with given hash. - InBlock(TransactionInBlock<'client, T, E>), + InBlock(TransactionInBlock<'client, T, E, Evs>), /// The block this transaction was included in has been retracted, /// probably because it did not make it onto the blocks which were /// finalized. @@ -291,7 +300,7 @@ pub enum TransactionStatus<'client, T: Config, E: Decode> { /// blocks, and so the subscription has ended. FinalityTimeout(T::Hash), /// The transaction has been finalized by a finality-gadget, e.g GRANDPA. - Finalized(TransactionInBlock<'client, T, E>), + Finalized(TransactionInBlock<'client, T, E, Evs>), /// The transaction has been replaced in the pool by another transaction /// that provides the same tags. (e.g. same (sender, nonce)). Usurped(T::Hash), @@ -301,10 +310,10 @@ pub enum TransactionStatus<'client, T: Config, E: Decode> { Invalid, } -impl<'client, T: Config, E: Decode> TransactionStatus<'client, T, E> { +impl<'client, T: Config, E: Decode, Evs: Decode> TransactionStatus<'client, T, E, Evs> { /// A convenience method to return the `Finalized` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::Finalized`]. - pub fn as_finalized(&self) -> Option<&TransactionInBlock<'client, T, E>> { + pub fn as_finalized(&self) -> Option<&TransactionInBlock<'client, T, E, Evs>> { match self { Self::Finalized(val) => Some(val), _ => None, @@ -313,7 +322,7 @@ impl<'client, T: Config, E: Decode> TransactionStatus<'client, T, E> { /// A convenience method to return the `InBlock` details. Returns /// [`None`] if the enum variant is not [`TransactionStatus::InBlock`]. - pub fn as_in_block(&self) -> Option<&TransactionInBlock<'client, T, E>> { + pub fn as_in_block(&self) -> Option<&TransactionInBlock<'client, T, E, Evs>> { match self { Self::InBlock(val) => Some(val), _ => None, @@ -324,14 +333,14 @@ impl<'client, T: Config, E: Decode> TransactionStatus<'client, T, E> { /// This struct represents a transaction that has made it into a block. #[derive(Derivative)] #[derivative(Debug(bound = ""))] -pub struct TransactionInBlock<'client, T: Config, E: Decode> { +pub struct TransactionInBlock<'client, T: Config, E: Decode, Evs: Decode> { block_hash: T::Hash, ext_hash: T::Hash, client: &'client Client, - _error: PhantomDataSendSync, + _error: PhantomDataSendSync<(E, Evs)>, } -impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { +impl<'client, T: Config, E: Decode, Evs: Decode> TransactionInBlock<'client, T, E, Evs> { pub(crate) fn new( block_hash: T::Hash, ext_hash: T::Hash, @@ -368,11 +377,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() { + for ev in events.iter_raw() { + let ev = ev?; if &ev.pallet == "System" && &ev.variant == "ExtrinsicFailed" { let dispatch_error = E::decode(&mut &*ev.data)?; return Err(Error::Runtime(RuntimeError(dispatch_error))) @@ -388,7 +400,9 @@ 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, BasicError> { + pub async fn fetch_events( + &self, + ) -> Result, BasicError> { let block = self .client .rpc() @@ -406,31 +420,11 @@ impl<'client, T: Config, E: Decode> TransactionInBlock<'client, T, E> { // extrinsic, the extrinsic should be in there somewhere.. .ok_or(BasicError::Transaction(TransactionError::BlockHashNotFound))?; - let raw_events = self - .client - .rpc() - .storage( - &StorageKey::from(SystemEvents::new()), - Some(self.block_hash), - ) - .await? - .map(|s| s.0) - .unwrap_or_else(Vec::new); - - let events = self - .client - .events_decoder() - .decode_events(&mut &*raw_events)? - .into_iter() - .filter(move |(phase, _raw)| { - phase == &Phase::ApplyExtrinsic(extrinsic_idx as u32) - }) - .map(|(_phase, event)| event) - .collect(); + let events = events::at::(self.client, self.block_hash).await?; Ok(TransactionEvents { - block_hash: self.block_hash, ext_hash: self.ext_hash, + ext_idx: extrinsic_idx as u32, events, }) } @@ -440,16 +434,16 @@ 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 { - block_hash: T::Hash, +pub struct TransactionEvents<'client, T: Config, Evs: Decode> { ext_hash: T::Hash, - events: Vec, + ext_idx: u32, + events: Events<'client, T, Evs>, } -impl TransactionEvents { +impl<'client, T: Config, Evs: Decode> TransactionEvents<'client, T, Evs> { /// Return the hash of the block that the transaction has made it into. pub fn block_hash(&self) -> T::Hash { - self.block_hash + self.events.block_hash() } /// Return the hash of the extrinsic. @@ -457,43 +451,66 @@ impl TransactionEvents { self.ext_hash } - /// Return a slice of the returned events. - pub fn as_slice(&self) -> &[crate::RawEvent] { + /// Return all of the events in the block that the transaction made it into. + pub fn all_events_in_block(&self) -> &events::Events<'client, T, Evs> { &self.events } - /// 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, BasicError> { - self.events - .iter() - .filter_map(|e| e.as_event::().map_err(Into::into).transpose()) - .collect() + /// Iterate over the statically decoded events associated with this transaction. + /// + /// This works in the same way that [`events::Events::iter()`] does, with the + /// exception that it filters out events not related to the submitted extrinsic. + pub fn iter( + &self, + ) -> impl Iterator, BasicError>> + '_ { + self.events.iter().filter(|ev| { + ev.as_ref() + .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) + .unwrap_or(true) // Keep any errors + }) } - /// Find the first event that matches the event type provided as a generic parameter. This - /// will return an error if a matching event is found but cannot be properly decoded. + /// Iterate over all of the raw events associated with this transaction. /// - /// 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, BasicError> { - self.events - .iter() - .filter_map(|e| e.as_event::().transpose()) - .next() - .transpose() - .map_err(Into::into) + /// This works in the same way that [`events::Events::iter_raw()`] does, with the + /// exception that it filters out events not related to the submitted extrinsic. + pub fn iter_raw( + &self, + ) -> impl Iterator> + '_ { + self.events.iter_raw().filter(|ev| { + ev.as_ref() + .map(|ev| ev.phase == Phase::ApplyExtrinsic(self.ext_idx)) + .unwrap_or(true) // Keep any errors. + }) } - /// Find an event. Returns true if it was found. - pub fn has_event(&self) -> Result { - Ok(self.find_first_event::()?.is_some()) + /// Find all of the transaction events matching the event type provided as a generic parameter. + /// + /// This works in the same way that [`events::Events::find()`] does, with the + /// exception that it filters out events not related to the submitted extrinsic. + pub fn find( + &self, + ) -> impl Iterator> + '_ { + self.iter_raw().filter_map(|ev| { + ev.and_then(|ev| ev.as_event::().map_err(Into::into)) + .transpose() + }) } -} -impl std::ops::Deref for TransactionEvents { - type Target = [crate::RawEvent]; - fn deref(&self) -> &Self::Target { - &self.events + /// Iterate through the transaction events using metadata to dynamically decode and skip + /// them, and return the first event found which decodes to the provided `Ev` type. + /// + /// This works in the same way that [`events::Events::find_first_event()`] does, with the + /// exception that it ignores events not related to the submitted extrinsic. + pub fn find_first_event(&self) -> Result, BasicError> { + self.find::().next().transpose() + } + + /// Find an event in those associated with this transaction. Returns true if it was found. + /// + /// This works in the same way that [`events::Events::has()`] does, with the + /// exception that it ignores events not related to the submitted extrinsic. + pub fn has(&self) -> Result { + Ok(self.find::().next().transpose()?.is_some()) } } diff --git a/subxt/tests/integration/codegen/polkadot.rs b/subxt/tests/integration/codegen/polkadot.rs index b1057261d98..7cec4ff4a07 100644 --- a/subxt/tests/integration/codegen/polkadot.rs +++ b/subxt/tests/integration/codegen/polkadot.rs @@ -1,3 +1,4 @@ +// Note [jsdw]: generated from polkadot 0.9.13-82616422d0-aarch64-macos. #[allow(dead_code, unused_imports, non_camel_case_types)] pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -6,6 +7,8 @@ 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)] @@ -68,6 +71,8 @@ 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; @@ -75,88 +80,83 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct FillBlock { + pub struct fill_block { pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, } - impl ::subxt::Call for FillBlock { + impl ::subxt::Call for fill_block { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "fill_block"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Remark { + pub struct remark { pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for Remark { + impl ::subxt::Call for remark { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "remark"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHeapPages { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_heap_pages { pub pages: ::core::primitive::u64, } - impl ::subxt::Call for SetHeapPages { + impl ::subxt::Call for set_heap_pages { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_heap_pages"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetCode { + pub struct set_code { pub code: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetCode { + impl ::subxt::Call for set_code { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_code"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetCodeWithoutChecks { + pub struct set_code_without_checks { pub code: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetCodeWithoutChecks { + impl ::subxt::Call for set_code_without_checks { const PALLET: &'static str = "System"; 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 struct set_storage { pub items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, } - impl ::subxt::Call for SetStorage { + impl ::subxt::Call for set_storage { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_storage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct KillStorage { + pub struct kill_storage { pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, } - impl ::subxt::Call for KillStorage { + impl ::subxt::Call for kill_storage { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "kill_storage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct KillPrefix { + pub struct kill_prefix { pub prefix: ::std::vec::Vec<::core::primitive::u8>, pub subkeys: ::core::primitive::u32, } - impl ::subxt::Call for KillPrefix { + impl ::subxt::Call for kill_prefix { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "kill_prefix"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemarkWithEvent { + pub struct remark_with_event { pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for RemarkWithEvent { + impl ::subxt::Call for remark_with_event { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "remark_with_event"; } @@ -179,65 +179,76 @@ pub mod api { pub fn fill_block( &self, ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, FillBlock, DispatchError> - { - let call = FillBlock { ratio }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + fill_block, + DispatchError, + super::super::Event, + > { + let call = fill_block { ratio }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Remark, DispatchError> - { - let call = Remark { remark }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remark, + DispatchError, + super::super::Event, + > { + let call = remark { remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetHeapPages, DispatchError> - { - let call = SetHeapPages { pages }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_heap_pages, + DispatchError, + super::super::Event, + > { + let call = set_heap_pages { pages }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::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, X, A, - SetCodeWithoutChecks, + set_code, DispatchError, + super::super::Event, > { - let call = SetCodeWithoutChecks { code }; + let call = set_code { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_changes_trie_config( + pub fn set_code_without_checks( &self, - changes_trie_config: ::core::option::Option< - runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, - >, + code: ::std::vec::Vec<::core::primitive::u8>, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - SetChangesTrieConfig, + set_code_without_checks, DispatchError, + super::super::Event, > { - let call = SetChangesTrieConfig { - changes_trie_config, - }; + let call = set_code_without_checks { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_storage( @@ -246,26 +257,47 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetStorage, DispatchError> - { - let call = SetStorage { items }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_storage, + DispatchError, + super::super::Event, + > { + let call = set_storage { items }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, KillStorage, DispatchError> - { - let call = KillStorage { keys }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + kill_storage, + DispatchError, + super::super::Event, + > { + let call = kill_storage { keys }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn kill_prefix( &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, KillPrefix, DispatchError> - { - let call = KillPrefix { prefix, subkeys }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + kill_prefix, + DispatchError, + super::super::Event, + > { + let call = kill_prefix { prefix, subkeys }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remark_with_event( @@ -276,10 +308,11 @@ pub mod api { T, X, A, - RemarkWithEvent, + remark_with_event, DispatchError, + super::super::Event, > { - let call = RemarkWithEvent { remark }; + let call = remark_with_event { remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -288,45 +321,49 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExtrinsicSuccess( - pub runtime_types::frame_support::weights::DispatchInfo, - ); + 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, Debug)] - pub struct ExtrinsicFailed( - pub runtime_types::sp_runtime::DispatchError, - pub runtime_types::frame_support::weights::DispatchInfo, - ); + 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, Debug)] - pub struct CodeUpdated {} + 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, Debug)] - pub struct NewAccount(pub ::subxt::sp_core::crypto::AccountId32); + 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, Debug)] - pub struct KilledAccount(pub ::subxt::sp_core::crypto::AccountId32); + 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, Debug)] - pub struct Remarked( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - ); + 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"; @@ -424,9 +461,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 } @@ -625,9 +660,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::sp_runtime::generic::digest::Digest< - ::subxt::sp_core::H256, - >, + runtime_types::sp_runtime::generic::digest::Digest, ::subxt::BasicError, > { let entry = Digest; @@ -716,6 +749,105 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn block_weights( + &self, + ) -> ::core::result::Result< + runtime_types::frame_system::limits::BlockWeights, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 242u8, 5u8, 42u8, 1u8, 0u8, 0u8, 0u8, 0u8, 32u8, 74u8, + 169u8, 209u8, 1u8, 0u8, 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, + 0u8, 0u8, 0u8, 1u8, 192u8, 118u8, 108u8, 143u8, 88u8, 1u8, + 0u8, 0u8, 1u8, 0u8, 152u8, 247u8, 62u8, 93u8, 1u8, 0u8, 0u8, + 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 64u8, 89u8, + 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, 1u8, 192u8, 254u8, 190u8, + 249u8, 204u8, 1u8, 0u8, 0u8, 1u8, 0u8, 32u8, 74u8, 169u8, + 209u8, 1u8, 0u8, 0u8, 1u8, 0u8, 136u8, 82u8, 106u8, 116u8, + 0u8, 0u8, 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn block_length( + &self, + ) -> ::core::result::Result< + runtime_types::frame_system::limits::BlockLength, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 0u8, 60u8, 0u8, 0u8, 0u8, 80u8, 0u8, 0u8, 0u8, 80u8, 0u8, + ][..], + )?) + } + pub fn block_hash_count( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[96u8, 9u8, 0u8, 0u8][..], + )?) + } + pub fn db_weight( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::weights::RuntimeDbWeight, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 64u8, 120u8, 125u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 225u8, + 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn version( + &self, + ) -> ::core::result::Result< + runtime_types::sp_version::RuntimeVersion, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 32u8, 112u8, 111u8, 108u8, 107u8, 97u8, 100u8, 111u8, 116u8, + 60u8, 112u8, 97u8, 114u8, 105u8, 116u8, 121u8, 45u8, 112u8, + 111u8, 108u8, 107u8, 97u8, 100u8, 111u8, 116u8, 0u8, 0u8, + 0u8, 0u8, 180u8, 35u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 56u8, + 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 4u8, + 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, + 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, + 1u8, 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 210u8, 188u8, + 152u8, 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, 0u8, + 247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, + 0u8, 0u8, 175u8, 44u8, 2u8, 151u8, 162u8, 62u8, 109u8, 61u8, + 2u8, 0u8, 0u8, 0u8, 73u8, 234u8, 175u8, 27u8, 84u8, 138u8, + 12u8, 176u8, 1u8, 0u8, 0u8, 0u8, 145u8, 213u8, 223u8, 24u8, + 176u8, 210u8, 207u8, 88u8, 1u8, 0u8, 0u8, 0u8, 237u8, 153u8, + 197u8, 172u8, 178u8, 94u8, 237u8, 245u8, 3u8, 0u8, 0u8, 0u8, + 203u8, 202u8, 37u8, 227u8, 159u8, 20u8, 35u8, 135u8, 2u8, + 0u8, 0u8, 0u8, 104u8, 122u8, 212u8, 74u8, 211u8, 127u8, 3u8, + 194u8, 1u8, 0u8, 0u8, 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, + 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, 0u8, 188u8, 157u8, 137u8, + 144u8, 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 55u8, + 200u8, 187u8, 19u8, 80u8, 169u8, 162u8, 168u8, 1u8, 0u8, 0u8, + 0u8, 9u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn ss58_prefix( + &self, + ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode(&mut &[0u8, 0u8][..])?) + } + } + } } pub mod scheduler { use super::runtime_types; @@ -723,30 +855,35 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Schedule { + pub struct schedule { pub when: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( ::core::primitive::u32, ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, } - impl ::subxt::Call for Schedule { + impl ::subxt::Call for schedule { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Cancel { + pub struct cancel { pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for Cancel { + impl ::subxt::Call for cancel { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "cancel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ScheduleNamed { + pub struct schedule_named { pub id: ::std::vec::Vec<::core::primitive::u8>, pub when: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( @@ -754,36 +891,46 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, } - impl ::subxt::Call for ScheduleNamed { + impl ::subxt::Call for schedule_named { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_named"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelNamed { + pub struct cancel_named { pub id: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for CancelNamed { + impl ::subxt::Call for cancel_named { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "cancel_named"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ScheduleAfter { + pub struct schedule_after { pub after: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( ::core::primitive::u32, ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, } - impl ::subxt::Call for ScheduleAfter { + impl ::subxt::Call for schedule_after { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_after"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ScheduleNamedAfter { + pub struct schedule_named_after { pub id: ::std::vec::Vec<::core::primitive::u8>, pub after: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<( @@ -791,9 +938,14 @@ pub mod api { ::core::primitive::u32, )>, pub priority: ::core::primitive::u8, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box< + runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, + >, } - impl ::subxt::Call for ScheduleNamedAfter { + impl ::subxt::Call for schedule_named_after { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_named_after"; } @@ -821,14 +973,24 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Schedule, DispatchError> - { - let call = 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, + super::super::Event, + > { + let call = schedule { when, maybe_periodic, priority, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -836,9 +998,16 @@ pub mod api { &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Cancel, DispatchError> - { - let call = Cancel { when, index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + cancel, + DispatchError, + super::super::Event, + > { + let call = cancel { when, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn schedule_named( @@ -850,30 +1019,41 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - ScheduleNamed, + schedule_named, DispatchError, + super::super::Event, > { - let call = ScheduleNamed { + let call = schedule_named { id, when, maybe_periodic, priority, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_named( &self, id: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CancelNamed, DispatchError> - { - let call = CancelNamed { id }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + cancel_named, + DispatchError, + super::super::Event, + > { + let call = cancel_named { id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn schedule_after( @@ -884,20 +1064,24 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - ScheduleAfter, + schedule_after, DispatchError, + super::super::Event, > { - let call = ScheduleAfter { + let call = schedule_after { after, maybe_periodic, priority, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -910,21 +1094,25 @@ pub mod api { ::core::primitive::u32, )>, priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::Call, + call: runtime_types::frame_support::traits::schedule::MaybeHashed< + runtime_types::polkadot_runtime::Call, + ::subxt::sp_core::H256, + >, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - ScheduleNamedAfter, + schedule_named_after, DispatchError, + super::super::Event, > { - let call = ScheduleNamedAfter { + let call = schedule_named_after { id, after, maybe_periodic, priority, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -934,27 +1122,44 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Scheduled(pub ::core::primitive::u32, pub ::core::primitive::u32); + 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, Debug)] - pub struct Canceled(pub ::core::primitive::u32, pub ::core::primitive::u32); + 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, Debug)] - 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>, - ); + 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; @@ -964,8 +1169,11 @@ pub mod api { 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, @@ -1006,24 +1214,7 @@ pub mod api { impl<'a, T: ::subxt::Config> StorageApi<'a, T> { 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::BasicError, - > { + } 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 :: BasicError >{ let entry = Agenda(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -1071,52 +1262,65 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn maximum_weight( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 128u8, 110u8, 135u8, 116u8, 1u8, 0u8, 0u8][..], + )?) + } + pub fn max_scheduled_per_block( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[50u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } - pub mod babe { + pub mod preimage { 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, + pub struct note_preimage { + 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 note_preimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "note_preimage"; } #[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, + pub struct unnote_preimage { + 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 unnote_preimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "unnote_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PlanConfigChange { - pub config: - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + pub struct request_preimage { + 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 request_preimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "request_preimage"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct unrequest_preimage { + pub hash: ::subxt::sp_core::H256, + } + impl ::subxt::Call for unrequest_preimage { + const PALLET: &'static str = "Preimage"; + const FUNCTION: &'static str = "unrequest_preimage"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, @@ -1134,57 +1338,305 @@ pub mod api { 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, + bytes: ::std::vec::Vec<::core::primitive::u8>, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - ReportEquivocation, + note_preimage, DispatchError, + super::super::Event, > { - let call = ReportEquivocation { - equivocation_proof, - key_owner_proof, - }; + let call = note_preimage { 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, + hash: ::subxt::sp_core::H256, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - ReportEquivocationUnsigned, + unnote_preimage, DispatchError, + super::super::Event, > { - let call = ReportEquivocationUnsigned { - equivocation_proof, - key_owner_proof, - }; + let call = unnote_preimage { 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, + hash: ::subxt::sp_core::H256, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - PlanConfigChange, + request_preimage, DispatchError, + super::super::Event, > { - let call = PlanConfigChange { config }; + let call = request_preimage { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - } + pub fn unrequest_preimage( + &self, + hash: ::subxt::sp_core::H256, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + unrequest_preimage, + DispatchError, + super::super::Event, + > { + let call = unrequest_preimage { 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 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::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Identity, + )]) + } + } + 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::BasicError, + > { + 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>, + ::subxt::BasicError, + > { + 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::BasicError, + > { + 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>, + ::subxt::BasicError, + > { + 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 report_equivocation { + pub 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, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + impl ::subxt::Call for report_equivocation { + const PALLET: &'static str = "Babe"; + const FUNCTION: &'static str = "report_equivocation"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct report_equivocation_unsigned { + pub 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, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + impl ::subxt::Call for report_equivocation_unsigned { + const PALLET: &'static str = "Babe"; + const FUNCTION: &'static str = "report_equivocation_unsigned"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct plan_config_change { + pub config: + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + } + impl ::subxt::Call for plan_config_change { + 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, + report_equivocation, + DispatchError, + super::super::Event, + > { + let call = report_equivocation { + equivocation_proof: ::std::boxed::Box::new(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, + report_equivocation_unsigned, + DispatchError, + super::super::Event, + > { + let call = report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box::new(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, + plan_config_change, + DispatchError, + super::super::Event, + > { + let call = plan_config_change { config }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } } pub mod storage { use super::runtime_types; @@ -1508,6 +1960,36 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn epoch_duration( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[96u8, 9u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn expected_block_time( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[112u8, 23u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_authorities( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[160u8, 134u8, 1u8, 0u8][..], + )?) + } + } + } } pub mod timestamp { use super::runtime_types; @@ -1515,11 +1997,11 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Set { + pub struct set { #[codec(compact)] pub now: ::core::primitive::u64, } - impl ::subxt::Call for Set { + impl ::subxt::Call for set { const PALLET: &'static str = "Timestamp"; const FUNCTION: &'static str = "set"; } @@ -1542,9 +2024,16 @@ pub mod api { pub fn set( &self, now: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Set, DispatchError> - { - let call = Set { now }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set, + DispatchError, + super::super::Event, + > { + let call = set { now }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -1594,52 +2083,81 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn minimum_period( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[184u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod indices { 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 Claim { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct claim { pub index: ::core::primitive::u32, } - impl ::subxt::Call for Claim { + impl ::subxt::Call for claim { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "claim"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Transfer { + pub struct transfer { pub new: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for Transfer { + impl ::subxt::Call for transfer { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Free { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct free { pub index: ::core::primitive::u32, } - impl ::subxt::Call for Free { + impl ::subxt::Call for free { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "free"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceTransfer { + pub struct force_transfer { pub new: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, pub freeze: ::core::primitive::bool, } - impl ::subxt::Call for ForceTransfer { + impl ::subxt::Call for force_transfer { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "force_transfer"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Freeze { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct freeze { pub index: ::core::primitive::u32, } - impl ::subxt::Call for Freeze { + impl ::subxt::Call for freeze { const PALLET: &'static str = "Indices"; const FUNCTION: &'static str = "freeze"; } @@ -1662,26 +2180,47 @@ pub mod api { pub fn claim( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Claim, DispatchError> - { - let call = Claim { index }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn transfer( - &self, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + claim, + DispatchError, + super::super::Event, + > { + let call = claim { index }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn transfer( + &self, new: ::subxt::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Transfer, DispatchError> - { - let call = Transfer { new, index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + transfer, + DispatchError, + super::super::Event, + > { + let call = transfer { new, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn free( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Free, DispatchError> - { - let call = Free { index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + free, + DispatchError, + super::super::Event, + > { + let call = free { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_transfer( @@ -1694,18 +2233,26 @@ pub mod api { T, X, A, - ForceTransfer, + force_transfer, DispatchError, + super::super::Event, > { - let call = ForceTransfer { new, index, freeze }; + let call = force_transfer { new, index, freeze }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn freeze( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Freeze, DispatchError> - { - let call = Freeze { index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + freeze, + DispatchError, + super::super::Event, + > { + let call = freeze { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -1714,25 +2261,32 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IndexAssigned( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct IndexFreed(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct IndexFrozen( - pub ::core::primitive::u32, - pub ::subxt::sp_core::crypto::AccountId32, - ); + 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"; @@ -1789,6 +2343,23 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 232u8, 118u8, 72u8, 23u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + } + } } pub mod balances { use super::runtime_types; @@ -1796,7 +2367,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Transfer { + pub struct transfer { pub dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -1804,12 +2375,12 @@ pub mod api { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Transfer { + impl ::subxt::Call for transfer { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetBalance { + pub struct set_balance { pub who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -1819,12 +2390,12 @@ pub mod api { #[codec(compact)] pub new_reserved: ::core::primitive::u128, } - impl ::subxt::Call for SetBalance { + impl ::subxt::Call for set_balance { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "set_balance"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceTransfer { + pub struct force_transfer { pub source: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -1836,12 +2407,12 @@ pub mod api { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for ForceTransfer { + impl ::subxt::Call for force_transfer { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "force_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TransferKeepAlive { + pub struct transfer_keep_alive { pub dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -1849,31 +2420,31 @@ pub mod api { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for TransferKeepAlive { + impl ::subxt::Call for transfer_keep_alive { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer_keep_alive"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TransferAll { + pub struct transfer_all { pub dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, pub keep_alive: ::core::primitive::bool, } - impl ::subxt::Call for TransferAll { + impl ::subxt::Call for transfer_all { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer_all"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceUnreserve { + pub struct force_unreserve { pub who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, pub amount: ::core::primitive::u128, } - impl ::subxt::Call for ForceUnreserve { + impl ::subxt::Call for force_unreserve { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "force_unreserve"; } @@ -1900,9 +2471,16 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Transfer, DispatchError> - { - let call = Transfer { dest, value }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + transfer, + DispatchError, + super::super::Event, + > { + let call = transfer { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_balance( @@ -1913,9 +2491,16 @@ pub mod api { >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetBalance, DispatchError> - { - let call = SetBalance { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_balance, + DispatchError, + super::super::Event, + > { + let call = set_balance { who, new_free, new_reserved, @@ -1938,10 +2523,11 @@ pub mod api { T, X, A, - ForceTransfer, + force_transfer, DispatchError, + super::super::Event, > { - let call = ForceTransfer { + let call = force_transfer { source, dest, value, @@ -1960,10 +2546,11 @@ pub mod api { T, X, A, - TransferKeepAlive, + transfer_keep_alive, DispatchError, + super::super::Event, > { - let call = TransferKeepAlive { dest, value }; + let call = transfer_keep_alive { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn transfer_all( @@ -1973,9 +2560,16 @@ pub mod api { (), >, keep_alive: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, TransferAll, DispatchError> - { - let call = TransferAll { dest, keep_alive }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + transfer_all, + DispatchError, + super::super::Event, + > { + let call = transfer_all { dest, keep_alive }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_unreserve( @@ -1990,10 +2584,11 @@ pub mod api { T, X, A, - ForceUnreserve, + force_unreserve, DispatchError, + super::super::Event, > { - let call = ForceUnreserve { who, amount }; + let call = force_unreserve { who, amount }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -2002,95 +2597,96 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Endowed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct DustLost( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct Transfer( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct BalanceSet( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct Reserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct Unreserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - 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, - ); + 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, Debug)] - pub struct Deposit( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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 ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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 ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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"; @@ -2243,6 +2839,39 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn existential_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn max_locks( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[50u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_reserves( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[50u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod transaction_payment { use super::runtime_types; @@ -2295,6 +2924,46 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn transaction_byte_fee( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 64u8, 66u8, 15u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn operational_fee_multiplier( + &self, + ) -> ::core::result::Result<::core::primitive::u8, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode(&mut &[5u8][..])?) + } + pub fn weight_to_fee( + &self, + ) -> ::core::result::Result< + ::std::vec::Vec< + runtime_types::frame_support::weights::WeightToFeeCoefficient< + ::core::primitive::u128, + >, + >, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 4u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 180u8, 196u8, 4u8, 0u8, 1u8, + ][..], + )?) + } + } + } } pub mod authorship { use super::runtime_types; @@ -2302,7 +2971,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetUncles { + pub struct set_uncles { pub new_uncles: ::std::vec::Vec< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, @@ -2310,7 +2979,7 @@ pub mod api { >, >, } - impl ::subxt::Call for SetUncles { + impl ::subxt::Call for set_uncles { const PALLET: &'static str = "Authorship"; const FUNCTION: &'static str = "set_uncles"; } @@ -2338,9 +3007,16 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetUncles, DispatchError> - { - let call = SetUncles { new_uncles }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_uncles, + DispatchError, + super::super::Event, + > { + let call = set_uncles { new_uncles }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -2423,6 +3099,20 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn uncle_generations( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod staking { use super::runtime_types; @@ -2430,7 +3120,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Bond { + pub struct bond { pub controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -2441,46 +3131,51 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, } - impl ::subxt::Call for Bond { + impl ::subxt::Call for bond { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "bond"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BondExtra { + pub struct bond_extra { #[codec(compact)] pub max_additional: ::core::primitive::u128, } - impl ::subxt::Call for BondExtra { + impl ::subxt::Call for bond_extra { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "bond_extra"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Unbond { + pub struct unbond { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Unbond { + impl ::subxt::Call for unbond { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "unbond"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct WithdrawUnbonded { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct withdraw_unbonded { pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for WithdrawUnbonded { + impl ::subxt::Call for withdraw_unbonded { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "withdraw_unbonded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Validate { + pub struct validate { pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } - impl ::subxt::Call for Validate { + impl ::subxt::Call for validate { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "validate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Nominate { + pub struct nominate { pub targets: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -2488,147 +3183,147 @@ pub mod api { >, >, } - impl ::subxt::Call for Nominate { + impl ::subxt::Call for nominate { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "nominate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Chill {} - impl ::subxt::Call for Chill { + 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, Debug)] - pub struct SetPayee { + pub struct set_payee { pub payee: runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, } - impl ::subxt::Call for SetPayee { + impl ::subxt::Call for set_payee { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_payee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetController { + pub struct set_controller { pub controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for SetController { + impl ::subxt::Call for set_controller { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_controller"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetValidatorCount { + pub struct set_validator_count { #[codec(compact)] pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidatorCount { + impl ::subxt::Call for set_validator_count { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_validator_count"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IncreaseValidatorCount { + pub struct increase_validator_count { #[codec(compact)] pub additional: ::core::primitive::u32, } - impl ::subxt::Call for IncreaseValidatorCount { + impl ::subxt::Call for increase_validator_count { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "increase_validator_count"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ScaleValidatorCount { + pub struct scale_validator_count { pub factor: runtime_types::sp_arithmetic::per_things::Percent, } - impl ::subxt::Call for ScaleValidatorCount { + impl ::subxt::Call for scale_validator_count { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "scale_validator_count"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceNoEras {} - impl ::subxt::Call for ForceNoEras { + pub struct force_no_eras; + impl ::subxt::Call for force_no_eras { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_no_eras"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceNewEra {} - impl ::subxt::Call for ForceNewEra { + pub struct force_new_era; + impl ::subxt::Call for force_new_era { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_new_era"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetInvulnerables { + pub struct set_invulnerables { pub invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for SetInvulnerables { + impl ::subxt::Call for set_invulnerables { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_invulnerables"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceUnstake { + pub struct force_unstake { pub stash: ::subxt::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for ForceUnstake { + impl ::subxt::Call for force_unstake { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_unstake"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceNewEraAlways {} - impl ::subxt::Call for ForceNewEraAlways { + pub struct force_new_era_always; + impl ::subxt::Call for force_new_era_always { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_new_era_always"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelDeferredSlash { + pub struct cancel_deferred_slash { pub era: ::core::primitive::u32, pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, } - impl ::subxt::Call for CancelDeferredSlash { + impl ::subxt::Call for cancel_deferred_slash { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "cancel_deferred_slash"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PayoutStakers { + pub struct payout_stakers { pub validator_stash: ::subxt::sp_core::crypto::AccountId32, pub era: ::core::primitive::u32, } - impl ::subxt::Call for PayoutStakers { + impl ::subxt::Call for payout_stakers { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "payout_stakers"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rebond { + pub struct rebond { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Rebond { + impl ::subxt::Call for rebond { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "rebond"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHistoryDepth { + pub struct set_history_depth { #[codec(compact)] pub new_history_depth: ::core::primitive::u32, #[codec(compact)] pub era_items_deleted: ::core::primitive::u32, } - impl ::subxt::Call for SetHistoryDepth { + impl ::subxt::Call for set_history_depth { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_history_depth"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReapStash { + pub struct reap_stash { pub stash: ::subxt::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for ReapStash { + impl ::subxt::Call for reap_stash { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "reap_stash"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Kick { + pub struct kick { pub who: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, @@ -2636,29 +3331,30 @@ pub mod api { >, >, } - impl ::subxt::Call for Kick { + impl ::subxt::Call for kick { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "kick"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetStakingLimits { + pub struct set_staking_configs { 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 set_staking_configs { 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, Debug)] - pub struct ChillOther { + pub struct chill_other { pub controller: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ChillOther { + impl ::subxt::Call for chill_other { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "chill_other"; } @@ -2688,9 +3384,16 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Bond, DispatchError> - { - let call = Bond { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + bond, + DispatchError, + super::super::Event, + > { + let call = bond { controller, value, payee, @@ -2700,17 +3403,31 @@ pub mod api { pub fn bond_extra( &self, max_additional: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, BondExtra, DispatchError> - { - let call = BondExtra { max_additional }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + bond_extra, + DispatchError, + super::super::Event, + > { + let call = bond_extra { max_additional }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn unbond( &self, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Unbond, DispatchError> - { - let call = Unbond { value }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + unbond, + DispatchError, + super::super::Event, + > { + let call = unbond { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn withdraw_unbonded( @@ -2721,18 +3438,26 @@ pub mod api { T, X, A, - WithdrawUnbonded, + withdraw_unbonded, DispatchError, + super::super::Event, > { - let call = WithdrawUnbonded { num_slashing_spans }; + let call = withdraw_unbonded { num_slashing_spans }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn validate( &self, prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Validate, DispatchError> - { - let call = Validate { prefs }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + validate, + DispatchError, + super::super::Event, + > { + let call = validate { prefs }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn nominate( @@ -2743,26 +3468,47 @@ pub mod api { (), >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Nominate, DispatchError> - { - let call = Nominate { targets }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + nominate, + DispatchError, + super::super::Event, + > { + let call = nominate { targets }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn chill( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Chill, DispatchError> - { - let call = Chill {}; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn set_payee( - &self, - payee: runtime_types::pallet_staking::RewardDestination< + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + chill, + DispatchError, + super::super::Event, + > { + let call = chill {}; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_payee( + &self, + payee: runtime_types::pallet_staking::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetPayee, DispatchError> - { - let call = SetPayee { payee }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_payee, + DispatchError, + super::super::Event, + > { + let call = set_payee { payee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_controller( @@ -2776,10 +3522,11 @@ pub mod api { T, X, A, - SetController, + set_controller, DispatchError, + super::super::Event, > { - let call = SetController { controller }; + let call = set_controller { controller }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_validator_count( @@ -2790,10 +3537,11 @@ pub mod api { T, X, A, - SetValidatorCount, + set_validator_count, DispatchError, + super::super::Event, > { - let call = SetValidatorCount { new }; + let call = set_validator_count { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn increase_validator_count( @@ -2804,10 +3552,11 @@ pub mod api { T, X, A, - IncreaseValidatorCount, + increase_validator_count, DispatchError, + super::super::Event, > { - let call = IncreaseValidatorCount { additional }; + let call = increase_validator_count { additional }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn scale_validator_count( @@ -2818,24 +3567,39 @@ pub mod api { T, X, A, - ScaleValidatorCount, + scale_validator_count, DispatchError, + super::super::Event, > { - let call = ScaleValidatorCount { factor }; + let call = scale_validator_count { factor }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_no_eras( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceNoEras, DispatchError> - { - let call = ForceNoEras {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_no_eras, + DispatchError, + super::super::Event, + > { + let call = force_no_eras {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_new_era( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceNewEra, DispatchError> - { - let call = ForceNewEra {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_new_era, + DispatchError, + super::super::Event, + > { + let call = force_new_era {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_invulnerables( @@ -2846,19 +3610,27 @@ pub mod api { T, X, A, - SetInvulnerables, + set_invulnerables, DispatchError, + super::super::Event, > { - let call = SetInvulnerables { invulnerables }; + let call = set_invulnerables { invulnerables }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_unstake( &self, stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceUnstake, DispatchError> - { - let call = ForceUnstake { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_unstake, + DispatchError, + super::super::Event, + > { + let call = force_unstake { stash, num_slashing_spans, }; @@ -2871,10 +3643,11 @@ pub mod api { T, X, A, - ForceNewEraAlways, + force_new_era_always, DispatchError, + super::super::Event, > { - let call = ForceNewEraAlways {}; + let call = force_new_era_always {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_deferred_slash( @@ -2886,10 +3659,11 @@ pub mod api { T, X, A, - CancelDeferredSlash, + cancel_deferred_slash, DispatchError, + super::super::Event, > { - let call = CancelDeferredSlash { era, slash_indices }; + let call = cancel_deferred_slash { era, slash_indices }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn payout_stakers( @@ -2901,10 +3675,11 @@ pub mod api { T, X, A, - PayoutStakers, + payout_stakers, DispatchError, + super::super::Event, > { - let call = PayoutStakers { + let call = payout_stakers { validator_stash, era, }; @@ -2913,9 +3688,16 @@ pub mod api { pub fn rebond( &self, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Rebond, DispatchError> - { - let call = Rebond { value }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + rebond, + DispatchError, + super::super::Event, + > { + let call = rebond { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_history_depth( @@ -2927,10 +3709,11 @@ pub mod api { T, X, A, - SetHistoryDepth, + set_history_depth, DispatchError, + super::super::Event, > { - let call = SetHistoryDepth { + let call = set_history_depth { new_history_depth, era_items_deleted, }; @@ -2940,9 +3723,16 @@ pub mod api { &self, stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ReapStash, DispatchError> - { - let call = ReapStash { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + reap_stash, + DispatchError, + super::super::Event, + > { + let call = reap_stash { stash, num_slashing_spans, }; @@ -2956,43 +3746,60 @@ pub mod api { (), >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Kick, DispatchError> - { - let call = Kick { who }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + kick, + DispatchError, + super::super::Event, + > { + 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, >, + min_commission: runtime_types::sp_arithmetic::per_things::Perbill, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - SetStakingLimits, + set_staking_configs, DispatchError, + super::super::Event, > { - let call = SetStakingLimits { + let call = set_staking_configs { 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, X, A, ChillOther, DispatchError> - { - let call = ChillOther { controller }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + chill_other, + DispatchError, + super::super::Event, + > { + let call = chill_other { controller }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -3028,14 +3835,19 @@ pub mod api { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "Slashed"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] 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, Debug)] - pub struct StakersElected {} + pub struct StakersElected; impl ::subxt::Event for StakersElected { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "StakersElected"; @@ -3077,7 +3889,7 @@ pub mod api { const EVENT: &'static str = "Kicked"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct StakingElectionFailed {} + pub struct StakingElectionFailed; impl ::subxt::Event for StakingElectionFailed { const PALLET: &'static str = "Staking"; const EVENT: &'static str = "StakingElectionFailed"; @@ -3166,6 +3978,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"; @@ -3645,6 +4466,16 @@ pub mod api { 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::BasicError, + > { + let entry = MinCommission; + self.client.storage().fetch_or_default(&entry, hash).await + } pub async fn ledger( &self, _0: ::subxt::sp_core::crypto::AccountId32, @@ -4146,6 +4977,52 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn sessions_per_era( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[6u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn bonding_duration( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[28u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn slash_defer_duration( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[27u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_nominator_rewarded_per_validator( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 1u8, 0u8, 0u8][..], + )?) + } + pub fn max_nominations( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[16u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod offences { use super::runtime_types; @@ -4153,10 +5030,10 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Offence( - pub [::core::primitive::u8; 16usize], - pub ::std::vec::Vec<::core::primitive::u8>, - ); + 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"; @@ -4309,17 +5186,17 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetKeys { + pub struct set_keys { pub keys: runtime_types::polkadot_runtime::SessionKeys, pub proof: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetKeys { + impl ::subxt::Call for set_keys { const PALLET: &'static str = "Session"; const FUNCTION: &'static str = "set_keys"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct PurgeKeys {} - impl ::subxt::Call for PurgeKeys { + pub struct purge_keys; + impl ::subxt::Call for purge_keys { const PALLET: &'static str = "Session"; const FUNCTION: &'static str = "purge_keys"; } @@ -4343,16 +5220,30 @@ pub mod api { &self, keys: runtime_types::polkadot_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetKeys, DispatchError> - { - let call = SetKeys { keys, proof }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_keys, + DispatchError, + super::super::Event, + > { + let call = set_keys { keys, proof }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn purge_keys( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, PurgeKeys, DispatchError> - { - let call = PurgeKeys {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + purge_keys, + DispatchError, + super::super::Event, + > { + let call = purge_keys {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -4360,8 +5251,15 @@ 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, Debug)] - pub struct NewSession(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct NewSession { + pub session_index: ::core::primitive::u32, + } impl ::subxt::Event for NewSession { const PALLET: &'static str = "Session"; const EVENT: &'static str = "NewSession"; @@ -4550,37 +5448,39 @@ pub mod api { 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: + pub struct report_equivocation { + pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< ::subxt::sp_core::H256, ::core::primitive::u32, >, + >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocation { + impl ::subxt::Call for report_equivocation { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "report_equivocation"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: + pub struct report_equivocation_unsigned { + pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< ::subxt::sp_core::H256, ::core::primitive::u32, >, + >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocationUnsigned { + impl ::subxt::Call for report_equivocation_unsigned { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "report_equivocation_unsigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NoteStalled { + pub struct note_stalled { pub delay: ::core::primitive::u32, pub best_finalized_block_number: ::core::primitive::u32, } - impl ::subxt::Call for NoteStalled { + impl ::subxt::Call for note_stalled { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "note_stalled"; } @@ -4609,11 +5509,12 @@ pub mod api { T, X, A, - ReportEquivocation, + report_equivocation, DispatchError, + super::super::Event, > { - let call = ReportEquivocation { - equivocation_proof, + let call = report_equivocation { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -4627,11 +5528,12 @@ pub mod api { T, X, A, - ReportEquivocationUnsigned, + report_equivocation_unsigned, DispatchError, + super::super::Event, > { - let call = ReportEquivocationUnsigned { - equivocation_proof, + let call = report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -4640,9 +5542,16 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NoteStalled, DispatchError> - { - let call = NoteStalled { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + note_stalled, + DispatchError, + super::super::Event, + > { + let call = note_stalled { delay, best_finalized_block_number, }; @@ -4654,24 +5563,24 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewAuthorities( - pub ::std::vec::Vec<( + 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, Debug)] - pub struct Paused {} + 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, Debug)] - pub struct Resumed {} + pub struct Resumed; impl ::subxt::Event for Resumed { const PALLET: &'static str = "Grandpa"; const EVENT: &'static str = "Resumed"; @@ -4823,6 +5732,20 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn max_authorities( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[160u8, 134u8, 1u8, 0u8][..], + )?) + } + } + } } pub mod im_online { use super::runtime_types; @@ -4830,13 +5753,13 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Heartbeat { + pub struct heartbeat { pub heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, pub signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, } - impl ::subxt::Call for Heartbeat { + impl ::subxt::Call for heartbeat { const PALLET: &'static str = "ImOnline"; const FUNCTION: &'static str = "heartbeat"; } @@ -4862,9 +5785,16 @@ pub mod api { ::core::primitive::u32, >, signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Heartbeat, DispatchError> - { - let call = Heartbeat { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + heartbeat, + DispatchError, + super::super::Event, + > { + let call = heartbeat { heartbeat, signature, }; @@ -4876,29 +5806,30 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct HeartbeatReceived( - pub runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - ); + 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, Debug)] - pub struct AllGood {} + 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, Debug)] - pub struct SomeOffline( - pub ::std::vec::Vec<( + 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"; @@ -5032,6 +5963,20 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn unsigned_priority( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8][..], + )?) + } + } + } } pub mod authority_discovery { use super::runtime_types; @@ -5042,218 +5987,233 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Propose { + pub struct propose { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Propose { + impl ::subxt::Call for propose { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Second { + pub struct second { #[codec(compact)] pub proposal: ::core::primitive::u32, #[codec(compact)] pub seconds_upper_bound: ::core::primitive::u32, } - impl ::subxt::Call for Second { + impl ::subxt::Call for second { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "second"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Vote { + pub struct vote { #[codec(compact)] pub ref_index: ::core::primitive::u32, pub vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "vote"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct EmergencyCancel { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct emergency_cancel { pub ref_index: ::core::primitive::u32, } - impl ::subxt::Call for EmergencyCancel { + impl ::subxt::Call for emergency_cancel { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "emergency_cancel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExternalPropose { + pub struct external_propose { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ExternalPropose { + impl ::subxt::Call for external_propose { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExternalProposeMajority { + pub struct external_propose_majority { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ExternalProposeMajority { + impl ::subxt::Call for external_propose_majority { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose_majority"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExternalProposeDefault { + pub struct external_propose_default { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ExternalProposeDefault { + impl ::subxt::Call for external_propose_default { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose_default"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct FastTrack { + pub struct fast_track { pub proposal_hash: ::subxt::sp_core::H256, pub voting_period: ::core::primitive::u32, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for FastTrack { + impl ::subxt::Call for fast_track { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "fast_track"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct VetoExternal { + pub struct veto_external { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for VetoExternal { + impl ::subxt::Call for veto_external { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "veto_external"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelReferendum { + pub struct cancel_referendum { #[codec(compact)] pub ref_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelReferendum { + impl ::subxt::Call for cancel_referendum { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_referendum"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelQueued { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct cancel_queued { pub which: ::core::primitive::u32, } - impl ::subxt::Call for CancelQueued { + impl ::subxt::Call for cancel_queued { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_queued"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Delegate { + pub struct delegate { pub to: ::subxt::sp_core::crypto::AccountId32, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } - impl ::subxt::Call for Delegate { + impl ::subxt::Call for delegate { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "delegate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Undelegate {} - impl ::subxt::Call for Undelegate { + 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, Debug)] - pub struct ClearPublicProposals {} - impl ::subxt::Call for ClearPublicProposals { + pub struct clear_public_proposals; + impl ::subxt::Call for clear_public_proposals { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "clear_public_proposals"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotePreimage { + pub struct note_preimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimage { + impl ::subxt::Call for note_preimage { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NotePreimageOperational { + pub struct note_preimage_operational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimageOperational { + impl ::subxt::Call for note_preimage_operational { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_preimage_operational"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NoteImminentPreimage { + pub struct note_imminent_preimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NoteImminentPreimage { + impl ::subxt::Call for note_imminent_preimage { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_imminent_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NoteImminentPreimageOperational { + pub struct note_imminent_preimage_operational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NoteImminentPreimageOperational { + impl ::subxt::Call for note_imminent_preimage_operational { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_imminent_preimage_operational"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReapPreimage { + pub struct reap_preimage { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub proposal_len_upper_bound: ::core::primitive::u32, } - impl ::subxt::Call for ReapPreimage { + impl ::subxt::Call for reap_preimage { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "reap_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Unlock { + pub struct unlock { pub target: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for Unlock { + impl ::subxt::Call for unlock { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "unlock"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveVote { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct remove_vote { pub index: ::core::primitive::u32, } - impl ::subxt::Call for RemoveVote { + impl ::subxt::Call for remove_vote { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "remove_vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveOtherVote { + pub struct remove_other_vote { pub target: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for RemoveOtherVote { + impl ::subxt::Call for remove_other_vote { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "remove_other_vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct EnactProposal { + pub struct enact_proposal { pub proposal_hash: ::subxt::sp_core::H256, pub index: ::core::primitive::u32, } - impl ::subxt::Call for EnactProposal { + impl ::subxt::Call for enact_proposal { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "enact_proposal"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Blacklist { + pub struct blacklist { pub proposal_hash: ::subxt::sp_core::H256, pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for Blacklist { + impl ::subxt::Call for blacklist { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "blacklist"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelProposal { + pub struct cancel_proposal { #[codec(compact)] pub prop_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelProposal { + impl ::subxt::Call for cancel_proposal { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_proposal"; } @@ -5277,9 +6237,16 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Propose, DispatchError> - { - let call = Propose { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + propose, + DispatchError, + super::super::Event, + > { + let call = propose { proposal_hash, value, }; @@ -5289,9 +6256,16 @@ pub mod api { &self, proposal: ::core::primitive::u32, seconds_upper_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Second, DispatchError> - { - let call = Second { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + second, + DispatchError, + super::super::Event, + > { + let call = second { proposal, seconds_upper_bound, }; @@ -5303,9 +6277,16 @@ pub mod api { vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> - { - let call = Vote { ref_index, vote }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + vote, + DispatchError, + super::super::Event, + > { + let call = vote { ref_index, vote }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn emergency_cancel( @@ -5316,10 +6297,11 @@ pub mod api { T, X, A, - EmergencyCancel, + emergency_cancel, DispatchError, + super::super::Event, > { - let call = EmergencyCancel { ref_index }; + let call = emergency_cancel { ref_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose( @@ -5330,10 +6312,11 @@ pub mod api { T, X, A, - ExternalPropose, + external_propose, DispatchError, + super::super::Event, > { - let call = ExternalPropose { proposal_hash }; + let call = external_propose { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose_majority( @@ -5344,10 +6327,11 @@ pub mod api { T, X, A, - ExternalProposeMajority, + external_propose_majority, DispatchError, + super::super::Event, > { - let call = ExternalProposeMajority { proposal_hash }; + let call = external_propose_majority { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose_default( @@ -5358,10 +6342,11 @@ pub mod api { T, X, A, - ExternalProposeDefault, + external_propose_default, DispatchError, + super::super::Event, > { - let call = ExternalProposeDefault { proposal_hash }; + let call = external_propose_default { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn fast_track( @@ -5369,9 +6354,16 @@ pub mod api { proposal_hash: ::subxt::sp_core::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, FastTrack, DispatchError> - { - let call = FastTrack { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + fast_track, + DispatchError, + super::super::Event, + > { + let call = fast_track { proposal_hash, voting_period, delay, @@ -5381,9 +6373,16 @@ pub mod api { pub fn veto_external( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, VetoExternal, DispatchError> - { - let call = VetoExternal { proposal_hash }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + veto_external, + DispatchError, + super::super::Event, + > { + let call = veto_external { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_referendum( @@ -5394,28 +6393,43 @@ pub mod api { T, X, A, - CancelReferendum, + cancel_referendum, DispatchError, + super::super::Event, > { - let call = CancelReferendum { ref_index }; + let call = cancel_referendum { ref_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_queued( &self, which: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CancelQueued, DispatchError> - { - let call = CancelQueued { which }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn delegate( - &self, - to: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + cancel_queued, + DispatchError, + super::super::Event, + > { + let call = cancel_queued { which }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn delegate( + &self, + to: ::subxt::sp_core::crypto::AccountId32, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Delegate, DispatchError> - { - let call = Delegate { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + delegate, + DispatchError, + super::super::Event, + > { + let call = delegate { to, conviction, balance, @@ -5424,9 +6438,16 @@ pub mod api { } pub fn undelegate( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Undelegate, DispatchError> - { - let call = Undelegate {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + undelegate, + DispatchError, + super::super::Event, + > { + let call = undelegate {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_public_proposals( @@ -5436,18 +6457,26 @@ pub mod api { T, X, A, - ClearPublicProposals, + clear_public_proposals, DispatchError, + super::super::Event, > { - let call = ClearPublicProposals {}; + let call = clear_public_proposals {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NotePreimage, DispatchError> - { - let call = NotePreimage { encoded_proposal }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + note_preimage, + DispatchError, + super::super::Event, + > { + let call = note_preimage { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_preimage_operational( @@ -5458,10 +6487,11 @@ pub mod api { T, X, A, - NotePreimageOperational, + note_preimage_operational, DispatchError, + super::super::Event, > { - let call = NotePreimageOperational { encoded_proposal }; + let call = note_preimage_operational { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_imminent_preimage( @@ -5472,10 +6502,11 @@ pub mod api { T, X, A, - NoteImminentPreimage, + note_imminent_preimage, DispatchError, + super::super::Event, > { - let call = NoteImminentPreimage { encoded_proposal }; + let call = note_imminent_preimage { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_imminent_preimage_operational( @@ -5486,19 +6517,27 @@ pub mod api { T, X, A, - NoteImminentPreimageOperational, + note_imminent_preimage_operational, DispatchError, + super::super::Event, > { - let call = NoteImminentPreimageOperational { encoded_proposal }; + let call = note_imminent_preimage_operational { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reap_preimage( &self, proposal_hash: ::subxt::sp_core::H256, proposal_len_upper_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ReapPreimage, DispatchError> - { - let call = ReapPreimage { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + reap_preimage, + DispatchError, + super::super::Event, + > { + let call = reap_preimage { proposal_hash, proposal_len_upper_bound, }; @@ -5507,17 +6546,31 @@ pub mod api { pub fn unlock( &self, target: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Unlock, DispatchError> - { - let call = Unlock { target }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + unlock, + DispatchError, + super::super::Event, + > { + let call = unlock { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveVote, DispatchError> - { - let call = RemoveVote { index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remove_vote, + DispatchError, + super::super::Event, + > { + let call = remove_vote { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_other_vote( @@ -5529,10 +6582,11 @@ pub mod api { T, X, A, - RemoveOtherVote, + remove_other_vote, DispatchError, + super::super::Event, > { - let call = RemoveOtherVote { target, index }; + let call = remove_other_vote { target, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn enact_proposal( @@ -5544,10 +6598,11 @@ pub mod api { T, X, A, - EnactProposal, + enact_proposal, DispatchError, + super::super::Event, > { - let call = EnactProposal { + let call = enact_proposal { proposal_hash, index, }; @@ -5557,9 +6612,16 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Blacklist, DispatchError> - { - let call = Blacklist { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + blacklist, + DispatchError, + super::super::Event, + > { + let call = blacklist { proposal_hash, maybe_ref_index, }; @@ -5573,10 +6635,11 @@ pub mod api { T, X, A, - CancelProposal, + cancel_proposal, DispatchError, + super::super::Event, > { - let call = CancelProposal { prop_index }; + let call = cancel_proposal { prop_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -5585,143 +6648,194 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed(pub ::core::primitive::u32, pub ::core::primitive::u128); + 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, Debug)] - pub struct Tabled( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ); + 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, Debug)] - pub struct ExternalTabled {} + 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, Debug)] - pub struct Started( - pub ::core::primitive::u32, - pub runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - ); + 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, Debug)] - pub struct Passed(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct NotPassed(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct Cancelled(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct Executed( - pub ::core::primitive::u32, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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, Debug)] - pub struct Delegated( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - ); + 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, Debug)] - pub struct Undelegated(pub ::subxt::sp_core::crypto::AccountId32); + 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, Debug)] - pub struct Vetoed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct PreimageNoted( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct PreimageUsed( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct PreimageInvalid( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct PreimageMissing( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct PreimageReaped( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::subxt::sp_core::crypto::AccountId32, - ); + 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, Debug)] - pub struct Blacklisted(pub ::subxt::sp_core::H256); + 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; @@ -6135,6 +7249,104 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn enactment_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 39u8, 6u8, 0u8][..], + )?) + } + pub fn launch_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 39u8, 6u8, 0u8][..], + )?) + } + pub fn voting_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 39u8, 6u8, 0u8][..], + )?) + } + pub fn vote_locking_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 39u8, 6u8, 0u8][..], + )?) + } + pub fn minimum_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn instant_allowed( + &self, + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode(&mut &[1u8][..])?) + } + pub fn fast_track_voting_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[8u8, 7u8, 0u8, 0u8][..], + )?) + } + pub fn cooloff_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[192u8, 137u8, 1u8, 0u8][..], + )?) + } + pub fn preimage_byte_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 128u8, 150u8, 152u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn max_votes( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_proposals( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod council { use super::runtime_types; @@ -6142,50 +7354,50 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMembers { + pub struct set_members { pub new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, pub old_count: ::core::primitive::u32, } - impl ::subxt::Call for SetMembers { + impl ::subxt::Call for set_members { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "set_members"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Execute { - pub proposal: runtime_types::polkadot_runtime::Call, + pub struct execute { + pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Execute { + impl ::subxt::Call for execute { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "execute"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Propose { + pub struct propose { #[codec(compact)] pub threshold: ::core::primitive::u32, - pub proposal: runtime_types::polkadot_runtime::Call, + pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Propose { + impl ::subxt::Call for propose { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Vote { + pub struct vote { pub proposal: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Close { + pub struct close { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, @@ -6194,15 +7406,15 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Close { + impl ::subxt::Call for close { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "close"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct DisapproveProposal { + pub struct disapprove_proposal { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for DisapproveProposal { + impl ::subxt::Call for disapprove_proposal { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "disapprove_proposal"; } @@ -6227,9 +7439,16 @@ 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, X, A, SetMembers, DispatchError> - { - let call = SetMembers { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_members, + DispatchError, + super::super::Event, + > { + let call = set_members { new_members, prime, old_count, @@ -6240,10 +7459,17 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Execute, DispatchError> - { - let call = Execute { - proposal, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + execute, + DispatchError, + super::super::Event, + > { + let call = execute { + proposal: ::std::boxed::Box::new(proposal), length_bound, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -6253,11 +7479,18 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Propose, DispatchError> - { - let call = Propose { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + propose, + DispatchError, + super::super::Event, + > { + let call = propose { threshold, - proposal, + proposal: ::std::boxed::Box::new(proposal), length_bound, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -6267,10 +7500,17 @@ pub mod api { proposal: ::subxt::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> - { - let call = Vote { - proposal, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + vote, + DispatchError, + super::super::Event, + > { + let call = vote { + proposal, index, approve, }; @@ -6282,9 +7522,16 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Close, DispatchError> - { - let call = Close { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + close, + DispatchError, + super::super::Event, + > { + let call = close { proposal_hash, index, proposal_weight_bound, @@ -6300,10 +7547,11 @@ pub mod api { T, X, A, - DisapproveProposal, + disapprove_proposal, DispatchError, + super::super::Event, > { - let call = DisapproveProposal { proposal_hash }; + let call = disapprove_proposal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -6312,64 +7560,70 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + 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, Debug)] - 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, - ); + 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, Debug)] - pub struct Approved(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct Disapproved(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct Executed( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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, Debug)] - pub struct MemberExecuted( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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, Debug)] - pub struct Closed( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + 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"; @@ -6544,50 +7798,50 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMembers { + pub struct set_members { pub new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, pub old_count: ::core::primitive::u32, } - impl ::subxt::Call for SetMembers { + impl ::subxt::Call for set_members { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "set_members"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Execute { - pub proposal: runtime_types::polkadot_runtime::Call, + pub struct execute { + pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Execute { + impl ::subxt::Call for execute { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "execute"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Propose { + pub struct propose { #[codec(compact)] pub threshold: ::core::primitive::u32, - pub proposal: runtime_types::polkadot_runtime::Call, + pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Propose { + impl ::subxt::Call for propose { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Vote { + pub struct vote { pub proposal: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Close { + pub struct close { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, @@ -6596,15 +7850,15 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Close { + impl ::subxt::Call for close { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "close"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct DisapproveProposal { + pub struct disapprove_proposal { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for DisapproveProposal { + impl ::subxt::Call for disapprove_proposal { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "disapprove_proposal"; } @@ -6629,9 +7883,16 @@ 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, X, A, SetMembers, DispatchError> - { - let call = SetMembers { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_members, + DispatchError, + super::super::Event, + > { + let call = set_members { new_members, prime, old_count, @@ -6642,10 +7903,17 @@ pub mod api { &self, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Execute, DispatchError> - { - let call = Execute { - proposal, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + execute, + DispatchError, + super::super::Event, + > { + let call = execute { + proposal: ::std::boxed::Box::new(proposal), length_bound, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -6655,11 +7923,18 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::polkadot_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Propose, DispatchError> - { - let call = Propose { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + propose, + DispatchError, + super::super::Event, + > { + let call = propose { threshold, - proposal, + proposal: ::std::boxed::Box::new(proposal), length_bound, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -6669,9 +7944,16 @@ pub mod api { proposal: ::subxt::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> - { - let call = Vote { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + vote, + DispatchError, + super::super::Event, + > { + let call = vote { proposal, index, approve, @@ -6684,9 +7966,16 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Close, DispatchError> - { - let call = Close { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + close, + DispatchError, + super::super::Event, + > { + let call = close { proposal_hash, index, proposal_weight_bound, @@ -6702,10 +7991,11 @@ pub mod api { T, X, A, - DisapproveProposal, + disapprove_proposal, DispatchError, + super::super::Event, > { - let call = DisapproveProposal { proposal_hash }; + let call = disapprove_proposal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -6714,64 +8004,70 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proposed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - ); + 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, Debug)] - 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, - ); + 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, Debug)] - pub struct Approved(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct Disapproved(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct Executed( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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, Debug)] - pub struct MemberExecuted( - pub ::subxt::sp_core::H256, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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, Debug)] - pub struct Closed( - pub ::subxt::sp_core::H256, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + 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"; @@ -6946,56 +8242,56 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Vote { + pub struct vote { pub votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveVoter {} - impl ::subxt::Call for RemoveVoter { + pub struct remove_voter; + impl ::subxt::Call for remove_voter { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "remove_voter"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SubmitCandidacy { + pub struct submit_candidacy { #[codec(compact)] pub candidate_count: ::core::primitive::u32, } - impl ::subxt::Call for SubmitCandidacy { + impl ::subxt::Call for submit_candidacy { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "submit_candidacy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RenounceCandidacy { + pub struct renounce_candidacy { pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, } - impl ::subxt::Call for RenounceCandidacy { + impl ::subxt::Call for renounce_candidacy { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "renounce_candidacy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveMember { + pub struct remove_member { pub who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, pub has_replacement: ::core::primitive::bool, } - impl ::subxt::Call for RemoveMember { + impl ::subxt::Call for remove_member { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "remove_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CleanDefunctVoters { + pub struct clean_defunct_voters { pub num_voters: ::core::primitive::u32, pub num_defunct: ::core::primitive::u32, } - impl ::subxt::Call for CleanDefunctVoters { + impl ::subxt::Call for clean_defunct_voters { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "clean_defunct_voters"; } @@ -7019,16 +8315,30 @@ pub mod api { &self, votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError> - { - let call = Vote { votes, value }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + vote, + DispatchError, + super::super::Event, + > { + let call = vote { votes, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_voter( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveVoter, DispatchError> - { - let call = RemoveVoter {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remove_voter, + DispatchError, + super::super::Event, + > { + let call = remove_voter {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn submit_candidacy( @@ -7039,10 +8349,11 @@ pub mod api { T, X, A, - SubmitCandidacy, + submit_candidacy, DispatchError, + super::super::Event, > { - let call = SubmitCandidacy { candidate_count }; + let call = submit_candidacy { candidate_count }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn renounce_candidacy( @@ -7053,10 +8364,11 @@ pub mod api { T, X, A, - RenounceCandidacy, + renounce_candidacy, DispatchError, + super::super::Event, > { - let call = RenounceCandidacy { renouncing }; + let call = renounce_candidacy { renouncing }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_member( @@ -7066,9 +8378,16 @@ pub mod api { (), >, has_replacement: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveMember, DispatchError> - { - let call = RemoveMember { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remove_member, + DispatchError, + super::super::Event, + > { + let call = remove_member { who, has_replacement, }; @@ -7083,10 +8402,11 @@ pub mod api { T, X, A, - CleanDefunctVoters, + clean_defunct_voters, DispatchError, + super::super::Event, > { - let call = CleanDefunctVoters { + let call = clean_defunct_voters { num_voters, num_defunct, }; @@ -7098,54 +8418,58 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewTerm( - pub ::std::vec::Vec<( + 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, Debug)] - pub struct EmptyTerm {} + 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, Debug)] - pub struct ElectionError {} + 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, Debug)] - pub struct MemberKicked(pub ::subxt::sp_core::crypto::AccountId32); + 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, Debug)] - pub struct Renounced(pub ::subxt::sp_core::crypto::AccountId32); + 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, Debug)] - pub struct CandidateSlashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct SeatHolderSlashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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"; @@ -7300,6 +8624,79 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn pallet_id( + &self, + ) -> ::core::result::Result< + [::core::primitive::u8; 8usize], + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[112u8, 104u8, 114u8, 101u8, 108u8, 101u8, 99u8, 116u8][..], + )?) + } + pub fn candidacy_bond( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn voting_bond_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 112u8, 19u8, 183u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn voting_bond_factor( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 208u8, 18u8, 19u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn desired_members( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[13u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn desired_runners_up( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[20u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn term_duration( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[192u8, 137u8, 1u8, 0u8][..], + )?) + } + } + } } pub mod technical_membership { use super::runtime_types; @@ -7307,57 +8704,57 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AddMember { + pub struct add_member { pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for AddMember { + impl ::subxt::Call for add_member { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "add_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveMember { + pub struct remove_member { pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for RemoveMember { + impl ::subxt::Call for remove_member { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "remove_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SwapMember { + pub struct swap_member { pub remove: ::subxt::sp_core::crypto::AccountId32, pub add: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SwapMember { + impl ::subxt::Call for swap_member { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "swap_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ResetMembers { + pub struct reset_members { pub members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for ResetMembers { + impl ::subxt::Call for reset_members { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "reset_members"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ChangeKey { + pub struct change_key { pub new: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ChangeKey { + impl ::subxt::Call for change_key { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "change_key"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetPrime { + pub struct set_prime { pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetPrime { + impl ::subxt::Call for set_prime { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "set_prime"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ClearPrime {} - impl ::subxt::Call for ClearPrime { + pub struct clear_prime; + impl ::subxt::Call for clear_prime { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "clear_prime"; } @@ -7380,96 +8777,145 @@ pub mod api { pub fn add_member( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddMember, DispatchError> - { - let call = AddMember { who }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + add_member, + DispatchError, + super::super::Event, + > { + let call = add_member { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_member( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveMember, DispatchError> - { - let call = RemoveMember { who }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remove_member, + DispatchError, + super::super::Event, + > { + let call = remove_member { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn swap_member( &self, remove: ::subxt::sp_core::crypto::AccountId32, add: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SwapMember, DispatchError> - { - let call = SwapMember { remove, add }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + swap_member, + DispatchError, + super::super::Event, + > { + let call = swap_member { remove, add }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reset_members( &self, members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ResetMembers, DispatchError> - { - let call = ResetMembers { members }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + reset_members, + DispatchError, + super::super::Event, + > { + let call = reset_members { members }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn change_key( &self, new: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ChangeKey, DispatchError> - { - let call = ChangeKey { new }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + change_key, + DispatchError, + super::super::Event, + > { + let call = change_key { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_prime( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetPrime, DispatchError> - { - let call = SetPrime { who }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_prime, + DispatchError, + super::super::Event, + > { + let call = set_prime { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_prime( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ClearPrime, DispatchError> - { - let call = ClearPrime {}; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - } + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + clear_prime, + DispatchError, + super::super::Event, + > { + let call = clear_prime {}; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } } pub type Event = runtime_types::pallet_membership::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MemberAdded {} + 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, Debug)] - pub struct MemberRemoved {} + 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, Debug)] - pub struct MembersSwapped {} + 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, Debug)] - pub struct MembersReset {} + 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, Debug)] - pub struct KeyChanged {} + 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, Debug)] - pub struct Dummy {} + pub struct Dummy; impl ::subxt::Event for Dummy { const PALLET: &'static str = "TechnicalMembership"; const EVENT: &'static str = "Dummy"; @@ -7531,7 +8977,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProposeSpend { + pub struct propose_spend { #[codec(compact)] pub value: ::core::primitive::u128, pub beneficiary: ::subxt::sp_runtime::MultiAddress< @@ -7539,25 +8985,25 @@ pub mod api { (), >, } - impl ::subxt::Call for ProposeSpend { + impl ::subxt::Call for propose_spend { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "propose_spend"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RejectProposal { + pub struct reject_proposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for RejectProposal { + impl ::subxt::Call for reject_proposal { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "reject_proposal"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ApproveProposal { + pub struct approve_proposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveProposal { + impl ::subxt::Call for approve_proposal { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "approve_proposal"; } @@ -7584,9 +9030,16 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ProposeSpend, DispatchError> - { - let call = ProposeSpend { value, beneficiary }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + propose_spend, + DispatchError, + super::super::Event, + > { + let call = propose_spend { value, beneficiary }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reject_proposal( @@ -7597,10 +9050,11 @@ pub mod api { T, X, A, - RejectProposal, + reject_proposal, DispatchError, + super::super::Event, > { - let call = RejectProposal { proposal_id }; + let call = reject_proposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_proposal( @@ -7611,10 +9065,11 @@ pub mod api { T, X, A, - ApproveProposal, + approve_proposal, DispatchError, + super::super::Event, > { - let call = ApproveProposal { proposal_id }; + let call = approve_proposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -7622,48 +9077,86 @@ 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, Debug)] - pub struct Proposed(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct Spending(pub ::core::primitive::u128); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct Awarded( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::subxt::sp_core::crypto::AccountId32, - ); + 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, Debug)] - pub struct Rejected(pub ::core::primitive::u32, pub ::core::primitive::u128); + 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, Debug)] - pub struct Burnt(pub ::core::primitive::u128); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct Rollover(pub ::core::primitive::u128); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct Deposit(pub ::core::primitive::u128); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct Deposit { + pub value: ::core::primitive::u128, + } impl ::subxt::Event for Deposit { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "Deposit"; @@ -7761,6 +9254,82 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn proposal_bond( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[80u8, 195u8, 0u8, 0u8][..], + )?) + } + pub fn proposal_bond_minimum( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn proposal_bond_maximum( + &self, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u128>, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 1u8, 0u8, 80u8, 57u8, 39u8, 140u8, 4u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn spend_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 70u8, 5u8, 0u8][..], + )?) + } + pub fn burn( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[16u8, 39u8, 0u8, 0u8][..], + )?) + } + pub fn pallet_id( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::PalletId, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[112u8, 121u8, 47u8, 116u8, 114u8, 115u8, 114u8, 121u8][..], + )?) + } + pub fn max_approvals( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod claims { use super::runtime_types; @@ -7768,17 +9337,17 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Claim { + pub struct claim { pub dest: ::subxt::sp_core::crypto::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, } - impl ::subxt::Call for Claim { + impl ::subxt::Call for claim { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "claim"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MintClaim { + pub struct mint_claim { pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub value: ::core::primitive::u128, pub vesting_schedule: ::core::option::Option<( @@ -7790,37 +9359,37 @@ pub mod api { runtime_types::polkadot_runtime_common::claims::StatementKind, >, } - impl ::subxt::Call for MintClaim { + impl ::subxt::Call for mint_claim { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "mint_claim"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ClaimAttest { + pub struct claim_attest { pub dest: ::subxt::sp_core::crypto::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, pub statement: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ClaimAttest { + impl ::subxt::Call for claim_attest { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "claim_attest"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Attest { + pub struct attest { pub statement: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for Attest { + impl ::subxt::Call for attest { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "attest"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MoveClaim { + pub struct move_claim { pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub maybe_preclaim: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for MoveClaim { + impl ::subxt::Call for move_claim { const PALLET: &'static str = "Claims"; const FUNCTION: &'static str = "move_claim"; } @@ -7844,9 +9413,16 @@ pub mod api { &self, dest: ::subxt::sp_core::crypto::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Claim, DispatchError> - { - let call = Claim { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + claim, + DispatchError, + super::super::Event, + > { + let call = claim { dest, ethereum_signature, }; @@ -7864,9 +9440,16 @@ pub mod api { statement: ::core::option::Option< runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, MintClaim, DispatchError> - { - let call = MintClaim { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + mint_claim, + DispatchError, + super::super::Event, + > { + let call = mint_claim { who, value, vesting_schedule, @@ -7879,9 +9462,16 @@ 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, X, A, ClaimAttest, DispatchError> - { - let call = ClaimAttest { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + claim_attest, + DispatchError, + super::super::Event, + > { + let call = claim_attest { dest, ethereum_signature, statement, @@ -7891,9 +9481,16 @@ pub mod api { pub fn attest( &self, statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Attest, DispatchError> - { - let call = Attest { statement }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + attest, + DispatchError, + super::super::Event, + > { + let call = attest { statement }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn move_claim( @@ -7903,9 +9500,16 @@ pub mod api { maybe_preclaim: ::core::option::Option< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, MoveClaim, DispatchError> - { - let call = MoveClaim { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + move_claim, + DispatchError, + super::super::Event, + > { + let call = move_claim { old, new, maybe_preclaim, @@ -8104,6 +9708,27 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn prefix( + &self, + ) -> ::core::result::Result< + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 132u8, 80u8, 97u8, 121u8, 32u8, 68u8, 79u8, 84u8, 115u8, + 32u8, 116u8, 111u8, 32u8, 116u8, 104u8, 101u8, 32u8, 80u8, + 111u8, 108u8, 107u8, 97u8, 100u8, 111u8, 116u8, 32u8, 97u8, + 99u8, 99u8, 111u8, 117u8, 110u8, 116u8, 58u8, + ][..], + )?) + } + } + } } pub mod vesting { use super::runtime_types; @@ -8111,24 +9736,24 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Vest {} - impl ::subxt::Call for Vest { + 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, Debug)] - pub struct VestOther { + pub struct vest_other { pub target: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for VestOther { + impl ::subxt::Call for vest_other { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vest_other"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct VestedTransfer { + pub struct vested_transfer { pub target: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -8138,12 +9763,12 @@ pub mod api { ::core::primitive::u32, >, } - impl ::subxt::Call for VestedTransfer { + impl ::subxt::Call for vested_transfer { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vested_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceVestedTransfer { + pub struct force_vested_transfer { pub source: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), @@ -8157,16 +9782,16 @@ pub mod api { ::core::primitive::u32, >, } - impl ::subxt::Call for ForceVestedTransfer { + impl ::subxt::Call for force_vested_transfer { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "force_vested_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct MergeSchedules { + pub struct merge_schedules { pub schedule1_index: ::core::primitive::u32, pub schedule2_index: ::core::primitive::u32, } - impl ::subxt::Call for MergeSchedules { + impl ::subxt::Call for merge_schedules { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "merge_schedules"; } @@ -8188,9 +9813,16 @@ pub mod api { } pub fn vest( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vest, DispatchError> - { - let call = Vest {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + vest, + DispatchError, + super::super::Event, + > { + let call = vest {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vest_other( @@ -8199,9 +9831,16 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, VestOther, DispatchError> - { - let call = VestOther { target }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + vest_other, + DispatchError, + super::super::Event, + > { + let call = vest_other { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vested_transfer( @@ -8219,10 +9858,11 @@ pub mod api { T, X, A, - VestedTransfer, + vested_transfer, DispatchError, + super::super::Event, > { - let call = VestedTransfer { target, schedule }; + let call = vested_transfer { target, schedule }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_vested_transfer( @@ -8244,10 +9884,11 @@ pub mod api { T, X, A, - ForceVestedTransfer, + force_vested_transfer, DispatchError, + super::super::Event, > { - let call = ForceVestedTransfer { + let call = force_vested_transfer { source, target, schedule, @@ -8263,10 +9904,11 @@ pub mod api { T, X, A, - MergeSchedules, + merge_schedules, DispatchError, + super::super::Event, > { - let call = MergeSchedules { + let call = merge_schedules { schedule1_index, schedule2_index, }; @@ -8278,16 +9920,18 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct VestingUpdated( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct VestingCompleted(pub ::subxt::sp_core::crypto::AccountId32); + 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"; @@ -8368,6 +10012,31 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn min_vested_transfer( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn max_vesting_schedules( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[28u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod utility { use super::runtime_types; @@ -8375,36 +10044,37 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Batch { + pub struct batch { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for Batch { + impl ::subxt::Call for batch { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "batch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AsDerivative { + pub struct as_derivative { pub index: ::core::primitive::u16, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box, } - impl ::subxt::Call for AsDerivative { + impl ::subxt::Call for as_derivative { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "as_derivative"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BatchAll { + pub struct batch_all { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for BatchAll { + impl ::subxt::Call for batch_all { 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, + pub struct dispatch_as { + pub as_origin: + ::std::boxed::Box, + pub call: ::std::boxed::Box, } - impl ::subxt::Call for DispatchAs { + impl ::subxt::Call for dispatch_as { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "dispatch_as"; } @@ -8427,35 +10097,69 @@ pub mod api { pub fn batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Batch, DispatchError> - { - let call = Batch { calls }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + batch, + DispatchError, + super::super::Event, + > { + let call = batch { calls }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn as_derivative( &self, index: ::core::primitive::u16, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AsDerivative, DispatchError> - { - let call = AsDerivative { index, call }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + as_derivative, + DispatchError, + super::super::Event, + > { + let call = as_derivative { + index, + call: ::std::boxed::Box::new(call), + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn batch_all( &self, calls: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, BatchAll, DispatchError> - { - let call = BatchAll { calls }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + batch_all, + DispatchError, + super::super::Event, + > { + let call = batch_all { 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< + 'a, + T, + X, + A, + dispatch_as, + DispatchError, + super::super::Event, + > { + let call = dispatch_as { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -8464,35 +10168,50 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct BatchInterrupted( - pub ::core::primitive::u32, - pub runtime_types::sp_runtime::DispatchError, - ); + 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, Debug)] - pub struct BatchCompleted {} + 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, Debug)] - pub struct ItemCompleted {} + 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, Debug)] - pub struct DispatchedAs( - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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 constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn batched_calls_limit( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[170u8, 42u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod identity { use super::runtime_types; @@ -8500,92 +10219,99 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AddRegistrar { + pub struct add_registrar { pub account: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for AddRegistrar { + impl ::subxt::Call for add_registrar { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "add_registrar"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetIdentity { - pub info: runtime_types::pallet_identity::types::IdentityInfo, + pub struct set_identity { + pub info: ::std::boxed::Box< + runtime_types::pallet_identity::types::IdentityInfo, + >, } - impl ::subxt::Call for SetIdentity { + impl ::subxt::Call for set_identity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_identity"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetSubs { + pub struct set_subs { pub subs: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, } - impl ::subxt::Call for SetSubs { + impl ::subxt::Call for set_subs { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_subs"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ClearIdentity {} - impl ::subxt::Call for ClearIdentity { + pub struct clear_identity; + impl ::subxt::Call for clear_identity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "clear_identity"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RequestJudgement { + pub struct request_judgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, #[codec(compact)] pub max_fee: ::core::primitive::u128, } - impl ::subxt::Call for RequestJudgement { + impl ::subxt::Call for request_judgement { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "request_judgement"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelRequest { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct cancel_request { pub reg_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelRequest { + impl ::subxt::Call for cancel_request { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "cancel_request"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetFee { + pub struct set_fee { #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for SetFee { + impl ::subxt::Call for set_fee { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetAccountId { + pub struct set_account_id { #[codec(compact)] pub index: ::core::primitive::u32, pub new: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetAccountId { + impl ::subxt::Call for set_account_id { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_account_id"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetFields { + pub struct set_fields { #[codec(compact)] pub index: ::core::primitive::u32, pub fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, } - impl ::subxt::Call for SetFields { + impl ::subxt::Call for set_fields { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_fields"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProvideJudgement { + pub struct provide_judgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, pub target: ::subxt::sp_runtime::MultiAddress< @@ -8596,59 +10322,59 @@ pub mod api { ::core::primitive::u128, >, } - impl ::subxt::Call for ProvideJudgement { + impl ::subxt::Call for provide_judgement { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "provide_judgement"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct KillIdentity { + pub struct kill_identity { pub target: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for KillIdentity { + impl ::subxt::Call for kill_identity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "kill_identity"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AddSub { + pub struct add_sub { pub sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, pub data: runtime_types::pallet_identity::types::Data, } - impl ::subxt::Call for AddSub { + impl ::subxt::Call for add_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "add_sub"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RenameSub { + pub struct rename_sub { pub sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, pub data: runtime_types::pallet_identity::types::Data, } - impl ::subxt::Call for RenameSub { + impl ::subxt::Call for rename_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "rename_sub"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveSub { + pub struct remove_sub { pub sub: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, } - impl ::subxt::Call for RemoveSub { + impl ::subxt::Call for remove_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "remove_sub"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct QuitSub {} - impl ::subxt::Call for QuitSub { + pub struct quit_sub; + impl ::subxt::Call for quit_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "quit_sub"; } @@ -8671,28 +10397,51 @@ pub mod api { pub fn add_registrar( &self, account: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddRegistrar, DispatchError> - { - let call = AddRegistrar { account }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + add_registrar, + DispatchError, + super::super::Event, + > { + let call = add_registrar { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetIdentity, DispatchError> - { - let call = SetIdentity { info }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn set_subs( + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_identity, + DispatchError, + super::super::Event, + > { + let call = set_identity { + info: ::std::boxed::Box::new(info), + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_subs( &self, subs: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetSubs, DispatchError> - { - let call = SetSubs { subs }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_subs, + DispatchError, + super::super::Event, + > { + let call = set_subs { subs }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_identity( @@ -8702,10 +10451,11 @@ pub mod api { T, X, A, - ClearIdentity, + clear_identity, DispatchError, + super::super::Event, > { - let call = ClearIdentity {}; + let call = clear_identity {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn request_judgement( @@ -8717,10 +10467,11 @@ pub mod api { T, X, A, - RequestJudgement, + request_judgement, DispatchError, + super::super::Event, > { - let call = RequestJudgement { reg_index, max_fee }; + let call = request_judgement { reg_index, max_fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_request( @@ -8731,28 +10482,43 @@ pub mod api { T, X, A, - CancelRequest, + cancel_request, DispatchError, + super::super::Event, > { - let call = CancelRequest { reg_index }; + let call = cancel_request { reg_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_fee( &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetFee, DispatchError> - { - let call = SetFee { index, fee }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_fee, + DispatchError, + super::super::Event, + > { + let call = set_fee { index, fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_account_id( &self, index: ::core::primitive::u32, new: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetAccountId, DispatchError> - { - let call = SetAccountId { index, new }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_account_id, + DispatchError, + super::super::Event, + > { + let call = set_account_id { index, new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_fields( @@ -8761,9 +10527,16 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SetFields, DispatchError> - { - let call = SetFields { index, fields }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_fields, + DispatchError, + super::super::Event, + > { + let call = set_fields { index, fields }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn provide_judgement( @@ -8781,10 +10554,11 @@ pub mod api { T, X, A, - ProvideJudgement, + provide_judgement, DispatchError, + super::super::Event, > { - let call = ProvideJudgement { + let call = provide_judgement { reg_index, target, judgement, @@ -8797,9 +10571,16 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, KillIdentity, DispatchError> - { - let call = KillIdentity { target }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + kill_identity, + DispatchError, + super::super::Event, + > { + let call = kill_identity { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn add_sub( @@ -8809,9 +10590,16 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddSub, DispatchError> - { - let call = AddSub { sub, data }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + add_sub, + DispatchError, + super::super::Event, + > { + let call = add_sub { sub, data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn rename_sub( @@ -8821,9 +10609,16 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RenameSub, DispatchError> - { - let call = RenameSub { sub, data }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + rename_sub, + DispatchError, + super::super::Event, + > { + let call = rename_sub { sub, data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_sub( @@ -8832,16 +10627,30 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveSub, DispatchError> - { - let call = RemoveSub { sub }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remove_sub, + DispatchError, + super::super::Event, + > { + let call = remove_sub { sub }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn quit_sub( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, QuitSub, DispatchError> - { - let call = QuitSub {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + quit_sub, + DispatchError, + super::super::Event, + > { + let call = quit_sub {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -8850,88 +10659,97 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct IdentitySet(pub ::subxt::sp_core::crypto::AccountId32); + 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, Debug)] - pub struct IdentityCleared( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct IdentityKilled( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct JudgementRequested( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct JudgementUnrequested( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct JudgementGiven( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - ); + 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, Debug)] - pub struct RegistrarAdded(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct SubIdentityAdded( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct SubIdentityRemoved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct SubIdentityRevoked( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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"; @@ -9100,6 +10918,69 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn basic_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 125u8, 181u8, 42u8, 47u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn field_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 205u8, 86u8, 39u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn sub_account_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 128u8, 248u8, 132u8, 176u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn max_sub_accounts( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_additional_fields( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_registrars( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[20u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod proxy { use super::runtime_types; @@ -9107,54 +10988,54 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Proxy { + pub struct proxy { pub real: ::subxt::sp_core::crypto::AccountId32, pub force_proxy_type: ::core::option::Option, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box, } - impl ::subxt::Call for Proxy { + impl ::subxt::Call for proxy { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "proxy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AddProxy { + pub struct add_proxy { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for AddProxy { + impl ::subxt::Call for add_proxy { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "add_proxy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveProxy { + pub struct remove_proxy { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for RemoveProxy { + impl ::subxt::Call for remove_proxy { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_proxy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveProxies {} - impl ::subxt::Call for RemoveProxies { + pub struct remove_proxies; + impl ::subxt::Call for remove_proxies { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_proxies"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Anonymous { + pub struct anonymous { pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, pub index: ::core::primitive::u16, } - impl ::subxt::Call for Anonymous { + impl ::subxt::Call for anonymous { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "anonymous"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct KillAnonymous { + pub struct kill_anonymous { pub spawner: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub index: ::core::primitive::u16, @@ -9163,46 +11044,46 @@ pub mod api { #[codec(compact)] pub ext_index: ::core::primitive::u32, } - impl ::subxt::Call for KillAnonymous { + impl ::subxt::Call for kill_anonymous { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "kill_anonymous"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Announce { + pub struct announce { pub real: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for Announce { + impl ::subxt::Call for announce { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "announce"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RemoveAnnouncement { + pub struct remove_announcement { pub real: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for RemoveAnnouncement { + impl ::subxt::Call for remove_announcement { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_announcement"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RejectAnnouncement { + pub struct reject_announcement { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for RejectAnnouncement { + impl ::subxt::Call for reject_announcement { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "reject_announcement"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProxyAnnounced { + pub struct proxy_announced { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub real: ::subxt::sp_core::crypto::AccountId32, pub force_proxy_type: ::core::option::Option, - pub call: runtime_types::polkadot_runtime::Call, + pub call: ::std::boxed::Box, } - impl ::subxt::Call for ProxyAnnounced { + impl ::subxt::Call for proxy_announced { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "proxy_announced"; } @@ -9229,12 +11110,19 @@ pub mod api { runtime_types::polkadot_runtime::ProxyType, >, call: runtime_types::polkadot_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Proxy, DispatchError> - { - let call = Proxy { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + proxy, + DispatchError, + super::super::Event, + > { + let call = proxy { real, force_proxy_type, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -9243,9 +11131,16 @@ pub mod api { delegate: ::subxt::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddProxy, DispatchError> - { - let call = AddProxy { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + add_proxy, + DispatchError, + super::super::Event, + > { + let call = add_proxy { delegate, proxy_type, delay, @@ -9257,9 +11152,16 @@ pub mod api { delegate: ::subxt::sp_core::crypto::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RemoveProxy, DispatchError> - { - let call = RemoveProxy { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + remove_proxy, + DispatchError, + super::super::Event, + > { + let call = remove_proxy { delegate, proxy_type, delay, @@ -9273,10 +11175,11 @@ pub mod api { T, X, A, - RemoveProxies, + remove_proxies, DispatchError, + super::super::Event, > { - let call = RemoveProxies {}; + let call = remove_proxies {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn anonymous( @@ -9284,9 +11187,16 @@ pub mod api { proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Anonymous, DispatchError> - { - let call = Anonymous { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + anonymous, + DispatchError, + super::super::Event, + > { + let call = anonymous { proxy_type, delay, index, @@ -9305,10 +11215,11 @@ pub mod api { T, X, A, - KillAnonymous, + kill_anonymous, DispatchError, + super::super::Event, > { - let call = KillAnonymous { + let call = kill_anonymous { spawner, proxy_type, index, @@ -9321,9 +11232,16 @@ pub mod api { &self, real: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Announce, DispatchError> - { - let call = Announce { real, call_hash }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + announce, + DispatchError, + super::super::Event, + > { + let call = announce { real, call_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_announcement( @@ -9335,10 +11253,11 @@ pub mod api { T, X, A, - RemoveAnnouncement, + remove_announcement, DispatchError, + super::super::Event, > { - let call = RemoveAnnouncement { real, call_hash }; + let call = remove_announcement { real, call_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reject_announcement( @@ -9350,10 +11269,11 @@ pub mod api { T, X, A, - RejectAnnouncement, + reject_announcement, DispatchError, + super::super::Event, > { - let call = RejectAnnouncement { + let call = reject_announcement { delegate, call_hash, }; @@ -9372,14 +11292,15 @@ pub mod api { T, X, A, - ProxyAnnounced, + proxy_announced, DispatchError, + super::super::Event, > { - let call = ProxyAnnounced { + let call = proxy_announced { delegate, real, force_proxy_type, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -9389,41 +11310,42 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProxyExecuted( - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + 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, Debug)] - 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, - ); + 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, Debug)] - pub struct Announced( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::H256, - ); + 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, Debug)] - 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, - ); + 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"; @@ -9540,41 +11462,107 @@ pub mod api { } } } - } - pub mod multisig { - use super::runtime_types; - pub mod calls { + pub mod constants { use super::runtime_types; - 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>, - pub call: runtime_types::polkadot_runtime::Call, - } - impl ::subxt::Call for AsMultiThreshold1 { - const PALLET: &'static str = "Multisig"; - const FUNCTION: &'static str = "as_multi_threshold1"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - >, - pub call: - ::subxt::WrapperKeepOpaque, - pub store_call: ::core::primitive::bool, - pub max_weight: ::core::primitive::u64, - } - impl ::subxt::Call for AsMulti { + pub struct ConstantsApi; + impl ConstantsApi { + pub fn proxy_deposit_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 132u8, 178u8, 149u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn proxy_deposit_factor( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 128u8, 102u8, 171u8, 19u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn max_proxies( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[32u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn max_pending( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[32u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn announcement_deposit_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 132u8, 178u8, 149u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn announcement_deposit_factor( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 205u8, 86u8, 39u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + } + } + } + pub mod multisig { + 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 as_multi_threshold_1 { + pub other_signatories: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub call: ::std::boxed::Box, + } + impl ::subxt::Call for as_multi_threshold_1 { + const PALLET: &'static str = "Multisig"; + const FUNCTION: &'static str = "as_multi_threshold_1"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct as_multi { + pub threshold: ::core::primitive::u16, + pub other_signatories: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + pub call: + ::subxt::WrapperKeepOpaque, + pub store_call: ::core::primitive::bool, + pub max_weight: ::core::primitive::u64, + } + impl ::subxt::Call for as_multi { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "as_multi"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ApproveAsMulti { + pub struct approve_as_multi { pub threshold: ::core::primitive::u16, pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, @@ -9584,12 +11572,12 @@ pub mod api { pub call_hash: [::core::primitive::u8; 32usize], pub max_weight: ::core::primitive::u64, } - impl ::subxt::Call for ApproveAsMulti { + impl ::subxt::Call for approve_as_multi { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "approve_as_multi"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelAsMulti { + pub struct cancel_as_multi { pub threshold: ::core::primitive::u16, pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, @@ -9597,7 +11585,7 @@ pub mod api { runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::Call for CancelAsMulti { + impl ::subxt::Call for cancel_as_multi { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "cancel_as_multi"; } @@ -9617,7 +11605,7 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn as_multi_threshold1( + pub fn as_multi_threshold_1( &self, other_signatories: ::std::vec::Vec< ::subxt::sp_core::crypto::AccountId32, @@ -9628,12 +11616,13 @@ pub mod api { T, X, A, - AsMultiThreshold1, + as_multi_threshold_1, DispatchError, + super::super::Event, > { - let call = AsMultiThreshold1 { + let call = as_multi_threshold_1 { other_signatories, - call, + call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -9651,9 +11640,16 @@ pub mod api { >, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AsMulti, DispatchError> - { - let call = AsMulti { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + as_multi, + DispatchError, + super::super::Event, + > { + let call = as_multi { threshold, other_signatories, maybe_timepoint, @@ -9679,10 +11675,11 @@ pub mod api { T, X, A, - ApproveAsMulti, + approve_as_multi, DispatchError, + super::super::Event, > { - let call = ApproveAsMulti { + let call = approve_as_multi { threshold, other_signatories, maybe_timepoint, @@ -9706,10 +11703,11 @@ pub mod api { T, X, A, - CancelAsMulti, + cancel_as_multi, DispatchError, + super::super::Event, > { - let call = CancelAsMulti { + let call = cancel_as_multi { threshold, other_signatories, timepoint, @@ -9723,45 +11721,49 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewMultisig( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::subxt::sp_core::crypto::AccountId32, - pub [::core::primitive::u8; 32usize], - ); + 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, Debug)] - 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], - ); + 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, Debug)] - 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>, - ); + 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, Debug)] - 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], - ); + 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"; @@ -9870,6 +11872,40 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn deposit_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 140u8, 97u8, 197u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn deposit_factor( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 208u8, 18u8, 19u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn max_signatories( + &self, + ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode(&mut &[100u8, 0u8][..])?) + } + } + } } pub mod bounties { use super::runtime_types; @@ -9877,26 +11913,26 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProposeBounty { + pub struct propose_bounty { #[codec(compact)] pub value: ::core::primitive::u128, pub description: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ProposeBounty { + impl ::subxt::Call for propose_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "propose_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ApproveBounty { + pub struct approve_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveBounty { + impl ::subxt::Call for approve_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "approve_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProposeCurator { + pub struct propose_curator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub curator: ::subxt::sp_runtime::MultiAddress< @@ -9906,30 +11942,30 @@ pub mod api { #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for ProposeCurator { + impl ::subxt::Call for propose_curator { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "propose_curator"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct UnassignCurator { + pub struct unassign_curator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for UnassignCurator { + impl ::subxt::Call for unassign_curator { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "unassign_curator"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AcceptCurator { + pub struct accept_curator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for AcceptCurator { + impl ::subxt::Call for accept_curator { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "accept_curator"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AwardBounty { + pub struct award_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub beneficiary: ::subxt::sp_runtime::MultiAddress< @@ -9937,35 +11973,35 @@ pub mod api { (), >, } - impl ::subxt::Call for AwardBounty { + impl ::subxt::Call for award_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "award_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ClaimBounty { + pub struct claim_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ClaimBounty { + impl ::subxt::Call for claim_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "claim_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CloseBounty { + pub struct close_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for CloseBounty { + impl ::subxt::Call for close_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "close_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ExtendBountyExpiry { + pub struct extend_bounty_expiry { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ExtendBountyExpiry { + impl ::subxt::Call for extend_bounty_expiry { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "extend_bounty_expiry"; } @@ -9994,10 +12030,11 @@ pub mod api { T, X, A, - ProposeBounty, + propose_bounty, DispatchError, + super::super::Event, > { - let call = ProposeBounty { value, description }; + let call = propose_bounty { value, description }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_bounty( @@ -10008,10 +12045,11 @@ pub mod api { T, X, A, - ApproveBounty, + approve_bounty, DispatchError, + super::super::Event, > { - let call = ApproveBounty { bounty_id }; + let call = approve_bounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn propose_curator( @@ -10027,10 +12065,11 @@ pub mod api { T, X, A, - ProposeCurator, + propose_curator, DispatchError, + super::super::Event, > { - let call = ProposeCurator { + let call = propose_curator { bounty_id, curator, fee, @@ -10045,10 +12084,11 @@ pub mod api { T, X, A, - UnassignCurator, + unassign_curator, DispatchError, + super::super::Event, > { - let call = UnassignCurator { bounty_id }; + let call = unassign_curator { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn accept_curator( @@ -10059,10 +12099,11 @@ pub mod api { T, X, A, - AcceptCurator, + accept_curator, DispatchError, + super::super::Event, > { - let call = AcceptCurator { bounty_id }; + let call = accept_curator { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn award_bounty( @@ -10072,9 +12113,16 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AwardBounty, DispatchError> - { - let call = AwardBounty { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + award_bounty, + DispatchError, + super::super::Event, + > { + let call = award_bounty { bounty_id, beneficiary, }; @@ -10083,17 +12131,31 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ClaimBounty, DispatchError> - { - let call = ClaimBounty { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + claim_bounty, + DispatchError, + super::super::Event, + > { + let call = claim_bounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, CloseBounty, DispatchError> - { - let call = CloseBounty { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + close_bounty, + DispatchError, + super::super::Event, + > { + let call = close_bounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn extend_bounty_expiry( @@ -10105,10 +12167,11 @@ pub mod api { T, X, A, - ExtendBountyExpiry, + extend_bounty_expiry, DispatchError, + super::super::Event, > { - let call = ExtendBountyExpiry { bounty_id, remark }; + let call = extend_bounty_expiry { bounty_id, remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -10116,54 +12179,82 @@ 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, Debug)] - pub struct BountyProposed(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct BountyRejected( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct BountyBecameActive(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct BountyAwarded( - pub ::core::primitive::u32, - pub ::subxt::sp_core::crypto::AccountId32, - ); + 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, Debug)] - pub struct BountyClaimed( - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::subxt::sp_core::crypto::AccountId32, - ); + 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, Debug)] - pub struct BountyCanceled(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct BountyExtended(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct BountyExtended { + pub index: ::core::primitive::u32, + } impl ::subxt::Event for BountyExtended { const PALLET: &'static str = "Bounties"; const EVENT: &'static str = "BountyExtended"; @@ -10290,6 +12381,79 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn bounty_deposit_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn bounty_deposit_payout_delay( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 194u8, 1u8, 0u8][..], + )?) + } + pub fn bounty_update_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[128u8, 198u8, 19u8, 0u8][..], + )?) + } + pub fn bounty_curator_deposit( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[32u8, 161u8, 7u8, 0u8][..], + )?) + } + pub fn bounty_value_minimum( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 232u8, 118u8, 72u8, 23u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn data_deposit_per_byte( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 225u8, 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn maximum_reason_length( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 64u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod tips { use super::runtime_types; @@ -10297,56 +12461,56 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ReportAwesome { + pub struct report_awesome { pub reason: ::std::vec::Vec<::core::primitive::u8>, pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ReportAwesome { + impl ::subxt::Call for report_awesome { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "report_awesome"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct RetractTip { + pub struct retract_tip { pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for RetractTip { + impl ::subxt::Call for retract_tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "retract_tip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TipNew { + pub struct tip_new { pub reason: ::std::vec::Vec<::core::primitive::u8>, pub who: ::subxt::sp_core::crypto::AccountId32, #[codec(compact)] pub tip_value: ::core::primitive::u128, } - impl ::subxt::Call for TipNew { + impl ::subxt::Call for tip_new { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "tip_new"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Tip { + pub struct tip { pub hash: ::subxt::sp_core::H256, #[codec(compact)] pub tip_value: ::core::primitive::u128, } - impl ::subxt::Call for Tip { + impl ::subxt::Call for tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "tip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CloseTip { + pub struct close_tip { pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for CloseTip { + impl ::subxt::Call for close_tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "close_tip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SlashTip { + pub struct slash_tip { pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for SlashTip { + impl ::subxt::Call for slash_tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "slash_tip"; } @@ -10375,18 +12539,26 @@ pub mod api { T, X, A, - ReportAwesome, + report_awesome, DispatchError, + super::super::Event, > { - let call = ReportAwesome { reason, who }; + let call = report_awesome { reason, who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn retract_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, RetractTip, DispatchError> - { - let call = RetractTip { hash }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + retract_tip, + DispatchError, + super::super::Event, + > { + let call = retract_tip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn tip_new( @@ -10394,9 +12566,16 @@ 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, X, A, TipNew, DispatchError> - { - let call = TipNew { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + tip_new, + DispatchError, + super::super::Event, + > { + let call = tip_new { reason, who, tip_value, @@ -10407,25 +12586,46 @@ pub mod api { &self, hash: ::subxt::sp_core::H256, tip_value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Tip, DispatchError> - { - let call = Tip { hash, tip_value }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + tip, + DispatchError, + super::super::Event, + > { + 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, X, A, CloseTip, DispatchError> - { - let call = CloseTip { hash }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + close_tip, + DispatchError, + super::super::Event, + > { + let call = close_tip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn slash_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, SlashTip, DispatchError> - { - let call = SlashTip { hash }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + slash_tip, + DispatchError, + super::super::Event, + > { + let call = slash_tip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -10434,39 +12634,45 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewTip(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct TipClosing(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct TipClosed( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct TipRetracted(pub ::subxt::sp_core::H256); + 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, Debug)] - pub struct TipSlashed( - pub ::subxt::sp_core::H256, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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"; @@ -10559,6 +12765,58 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn maximum_reason_length( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 64u8, 0u8, 0u8][..], + )?) + } + pub fn data_deposit_per_byte( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 225u8, 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn tip_countdown( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[64u8, 56u8, 0u8, 0u8][..], + )?) + } + pub fn tip_finders_fee( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Percent, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode(&mut &[20u8][..])?) + } + pub fn tip_report_deposit_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + } + } } pub mod election_provider_multi_phase { use super::runtime_types; @@ -10566,22 +12824,22 @@ pub mod api { use super::runtime_types; 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 { + pub struct submit_unsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } + impl ::subxt::Call for submit_unsigned { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "submit_unsigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMinimumUntrustedScore { + pub struct set_minimum_untrusted_score { pub maybe_next_score: ::core::option::Option<[::core::primitive::u128; 3usize]>, } - impl ::subxt::Call for SetMinimumUntrustedScore { + impl ::subxt::Call for set_minimum_untrusted_score { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "set_minimum_untrusted_score"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetEmergencyElectionResult { + pub struct set_emergency_election_result { pub supports: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::sp_npos_elections::Support< @@ -10589,19 +12847,20 @@ pub mod api { >, )>, } - impl ::subxt::Call for SetEmergencyElectionResult { + impl ::subxt::Call for set_emergency_election_result { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "set_emergency_election_result"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Submit { - pub raw_solution: + pub struct submit { + pub raw_solution: ::std::boxed::Box< runtime_types::pallet_election_provider_multi_phase::RawSolution< runtime_types::polkadot_runtime::NposCompactSolution16, >, + >, pub num_signed_submissions: ::core::primitive::u32, } - impl ::subxt::Call for Submit { + impl ::subxt::Call for submit { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "submit"; } @@ -10630,11 +12889,12 @@ pub mod api { T, X, A, - SubmitUnsigned, + submit_unsigned, DispatchError, + super::super::Event, > { - let call = SubmitUnsigned { - raw_solution, + let call = submit_unsigned { + raw_solution: ::std::boxed::Box::new(raw_solution), witness, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -10649,10 +12909,11 @@ pub mod api { T, X, A, - SetMinimumUntrustedScore, + set_minimum_untrusted_score, DispatchError, + super::super::Event, > { - let call = SetMinimumUntrustedScore { maybe_next_score }; + let call = set_minimum_untrusted_score { maybe_next_score }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_emergency_election_result( @@ -10668,20 +12929,28 @@ pub mod api { T, X, A, - SetEmergencyElectionResult, + set_emergency_election_result, DispatchError, + super::super::Event, > { - let call = SetEmergencyElectionResult { supports }; + let call = set_emergency_election_result { supports }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn submit( &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, X, A, Submit, DispatchError> - { - let call = Submit { - raw_solution, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + submit, + DispatchError, + super::super::Event, + > { + let call = submit { + raw_solution: ::std::boxed::Box::new(raw_solution), num_signed_submissions, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -10693,50 +12962,65 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SolutionStored( - pub runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub ::core::primitive::bool, - ); + 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, Debug)] - pub struct ElectionFinalized( - pub ::core::option::Option< + 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, Debug)] - pub struct Rewarded( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct Slashed( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + 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, Debug)] - pub struct SignedPhaseStarted(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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, Debug)] - pub struct UnsignedPhaseStarted(pub ::core::primitive::u32); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct UnsignedPhaseStarted { + pub round: ::core::primitive::u32, + } impl ::subxt::Event for UnsignedPhaseStarted { const PALLET: &'static str = "ElectionProviderMultiPhase"; const EVENT: &'static str = "UnsignedPhaseStarted"; @@ -10901,9 +13185,9 @@ pub mod api { } 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 < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > , :: subxt :: BasicError >{ + } 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 :: BasicError >{ 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, @@ -10926,6 +13210,138 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn unsigned_phase( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[88u8, 2u8, 0u8, 0u8][..], + )?) + } + pub fn signed_phase( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[88u8, 2u8, 0u8, 0u8][..], + )?) + } + pub fn solution_improvement_threshold( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[32u8, 161u8, 7u8, 0u8][..], + )?) + } + pub fn offchain_repeat( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[18u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn miner_tx_priority( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[101u8, 102u8, 102u8, 102u8, 102u8, 102u8, 102u8, 230u8][..], + )?) + } + pub fn miner_max_weight( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[192u8, 132u8, 102u8, 101u8, 87u8, 1u8, 0u8, 0u8][..], + )?) + } + pub fn signed_max_submissions( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[16u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn signed_max_weight( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[192u8, 132u8, 102u8, 101u8, 87u8, 1u8, 0u8, 0u8][..], + )?) + } + pub fn signed_reward_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn signed_deposit_base( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 160u8, 219u8, 33u8, 93u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn signed_deposit_byte( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 120u8, 125u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn signed_deposit_weight( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn voter_snapshot_per_block( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[228u8, 87u8, 0u8, 0u8][..], + )?) + } + pub fn miner_max_length( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 0u8, 54u8, 0u8][..], + )?) + } + } + } } pub mod bags_list { use super::runtime_types; @@ -10933,13 +13349,21 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rebag { + pub struct rebag { pub dislocated: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for Rebag { + 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 put_in_front_of { + pub lighter: ::subxt::sp_core::crypto::AccountId32, + } + impl ::subxt::Call for put_in_front_of { + 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)>, @@ -10959,9 +13383,31 @@ pub mod api { pub fn rebag( &self, dislocated: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Rebag, DispatchError> - { - let call = Rebag { dislocated }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + rebag, + DispatchError, + super::super::Event, + > { + 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, + put_in_front_of, + DispatchError, + super::super::Event, + > { + let call = put_in_front_of { lighter }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -10970,11 +13416,11 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Rebagged( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u64, - pub ::core::primitive::u64, - ); + 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"; @@ -11072,6 +13518,191 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn bag_thresholds( + &self, + ) -> ::core::result::Result< + ::std::vec::Vec<::core::primitive::u64>, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 33u8, 3u8, 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 243u8, + 158u8, 128u8, 151u8, 2u8, 0u8, 0u8, 0u8, 168u8, 177u8, 151u8, + 226u8, 2u8, 0u8, 0u8, 0u8, 148u8, 73u8, 46u8, 54u8, 3u8, 0u8, + 0u8, 0u8, 39u8, 156u8, 58u8, 147u8, 3u8, 0u8, 0u8, 0u8, 3u8, + 188u8, 206u8, 250u8, 3u8, 0u8, 0u8, 0u8, 66u8, 192u8, 27u8, + 110u8, 4u8, 0u8, 0u8, 0u8, 27u8, 71u8, 117u8, 238u8, 4u8, + 0u8, 0u8, 0u8, 56u8, 94u8, 85u8, 125u8, 5u8, 0u8, 0u8, 0u8, + 70u8, 220u8, 96u8, 28u8, 6u8, 0u8, 0u8, 0u8, 137u8, 56u8, + 108u8, 205u8, 6u8, 0u8, 0u8, 0u8, 182u8, 238u8, 128u8, 146u8, + 7u8, 0u8, 0u8, 0u8, 254u8, 126u8, 227u8, 109u8, 8u8, 0u8, + 0u8, 0u8, 232u8, 27u8, 26u8, 98u8, 9u8, 0u8, 0u8, 0u8, 176u8, + 25u8, 244u8, 113u8, 10u8, 0u8, 0u8, 0u8, 16u8, 53u8, 146u8, + 160u8, 11u8, 0u8, 0u8, 0u8, 207u8, 201u8, 111u8, 241u8, 12u8, + 0u8, 0u8, 0u8, 65u8, 20u8, 109u8, 104u8, 14u8, 0u8, 0u8, 0u8, + 231u8, 155u8, 218u8, 9u8, 16u8, 0u8, 0u8, 0u8, 206u8, 232u8, + 133u8, 218u8, 17u8, 0u8, 0u8, 0u8, 40u8, 169u8, 199u8, 223u8, + 19u8, 0u8, 0u8, 0u8, 187u8, 112u8, 147u8, 31u8, 22u8, 0u8, + 0u8, 0u8, 142u8, 64u8, 137u8, 160u8, 24u8, 0u8, 0u8, 0u8, + 129u8, 10u8, 9u8, 106u8, 27u8, 0u8, 0u8, 0u8, 54u8, 106u8, + 72u8, 132u8, 30u8, 0u8, 0u8, 0u8, 91u8, 211u8, 106u8, 248u8, + 33u8, 0u8, 0u8, 0u8, 128u8, 124u8, 156u8, 208u8, 37u8, 0u8, + 0u8, 0u8, 201u8, 85u8, 48u8, 24u8, 42u8, 0u8, 0u8, 0u8, + 189u8, 99u8, 193u8, 219u8, 46u8, 0u8, 0u8, 0u8, 113u8, 224u8, + 87u8, 41u8, 52u8, 0u8, 0u8, 0u8, 104u8, 144u8, 146u8, 16u8, + 58u8, 0u8, 0u8, 0u8, 237u8, 196u8, 212u8, 162u8, 64u8, 0u8, + 0u8, 0u8, 105u8, 147u8, 121u8, 243u8, 71u8, 0u8, 0u8, 0u8, + 143u8, 216u8, 12u8, 24u8, 80u8, 0u8, 0u8, 0u8, 75u8, 175u8, + 138u8, 40u8, 89u8, 0u8, 0u8, 0u8, 106u8, 22u8, 166u8, 63u8, + 99u8, 0u8, 0u8, 0u8, 9u8, 149u8, 23u8, 123u8, 110u8, 0u8, + 0u8, 0u8, 120u8, 197u8, 244u8, 251u8, 122u8, 0u8, 0u8, 0u8, + 98u8, 200u8, 17u8, 231u8, 136u8, 0u8, 0u8, 0u8, 81u8, 191u8, + 109u8, 101u8, 152u8, 0u8, 0u8, 0u8, 4u8, 142u8, 171u8, 164u8, + 169u8, 0u8, 0u8, 0u8, 84u8, 70u8, 152u8, 215u8, 188u8, 0u8, + 0u8, 0u8, 145u8, 202u8, 192u8, 54u8, 210u8, 0u8, 0u8, 0u8, + 23u8, 95u8, 24u8, 1u8, 234u8, 0u8, 0u8, 0u8, 189u8, 21u8, + 178u8, 124u8, 4u8, 1u8, 0u8, 0u8, 67u8, 53u8, 143u8, 247u8, + 33u8, 1u8, 0u8, 0u8, 184u8, 252u8, 132u8, 200u8, 66u8, 1u8, + 0u8, 0u8, 153u8, 103u8, 60u8, 80u8, 103u8, 1u8, 0u8, 0u8, + 7u8, 228u8, 78u8, 250u8, 143u8, 1u8, 0u8, 0u8, 179u8, 65u8, + 131u8, 62u8, 189u8, 1u8, 0u8, 0u8, 2u8, 127u8, 46u8, 162u8, + 239u8, 1u8, 0u8, 0u8, 152u8, 131u8, 188u8, 185u8, 39u8, 2u8, + 0u8, 0u8, 22u8, 77u8, 101u8, 42u8, 102u8, 2u8, 0u8, 0u8, + 180u8, 149u8, 19u8, 172u8, 171u8, 2u8, 0u8, 0u8, 45u8, 142u8, + 130u8, 11u8, 249u8, 2u8, 0u8, 0u8, 161u8, 230u8, 152u8, 44u8, + 79u8, 3u8, 0u8, 0u8, 166u8, 22u8, 8u8, 13u8, 175u8, 3u8, 0u8, + 0u8, 204u8, 157u8, 55u8, 199u8, 25u8, 4u8, 0u8, 0u8, 160u8, + 213u8, 132u8, 149u8, 144u8, 4u8, 0u8, 0u8, 66u8, 231u8, + 224u8, 213u8, 20u8, 5u8, 0u8, 0u8, 2u8, 140u8, 215u8, 13u8, + 168u8, 5u8, 0u8, 0u8, 15u8, 117u8, 10u8, 239u8, 75u8, 6u8, + 0u8, 0u8, 234u8, 141u8, 46u8, 92u8, 2u8, 7u8, 0u8, 0u8, + 195u8, 203u8, 153u8, 110u8, 205u8, 7u8, 0u8, 0u8, 177u8, + 229u8, 113u8, 124u8, 175u8, 8u8, 0u8, 0u8, 170u8, 43u8, + 142u8, 31u8, 171u8, 9u8, 0u8, 0u8, 181u8, 193u8, 32u8, 61u8, + 195u8, 10u8, 0u8, 0u8, 38u8, 208u8, 61u8, 14u8, 251u8, 11u8, + 0u8, 0u8, 112u8, 199u8, 89u8, 41u8, 86u8, 13u8, 0u8, 0u8, + 235u8, 173u8, 218u8, 140u8, 216u8, 14u8, 0u8, 0u8, 247u8, + 151u8, 219u8, 170u8, 134u8, 16u8, 0u8, 0u8, 207u8, 240u8, + 68u8, 118u8, 101u8, 18u8, 0u8, 0u8, 31u8, 38u8, 96u8, 113u8, + 122u8, 20u8, 0u8, 0u8, 9u8, 166u8, 17u8, 190u8, 203u8, 22u8, + 0u8, 0u8, 29u8, 251u8, 232u8, 47u8, 96u8, 25u8, 0u8, 0u8, + 148u8, 58u8, 60u8, 96u8, 63u8, 28u8, 0u8, 0u8, 138u8, 254u8, + 137u8, 196u8, 113u8, 31u8, 0u8, 0u8, 206u8, 217u8, 99u8, + 199u8, 0u8, 35u8, 0u8, 0u8, 3u8, 169u8, 42u8, 228u8, 246u8, + 38u8, 0u8, 0u8, 254u8, 114u8, 238u8, 197u8, 95u8, 43u8, 0u8, + 0u8, 54u8, 201u8, 204u8, 105u8, 72u8, 48u8, 0u8, 0u8, 218u8, + 227u8, 50u8, 69u8, 191u8, 53u8, 0u8, 0u8, 6u8, 42u8, 116u8, + 112u8, 212u8, 59u8, 0u8, 0u8, 124u8, 151u8, 50u8, 214u8, + 153u8, 66u8, 0u8, 0u8, 132u8, 163u8, 36u8, 104u8, 35u8, 74u8, + 0u8, 0u8, 87u8, 26u8, 212u8, 89u8, 135u8, 82u8, 0u8, 0u8, + 231u8, 241u8, 2u8, 98u8, 222u8, 91u8, 0u8, 0u8, 13u8, 184u8, + 118u8, 3u8, 68u8, 102u8, 0u8, 0u8, 174u8, 4u8, 1u8, 222u8, + 214u8, 113u8, 0u8, 0u8, 125u8, 158u8, 179u8, 8u8, 185u8, + 126u8, 0u8, 0u8, 30u8, 4u8, 74u8, 118u8, 16u8, 141u8, 0u8, + 0u8, 58u8, 29u8, 240u8, 100u8, 7u8, 157u8, 0u8, 0u8, 224u8, + 79u8, 175u8, 218u8, 204u8, 174u8, 0u8, 0u8, 86u8, 121u8, + 240u8, 47u8, 149u8, 194u8, 0u8, 0u8, 149u8, 195u8, 170u8, + 169u8, 154u8, 216u8, 0u8, 0u8, 150u8, 124u8, 5u8, 37u8, 30u8, + 241u8, 0u8, 0u8, 23u8, 122u8, 102u8, 214u8, 103u8, 12u8, 1u8, + 0u8, 40u8, 203u8, 31u8, 30u8, 200u8, 42u8, 1u8, 0u8, 250u8, + 40u8, 47u8, 117u8, 152u8, 76u8, 1u8, 0u8, 213u8, 125u8, + 200u8, 116u8, 60u8, 114u8, 1u8, 0u8, 125u8, 196u8, 179u8, + 251u8, 34u8, 156u8, 1u8, 0u8, 54u8, 92u8, 222u8, 116u8, + 199u8, 202u8, 1u8, 0u8, 158u8, 184u8, 225u8, 66u8, 179u8, + 254u8, 1u8, 0u8, 12u8, 49u8, 174u8, 84u8, 127u8, 56u8, 2u8, + 0u8, 95u8, 225u8, 1u8, 232u8, 213u8, 120u8, 2u8, 0u8, 99u8, + 115u8, 218u8, 126u8, 116u8, 192u8, 2u8, 0u8, 81u8, 209u8, + 166u8, 13u8, 46u8, 16u8, 3u8, 0u8, 199u8, 233u8, 164u8, + 104u8, 237u8, 104u8, 3u8, 0u8, 97u8, 192u8, 145u8, 247u8, + 183u8, 203u8, 3u8, 0u8, 191u8, 39u8, 161u8, 183u8, 176u8, + 57u8, 4u8, 0u8, 123u8, 20u8, 153u8, 148u8, 27u8, 180u8, 4u8, + 0u8, 133u8, 35u8, 237u8, 34u8, 97u8, 60u8, 5u8, 0u8, 105u8, + 165u8, 212u8, 197u8, 18u8, 212u8, 5u8, 0u8, 236u8, 140u8, + 147u8, 77u8, 239u8, 124u8, 6u8, 0u8, 245u8, 170u8, 144u8, + 27u8, 232u8, 56u8, 7u8, 0u8, 140u8, 190u8, 93u8, 219u8, 38u8, + 10u8, 8u8, 0u8, 2u8, 151u8, 140u8, 225u8, 19u8, 243u8, 8u8, + 0u8, 250u8, 227u8, 20u8, 67u8, 93u8, 246u8, 9u8, 0u8, 221u8, + 241u8, 45u8, 186u8, 254u8, 22u8, 11u8, 0u8, 46u8, 186u8, + 220u8, 111u8, 74u8, 88u8, 12u8, 0u8, 12u8, 85u8, 24u8, 196u8, + 242u8, 189u8, 13u8, 0u8, 240u8, 187u8, 84u8, 49u8, 21u8, + 76u8, 15u8, 0u8, 73u8, 142u8, 134u8, 107u8, 70u8, 7u8, 17u8, + 0u8, 178u8, 193u8, 83u8, 222u8, 159u8, 244u8, 18u8, 0u8, + 39u8, 138u8, 47u8, 178u8, 206u8, 25u8, 21u8, 0u8, 178u8, + 57u8, 159u8, 132u8, 36u8, 125u8, 23u8, 0u8, 225u8, 153u8, + 231u8, 4u8, 170u8, 37u8, 26u8, 0u8, 186u8, 19u8, 245u8, + 171u8, 51u8, 27u8, 29u8, 0u8, 38u8, 71u8, 133u8, 204u8, + 120u8, 102u8, 32u8, 0u8, 136u8, 191u8, 128u8, 63u8, 45u8, + 17u8, 36u8, 0u8, 28u8, 152u8, 35u8, 248u8, 29u8, 38u8, 40u8, + 0u8, 204u8, 196u8, 34u8, 212u8, 80u8, 177u8, 44u8, 0u8, + 240u8, 136u8, 130u8, 5u8, 40u8, 192u8, 49u8, 0u8, 54u8, + 124u8, 109u8, 126u8, 137u8, 97u8, 55u8, 0u8, 110u8, 147u8, + 41u8, 211u8, 10u8, 166u8, 61u8, 0u8, 140u8, 188u8, 108u8, + 19u8, 34u8, 160u8, 68u8, 0u8, 0u8, 112u8, 243u8, 42u8, 92u8, + 100u8, 76u8, 0u8, 180u8, 59u8, 132u8, 105u8, 153u8, 9u8, + 85u8, 0u8, 128u8, 180u8, 171u8, 228u8, 80u8, 169u8, 94u8, + 0u8, 160u8, 205u8, 169u8, 121u8, 219u8, 95u8, 105u8, 0u8, + 76u8, 194u8, 127u8, 76u8, 199u8, 76u8, 117u8, 0u8, 208u8, + 172u8, 14u8, 186u8, 52u8, 147u8, 130u8, 0u8, 72u8, 62u8, + 12u8, 207u8, 61u8, 90u8, 145u8, 0u8, 104u8, 198u8, 142u8, + 116u8, 105u8, 205u8, 161u8, 0u8, 40u8, 30u8, 111u8, 165u8, + 43u8, 29u8, 180u8, 0u8, 152u8, 169u8, 35u8, 38u8, 116u8, + 127u8, 200u8, 0u8, 240u8, 154u8, 116u8, 99u8, 77u8, 48u8, + 223u8, 0u8, 128u8, 205u8, 252u8, 75u8, 141u8, 114u8, 248u8, + 0u8, 144u8, 20u8, 96u8, 45u8, 154u8, 144u8, 20u8, 1u8, 240u8, + 180u8, 19u8, 217u8, 69u8, 221u8, 51u8, 1u8, 32u8, 151u8, + 53u8, 150u8, 193u8, 180u8, 86u8, 1u8, 80u8, 220u8, 251u8, + 174u8, 173u8, 125u8, 125u8, 1u8, 224u8, 17u8, 152u8, 185u8, + 71u8, 170u8, 168u8, 1u8, 48u8, 199u8, 238u8, 22u8, 187u8, + 185u8, 216u8, 1u8, 32u8, 110u8, 72u8, 134u8, 151u8, 57u8, + 14u8, 2u8, 160u8, 250u8, 75u8, 29u8, 114u8, 199u8, 73u8, 2u8, + 192u8, 17u8, 113u8, 112u8, 181u8, 18u8, 140u8, 2u8, 128u8, + 138u8, 22u8, 67u8, 166u8, 222u8, 213u8, 2u8, 192u8, 248u8, + 35u8, 177u8, 162u8, 4u8, 40u8, 3u8, 128u8, 175u8, 89u8, + 112u8, 162u8, 118u8, 131u8, 3u8, 192u8, 111u8, 45u8, 135u8, + 255u8, 65u8, 233u8, 3u8, 64u8, 147u8, 127u8, 172u8, 143u8, + 146u8, 90u8, 4u8, 0u8, 145u8, 9u8, 113u8, 23u8, 182u8, 216u8, + 4u8, 64u8, 15u8, 223u8, 91u8, 33u8, 32u8, 101u8, 5u8, 0u8, + 73u8, 193u8, 73u8, 68u8, 110u8, 1u8, 6u8, 0u8, 142u8, 188u8, + 166u8, 229u8, 108u8, 175u8, 6u8, 0u8, 89u8, 86u8, 134u8, + 133u8, 28u8, 113u8, 7u8, 128u8, 104u8, 170u8, 52u8, 164u8, + 183u8, 72u8, 8u8, 128u8, 161u8, 226u8, 158u8, 82u8, 185u8, + 56u8, 9u8, 0u8, 189u8, 171u8, 232u8, 128u8, 228u8, 67u8, + 10u8, 0u8, 42u8, 114u8, 180u8, 32u8, 76u8, 109u8, 11u8, + 128u8, 241u8, 192u8, 19u8, 51u8, 92u8, 184u8, 12u8, 0u8, + 160u8, 60u8, 203u8, 220u8, 227u8, 40u8, 14u8, 128u8, 184u8, + 98u8, 154u8, 158u8, 32u8, 195u8, 15u8, 0u8, 222u8, 86u8, + 147u8, 210u8, 202u8, 139u8, 17u8, 0u8, 93u8, 127u8, 76u8, + 147u8, 35u8, 136u8, 19u8, 0u8, 26u8, 135u8, 223u8, 53u8, 4u8, + 190u8, 21u8, 0u8, 167u8, 206u8, 75u8, 132u8, 239u8, 51u8, + 24u8, 0u8, 1u8, 16u8, 251u8, 234u8, 36u8, 241u8, 26u8, 0u8, + 128u8, 42u8, 229u8, 209u8, 181u8, 253u8, 29u8, 0u8, 34u8, + 161u8, 52u8, 96u8, 157u8, 98u8, 33u8, 0u8, 68u8, 33u8, 107u8, + 240u8, 218u8, 41u8, 37u8, 0u8, 2u8, 97u8, 241u8, 130u8, + 143u8, 94u8, 41u8, 0u8, 102u8, 32u8, 207u8, 133u8, 30u8, + 13u8, 46u8, 0u8, 132u8, 16u8, 25u8, 82u8, 82u8, 67u8, 51u8, + 0u8, 160u8, 193u8, 143u8, 202u8, 132u8, 16u8, 57u8, 0u8, + 38u8, 173u8, 20u8, 147u8, 204u8, 133u8, 63u8, 0u8, 208u8, + 205u8, 36u8, 102u8, 47u8, 182u8, 70u8, 0u8, 156u8, 225u8, + 154u8, 28u8, 218u8, 182u8, 78u8, 0u8, 88u8, 204u8, 194u8, + 12u8, 95u8, 159u8, 87u8, 0u8, 32u8, 10u8, 117u8, 120u8, + 251u8, 137u8, 97u8, 0u8, 48u8, 187u8, 187u8, 214u8, 228u8, + 147u8, 108u8, 0u8, 96u8, 203u8, 167u8, 220u8, 158u8, 221u8, + 120u8, 0u8, 184u8, 59u8, 192u8, 66u8, 91u8, 139u8, 134u8, + 0u8, 184u8, 134u8, 35u8, 97u8, 100u8, 197u8, 149u8, 0u8, + 248u8, 241u8, 95u8, 220u8, 147u8, 184u8, 166u8, 0u8, 32u8, + 106u8, 145u8, 192u8, 214u8, 150u8, 185u8, 0u8, 216u8, 239u8, + 226u8, 143u8, 192u8, 151u8, 206u8, 0u8, 104u8, 41u8, 155u8, + 245u8, 46u8, 249u8, 229u8, 255u8, 255u8, 255u8, 255u8, 255u8, + 255u8, 255u8, 255u8, + ][..], + )?) + } + } + } } pub mod parachains_origin { use super::runtime_types; @@ -11081,337 +13712,574 @@ pub mod api { pub mod calls { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetValidationUpgradeFrequency { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_validation_upgrade_cooldown { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidationUpgradeFrequency { + impl ::subxt::Call for set_validation_upgrade_cooldown { 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, Debug)] - pub struct SetValidationUpgradeDelay { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_validation_upgrade_delay { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidationUpgradeDelay { + impl ::subxt::Call for set_validation_upgrade_delay { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_validation_upgrade_delay"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetCodeRetentionPeriod { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_code_retention_period { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetCodeRetentionPeriod { + impl ::subxt::Call for set_code_retention_period { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_code_retention_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxCodeSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_code_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxCodeSize { + impl ::subxt::Call for set_max_code_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_code_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxPovSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_pov_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxPovSize { + impl ::subxt::Call for set_max_pov_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_pov_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxHeadDataSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_head_data_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxHeadDataSize { + impl ::subxt::Call for set_max_head_data_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_head_data_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetParathreadCores { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_parathread_cores { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetParathreadCores { + impl ::subxt::Call for set_parathread_cores { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_parathread_cores"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetParathreadRetries { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_parathread_retries { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetParathreadRetries { + impl ::subxt::Call for set_parathread_retries { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_parathread_retries"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetGroupRotationFrequency { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_group_rotation_frequency { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetGroupRotationFrequency { + impl ::subxt::Call for set_group_rotation_frequency { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_group_rotation_frequency"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetChainAvailabilityPeriod { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_chain_availability_period { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetChainAvailabilityPeriod { + impl ::subxt::Call for set_chain_availability_period { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_chain_availability_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetThreadAvailabilityPeriod { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_thread_availability_period { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetThreadAvailabilityPeriod { + impl ::subxt::Call for set_thread_availability_period { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_thread_availability_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetSchedulingLookahead { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_scheduling_lookahead { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetSchedulingLookahead { + impl ::subxt::Call for set_scheduling_lookahead { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_scheduling_lookahead"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxValidatorsPerCore { + pub struct set_max_validators_per_core { pub new: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for SetMaxValidatorsPerCore { + impl ::subxt::Call for set_max_validators_per_core { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_validators_per_core"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxValidators { + pub struct set_max_validators { pub new: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for SetMaxValidators { + impl ::subxt::Call for set_max_validators { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_validators"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetDisputePeriod { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_dispute_period { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputePeriod { + impl ::subxt::Call for set_dispute_period { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_dispute_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetDisputePostConclusionAcceptancePeriod { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_dispute_post_conclusion_acceptance_period { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputePostConclusionAcceptancePeriod { + impl ::subxt::Call for set_dispute_post_conclusion_acceptance_period { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_dispute_post_conclusion_acceptance_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetDisputeMaxSpamSlots { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_dispute_max_spam_slots { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputeMaxSpamSlots { + impl ::subxt::Call for set_dispute_max_spam_slots { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_dispute_max_spam_slots"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetDisputeConclusionByTimeOutPeriod { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_dispute_conclusion_by_time_out_period { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetDisputeConclusionByTimeOutPeriod { + impl ::subxt::Call for set_dispute_conclusion_by_time_out_period { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_dispute_conclusion_by_time_out_period"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetNoShowSlots { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_no_show_slots { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetNoShowSlots { + impl ::subxt::Call for set_no_show_slots { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_no_show_slots"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetNDelayTranches { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_n_delay_tranches { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetNDelayTranches { + impl ::subxt::Call for set_n_delay_tranches { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_n_delay_tranches"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetZerothDelayTrancheWidth { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_zeroth_delay_tranche_width { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetZerothDelayTrancheWidth { + impl ::subxt::Call for set_zeroth_delay_tranche_width { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_zeroth_delay_tranche_width"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetNeededApprovals { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_needed_approvals { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetNeededApprovals { + impl ::subxt::Call for set_needed_approvals { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_needed_approvals"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetRelayVrfModuloSamples { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_relay_vrf_modulo_samples { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetRelayVrfModuloSamples { + impl ::subxt::Call for set_relay_vrf_modulo_samples { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_relay_vrf_modulo_samples"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxUpwardQueueCount { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_upward_queue_count { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardQueueCount { + impl ::subxt::Call for set_max_upward_queue_count { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_queue_count"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxUpwardQueueSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_upward_queue_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardQueueSize { + impl ::subxt::Call for set_max_upward_queue_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_queue_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxDownwardMessageSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_downward_message_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxDownwardMessageSize { + impl ::subxt::Call for set_max_downward_message_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_downward_message_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetUmpServiceTotalWeight { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_ump_service_total_weight { pub new: ::core::primitive::u64, } - impl ::subxt::Call for SetUmpServiceTotalWeight { + impl ::subxt::Call for set_ump_service_total_weight { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_ump_service_total_weight"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxUpwardMessageSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_upward_message_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardMessageSize { + impl ::subxt::Call for set_max_upward_message_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_message_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetMaxUpwardMessageNumPerCandidate { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_max_upward_message_num_per_candidate { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxUpwardMessageNumPerCandidate { + impl ::subxt::Call for set_max_upward_message_num_per_candidate { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_max_upward_message_num_per_candidate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpOpenRequestTtl { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_open_request_ttl { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpOpenRequestTtl { + impl ::subxt::Call for set_hrmp_open_request_ttl { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_open_request_ttl"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpSenderDeposit { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_sender_deposit { pub new: ::core::primitive::u128, } - impl ::subxt::Call for SetHrmpSenderDeposit { + impl ::subxt::Call for set_hrmp_sender_deposit { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_sender_deposit"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpRecipientDeposit { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_recipient_deposit { pub new: ::core::primitive::u128, } - impl ::subxt::Call for SetHrmpRecipientDeposit { + impl ::subxt::Call for set_hrmp_recipient_deposit { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_recipient_deposit"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpChannelMaxCapacity { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_channel_max_capacity { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpChannelMaxCapacity { + impl ::subxt::Call for set_hrmp_channel_max_capacity { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_channel_max_capacity"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpChannelMaxTotalSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_channel_max_total_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpChannelMaxTotalSize { + impl ::subxt::Call for set_hrmp_channel_max_total_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_channel_max_total_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpMaxParachainInboundChannels { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_max_parachain_inbound_channels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParachainInboundChannels { + impl ::subxt::Call for set_hrmp_max_parachain_inbound_channels { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parachain_inbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpMaxParathreadInboundChannels { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_max_parathread_inbound_channels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParathreadInboundChannels { + impl ::subxt::Call for set_hrmp_max_parathread_inbound_channels { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parathread_inbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpChannelMaxMessageSize { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_channel_max_message_size { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpChannelMaxMessageSize { + impl ::subxt::Call for set_hrmp_channel_max_message_size { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_channel_max_message_size"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpMaxParachainOutboundChannels { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_max_parachain_outbound_channels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParachainOutboundChannels { + impl ::subxt::Call for set_hrmp_max_parachain_outbound_channels { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parachain_outbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpMaxParathreadOutboundChannels { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_max_parathread_outbound_channels { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxParathreadOutboundChannels { + impl ::subxt::Call for set_hrmp_max_parathread_outbound_channels { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_parathread_outbound_channels"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetHrmpMaxMessageNumPerCandidate { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_hrmp_max_message_num_per_candidate { pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetHrmpMaxMessageNumPerCandidate { + impl ::subxt::Call for set_hrmp_max_message_num_per_candidate { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_hrmp_max_message_num_per_candidate"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct SetUmpMaxIndividualWeight { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_ump_max_individual_weight { pub new: ::core::primitive::u64, } - impl ::subxt::Call for SetUmpMaxIndividualWeight { + impl ::subxt::Call for set_ump_max_individual_weight { const PALLET: &'static str = "Configuration"; const FUNCTION: &'static str = "set_ump_max_individual_weight"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct set_pvf_checking_enabled { + pub new: ::core::primitive::bool, + } + impl ::subxt::Call for set_pvf_checking_enabled { + const PALLET: &'static str = "Configuration"; + const FUNCTION: &'static str = "set_pvf_checking_enabled"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_pvf_voting_ttl { + pub new: ::core::primitive::u32, + } + impl ::subxt::Call for set_pvf_voting_ttl { + const PALLET: &'static str = "Configuration"; + const FUNCTION: &'static str = "set_pvf_voting_ttl"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct set_minimum_validation_upgrade_delay { + pub new: ::core::primitive::u32, + } + impl ::subxt::Call for set_minimum_validation_upgrade_delay { + const PALLET: &'static str = "Configuration"; + const FUNCTION: &'static str = "set_minimum_validation_upgrade_delay"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct set_bypass_consistency_check { + pub new: ::core::primitive::bool, + } + impl ::subxt::Call for set_bypass_consistency_check { + 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)>, @@ -11428,7 +14296,7 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn set_validation_upgrade_frequency( + pub fn set_validation_upgrade_cooldown( &self, new: ::core::primitive::u32, ) -> ::subxt::SubmittableExtrinsic< @@ -11436,10 +14304,11 @@ pub mod api { T, X, A, - SetValidationUpgradeFrequency, + set_validation_upgrade_cooldown, DispatchError, + super::super::Event, > { - let call = SetValidationUpgradeFrequency { new }; + let call = set_validation_upgrade_cooldown { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_validation_upgrade_delay( @@ -11450,10 +14319,11 @@ pub mod api { T, X, A, - SetValidationUpgradeDelay, + set_validation_upgrade_delay, DispatchError, + super::super::Event, > { - let call = SetValidationUpgradeDelay { new }; + let call = set_validation_upgrade_delay { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_code_retention_period( @@ -11464,10 +14334,11 @@ pub mod api { T, X, A, - SetCodeRetentionPeriod, + set_code_retention_period, DispatchError, + super::super::Event, > { - let call = SetCodeRetentionPeriod { new }; + let call = set_code_retention_period { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_code_size( @@ -11478,10 +14349,11 @@ pub mod api { T, X, A, - SetMaxCodeSize, + set_max_code_size, DispatchError, + super::super::Event, > { - let call = SetMaxCodeSize { new }; + let call = set_max_code_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_pov_size( @@ -11492,10 +14364,11 @@ pub mod api { T, X, A, - SetMaxPovSize, + set_max_pov_size, DispatchError, + super::super::Event, > { - let call = SetMaxPovSize { new }; + let call = set_max_pov_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_head_data_size( @@ -11506,10 +14379,11 @@ pub mod api { T, X, A, - SetMaxHeadDataSize, + set_max_head_data_size, DispatchError, + super::super::Event, > { - let call = SetMaxHeadDataSize { new }; + let call = set_max_head_data_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_parathread_cores( @@ -11520,10 +14394,11 @@ pub mod api { T, X, A, - SetParathreadCores, + set_parathread_cores, DispatchError, + super::super::Event, > { - let call = SetParathreadCores { new }; + let call = set_parathread_cores { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_parathread_retries( @@ -11534,10 +14409,11 @@ pub mod api { T, X, A, - SetParathreadRetries, + set_parathread_retries, DispatchError, + super::super::Event, > { - let call = SetParathreadRetries { new }; + let call = set_parathread_retries { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_group_rotation_frequency( @@ -11548,10 +14424,11 @@ pub mod api { T, X, A, - SetGroupRotationFrequency, + set_group_rotation_frequency, DispatchError, + super::super::Event, > { - let call = SetGroupRotationFrequency { new }; + let call = set_group_rotation_frequency { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_chain_availability_period( @@ -11562,10 +14439,11 @@ pub mod api { T, X, A, - SetChainAvailabilityPeriod, + set_chain_availability_period, DispatchError, + super::super::Event, > { - let call = SetChainAvailabilityPeriod { new }; + let call = set_chain_availability_period { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_thread_availability_period( @@ -11576,10 +14454,11 @@ pub mod api { T, X, A, - SetThreadAvailabilityPeriod, + set_thread_availability_period, DispatchError, + super::super::Event, > { - let call = SetThreadAvailabilityPeriod { new }; + let call = set_thread_availability_period { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_scheduling_lookahead( @@ -11590,10 +14469,11 @@ pub mod api { T, X, A, - SetSchedulingLookahead, + set_scheduling_lookahead, DispatchError, + super::super::Event, > { - let call = SetSchedulingLookahead { new }; + let call = set_scheduling_lookahead { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_validators_per_core( @@ -11604,10 +14484,11 @@ pub mod api { T, X, A, - SetMaxValidatorsPerCore, + set_max_validators_per_core, DispatchError, + super::super::Event, > { - let call = SetMaxValidatorsPerCore { new }; + let call = set_max_validators_per_core { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_validators( @@ -11618,10 +14499,11 @@ pub mod api { T, X, A, - SetMaxValidators, + set_max_validators, DispatchError, + super::super::Event, > { - let call = SetMaxValidators { new }; + let call = set_max_validators { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_dispute_period( @@ -11632,10 +14514,11 @@ pub mod api { T, X, A, - SetDisputePeriod, + set_dispute_period, DispatchError, + super::super::Event, > { - let call = SetDisputePeriod { new }; + let call = set_dispute_period { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_dispute_post_conclusion_acceptance_period( @@ -11646,10 +14529,11 @@ pub mod api { T, X, A, - SetDisputePostConclusionAcceptancePeriod, + set_dispute_post_conclusion_acceptance_period, DispatchError, + super::super::Event, > { - let call = SetDisputePostConclusionAcceptancePeriod { new }; + let call = set_dispute_post_conclusion_acceptance_period { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_dispute_max_spam_slots( @@ -11660,10 +14544,11 @@ pub mod api { T, X, A, - SetDisputeMaxSpamSlots, + set_dispute_max_spam_slots, DispatchError, + super::super::Event, > { - let call = SetDisputeMaxSpamSlots { new }; + let call = set_dispute_max_spam_slots { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_dispute_conclusion_by_time_out_period( @@ -11674,10 +14559,11 @@ pub mod api { T, X, A, - SetDisputeConclusionByTimeOutPeriod, + set_dispute_conclusion_by_time_out_period, DispatchError, + super::super::Event, > { - let call = SetDisputeConclusionByTimeOutPeriod { new }; + let call = set_dispute_conclusion_by_time_out_period { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_no_show_slots( @@ -11688,10 +14574,11 @@ pub mod api { T, X, A, - SetNoShowSlots, + set_no_show_slots, DispatchError, + super::super::Event, > { - let call = SetNoShowSlots { new }; + let call = set_no_show_slots { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_n_delay_tranches( @@ -11702,10 +14589,11 @@ pub mod api { T, X, A, - SetNDelayTranches, + set_n_delay_tranches, DispatchError, + super::super::Event, > { - let call = SetNDelayTranches { new }; + let call = set_n_delay_tranches { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_zeroth_delay_tranche_width( @@ -11716,10 +14604,11 @@ pub mod api { T, X, A, - SetZerothDelayTrancheWidth, + set_zeroth_delay_tranche_width, DispatchError, + super::super::Event, > { - let call = SetZerothDelayTrancheWidth { new }; + let call = set_zeroth_delay_tranche_width { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_needed_approvals( @@ -11730,10 +14619,11 @@ pub mod api { T, X, A, - SetNeededApprovals, + set_needed_approvals, DispatchError, + super::super::Event, > { - let call = SetNeededApprovals { new }; + let call = set_needed_approvals { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_relay_vrf_modulo_samples( @@ -11744,10 +14634,11 @@ pub mod api { T, X, A, - SetRelayVrfModuloSamples, + set_relay_vrf_modulo_samples, DispatchError, + super::super::Event, > { - let call = SetRelayVrfModuloSamples { new }; + let call = set_relay_vrf_modulo_samples { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_queue_count( @@ -11758,10 +14649,11 @@ pub mod api { T, X, A, - SetMaxUpwardQueueCount, + set_max_upward_queue_count, DispatchError, + super::super::Event, > { - let call = SetMaxUpwardQueueCount { new }; + let call = set_max_upward_queue_count { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_queue_size( @@ -11772,10 +14664,11 @@ pub mod api { T, X, A, - SetMaxUpwardQueueSize, + set_max_upward_queue_size, DispatchError, + super::super::Event, > { - let call = SetMaxUpwardQueueSize { new }; + let call = set_max_upward_queue_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_downward_message_size( @@ -11786,10 +14679,11 @@ pub mod api { T, X, A, - SetMaxDownwardMessageSize, + set_max_downward_message_size, DispatchError, + super::super::Event, > { - let call = SetMaxDownwardMessageSize { new }; + let call = set_max_downward_message_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_ump_service_total_weight( @@ -11800,10 +14694,11 @@ pub mod api { T, X, A, - SetUmpServiceTotalWeight, + set_ump_service_total_weight, DispatchError, + super::super::Event, > { - let call = SetUmpServiceTotalWeight { new }; + let call = set_ump_service_total_weight { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_message_size( @@ -11814,10 +14709,11 @@ pub mod api { T, X, A, - SetMaxUpwardMessageSize, + set_max_upward_message_size, DispatchError, + super::super::Event, > { - let call = SetMaxUpwardMessageSize { new }; + let call = set_max_upward_message_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_upward_message_num_per_candidate( @@ -11828,10 +14724,11 @@ pub mod api { T, X, A, - SetMaxUpwardMessageNumPerCandidate, + set_max_upward_message_num_per_candidate, DispatchError, + super::super::Event, > { - let call = SetMaxUpwardMessageNumPerCandidate { new }; + let call = set_max_upward_message_num_per_candidate { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_open_request_ttl( @@ -11842,10 +14739,11 @@ pub mod api { T, X, A, - SetHrmpOpenRequestTtl, + set_hrmp_open_request_ttl, DispatchError, + super::super::Event, > { - let call = SetHrmpOpenRequestTtl { new }; + let call = set_hrmp_open_request_ttl { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_sender_deposit( @@ -11856,10 +14754,11 @@ pub mod api { T, X, A, - SetHrmpSenderDeposit, + set_hrmp_sender_deposit, DispatchError, + super::super::Event, > { - let call = SetHrmpSenderDeposit { new }; + let call = set_hrmp_sender_deposit { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_recipient_deposit( @@ -11870,10 +14769,11 @@ pub mod api { T, X, A, - SetHrmpRecipientDeposit, + set_hrmp_recipient_deposit, DispatchError, + super::super::Event, > { - let call = SetHrmpRecipientDeposit { new }; + let call = set_hrmp_recipient_deposit { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_channel_max_capacity( @@ -11884,10 +14784,11 @@ pub mod api { T, X, A, - SetHrmpChannelMaxCapacity, + set_hrmp_channel_max_capacity, DispatchError, + super::super::Event, > { - let call = SetHrmpChannelMaxCapacity { new }; + let call = set_hrmp_channel_max_capacity { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_channel_max_total_size( @@ -11898,10 +14799,11 @@ pub mod api { T, X, A, - SetHrmpChannelMaxTotalSize, + set_hrmp_channel_max_total_size, DispatchError, + super::super::Event, > { - let call = SetHrmpChannelMaxTotalSize { new }; + let call = set_hrmp_channel_max_total_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_max_parachain_inbound_channels( @@ -11912,10 +14814,11 @@ pub mod api { T, X, A, - SetHrmpMaxParachainInboundChannels, + set_hrmp_max_parachain_inbound_channels, DispatchError, + super::super::Event, > { - let call = SetHrmpMaxParachainInboundChannels { new }; + let call = set_hrmp_max_parachain_inbound_channels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_max_parathread_inbound_channels( @@ -11926,10 +14829,11 @@ pub mod api { T, X, A, - SetHrmpMaxParathreadInboundChannels, + set_hrmp_max_parathread_inbound_channels, DispatchError, + super::super::Event, > { - let call = SetHrmpMaxParathreadInboundChannels { new }; + let call = set_hrmp_max_parathread_inbound_channels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_channel_max_message_size( @@ -11940,10 +14844,11 @@ pub mod api { T, X, A, - SetHrmpChannelMaxMessageSize, + set_hrmp_channel_max_message_size, DispatchError, + super::super::Event, > { - let call = SetHrmpChannelMaxMessageSize { new }; + let call = set_hrmp_channel_max_message_size { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_max_parachain_outbound_channels( @@ -11954,10 +14859,11 @@ pub mod api { T, X, A, - SetHrmpMaxParachainOutboundChannels, + set_hrmp_max_parachain_outbound_channels, DispatchError, + super::super::Event, > { - let call = SetHrmpMaxParachainOutboundChannels { new }; + let call = set_hrmp_max_parachain_outbound_channels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_max_parathread_outbound_channels( @@ -11968,10 +14874,11 @@ pub mod api { T, X, A, - SetHrmpMaxParathreadOutboundChannels, + set_hrmp_max_parathread_outbound_channels, DispatchError, + super::super::Event, > { - let call = SetHrmpMaxParathreadOutboundChannels { new }; + let call = set_hrmp_max_parathread_outbound_channels { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_hrmp_max_message_num_per_candidate( @@ -11982,10 +14889,11 @@ pub mod api { T, X, A, - SetHrmpMaxMessageNumPerCandidate, + set_hrmp_max_message_num_per_candidate, DispatchError, + super::super::Event, > { - let call = SetHrmpMaxMessageNumPerCandidate { new }; + let call = set_hrmp_max_message_num_per_candidate { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_ump_max_individual_weight( @@ -11996,37 +14904,116 @@ pub mod api { T, X, A, - SetUmpMaxIndividualWeight, + set_ump_max_individual_weight, DispatchError, + super::super::Event, > { - let call = SetUmpMaxIndividualWeight { new }; + let call = set_ump_max_individual_weight { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - } - } - pub mod storage { - use super::runtime_types; - pub struct ActiveConfig; - impl ::subxt::StorageEntry for ActiveConfig { - const PALLET: &'static str = "Configuration"; - const STORAGE: &'static str = "ActiveConfig"; - type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct PendingConfig(pub ::core::primitive::u32); - 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 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) + pub fn set_pvf_checking_enabled( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_pvf_checking_enabled, + DispatchError, + super::super::Event, + > { + let call = set_pvf_checking_enabled { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - } + pub fn set_pvf_voting_ttl( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_pvf_voting_ttl, + DispatchError, + super::super::Event, + > { + let call = set_pvf_voting_ttl { 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, + set_minimum_validation_upgrade_delay, + DispatchError, + super::super::Event, + > { + let call = set_minimum_validation_upgrade_delay { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_bypass_consistency_check( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_bypass_consistency_check, + DispatchError, + super::super::Event, + > { + let call = set_bypass_consistency_check { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct ActiveConfig; + impl ::subxt::StorageEntry for ActiveConfig { + const PALLET: &'static str = "Configuration"; + const STORAGE: &'static str = "ActiveConfig"; + type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct PendingConfig(pub ::core::primitive::u32); + 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 > ; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Twox64Concat, + )]) + } + } + 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, } @@ -12036,7 +15023,7 @@ pub mod api { } 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 :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ + } 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 :: BasicError >{ let entry = PendingConfig(_0); self.client.storage().fetch(&entry, hash).await } @@ -12048,6 +15035,17 @@ pub mod api { ::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 :: BasicError >{ + 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::BasicError> + { + let entry = BypassConsistencyCheck; + self.client.storage().fetch_or_default(&entry, hash).await } } } @@ -12326,7 +15324,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Enter { + pub struct enter { pub data: runtime_types::polkadot_primitives::v1::InherentData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, @@ -12334,7 +15332,7 @@ pub mod api { >, >, } - impl ::subxt::Call for Enter { + impl ::subxt::Call for enter { const PALLET: &'static str = "ParaInherent"; const FUNCTION: &'static str = "enter"; } @@ -12362,9 +15360,16 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Enter, DispatchError> - { - let call = Enter { data }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + enter, + DispatchError, + super::super::Event, + > { + let call = enter { data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -12560,52 +15565,80 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceSetCurrentCode { + pub struct force_set_current_code { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for ForceSetCurrentCode { + impl ::subxt::Call for force_set_current_code { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_set_current_code"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceSetCurrentHead { + pub struct force_set_current_head { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, } - impl ::subxt::Call for ForceSetCurrentHead { + impl ::subxt::Call for force_set_current_head { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_set_current_head"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceScheduleCodeUpgrade { + pub struct force_schedule_code_upgrade { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, pub relay_parent_number: ::core::primitive::u32, } - impl ::subxt::Call for ForceScheduleCodeUpgrade { + impl ::subxt::Call for force_schedule_code_upgrade { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_schedule_code_upgrade"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceNoteNewHead { + pub struct force_note_new_head { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, } - impl ::subxt::Call for ForceNoteNewHead { + impl ::subxt::Call for force_note_new_head { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_note_new_head"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceQueueAction { + pub struct force_queue_action { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ForceQueueAction { + impl ::subxt::Call for force_queue_action { const PALLET: &'static str = "Paras"; const FUNCTION: &'static str = "force_queue_action"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct add_trusted_validation_code { + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + } + impl ::subxt::Call for add_trusted_validation_code { + const PALLET: &'static str = "Paras"; + const FUNCTION: &'static str = "add_trusted_validation_code"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct poke_unused_validation_code { + pub validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + } + impl ::subxt::Call for poke_unused_validation_code { + const PALLET: &'static str = "Paras"; + const FUNCTION: &'static str = "poke_unused_validation_code"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct include_pvf_check_statement { + pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, + pub signature: + runtime_types::polkadot_primitives::v0::validator_app::Signature, + } + impl ::subxt::Call for include_pvf_check_statement { + 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)>, @@ -12631,10 +15664,11 @@ pub mod api { T, X, A, - ForceSetCurrentCode, + force_set_current_code, DispatchError, + super::super::Event, > { - let call = ForceSetCurrentCode { para, new_code }; + let call = force_set_current_code { para, new_code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_set_current_head( @@ -12646,10 +15680,11 @@ pub mod api { T, X, A, - ForceSetCurrentHead, + force_set_current_head, DispatchError, + super::super::Event, > { - let call = ForceSetCurrentHead { para, new_head }; + let call = force_set_current_head { para, new_head }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_schedule_code_upgrade( @@ -12662,10 +15697,11 @@ pub mod api { T, X, A, - ForceScheduleCodeUpgrade, + force_schedule_code_upgrade, DispatchError, + super::super::Event, > { - let call = ForceScheduleCodeUpgrade { + let call = force_schedule_code_upgrade { para, new_code, relay_parent_number, @@ -12681,10 +15717,11 @@ pub mod api { T, X, A, - ForceNoteNewHead, + force_note_new_head, DispatchError, + super::super::Event, > { - let call = ForceNoteNewHead { para, new_head }; + let call = force_note_new_head { para, new_head }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_queue_action( @@ -12695,10 +15732,59 @@ pub mod api { T, X, A, - ForceQueueAction, + force_queue_action, + DispatchError, + super::super::Event, + > { + let call = force_queue_action { 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, + add_trusted_validation_code, + DispatchError, + super::super::Event, + > { + let call = add_trusted_validation_code { 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, + poke_unused_validation_code, + DispatchError, + super::super::Event, + > { + let call = poke_unused_validation_code { + 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, + include_pvf_check_statement, DispatchError, + super::super::Event, > { - let call = ForceQueueAction { para }; + let call = include_pvf_check_statement { stmt, signature }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -12747,9 +15833,61 @@ 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; + 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"; @@ -12991,6 +16129,30 @@ pub mod api { impl<'a, T: ::subxt::Config> StorageApi<'a, T> { 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 :: BasicError >{ + 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>, + ::subxt::BasicError, + > { + 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::BasicError, + > { + let entry = PvfActiveVoteList; + self.client.storage().fetch_or_default(&entry, hash).await } pub async fn parachains( &self, @@ -13312,17 +16474,36 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn unsigned_priority( + &self, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8][..], + )?) + } + } + } } pub mod initializer { 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 ForceApprove { + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct force_approve { pub up_to: ::core::primitive::u32, } - impl ::subxt::Call for ForceApprove { + impl ::subxt::Call for force_approve { const PALLET: &'static str = "Initializer"; const FUNCTION: &'static str = "force_approve"; } @@ -13345,9 +16526,16 @@ pub mod api { pub fn force_approve( &self, up_to: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceApprove, DispatchError> - { - let call = ForceApprove { up_to }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_approve, + DispatchError, + super::super::Event, + > { + let call = force_approve { up_to }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -13508,11 +16696,11 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ServiceOverweight { + pub struct service_overweight { pub index: ::core::primitive::u64, pub weight_limit: ::core::primitive::u64, } - impl ::subxt::Call for ServiceOverweight { + impl ::subxt::Call for service_overweight { const PALLET: &'static str = "Ump"; const FUNCTION: &'static str = "service_overweight"; } @@ -13541,10 +16729,11 @@ pub mod api { T, X, A, - ServiceOverweight, + service_overweight, DispatchError, + super::super::Event, > { - let call = ServiceOverweight { + let call = service_overweight { index, weight_limit, }; @@ -13799,58 +16988,58 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct HrmpInitOpenChannel { + pub struct hrmp_init_open_channel { pub recipient: runtime_types::polkadot_parachain::primitives::Id, pub proposed_max_capacity: ::core::primitive::u32, pub proposed_max_message_size: ::core::primitive::u32, } - impl ::subxt::Call for HrmpInitOpenChannel { + impl ::subxt::Call for hrmp_init_open_channel { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_init_open_channel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct HrmpAcceptOpenChannel { + pub struct hrmp_accept_open_channel { pub sender: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for HrmpAcceptOpenChannel { + impl ::subxt::Call for hrmp_accept_open_channel { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_accept_open_channel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct HrmpCloseChannel { + pub struct hrmp_close_channel { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, } - impl ::subxt::Call for HrmpCloseChannel { + impl ::subxt::Call for hrmp_close_channel { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_close_channel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceCleanHrmp { + pub struct force_clean_hrmp { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ForceCleanHrmp { + impl ::subxt::Call for force_clean_hrmp { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "force_clean_hrmp"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceProcessHrmpOpen {} - impl ::subxt::Call for ForceProcessHrmpOpen { + pub struct force_process_hrmp_open; + impl ::subxt::Call for force_process_hrmp_open { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "force_process_hrmp_open"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceProcessHrmpClose {} - impl ::subxt::Call for ForceProcessHrmpClose { + pub struct force_process_hrmp_close; + impl ::subxt::Call for force_process_hrmp_close { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "force_process_hrmp_close"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct HrmpCancelOpenRequest { + pub struct hrmp_cancel_open_request { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, } - impl ::subxt::Call for HrmpCancelOpenRequest { + impl ::subxt::Call for hrmp_cancel_open_request { const PALLET: &'static str = "Hrmp"; const FUNCTION: &'static str = "hrmp_cancel_open_request"; } @@ -13880,10 +17069,11 @@ pub mod api { T, X, A, - HrmpInitOpenChannel, + hrmp_init_open_channel, DispatchError, + super::super::Event, > { - let call = HrmpInitOpenChannel { + let call = hrmp_init_open_channel { recipient, proposed_max_capacity, proposed_max_message_size, @@ -13898,10 +17088,11 @@ pub mod api { T, X, A, - HrmpAcceptOpenChannel, + hrmp_accept_open_channel, DispatchError, + super::super::Event, > { - let call = HrmpAcceptOpenChannel { sender }; + let call = hrmp_accept_open_channel { sender }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn hrmp_close_channel( @@ -13912,10 +17103,11 @@ pub mod api { T, X, A, - HrmpCloseChannel, + hrmp_close_channel, DispatchError, + super::super::Event, > { - let call = HrmpCloseChannel { channel_id }; + let call = hrmp_close_channel { channel_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_clean_hrmp( @@ -13926,10 +17118,11 @@ pub mod api { T, X, A, - ForceCleanHrmp, + force_clean_hrmp, DispatchError, + super::super::Event, > { - let call = ForceCleanHrmp { para }; + let call = force_clean_hrmp { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_process_hrmp_open( @@ -13939,10 +17132,11 @@ pub mod api { T, X, A, - ForceProcessHrmpOpen, + force_process_hrmp_open, DispatchError, + super::super::Event, > { - let call = ForceProcessHrmpOpen {}; + let call = force_process_hrmp_open {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_process_hrmp_close( @@ -13952,10 +17146,11 @@ pub mod api { T, X, A, - ForceProcessHrmpClose, + force_process_hrmp_close, DispatchError, + super::super::Event, > { - let call = ForceProcessHrmpClose {}; + let call = force_process_hrmp_close {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn hrmp_cancel_open_request( @@ -13966,10 +17161,11 @@ pub mod api { T, X, A, - HrmpCancelOpenRequest, + hrmp_cancel_open_request, DispatchError, + super::super::Event, > { - let call = HrmpCancelOpenRequest { channel_id }; + let call = hrmp_cancel_open_request { channel_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -14449,7 +17645,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, @@ -14490,7 +17686,7 @@ 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::BasicError, > { @@ -14515,18 +17711,18 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Register { + pub struct register { pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for Register { + impl ::subxt::Call for register { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "register"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceRegister { + pub struct force_register { pub who: ::subxt::sp_core::crypto::AccountId32, pub deposit: ::core::primitive::u128, pub id: runtime_types::polkadot_parachain::primitives::Id, @@ -14534,38 +17730,38 @@ pub mod api { pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, } - impl ::subxt::Call for ForceRegister { + impl ::subxt::Call for force_register { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "force_register"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Deregister { + pub struct deregister { pub id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Deregister { + impl ::subxt::Call for deregister { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "deregister"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Swap { + pub struct swap { pub id: runtime_types::polkadot_parachain::primitives::Id, pub other: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Swap { + impl ::subxt::Call for swap { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "swap"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceRemoveLock { + pub struct force_remove_lock { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ForceRemoveLock { + impl ::subxt::Call for force_remove_lock { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "force_remove_lock"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Reserve {} - impl ::subxt::Call for Reserve { + pub struct reserve; + impl ::subxt::Call for reserve { const PALLET: &'static str = "Registrar"; const FUNCTION: &'static str = "reserve"; } @@ -14590,9 +17786,16 @@ pub mod api { id: runtime_types::polkadot_parachain::primitives::Id, genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Register, DispatchError> - { - let call = Register { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + register, + DispatchError, + super::super::Event, + > { + let call = register { id, genesis_head, validation_code, @@ -14611,10 +17814,11 @@ pub mod api { T, X, A, - ForceRegister, + force_register, DispatchError, + super::super::Event, > { - let call = ForceRegister { + let call = force_register { who, deposit, id, @@ -14626,18 +17830,32 @@ pub mod api { pub fn deregister( &self, id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Deregister, DispatchError> - { - let call = Deregister { id }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + deregister, + DispatchError, + super::super::Event, + > { + let call = deregister { id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn swap( &self, id: runtime_types::polkadot_parachain::primitives::Id, other: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Swap, DispatchError> - { - let call = Swap { id, other }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + swap, + DispatchError, + super::super::Event, + > { + let call = swap { id, other }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_remove_lock( @@ -14648,17 +17866,25 @@ pub mod api { T, X, A, - ForceRemoveLock, + force_remove_lock, DispatchError, + super::super::Event, > { - let call = ForceRemoveLock { para }; + let call = force_remove_lock { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reserve( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Reserve, DispatchError> - { - let call = Reserve {}; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + reserve, + DispatchError, + super::super::Event, + > { + let call = reserve {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -14799,6 +18025,34 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn para_deposit( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn data_deposit_per_byte( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 128u8, 150u8, 152u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + } + } } pub mod slots { use super::runtime_types; @@ -14806,30 +18060,30 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ForceLease { + pub struct force_lease { pub para: runtime_types::polkadot_parachain::primitives::Id, pub leaser: ::subxt::sp_core::crypto::AccountId32, pub amount: ::core::primitive::u128, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, } - impl ::subxt::Call for ForceLease { + impl ::subxt::Call for force_lease { const PALLET: &'static str = "Slots"; const FUNCTION: &'static str = "force_lease"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ClearAllLeases { + pub struct clear_all_leases { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for ClearAllLeases { + impl ::subxt::Call for clear_all_leases { const PALLET: &'static str = "Slots"; const FUNCTION: &'static str = "clear_all_leases"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct TriggerOnboard { + pub struct trigger_onboard { pub para: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for TriggerOnboard { + impl ::subxt::Call for trigger_onboard { const PALLET: &'static str = "Slots"; const FUNCTION: &'static str = "trigger_onboard"; } @@ -14856,9 +18110,16 @@ pub mod api { amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, ForceLease, DispatchError> - { - let call = ForceLease { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_lease, + DispatchError, + super::super::Event, + > { + let call = force_lease { para, leaser, amount, @@ -14875,10 +18136,11 @@ pub mod api { T, X, A, - ClearAllLeases, + clear_all_leases, DispatchError, + super::super::Event, > { - let call = ClearAllLeases { para }; + let call = clear_all_leases { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn trigger_onboard( @@ -14889,10 +18151,11 @@ pub mod api { T, X, A, - TriggerOnboard, + trigger_onboard, DispatchError, + super::super::Event, > { - let call = TriggerOnboard { para }; + let call = trigger_onboard { para }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -14900,7 +18163,12 @@ 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, Debug)] + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] pub struct NewLeasePeriod(pub ::core::primitive::u32); impl ::subxt::Event for NewLeasePeriod { const PALLET: &'static str = "Slots"; @@ -14973,6 +18241,28 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn lease_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 117u8, 18u8, 0u8][..], + )?) + } + pub fn lease_offset( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 16u8, 14u8, 0u8][..], + )?) + } + } + } } pub mod auctions { use super::runtime_types; @@ -14980,18 +18270,18 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct NewAuction { + pub struct new_auction { #[codec(compact)] pub duration: ::core::primitive::u32, #[codec(compact)] pub lease_period_index: ::core::primitive::u32, } - impl ::subxt::Call for NewAuction { + impl ::subxt::Call for new_auction { const PALLET: &'static str = "Auctions"; const FUNCTION: &'static str = "new_auction"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Bid { + pub struct bid { #[codec(compact)] pub para: runtime_types::polkadot_parachain::primitives::Id, #[codec(compact)] @@ -15003,13 +18293,13 @@ pub mod api { #[codec(compact)] pub amount: ::core::primitive::u128, } - impl ::subxt::Call for Bid { + impl ::subxt::Call for bid { const PALLET: &'static str = "Auctions"; const FUNCTION: &'static str = "bid"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct CancelAuction {} - impl ::subxt::Call for CancelAuction { + pub struct cancel_auction; + impl ::subxt::Call for cancel_auction { const PALLET: &'static str = "Auctions"; const FUNCTION: &'static str = "cancel_auction"; } @@ -15033,9 +18323,16 @@ pub mod api { &self, duration: ::core::primitive::u32, lease_period_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, NewAuction, DispatchError> - { - let call = NewAuction { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + new_auction, + DispatchError, + super::super::Event, + > { + let call = new_auction { duration, lease_period_index, }; @@ -15048,9 +18345,16 @@ pub mod api { first_slot: ::core::primitive::u32, last_slot: ::core::primitive::u32, amount: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Bid, DispatchError> - { - let call = Bid { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + bid, + DispatchError, + super::super::Event, + > { + let call = bid { para, auction_index, first_slot, @@ -15066,10 +18370,11 @@ pub mod api { T, X, A, - CancelAuction, + cancel_auction, DispatchError, + super::super::Event, > { - let call = CancelAuction {}; + let call = cancel_auction {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -15087,7 +18392,12 @@ pub mod api { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionStarted"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] pub struct AuctionClosed(pub ::core::primitive::u32); impl ::subxt::Event for AuctionClosed { const PALLET: &'static str = "Auctions"; @@ -15272,6 +18582,44 @@ pub mod api { } } } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn ending_period( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[64u8, 25u8, 1u8, 0u8][..], + )?) + } + pub fn sample_length( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[20u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn slot_range_count( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[36u8, 0u8, 0u8, 0u8][..], + )?) + } + pub fn lease_periods_per_slot( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[8u8, 0u8, 0u8, 0u8][..], + )?) + } + } + } } pub mod crowdloan { use super::runtime_types; @@ -15279,7 +18627,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Create { + pub struct create { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, #[codec(compact)] @@ -15293,12 +18641,12 @@ pub mod api { pub verifier: ::core::option::Option, } - impl ::subxt::Call for Create { + impl ::subxt::Call for create { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "create"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Contribute { + pub struct contribute { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, #[codec(compact)] @@ -15306,40 +18654,40 @@ pub mod api { pub signature: ::core::option::Option, } - impl ::subxt::Call for Contribute { + impl ::subxt::Call for contribute { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "contribute"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Withdraw { + pub struct withdraw { pub who: ::subxt::sp_core::crypto::AccountId32, #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Withdraw { + impl ::subxt::Call for withdraw { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "withdraw"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Refund { + pub struct refund { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Refund { + impl ::subxt::Call for refund { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "refund"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Dissolve { + pub struct dissolve { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Dissolve { + impl ::subxt::Call for dissolve { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "dissolve"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Edit { + pub struct edit { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, #[codec(compact)] @@ -15353,27 +18701,38 @@ pub mod api { pub verifier: ::core::option::Option, } - impl ::subxt::Call for Edit { + impl ::subxt::Call for edit { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "edit"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct AddMemo { + pub struct add_memo { pub index: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for AddMemo { + impl ::subxt::Call for add_memo { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "add_memo"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Poke { + pub struct poke { pub index: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::Call for Poke { + impl ::subxt::Call for poke { const PALLET: &'static str = "Crowdloan"; const FUNCTION: &'static str = "poke"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct contribute_all { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + pub signature: + ::core::option::Option, + } + impl ::subxt::Call for contribute_all { + 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)>, @@ -15400,9 +18759,16 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Create, DispatchError> - { - let call = Create { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + create, + DispatchError, + super::super::Event, + > { + let call = create { index, cap, first_period, @@ -15419,9 +18785,16 @@ pub mod api { signature: ::core::option::Option< runtime_types::sp_runtime::MultiSignature, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Contribute, DispatchError> - { - let call = Contribute { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + contribute, + DispatchError, + super::super::Event, + > { + let call = contribute { index, value, signature, @@ -15432,25 +18805,46 @@ pub mod api { &self, who: ::subxt::sp_core::crypto::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Withdraw, DispatchError> - { - let call = Withdraw { who, index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + withdraw, + DispatchError, + super::super::Event, + > { + let call = withdraw { who, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn refund( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Refund, DispatchError> - { - let call = Refund { index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + refund, + DispatchError, + super::super::Event, + > { + 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, X, A, Dissolve, DispatchError> - { - let call = Dissolve { index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + dissolve, + DispatchError, + super::super::Event, + > { + let call = dissolve { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn edit( @@ -15463,9 +18857,16 @@ pub mod api { verifier: ::core::option::Option< runtime_types::sp_runtime::MultiSigner, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Edit, DispatchError> - { - let call = Edit { + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + edit, + DispatchError, + super::super::Event, + > { + let call = edit { index, cap, first_period, @@ -15479,17 +18880,49 @@ pub mod api { &self, index: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, AddMemo, DispatchError> - { - let call = AddMemo { index, memo }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + add_memo, + DispatchError, + super::super::Event, + > { + let call = add_memo { index, memo }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn poke( &self, index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Poke, DispatchError> - { - let call = Poke { index }; + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + poke, + DispatchError, + super::super::Event, + > { + 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, + contribute_all, + DispatchError, + super::super::Event, + > { + let call = contribute_all { index, signature }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -15686,1597 +19119,1134 @@ pub mod api { } } } - } - pub mod runtime_types { - use super::runtime_types; - pub mod bitvec { + pub mod constants { use super::runtime_types; - pub mod order { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Lsb0 {} + pub struct ConstantsApi; + impl ConstantsApi { + pub fn pallet_id( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::PalletId, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[112u8, 121u8, 47u8, 99u8, 102u8, 117u8, 110u8, 100u8][..], + )?) + } + pub fn min_contribution( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 116u8, 59u8, 164u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn remove_keys_limit( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[232u8, 3u8, 0u8, 0u8][..], + )?) + } } } - pub mod finality_grandpa { + } + pub mod xcm_pallet { + 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 Equivocation<_0, _1, _2> { - pub round_number: ::core::primitive::u64, - pub identity: _0, - pub first: (_1, _2), - pub second: (_1, _2), + pub struct send { + pub dest: ::std::boxed::Box, + pub message: ::std::boxed::Box, + } + impl ::subxt::Call for send { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "send"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + pub struct teleport_assets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + } + impl ::subxt::Call for teleport_assets { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "teleport_assets"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Prevote<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + pub struct reserve_transfer_assets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, } - } - 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>); - } + impl ::subxt::Call for reserve_transfer_assets { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "reserve_transfer_assets"; } - 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 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, - } - } - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct execute { + pub message: ::std::boxed::Box, + pub max_weight: ::core::primitive::u64, } - 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, - } + impl ::subxt::Call for execute { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "execute"; } #[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_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 struct force_xcm_version { + pub location: ::std::boxed::Box< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + pub xcm_version: ::core::primitive::u32, } - 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, - #[codec(index = 5)] - CallFiltered, - } - #[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, - ), - } + impl ::subxt::Call for force_xcm_version { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "force_xcm_version"; } #[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, + pub struct force_default_xcm_version { + pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, } - #[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>, + impl ::subxt::Call for force_default_xcm_version { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "force_default_xcm_version"; } #[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, + pub struct force_subscribe_version_notify { + pub location: + ::std::boxed::Box, + } + impl ::subxt::Call for force_subscribe_version_notify { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "force_subscribe_version_notify"; } #[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, + pub struct force_unsubscribe_version_notify { + pub location: + ::std::boxed::Box, + } + impl ::subxt::Call for force_unsubscribe_version_notify { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "force_unsubscribe_version_notify"; } #[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 limited_reserve_transfer_assets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + pub weight_limit: runtime_types::xcm::v2::WeightLimit, } - } - 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, - } + impl ::subxt::Call for limited_reserve_transfer_assets { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "limited_reserve_transfer_assets"; } #[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 limited_teleport_assets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + pub weight_limit: runtime_types::xcm::v2::WeightLimit, } - } - 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, - } + impl ::subxt::Call for limited_teleport_assets { + const PALLET: &'static str = "XcmPallet"; + const FUNCTION: &'static str = "limited_teleport_assets"; } - } - 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>, + 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, + } } - #[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 fn send( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + message: runtime_types::xcm::VersionedXcm, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + send, + DispatchError, + super::super::Event, + > { + let call = send { + dest: ::std::boxed::Box::new(dest), + message: ::std::boxed::Box::new(message), + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - } - 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, - }, + 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, + teleport_assets, + DispatchError, + super::super::Event, + > { + let call = teleport_assets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - Rebagged( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u64, - ::core::primitive::u64, - ), + 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, + reserve_transfer_assets, + DispatchError, + super::super::Event, + > { + let call = reserve_transfer_assets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn execute( + &self, + message: runtime_types::xcm::VersionedXcm, + max_weight: ::core::primitive::u64, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + execute, + DispatchError, + super::super::Event, + > { + let call = execute { + message: ::std::boxed::Box::new(message), + max_weight, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn force_xcm_version( + &self, + location: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm_version: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_xcm_version, + DispatchError, + super::super::Event, + > { + let call = force_xcm_version { + location: ::std::boxed::Box::new(location), + xcm_version, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn force_default_xcm_version( + &self, + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_default_xcm_version, + DispatchError, + super::super::Event, + > { + let call = force_default_xcm_version { maybe_xcm_version }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn force_subscribe_version_notify( + &self, + location: runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_subscribe_version_notify, + DispatchError, + super::super::Event, + > { + let call = force_subscribe_version_notify { + location: ::std::boxed::Box::new(location), + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn force_unsubscribe_version_notify( + &self, + location: runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + force_unsubscribe_version_notify, + DispatchError, + super::super::Event, + > { + let call = force_unsubscribe_version_notify { + location: ::std::boxed::Box::new(location), + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + 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, + limited_reserve_transfer_assets, + DispatchError, + super::super::Event, + > { + let call = limited_reserve_transfer_assets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + 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, + limited_teleport_assets, + DispatchError, + super::super::Event, + > { + let call = limited_teleport_assets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub mod pallet_balances { + pub type Event = runtime_types::pallet_xcm::pallet::Event; + pub mod events { 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, - }, - } - #[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, - } - #[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, - ), - } + #[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 AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub misc_frozen: _0, - pub fee_frozen: _0, + 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 BalanceLock<_0> { - pub id: [::core::primitive::u8; 8usize], - pub amount: _0, - pub reasons: runtime_types::pallet_balances::Reasons, + 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 enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, + 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 enum Releases { - #[codec(index = 0)] - V1_0_0, - #[codec(index = 1)] - V2_0_0, + 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 ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, + 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"; } - } - 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, - (), - >, - #[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>, - }, - } - #[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, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - 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 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 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>, + 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 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 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 pallet_collective { - 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_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)] - 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, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - NotMember, - #[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, - } - #[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, - ), - #[codec(index = 1)] - 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)] - Executed( - ::subxt::sp_core::H256, - ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - ), - #[codec(index = 5)] - 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 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, + :: subxt :: codec :: CompactAs, + )] + 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 enum RawOrigin<_0> { - #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), - #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, + 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 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 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_democracy { + pub mod storage { use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, + 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)] - propose { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - second { - #[codec(compact)] - proposal: ::core::primitive::u32, - #[codec(compact)] - seconds_upper_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - vote { - #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::pallet_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 3)] - emergency_cancel { ref_index: ::core::primitive::u32 }, - #[codec(index = 4)] - external_propose { - proposal_hash: ::subxt::sp_core::H256, - }, - #[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, - }, + 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)] - ValueLow, - #[codec(index = 1)] - ProposalMissing, - #[codec(index = 2)] - AlreadyCanceled, - #[codec(index = 3)] - DuplicateProposal, - #[codec(index = 4)] - ProposalBlacklisted, - #[codec(index = 5)] - NotSimpleMajority, - #[codec(index = 6)] - InvalidHash, - #[codec(index = 7)] - NoProposal, - #[codec(index = 8)] - AlreadyVetoed, - #[codec(index = 9)] - 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, + } + 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 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), + } + 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 types { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, + pub struct SupportedVersion( + pub ::core::primitive::u32, + pub 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, Debug, - )] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing( - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >, - ), - #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, + } + pub struct VersionNotifiers( + pub ::core::primitive::u32, + pub 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 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>, + } + pub struct VersionNotifyTargets( + pub ::core::primitive::u32, + pub 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 struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, + } + 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 vote { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _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 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)] - 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)] - 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 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::BasicError> + { + 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::BasicError, + > { + 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>, + ::subxt::BasicError, + > { + 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::BasicError> + { + 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>, + ::subxt::BasicError, + > { + 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::BasicError, + > { + 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::BasicError, + > { + 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>, + ::subxt::BasicError, + > { + 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::BasicError, + > { + 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>, + ::subxt::BasicError, + > { + 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::BasicError, + > { + 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>, + ::subxt::BasicError, + > { + 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::BasicError, + > { + 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::BasicError, + > { + let entry = CurrentMigration; + self.client.storage().fetch(&entry, hash).await } } - pub mod vote_threshold { + } + } + 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 enum VoteThreshold { - #[codec(index = 0)] - SuperMajorityApprove, - #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, - } + pub struct Lsb0; } + } + pub mod finality_grandpa { + use super::runtime_types; #[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 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 enum Releases { - #[codec(index = 0)] - V1, + 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 pallet_election_provider_multi_phase { + pub mod frame_support { use super::runtime_types; - pub mod pallet { + pub mod storage { use super::runtime_types; - #[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, Debug, - )] - pub enum Error { - #[codec(index = 0)] - PreDispatchEarlySubmission, - #[codec(index = 1)] - PreDispatchWrongWinnerCount, - #[codec(index = 2)] - PreDispatchWeakSubmission, - #[codec(index = 3)] - SignedQueueFull, - #[codec(index = 4)] - SignedCannotPayDeposit, - #[codec(index = 5)] - SignedInvalidWitness, - #[codec(index = 6)] - SignedTooMuchWeight, - #[codec(index = 7)] - OcwCallWrongEra, - #[codec(index = 8)] - MissingSnapshotMetadata, - #[codec(index = 9)] - InvalidSubmissionIndex, - #[codec(index = 10)] - CallNotAllowed, + 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>, + ); } - #[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, + 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>); } } - #[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 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)] pub ::core::primitive::u32, + pub _0, + ); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct WrapperOpaque<_0>( + #[codec(compact)] pub ::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 pallet_elections_phragmen { - use super::runtime_types; - pub mod pallet { + pub mod weights { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Call { + pub enum DispatchClass { #[codec(index = 0)] - vote { - votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - #[codec(compact)] - value: ::core::primitive::u128, - }, + Normal, #[codec(index = 1)] - remove_voter, + Operational, #[codec(index = 2)] - submit_candidacy { - #[codec(compact)] - candidate_count: ::core::primitive::u32, - }, - #[codec(index = 3)] - renounce_candidacy { - renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - }, - #[codec(index = 4)] - remove_member { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - has_replacement: ::core::primitive::bool, - }, - #[codec(index = 5)] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - }, + Mandatory, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Error { - #[codec(index = 0)] - UnableToVote, - #[codec(index = 1)] - NoVotes, - #[codec(index = 2)] - TooManyVotes, - #[codec(index = 3)] - MaximumVotesExceeded, - #[codec(index = 4)] - LowBalance, - #[codec(index = 5)] - UnableToPayBond, - #[codec(index = 6)] - MustBeVoter, - #[codec(index = 7)] - ReportSelf, - #[codec(index = 8)] - DuplicatedCandidate, - #[codec(index = 9)] - MemberSubmit, - #[codec(index = 10)] - RunnerUpSubmit, - #[codec(index = 11)] - InsufficientCandidateFunds, - #[codec(index = 12)] - NotMember, - #[codec(index = 13)] - InvalidWitnessData, - #[codec(index = 14)] - InvalidVoteCount, - #[codec(index = 15)] - InvalidRenouncing, - #[codec(index = 16)] - InvalidReplacement, + 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 Event { + pub enum Pays { #[codec(index = 0)] - NewTerm( - ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - ), + Yes, #[codec(index = 1)] - 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, - ), + No, } - } - #[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 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, + 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)] - 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, + remark { + remark: ::std::vec::Vec<::core::primitive::u8>, }, #[codec(index = 2)] - note_stalled { - delay: ::core::primitive::u32, - best_finalized_block_number: ::core::primitive::u32, + 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( @@ -17284,52 +20254,90 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - PauseFailed, + InvalidSpecName, #[codec(index = 1)] - ResumeFailed, + SpecVersionNeedsToIncrease, #[codec(index = 2)] - ChangePending, + FailedToExtractRuntimeVersion, #[codec(index = 3)] - TooSoon, + NonDefaultComposite, #[codec(index = 4)] - InvalidKeyOwnershipProof, + NonZeroRefCount, #[codec(index = 5)] - InvalidEquivocationProof, - #[codec(index = 6)] - DuplicateOffenceReport, + CallFiltered, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] - NewAuthorities( - ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - ), + ExtrinsicSuccess { + dispatch_info: + runtime_types::frame_support::weights::DispatchInfo, + }, #[codec(index = 1)] - Paused, + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: + runtime_types::frame_support::weights::DispatchInfo, + }, #[codec(index = 2)] - Resumed, + 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 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 > , } + 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 enum StoredState<_0> { + 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)] - Live, + ApplyExtrinsic(::core::primitive::u32), #[codec(index = 1)] - PendingPause { scheduled_at: _0, delay: _0 }, + Finalization, #[codec(index = 2)] - Paused, - #[codec(index = 3)] - PendingResume { scheduled_at: _0, delay: _0 }, + 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_identity { + pub mod pallet_authorship { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -17338,556 +20346,580 @@ pub mod api { )] 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, + 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)] - set_subs { - subs: ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, - }, + TooManyUncles, #[codec(index = 3)] - clear_identity, + GenesisUncle, #[codec(index = 4)] - request_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - #[codec(compact)] - max_fee: ::core::primitive::u128, - }, + TooHighUncle, #[codec(index = 5)] - cancel_request { reg_index: ::core::primitive::u32 }, + UncleAlreadyIncluded, #[codec(index = 6)] - set_fee { - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - fee: ::core::primitive::u128, + 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 = 7)] - set_account_id { - #[codec(compact)] - index: ::core::primitive::u32, - new: ::subxt::sp_core::crypto::AccountId32, + #[codec(index = 1)] + put_in_front_of { + lighter: ::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, - >, + } + #[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, }, - #[codec(index = 9)] - provide_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - target: ::subxt::sp_runtime::MultiAddress< + } + } + } + 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, (), >, - judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, + #[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 = 10)] - kill_identity { - target: ::subxt::sp_runtime::MultiAddress< + #[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 = 11)] - add_sub { - sub: ::subxt::sp_runtime::MultiAddress< + #[codec(index = 3)] + transfer_keep_alive { + dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, - data: runtime_types::pallet_identity::types::Data, + #[codec(compact)] + value: ::core::primitive::u128, }, - #[codec(index = 12)] - rename_sub { - sub: ::subxt::sp_runtime::MultiAddress< + #[codec(index = 4)] + transfer_all { + dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, - data: runtime_types::pallet_identity::types::Data, + keep_alive: ::core::primitive::bool, }, - #[codec(index = 13)] - remove_sub { - sub: ::subxt::sp_runtime::MultiAddress< + #[codec(index = 5)] + force_unreserve { + who: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, + amount: ::core::primitive::u128, }, - #[codec(index = 14)] - quit_sub, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] - TooManySubAccounts, + VestingBalance, #[codec(index = 1)] - NotFound, + LiquidityRestrictions, #[codec(index = 2)] - NotNamed, + InsufficientBalance, #[codec(index = 3)] - EmptyIndex, + ExistentialDeposit, #[codec(index = 4)] - FeeChanged, + KeepAlive, #[codec(index = 5)] - NoIdentity, + ExistingVestingSchedule, #[codec(index = 6)] - StickyJudgement, + DeadAccount, #[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, + 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)] - IdentitySet(::subxt::sp_core::crypto::AccountId32), + propose_bounty { + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, #[codec(index = 1)] - IdentityCleared( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 2)] - IdentityKilled( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + 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, + (), + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, #[codec(index = 3)] - JudgementRequested( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + unassign_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, #[codec(index = 4)] - JudgementUnrequested( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + accept_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, #[codec(index = 5)] - JudgementGiven( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), + award_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + }, #[codec(index = 6)] - RegistrarAdded(::core::primitive::u32), + claim_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, #[codec(index = 7)] - SubIdentityAdded( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + close_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, #[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, - ), + extend_bounty_expiry { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + }, } - } - 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 Error { #[codec(index = 0)] - None, + InsufficientProposersBalance, #[codec(index = 1)] - Raw0([::core::primitive::u8; 0usize]), + InvalidIndex, #[codec(index = 2)] - Raw1([::core::primitive::u8; 1usize]), + ReasonTooBig, #[codec(index = 3)] - Raw2([::core::primitive::u8; 2usize]), + UnexpectedStatus, #[codec(index = 4)] - Raw3([::core::primitive::u8; 3usize]), + RequireCurator, #[codec(index = 5)] - Raw4([::core::primitive::u8; 4usize]), + InvalidValue, #[codec(index = 6)] - Raw5([::core::primitive::u8; 5usize]), + InvalidFee, #[codec(index = 7)] - Raw6([::core::primitive::u8; 6usize]), + PendingPayout, #[codec(index = 8)] - Raw7([::core::primitive::u8; 7usize]), + Premature, #[codec(index = 9)] - Raw8([::core::primitive::u8; 8usize]), - #[codec(index = 10)] - Raw9([::core::primitive::u8; 9usize]), - #[codec(index = 11)] - Raw10([::core::primitive::u8; 10usize]), - #[codec(index = 12)] - Raw11([::core::primitive::u8; 11usize]), - #[codec(index = 13)] - Raw12([::core::primitive::u8; 12usize]), - #[codec(index = 14)] - Raw13([::core::primitive::u8; 13usize]), - #[codec(index = 15)] - Raw14([::core::primitive::u8; 14usize]), - #[codec(index = 16)] - Raw15([::core::primitive::u8; 15usize]), - #[codec(index = 17)] - Raw16([::core::primitive::u8; 16usize]), - #[codec(index = 18)] - Raw17([::core::primitive::u8; 17usize]), - #[codec(index = 19)] - Raw18([::core::primitive::u8; 18usize]), - #[codec(index = 20)] - Raw19([::core::primitive::u8; 19usize]), - #[codec(index = 21)] - Raw20([::core::primitive::u8; 20usize]), - #[codec(index = 22)] - Raw21([::core::primitive::u8; 21usize]), - #[codec(index = 23)] - Raw22([::core::primitive::u8; 22usize]), - #[codec(index = 24)] - Raw23([::core::primitive::u8; 23usize]), - #[codec(index = 25)] - Raw24([::core::primitive::u8; 24usize]), - #[codec(index = 26)] - Raw25([::core::primitive::u8; 25usize]), - #[codec(index = 27)] - Raw26([::core::primitive::u8; 26usize]), - #[codec(index = 28)] - Raw27([::core::primitive::u8; 27usize]), - #[codec(index = 29)] - Raw28([::core::primitive::u8; 28usize]), - #[codec(index = 30)] - Raw29([::core::primitive::u8; 29usize]), - #[codec(index = 31)] - Raw30([::core::primitive::u8; 30usize]), - #[codec(index = 32)] - Raw31([::core::primitive::u8; 31usize]), - #[codec(index = 33)] - Raw32([::core::primitive::u8; 32usize]), - #[codec(index = 34)] - BlakeTwo256([::core::primitive::u8; 32usize]), - #[codec(index = 35)] - Sha256([::core::primitive::u8; 32usize]), - #[codec(index = 36)] - Keccak256([::core::primitive::u8; 32usize]), - #[codec(index = 37)] - ShaThree256([::core::primitive::u8; 32usize]), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum IdentityField { - #[codec(index = 1)] - Display, - #[codec(index = 2)] - Legal, - #[codec(index = 4)] - Web, - #[codec(index = 8)] - Riot, - #[codec(index = 16)] - Email, - #[codec(index = 32)] - PgpFingerprint, - #[codec(index = 64)] - Image, - #[codec(index = 128)] - Twitter, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct IdentityInfo { - pub additional: - runtime_types::frame_support::storage::bounded_vec::BoundedVec<( - runtime_types::pallet_identity::types::Data, - runtime_types::pallet_identity::types::Data, - )>, - pub display: runtime_types::pallet_identity::types::Data, - pub legal: runtime_types::pallet_identity::types::Data, - pub web: runtime_types::pallet_identity::types::Data, - pub riot: runtime_types::pallet_identity::types::Data, - pub email: runtime_types::pallet_identity::types::Data, - pub pgp_fingerprint: - ::core::option::Option<[::core::primitive::u8; 20usize]>, - pub image: runtime_types::pallet_identity::types::Data, - pub twitter: runtime_types::pallet_identity::types::Data, + HasActiveChildBounty, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Judgement<_0> { + pub enum Event { #[codec(index = 0)] - Unknown, + BountyProposed { index: ::core::primitive::u32 }, #[codec(index = 1)] - FeePaid(_0), + BountyRejected { + index: ::core::primitive::u32, + bond: ::core::primitive::u128, + }, #[codec(index = 2)] - Reasonable, + BountyBecameActive { index: ::core::primitive::u32 }, #[codec(index = 3)] - KnownGood, + BountyAwarded { + index: ::core::primitive::u32, + beneficiary: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 4)] - OutOfDate, + BountyClaimed { + index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 5)] - LowQuality, + BountyCanceled { index: ::core::primitive::u32 }, #[codec(index = 6)] - Erroneous, + BountyExtended { index: ::core::primitive::u32 }, } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct RegistrarInfo<_0, _1> { - pub account: _1, - pub fee: _0, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Registration<_0> { - pub judgements: - runtime_types::frame_support::storage::bounded_vec::BoundedVec<( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - )>, - pub deposit: _0, - pub info: runtime_types::pallet_identity::types::IdentityInfo, - } - } - } - pub mod pallet_im_online { - 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)] 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, Debug, - )] - pub enum Error { - #[codec(index = 0)] - InvalidKey, - #[codec(index = 1)] - DuplicatedHeartbeat, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Event { - #[codec(index = 0)] - HeartbeatReceived( - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - ), - #[codec(index = 1)] - AllGood, - #[codec(index = 2)] - 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 { - use super::runtime_types; - pub mod app_sr25519 { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); - } - } - #[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, Debug)] - pub struct Heartbeat<_0> { - pub block_number: _0, - pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, - pub session_index: _0, - pub authority_index: _0, - pub validators_len: _0, - } - } - pub mod pallet_indices { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; + } + #[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 { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Call { #[codec(index = 0)] - claim { index: ::core::primitive::u32 }, + 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)] - transfer { - new: ::subxt::sp_core::crypto::AccountId32, - index: ::core::primitive::u32, + execute { + proposal: + ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, }, #[codec(index = 2)] - free { index: ::core::primitive::u32 }, + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: + ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, #[codec(index = 3)] - force_transfer { - new: ::subxt::sp_core::crypto::AccountId32, + vote { + proposal: ::subxt::sp_core::H256, + #[codec(compact)] index: ::core::primitive::u32, - freeze: ::core::primitive::bool, + approve: ::core::primitive::bool, }, #[codec(index = 4)] - freeze { index: ::core::primitive::u32 }, + 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, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] - NotAssigned, + NotMember, #[codec(index = 1)] - NotOwner, + DuplicateProposal, #[codec(index = 2)] - InUse, + ProposalMissing, #[codec(index = 3)] - NotTransfer, + WrongIndex, #[codec(index = 4)] - Permanent, + DuplicateVote, + #[codec(index = 5)] + 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)] - IndexAssigned( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ), - #[codec(index = 1)] - IndexFreed(::core::primitive::u32), - #[codec(index = 2)] - IndexFrozen( - ::core::primitive::u32, - ::subxt::sp_core::crypto::AccountId32, - ), - } - } - } - pub mod pallet_membership { - 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_member { - who: ::subxt::sp_core::crypto::AccountId32, + 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)] - remove_member { - who: ::subxt::sp_core::crypto::AccountId32, + 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)] - swap_member { - remove: ::subxt::sp_core::crypto::AccountId32, - add: ::subxt::sp_core::crypto::AccountId32, + Approved { + proposal_hash: ::subxt::sp_core::H256, }, #[codec(index = 3)] - reset_members { - members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + Disapproved { + proposal_hash: ::subxt::sp_core::H256, }, #[codec(index = 4)] - change_key { - new: ::subxt::sp_core::crypto::AccountId32, + Executed { + proposal_hash: ::subxt::sp_core::H256, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, }, #[codec(index = 5)] - set_prime { - who: ::subxt::sp_core::crypto::AccountId32, + MemberExecuted { + proposal_hash: ::subxt::sp_core::H256, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, }, #[codec(index = 6)] - clear_prime, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, - )] - pub enum Error { - #[codec(index = 0)] - AlreadyMember, - #[codec(index = 1)] - NotMember, + Closed { + proposal_hash: ::subxt::sp_core::H256, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Members(::core::primitive::u32, ::core::primitive::u32), + #[codec(index = 1)] + Member(_0), + #[codec(index = 2)] + _Phantom, + } + #[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 mod pallet_democracy { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Event { + pub enum Conviction { #[codec(index = 0)] - MemberAdded, + None, #[codec(index = 1)] - MemberRemoved, + Locked1x, #[codec(index = 2)] - MembersSwapped, + Locked2x, #[codec(index = 3)] - MembersReset, + Locked3x, #[codec(index = 4)] - KeyChanged, + Locked4x, #[codec(index = 5)] - Dummy, + Locked5x, + #[codec(index = 6)] + Locked6x, } } - } - pub mod pallet_multisig { - use super::runtime_types; pub mod pallet { use super::runtime_types; #[derive( @@ -17895,49 +20927,115 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - as_multi_threshold_1 { - other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - call: ::std::boxed::Box, - }, - #[codec(index = 1)] - as_multi { - threshold: ::core::primitive::u16, - other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - >, - call: ::subxt::WrapperKeepOpaque< - runtime_types::polkadot_runtime::Call, - >, - store_call: ::core::primitive::bool, - max_weight: ::core::primitive::u64, + propose { + proposal_hash: ::subxt::sp_core::H256, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + second { + #[codec(compact)] + proposal: ::core::primitive::u32, + #[codec(compact)] + seconds_upper_bound: ::core::primitive::u32, }, #[codec(index = 2)] - approve_as_multi { - threshold: ::core::primitive::u16, - other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, + vote { + #[codec(compact)] + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: ::core::primitive::u64, }, #[codec(index = 3)] - cancel_as_multi { - threshold: ::core::primitive::u16, - other_signatories: - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - timepoint: runtime_types::pallet_multisig::Timepoint< - ::core::primitive::u32, - >, - call_hash: [::core::primitive::u8; 32usize], + emergency_cancel { ref_index: ::core::primitive::u32 }, + #[codec(index = 4)] + external_propose { + proposal_hash: ::subxt::sp_core::H256, + }, + #[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, }, } #[derive( @@ -17945,239 +21043,200 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - MinimumThreshold, + ValueLow, #[codec(index = 1)] - AlreadyApproved, + ProposalMissing, #[codec(index = 2)] - NoApprovalsNeeded, + AlreadyCanceled, #[codec(index = 3)] - TooFewSignatories, + DuplicateProposal, #[codec(index = 4)] - TooManySignatories, + ProposalBlacklisted, #[codec(index = 5)] - SignatoriesOutOfOrder, + NotSimpleMajority, #[codec(index = 6)] - SenderInSignatories, + InvalidHash, #[codec(index = 7)] - NotFound, + NoProposal, #[codec(index = 8)] - NotOwner, + AlreadyVetoed, #[codec(index = 9)] - NoTimepoint, + DuplicatePreimage, #[codec(index = 10)] - WrongTimepoint, + NotImminent, #[codec(index = 11)] - UnexpectedTimepoint, + TooEarly, #[codec(index = 12)] - MaxWeightTooLow, + Imminent, #[codec(index = 13)] - AlreadyStored, + 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)] - NewMultisig( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - [::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], - ), - #[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< - (), - 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], - ), - } - } - #[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, Debug)] - pub struct Timepoint<_0> { - pub height: _0, - pub index: _0, + # [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 pallet_offences { - use super::runtime_types; - pub mod pallet { + pub mod types { use super::runtime_types; #[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>, - ), + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, } - } - } - pub mod pallet_proxy { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Call { + pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] - proxy { - real: ::subxt::sp_core::crypto::AccountId32, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: ::std::boxed::Box, - }, + Ongoing( + runtime_types::pallet_democracy::types::ReferendumStatus< + _0, + _1, + _2, + >, + ), #[codec(index = 1)] - add_proxy { - delegate: ::subxt::sp_core::crypto::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 2)] - remove_proxy { - delegate: ::subxt::sp_core::crypto::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 3)] - remove_proxies, - #[codec(index = 4)] - anonymous { - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - }, - #[codec(index = 5)] - kill_anonymous { - spawner: ::subxt::sp_core::crypto::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - index: ::core::primitive::u16, - #[codec(compact)] - height: ::core::primitive::u32, - #[codec(compact)] - ext_index: ::core::primitive::u32, - }, - #[codec(index = 6)] - announce { - real: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 7)] - remove_announcement { - real: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 8)] - reject_announcement { - delegate: ::subxt::sp_core::crypto::AccountId32, - call_hash: ::subxt::sp_core::H256, + Finished { + approved: ::core::primitive::bool, + end: _0, }, - #[codec(index = 9)] - proxy_announced { - delegate: ::subxt::sp_core::crypto::AccountId32, - real: ::subxt::sp_core::crypto::AccountId32, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: ::std::boxed::Box, + } + #[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, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum Error { + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Voting<_0, _1, _2> { #[codec(index = 0)] - TooMany, + 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)] - NotFound, - #[codec(index = 2)] - NotProxy, - #[codec(index = 3)] - Unproxyable, - #[codec(index = 4)] - Duplicate, - #[codec(index = 5)] - NoPermission, - #[codec(index = 6)] - Unannounced, - #[codec(index = 7)] - NoSelfProxy, + 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 Event { + pub enum VoteThreshold { #[codec(index = 0)] - ProxyExecuted( - ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - ), + SuperMajorityApprove, #[codec(index = 1)] - AnonymousCreated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u16, - ), + SuperMajorityAgainst, #[codec(index = 2)] - Announced( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::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, - ), + SimpleMajority, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Announcement<_0, _1, _2> { - pub real: _0, - pub call_hash: _1, - pub height: _2, + 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>, + }, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ProxyDefinition<_0, _1, _2> { - pub delegate: _0, - pub proxy_type: _1, - pub delay: _2, + pub enum Releases { + #[codec(index = 0)] + V1, } } - pub mod pallet_scheduler { + pub mod pallet_election_provider_multi_phase { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -18185,110 +21244,243 @@ 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)] - schedule { - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, + PreDispatchEarlySubmission, #[codec(index = 1)] - cancel { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, + PreDispatchWrongWinnerCount, #[codec(index = 2)] - schedule_named { - id: ::std::vec::Vec<::core::primitive::u8>, - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, + PreDispatchWeakSubmission, #[codec(index = 3)] - cancel_named { - id: ::std::vec::Vec<::core::primitive::u8>, - }, + SignedQueueFull, #[codec(index = 4)] - schedule_after { - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, + SignedCannotPayDeposit, #[codec(index = 5)] - schedule_named_after { - id: ::std::vec::Vec<::core::primitive::u8>, - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: ::std::boxed::Box, - }, + SignedInvalidWitness, + #[codec(index = 6)] + 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 { 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>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + remove_voter, + #[codec(index = 2)] + submit_candidacy { + #[codec(compact)] + candidate_count: ::core::primitive::u32, + }, + #[codec(index = 3)] + renounce_candidacy { + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + }, + #[codec(index = 4)] + remove_member { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + has_replacement: ::core::primitive::bool, + }, + #[codec(index = 5)] + clean_defunct_voters { + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Error { #[codec(index = 0)] - FailedToSchedule, + UnableToVote, #[codec(index = 1)] - NotFound, + NoVotes, #[codec(index = 2)] - TargetBlockNumberInPast, + TooManyVotes, #[codec(index = 3)] - RescheduleNoChange, + MaximumVotesExceeded, + #[codec(index = 4)] + LowBalance, + #[codec(index = 5)] + UnableToPayBond, + #[codec(index = 6)] + MustBeVoter, + #[codec(index = 7)] + ReportSelf, + #[codec(index = 8)] + DuplicatedCandidate, + #[codec(index = 9)] + MemberSubmit, + #[codec(index = 10)] + RunnerUpSubmit, + #[codec(index = 11)] + InsufficientCandidateFunds, + #[codec(index = 12)] + NotMember, + #[codec(index = 13)] + InvalidWitnessData, + #[codec(index = 14)] + InvalidVoteCount, + #[codec(index = 15)] + InvalidRenouncing, + #[codec(index = 16)] + InvalidReplacement, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] - Scheduled(::core::primitive::u32, ::core::primitive::u32), + NewTerm { + new_members: ::std::vec::Vec<( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + }, #[codec(index = 1)] - Canceled(::core::primitive::u32, ::core::primitive::u32), + EmptyTerm, #[codec(index = 2)] - Dispatched( - (::core::primitive::u32, ::core::primitive::u32), - ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - ), + ElectionError, + #[codec(index = 3)] + MemberKicked { + member: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 4)] + Renounced { + candidate: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 5)] + CandidateSlashed { + candidate: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + SeatHolderSlashed { + seat_holder: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Releases { + pub enum Renouncing { #[codec(index = 0)] - V1, + Member, #[codec(index = 1)] - V2, + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::core::primitive::u32), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct ScheduledV2<_0, _1, _2, _3> { - pub maybe_id: - ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - pub priority: ::core::primitive::u8, - pub call: _0, - pub maybe_periodic: ::core::option::Option<(_1, _1)>, - pub origin: _2, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_3>, + 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_session { + pub mod pallet_grandpa { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -18297,38 +21489,1189 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - set_keys { - keys: runtime_types::polkadot_runtime::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, + 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)] - purge_keys, + 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)] - InvalidProof, + PauseFailed, #[codec(index = 1)] - NoAssociatedValidatorId, + ResumeFailed, #[codec(index = 2)] - DuplicatedKey, + ChangePending, #[codec(index = 3)] - NoKeys, + TooSoon, #[codec(index = 4)] - NoAccount, + InvalidKeyOwnershipProof, + #[codec(index = 5)] + InvalidEquivocationProof, + #[codec(index = 6)] + DuplicateOffenceReport, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] pub enum Event { #[codec(index = 0)] - NewSession(::core::primitive::u32), + 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_staking { + 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 :: Encode, + :: subxt :: codec :: Decode, + Debug, + :: subxt :: codec :: CompactAs, + )] + 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 { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Raw0([::core::primitive::u8; 0usize]), + #[codec(index = 2)] + Raw1([::core::primitive::u8; 1usize]), + #[codec(index = 3)] + Raw2([::core::primitive::u8; 2usize]), + #[codec(index = 4)] + Raw3([::core::primitive::u8; 3usize]), + #[codec(index = 5)] + Raw4([::core::primitive::u8; 4usize]), + #[codec(index = 6)] + Raw5([::core::primitive::u8; 5usize]), + #[codec(index = 7)] + Raw6([::core::primitive::u8; 6usize]), + #[codec(index = 8)] + Raw7([::core::primitive::u8; 7usize]), + #[codec(index = 9)] + Raw8([::core::primitive::u8; 8usize]), + #[codec(index = 10)] + Raw9([::core::primitive::u8; 9usize]), + #[codec(index = 11)] + Raw10([::core::primitive::u8; 10usize]), + #[codec(index = 12)] + Raw11([::core::primitive::u8; 11usize]), + #[codec(index = 13)] + Raw12([::core::primitive::u8; 12usize]), + #[codec(index = 14)] + Raw13([::core::primitive::u8; 13usize]), + #[codec(index = 15)] + Raw14([::core::primitive::u8; 14usize]), + #[codec(index = 16)] + Raw15([::core::primitive::u8; 15usize]), + #[codec(index = 17)] + Raw16([::core::primitive::u8; 16usize]), + #[codec(index = 18)] + Raw17([::core::primitive::u8; 17usize]), + #[codec(index = 19)] + Raw18([::core::primitive::u8; 18usize]), + #[codec(index = 20)] + Raw19([::core::primitive::u8; 19usize]), + #[codec(index = 21)] + Raw20([::core::primitive::u8; 20usize]), + #[codec(index = 22)] + Raw21([::core::primitive::u8; 21usize]), + #[codec(index = 23)] + Raw22([::core::primitive::u8; 22usize]), + #[codec(index = 24)] + Raw23([::core::primitive::u8; 23usize]), + #[codec(index = 25)] + Raw24([::core::primitive::u8; 24usize]), + #[codec(index = 26)] + Raw25([::core::primitive::u8; 25usize]), + #[codec(index = 27)] + Raw26([::core::primitive::u8; 26usize]), + #[codec(index = 28)] + Raw27([::core::primitive::u8; 27usize]), + #[codec(index = 29)] + Raw28([::core::primitive::u8; 28usize]), + #[codec(index = 30)] + Raw29([::core::primitive::u8; 29usize]), + #[codec(index = 31)] + Raw30([::core::primitive::u8; 30usize]), + #[codec(index = 32)] + Raw31([::core::primitive::u8; 31usize]), + #[codec(index = 33)] + Raw32([::core::primitive::u8; 32usize]), + #[codec(index = 34)] + BlakeTwo256([::core::primitive::u8; 32usize]), + #[codec(index = 35)] + Sha256([::core::primitive::u8; 32usize]), + #[codec(index = 36)] + Keccak256([::core::primitive::u8; 32usize]), + #[codec(index = 37)] + ShaThree256([::core::primitive::u8; 32usize]), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum IdentityField { + #[codec(index = 1)] + Display, + #[codec(index = 2)] + Legal, + #[codec(index = 4)] + Web, + #[codec(index = 8)] + Riot, + #[codec(index = 16)] + Email, + #[codec(index = 32)] + PgpFingerprint, + #[codec(index = 64)] + Image, + #[codec(index = 128)] + Twitter, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct IdentityInfo { + pub additional: + runtime_types::frame_support::storage::bounded_vec::BoundedVec<( + runtime_types::pallet_identity::types::Data, + runtime_types::pallet_identity::types::Data, + )>, + pub display: runtime_types::pallet_identity::types::Data, + pub legal: runtime_types::pallet_identity::types::Data, + pub web: runtime_types::pallet_identity::types::Data, + pub riot: runtime_types::pallet_identity::types::Data, + pub email: runtime_types::pallet_identity::types::Data, + pub pgp_fingerprint: + ::core::option::Option<[::core::primitive::u8; 20usize]>, + pub image: runtime_types::pallet_identity::types::Data, + pub twitter: runtime_types::pallet_identity::types::Data, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Judgement<_0> { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + FeePaid(_0), + #[codec(index = 2)] + Reasonable, + #[codec(index = 3)] + KnownGood, + #[codec(index = 4)] + OutOfDate, + #[codec(index = 5)] + LowQuality, + #[codec(index = 6)] + Erroneous, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct RegistrarInfo<_0, _1> { + pub account: _1, + pub fee: _0, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Registration<_0> { + pub judgements: + runtime_types::frame_support::storage::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_identity::types::Judgement<_0>, + )>, + pub deposit: _0, + pub info: runtime_types::pallet_identity::types::IdentityInfo, + } + } + } + pub mod pallet_im_online { + 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)] 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, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidKey, + #[codec(index = 1)] + DuplicatedHeartbeat, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + HeartbeatReceived { + authority_id: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, + #[codec(index = 1)] + AllGood, + #[codec(index = 2)] + 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 { + use super::runtime_types; + pub mod app_sr25519 { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + } + #[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, Debug)] + pub struct Heartbeat<_0> { + pub block_number: _0, + pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, + pub session_index: _0, + pub authority_index: _0, + pub validators_len: _0, + } + } + pub mod pallet_indices { + 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)] + claim { index: ::core::primitive::u32 }, + #[codec(index = 1)] + transfer { + new: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + free { index: ::core::primitive::u32 }, + #[codec(index = 3)] + force_transfer { + new: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + freeze: ::core::primitive::bool, + }, + #[codec(index = 4)] + freeze { index: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + NotAssigned, + #[codec(index = 1)] + NotOwner, + #[codec(index = 2)] + InUse, + #[codec(index = 3)] + NotTransfer, + #[codec(index = 4)] + Permanent, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + IndexAssigned { + who: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + IndexFreed { index: ::core::primitive::u32 }, + #[codec(index = 2)] + IndexFrozen { + index: ::core::primitive::u32, + who: ::subxt::sp_core::crypto::AccountId32, + }, + } + } + } + pub mod pallet_membership { + 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_member { + who: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 1)] + remove_member { + who: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 2)] + swap_member { + remove: ::subxt::sp_core::crypto::AccountId32, + add: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 3)] + reset_members { + members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + }, + #[codec(index = 4)] + change_key { + new: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 5)] + set_prime { + who: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 6)] + clear_prime, + } + #[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, Debug, + )] + pub enum Event { + #[codec(index = 0)] + MemberAdded, + #[codec(index = 1)] + MemberRemoved, + #[codec(index = 2)] + MembersSwapped, + #[codec(index = 3)] + MembersReset, + #[codec(index = 4)] + KeyChanged, + #[codec(index = 5)] + Dummy, + } + } + } + pub mod pallet_multisig { + 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)] + as_multi_threshold_1 { + other_signatories: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + as_multi { + threshold: ::core::primitive::u16, + other_signatories: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, + >, + >, + call: ::subxt::WrapperKeepOpaque< + runtime_types::polkadot_runtime::Call, + >, + store_call: ::core::primitive::bool, + max_weight: ::core::primitive::u64, + }, + #[codec(index = 2)] + approve_as_multi { + threshold: ::core::primitive::u16, + other_signatories: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, + >, + >, + call_hash: [::core::primitive::u8; 32usize], + max_weight: ::core::primitive::u64, + }, + #[codec(index = 3)] + cancel_as_multi { + threshold: ::core::primitive::u16, + other_signatories: + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + timepoint: runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, + >, + call_hash: [::core::primitive::u8; 32usize], + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + MinimumThreshold, + #[codec(index = 1)] + AlreadyApproved, + #[codec(index = 2)] + NoApprovalsNeeded, + #[codec(index = 3)] + TooFewSignatories, + #[codec(index = 4)] + TooManySignatories, + #[codec(index = 5)] + SignatoriesOutOfOrder, + #[codec(index = 6)] + SenderInSignatories, + #[codec(index = 7)] + NotFound, + #[codec(index = 8)] + NotOwner, + #[codec(index = 9)] + NoTimepoint, + #[codec(index = 10)] + WrongTimepoint, + #[codec(index = 11)] + UnexpectedTimepoint, + #[codec(index = 12)] + MaxWeightTooLow, + #[codec(index = 13)] + AlreadyStored, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + 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], + }, + #[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], + }, + #[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< + (), + 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], + }, + } + } + #[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, Debug)] + pub struct Timepoint<_0> { + pub height: _0, + pub index: _0, + } + } + pub mod pallet_offences { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + 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 }, + } + } + #[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, Debug, + )] + pub enum Call { + #[codec(index = 0)] + proxy { + real: ::subxt::sp_core::crypto::AccountId32, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, + >, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + add_proxy { + delegate: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 2)] + remove_proxy { + delegate: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 3)] + remove_proxies, + #[codec(index = 4)] + anonymous { + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + }, + #[codec(index = 5)] + kill_anonymous { + spawner: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + index: ::core::primitive::u16, + #[codec(compact)] + height: ::core::primitive::u32, + #[codec(compact)] + ext_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + announce { + real: ::subxt::sp_core::crypto::AccountId32, + call_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 7)] + remove_announcement { + real: ::subxt::sp_core::crypto::AccountId32, + call_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 8)] + reject_announcement { + delegate: ::subxt::sp_core::crypto::AccountId32, + call_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 9)] + proxy_announced { + delegate: ::subxt::sp_core::crypto::AccountId32, + real: ::subxt::sp_core::crypto::AccountId32, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, + >, + call: ::std::boxed::Box, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + TooMany, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + NotProxy, + #[codec(index = 3)] + Unproxyable, + #[codec(index = 4)] + Duplicate, + #[codec(index = 5)] + NoPermission, + #[codec(index = 6)] + Unannounced, + #[codec(index = 7)] + NoSelfProxy, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + ProxyExecuted { + result: ::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, + }, + #[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 { + 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, Debug)] + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, + } + } + pub mod pallet_scheduler { + 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)] + schedule { + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::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, + >, + >, + }, + #[codec(index = 1)] + cancel { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + schedule_named { + id: ::std::vec::Vec<::core::primitive::u8>, + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::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, + >, + >, + }, + #[codec(index = 3)] + cancel_named { + id: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + schedule_after { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::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, + >, + >, + }, + #[codec(index = 5)] + schedule_named_after { + id: ::std::vec::Vec<::core::primitive::u8>, + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::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, + >, + >, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + FailedToSchedule, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + TargetBlockNumberInPast, + #[codec(index = 3)] + RescheduleNoChange, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + Scheduled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + Canceled { + when: ::core::primitive::u32, + index: ::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< + (), + 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)] + pub enum Releases { + #[codec(index = 0)] + 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 maybe_id: + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + pub priority: ::core::primitive::u8, + pub call: _0, + pub maybe_periodic: ::core::option::Option<(_1, _1)>, + pub origin: _2, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_3>, + } + } + pub mod pallet_session { + 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_keys { + keys: runtime_types::polkadot_runtime::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + purge_keys, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Error { + #[codec(index = 0)] + InvalidProof, + #[codec(index = 1)] + NoAssociatedValidatorId, + #[codec(index = 2)] + DuplicatedKey, + #[codec(index = 3)] + NoKeys, + #[codec(index = 4)] + NoAccount, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + )] + pub enum Event { + #[codec(index = 0)] + NewSession { + session_index: ::core::primitive::u32, + }, + } + } + } + pub mod pallet_staking { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -18459,16 +22802,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 { @@ -18525,6 +22870,8 @@ pub mod api { TooManyNominators, #[codec(index = 22)] TooManyValidators, + #[codec(index = 23)] + CommissionTooLow, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -18780,23 +23127,23 @@ pub mod api { )] 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, Debug)] @@ -18868,23 +23215,34 @@ pub mod api { )] 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, Debug)] @@ -18936,21 +23294,21 @@ pub mod api { )] 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, >, - ), + }, } } } @@ -19025,12 +23383,14 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - VestingUpdated( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + VestingUpdated { + account: ::subxt::sp_core::crypto::AccountId32, + unvested: ::core::primitive::u128, + }, #[codec(index = 1)] - VestingCompleted(::subxt::sp_core::crypto::AccountId32), + VestingCompleted { + account: ::subxt::sp_core::crypto::AccountId32, + }, } } pub mod vesting_info { @@ -19038,19 +23398,274 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, + 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)] + 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, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } } pub mod polkadot_core_primitives { use super::runtime_types; @@ -19088,10 +23703,10 @@ pub mod api { pub recipient: runtime_types::polkadot_parachain::primitives::Id, } #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct Id(pub ::core::primitive::u32); #[derive( @@ -19131,10 +23746,10 @@ pub mod api { pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct ValidatorIndex(pub ::core::primitive::u32); #[derive( @@ -19165,7 +23780,7 @@ pub mod api { #[derive( :: 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 > , } + 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, Debug, @@ -19248,10 +23863,10 @@ pub mod api { >, } #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct CoreIndex(pub ::core::primitive::u32); #[derive( @@ -19282,10 +23897,10 @@ pub mod api { )>, } #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct GroupIndex(pub ::core::primitive::u32); #[derive( @@ -19348,31 +23963,6 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - 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, - >, - >, - 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, - )] pub enum UpgradeGoAhead { #[codec(index = 0)] Abort, @@ -19400,19 +23990,64 @@ 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 = 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 = 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 ,) , } + # [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<( + pub votes1: + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u16)>, + pub votes2: ::std::vec::Vec<( ::core::primitive::u32, ( ::core::primitive::u16, @@ -19420,7 +24055,7 @@ pub mod api { ), ::core::primitive::u16, )>, - votes3: ::std::vec::Vec<( + pub votes3: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19428,7 +24063,7 @@ pub mod api { ); 2usize], ::core::primitive::u16, )>, - votes4: ::std::vec::Vec<( + pub votes4: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19436,7 +24071,7 @@ pub mod api { ); 3usize], ::core::primitive::u16, )>, - votes5: ::std::vec::Vec<( + pub votes5: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19444,7 +24079,7 @@ pub mod api { ); 4usize], ::core::primitive::u16, )>, - votes6: ::std::vec::Vec<( + pub votes6: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19452,7 +24087,7 @@ pub mod api { ); 5usize], ::core::primitive::u16, )>, - votes7: ::std::vec::Vec<( + pub votes7: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19460,7 +24095,7 @@ pub mod api { ); 6usize], ::core::primitive::u16, )>, - votes8: ::std::vec::Vec<( + pub votes8: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19468,7 +24103,7 @@ pub mod api { ); 7usize], ::core::primitive::u16, )>, - votes9: ::std::vec::Vec<( + pub votes9: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19476,7 +24111,7 @@ pub mod api { ); 8usize], ::core::primitive::u16, )>, - votes10: ::std::vec::Vec<( + pub votes10: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19484,7 +24119,7 @@ pub mod api { ); 9usize], ::core::primitive::u16, )>, - votes11: ::std::vec::Vec<( + pub votes11: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19492,7 +24127,7 @@ pub mod api { ); 10usize], ::core::primitive::u16, )>, - votes12: ::std::vec::Vec<( + pub votes12: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19500,7 +24135,7 @@ pub mod api { ); 11usize], ::core::primitive::u16, )>, - votes13: ::std::vec::Vec<( + pub votes13: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19508,7 +24143,7 @@ pub mod api { ); 12usize], ::core::primitive::u16, )>, - votes14: ::std::vec::Vec<( + pub votes14: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19516,7 +24151,7 @@ pub mod api { ); 13usize], ::core::primitive::u16, )>, - votes15: ::std::vec::Vec<( + pub votes15: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19524,7 +24159,7 @@ pub mod api { ); 14usize], ::core::primitive::u16, )>, - votes16: ::std::vec::Vec<( + pub votes16: ::std::vec::Vec<( ::core::primitive::u32, [( ::core::primitive::u16, @@ -19557,7 +24192,9 @@ 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, Debug)] @@ -19578,7 +24215,7 @@ pub mod api { Auction, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] - pub struct Runtime {} + pub struct Runtime; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SessionKeys { pub grandpa: runtime_types::sp_finality_grandpa::app::Public, @@ -19730,7 +24367,7 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub struct PrevalidateAttests {} + pub struct PrevalidateAttests; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] @@ -19816,6 +24453,14 @@ 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, @@ -19919,7 +24564,7 @@ pub mod api { #[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 > , } + 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, Debug, )] @@ -19969,6 +24614,8 @@ pub mod api { ParaLocked, #[codec(index = 11)] NotReserved, + #[codec(index = 12)] + EmptyCode, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -20054,6 +24701,59 @@ 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( @@ -20061,7 +24761,7 @@ pub mod api { )] 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)] @@ -20162,6 +24862,16 @@ 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, @@ -20182,7 +24892,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, @@ -20215,6 +24925,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 { @@ -20343,51 +25056,63 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - WrongBitfieldSize, + UnsortedOrDuplicateValidatorIndices, #[codec(index = 1)] - BitfieldDuplicateOrUnordered, + UnsortedOrDuplicateDisputeStatementSet, #[codec(index = 2)] - ValidatorIndexOutOfBounds, + UnsortedOrDuplicateBackedCandidates, #[codec(index = 3)] - InvalidBitfieldSignature, + UnexpectedRelayParent, #[codec(index = 4)] - UnscheduledCandidate, + WrongBitfieldSize, #[codec(index = 5)] - CandidateScheduledBeforeParaFree, + BitfieldAllZeros, #[codec(index = 6)] - WrongCollator, + BitfieldDuplicateOrUnordered, #[codec(index = 7)] - ScheduledOutOfOrder, + ValidatorIndexOutOfBounds, #[codec(index = 8)] - HeadDataTooLarge, + InvalidBitfieldSignature, #[codec(index = 9)] - PrematureCodeUpgrade, + UnscheduledCandidate, #[codec(index = 10)] - NewCodeTooLarge, + CandidateScheduledBeforeParaFree, #[codec(index = 11)] - CandidateNotInParentContext, + WrongCollator, #[codec(index = 12)] - InvalidGroupIndex, + ScheduledOutOfOrder, #[codec(index = 13)] - InsufficientBacking, + HeadDataTooLarge, #[codec(index = 14)] - InvalidBacking, + PrematureCodeUpgrade, #[codec(index = 15)] - NotCollatorSigned, + NewCodeTooLarge, #[codec(index = 16)] - ValidationDataHashMismatch, + CandidateNotInParentContext, #[codec(index = 17)] - IncorrectDownwardMessageHandling, + InvalidGroupIndex, #[codec(index = 18)] - InvalidUpwardMessages, + InsufficientBacking, #[codec(index = 19)] - HrmpWatermarkMishandling, + InvalidBacking, #[codec(index = 20)] - InvalidOutboundHrmp, + NotCollatorSigned, #[codec(index = 21)] - InvalidValidationCodeHash, + ValidationDataHashMismatch, #[codec(index = 22)] + IncorrectDownwardMessageHandling, + #[codec(index = 23)] + InvalidUpwardMessages, + #[codec(index = 24)] + HrmpWatermarkMishandling, + #[codec(index = 25)] + InvalidOutboundHrmp, + #[codec(index = 26)] + InvalidValidationCodeHash, + #[codec(index = 27)] ParaHeadMismatch, + #[codec(index = 28)] + BitfieldReferencesFreedCore, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, @@ -20496,7 +25221,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 = 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, Debug, )] @@ -20511,31 +25236,26 @@ 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, + #[codec(index = 11)] + PvfCheckDisabled, } #[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 = 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, @@ -20573,6 +25293,38 @@ 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, @@ -20606,6 +25358,12 @@ pub mod api { InvalidParentHeader, #[codec(index = 2)] CandidateConcludedInvalid, + #[codec(index = 3)] + InherentOverweight, + #[codec(index = 4)] + DisputeStatementsUnsortedOrDuplicates, + #[codec(index = 5)] + DisputeInvalid, } } } @@ -20723,41 +25481,41 @@ pub mod api { pub mod fixed_point { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct FixedU128(pub ::core::primitive::u128); } pub mod per_things { use super::runtime_types; #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct PerU16(pub ::core::primitive::u16); #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct Perbill(pub ::core::primitive::u32); #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct Percent(pub ::core::primitive::u8); #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] pub struct Permill(pub ::core::primitive::u32); } @@ -20819,25 +25577,15 @@ pub mod api { pub second_header: _0, } #[derive( - :: subxt :: codec :: CompactAs, :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, + :: subxt :: codec :: CompactAs, )] 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, Debug, - )] - pub struct ChangesTrieConfiguration { - pub digest_interval: ::core::primitive::u32, - pub digest_levels: ::core::primitive::u32, - } - } pub mod crypto { use super::runtime_types; #[derive( @@ -20959,22 +25707,15 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - 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 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, Debug, )] - pub enum DigestItem<_0> { - #[codec(index = 2)] - ChangesTrieRoot(_0), + pub enum DigestItem { #[codec(index = 6)] PreRuntime( [::core::primitive::u8; 4usize], @@ -20990,10 +25731,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)] @@ -21520,167 +26257,932 @@ 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>( + pub ::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 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 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 unchecked_extrinsic { + pub mod order { 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 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, + }, + } } - } - pub mod multiaddress { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, )] - pub enum MultiAddress<_0, _1> { + pub enum OriginKind { #[codec(index = 0)] - Id(_0), + Native, #[codec(index = 1)] - Index(#[codec(compact)] _1), + SovereignAccount, #[codec(index = 2)] - Raw(::std::vec::Vec<::core::primitive::u8>), + Superuser, #[codec(index = 3)] - Address32([::core::primitive::u8; 32usize]), - #[codec(index = 4)] - Address20([::core::primitive::u8; 20usize]), + Xcm, } - } - 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)] - 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 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)] + 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, + >, + 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 sp_staking { - use super::runtime_types; - pub mod offence { + 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 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 struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, + pub enum Response { + #[codec(index = 0)] + Assets(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 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)] + 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 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 { @@ -21726,7 +27228,7 @@ pub mod api { #[codec(index = 17)] FailedToDecode, #[codec(index = 18)] - TooMuchWeightRequired, + MaxWeightInvalid, #[codec(index = 19)] NotHoldingFees, #[codec(index = 20)] @@ -21757,6 +27259,215 @@ 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), } } } @@ -21770,7 +27481,7 @@ pub mod api { 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." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (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 : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (53u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (53u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (53u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (53u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (53u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (53u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (53u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (53u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (53u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (53u8 , 22u8) => 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 } + 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." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (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." }) , (10u8 , 0u8) => Some (ErrorDetails { pallet : "Preimage" , error : "TooLarge" , docs : "Preimage is too large to store on-chain." }) , (10u8 , 1u8) => Some (ErrorDetails { pallet : "Preimage" , error : "AlreadyNoted" , docs : "Preimage has already been noted on-chain." }) , (10u8 , 2u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotAuthorized" , docs : "The user is not authorized to perform this action." }) , (10u8 , 3u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotNoted" , docs : "The preimage cannot be removed since it has not yet been noted." }) , (10u8 , 4u8) => Some (ErrorDetails { pallet : "Preimage" , error : "Requested" , docs : "A preimage may not be removed when there are outstanding requests." }) , (10u8 , 5u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotRequested" , docs : "The preimage request cannot be removed since no outstanding requests exist." }) , (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 : "Cannot have a validator or nominator role, with value less than the minimum defined by\ngovernance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the\nintention, `chill` first to remove one's role as validator/nominator." }) , (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." }) , (7u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "CommissionTooLow" , docs : "Commission is too low. Must be at least `MinCommission`." }) , (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." }) , (34u8 , 9u8) => Some (ErrorDetails { pallet : "Bounties" , error : "HasActiveChildBounty" , docs : "The bounty cannot be closed because it has active child-bounties." }) , (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." }) , (37u8 , 0u8) => Some (ErrorDetails { pallet : "BagsList" , error : "NotInSameBag" , docs : "Attempted to place node in front of a node in another bag." }) , (37u8 , 1u8) => Some (ErrorDetails { pallet : "BagsList" , error : "IdNotFound" , docs : "Id not found in list." }) , (37u8 , 2u8) => Some (ErrorDetails { pallet : "BagsList" , error : "NotHeavier" , docs : "An Id does not have a greater vote weight than another Id." }) , (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 : "UnsortedOrDuplicateValidatorIndices" , docs : "Validator indices are out of order or contains duplicates." }) , (53u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateDisputeStatementSet" , docs : "Dispute statement sets are out of order or contain duplicates." }) , (53u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateBackedCandidates" , docs : "Backed candidates are out of order (core index) or contain duplicates." }) , (53u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnexpectedRelayParent" , docs : "A different relay parent was provided compared to the on-chain stored one." }) , (53u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongBitfieldSize" , docs : "Availability bitfield has unexpected size." }) , (53u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldAllZeros" , docs : "Bitfield consists of zeros only." }) , (53u8 , 6u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldDuplicateOrUnordered" , docs : "Multiple bitfields submitted by same validator or validators out of order by index." }) , (53u8 , 7u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index out of bounds." }) , (53u8 , 8u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBitfieldSignature" , docs : "Invalid signature" }) , (53u8 , 9u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnscheduledCandidate" , docs : "Candidate submitted but para not scheduled." }) , (53u8 , 10u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateScheduledBeforeParaFree" , docs : "Candidate scheduled despite pending candidate already existing for the para." }) , (53u8 , 11u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongCollator" , docs : "Candidate included with the wrong collator." }) , (53u8 , 12u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ScheduledOutOfOrder" , docs : "Scheduled cores out of order." }) , (53u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HeadDataTooLarge" , docs : "Head data exceeds the configured maximum." }) , (53u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "PrematureCodeUpgrade" , docs : "Code upgrade prematurely." }) , (53u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NewCodeTooLarge" , docs : "Output code is too large" }) , (53u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateNotInParentContext" , docs : "Candidate not in parent context." }) , (53u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (53u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (53u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (53u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (53u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (53u8 , 22u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (53u8 , 23u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (53u8 , 24u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (53u8 , 25u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (53u8 , 26u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (53u8 , 27u8) => 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." }) , (53u8 , 28u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldReferencesFreedCore" , docs : "A bitfield that references a freed core,\neither intentionally or as part of a concluded\ninvalid dispute." }) , (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." }) , (54u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InherentOverweight" , docs : "The data given to the inherent will result in an overweight block." }) , (54u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeStatementsUnsortedOrDuplicates" , docs : "The ordering of dispute statements was invalid." }) , (54u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeInvalid" , docs : "A dispute statement was 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." }) , (56u8 , 5u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementStale" , docs : "The statement for PVF pre-checking is stale." }) , (56u8 , 6u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementFuture" , docs : "The statement for PVF pre-checking is for a future session." }) , (56u8 , 7u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckValidatorIndexOutOfBounds" , docs : "Claimed validator index is out of bounds." }) , (56u8 , 8u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckInvalidSignature" , docs : "The signature for the PVF pre-checking is invalid." }) , (56u8 , 9u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDoubleVote" , docs : "The given validator already has cast a vote." }) , (56u8 , 10u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckSubjectInvalid" , docs : "The given PVF does not exist at the moment of process a vote." }) , (56u8 , 11u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDisabled" , docs : "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism\nis disabled." }) , (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." }) , (70u8 , 12u8) => Some (ErrorDetails { pallet : "Registrar" , error : "EmptyCode" , docs : "Registering parachain with empty code is not allowed." }) , (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." }) , (99u8 , 0u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (99u8 , 1u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (99u8 , 2u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Filtered" , docs : "The message execution fails the filter." }) , (99u8 , 3u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (99u8 , 4u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (99u8 , 5u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Empty" , docs : "The assets to be sent are empty." }) , (99u8 , 6u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (99u8 , 7u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (99u8 , 8u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (99u8 , 9u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (99u8 , 10u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (99u8 , 11u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (99u8 , 12u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , _ => None } } else { None } @@ -21815,6 +27526,9 @@ pub mod api { X: ::subxt::SignedExtra, A: ::subxt::AccountData, { + pub fn constants(&'a self) -> ConstantsApi { + ConstantsApi + } pub fn storage(&'a self) -> StorageApi<'a, T> { StorageApi { client: &self.client, @@ -21826,6 +27540,128 @@ pub mod api { marker: ::core::marker::PhantomData, } } + pub fn events(&'a self) -> EventsApi<'a, T> { + EventsApi { + client: &self.client, + } + } + } + pub struct EventsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> EventsApi<'a, T> { + pub async fn at( + &self, + block_hash: T::Hash, + ) -> Result<::subxt::events::Events<'a, T, Event>, ::subxt::BasicError> { + ::subxt::events::at::(self.client, block_hash).await + } + pub async fn subscribe( + &self, + ) -> Result<::subxt::events::EventSubscription<'a, T, Event>, ::subxt::BasicError> + { + ::subxt::events::subscribe::(self.client).await + } + pub async fn subscribe_finalized( + &self, + ) -> Result<::subxt::events::EventSubscription<'a, T, Event>, ::subxt::BasicError> + { + ::subxt::events::subscribe_finalized::(self.client).await + } + } + pub struct ConstantsApi; + impl ConstantsApi { + pub fn system(&self) -> system::constants::ConstantsApi { + system::constants::ConstantsApi + } + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi + } + pub fn babe(&self) -> babe::constants::ConstantsApi { + babe::constants::ConstantsApi + } + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi + } + pub fn indices(&self) -> indices::constants::ConstantsApi { + indices::constants::ConstantsApi + } + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi + } + pub fn transaction_payment( + &self, + ) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi + } + pub fn authorship(&self) -> authorship::constants::ConstantsApi { + authorship::constants::ConstantsApi + } + pub fn staking(&self) -> staking::constants::ConstantsApi { + staking::constants::ConstantsApi + } + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { + grandpa::constants::ConstantsApi + } + pub fn im_online(&self) -> im_online::constants::ConstantsApi { + im_online::constants::ConstantsApi + } + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi + } + pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { + phragmen_election::constants::ConstantsApi + } + pub fn treasury(&self) -> treasury::constants::ConstantsApi { + treasury::constants::ConstantsApi + } + pub fn claims(&self) -> claims::constants::ConstantsApi { + claims::constants::ConstantsApi + } + pub fn vesting(&self) -> vesting::constants::ConstantsApi { + vesting::constants::ConstantsApi + } + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi + } + pub fn proxy(&self) -> proxy::constants::ConstantsApi { + proxy::constants::ConstantsApi + } + pub fn multisig(&self) -> multisig::constants::ConstantsApi { + multisig::constants::ConstantsApi + } + pub fn bounties(&self) -> bounties::constants::ConstantsApi { + bounties::constants::ConstantsApi + } + pub fn tips(&self) -> tips::constants::ConstantsApi { + tips::constants::ConstantsApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi + } + pub fn bags_list(&self) -> bags_list::constants::ConstantsApi { + bags_list::constants::ConstantsApi + } + pub fn paras(&self) -> paras::constants::ConstantsApi { + paras::constants::ConstantsApi + } + pub fn registrar(&self) -> registrar::constants::ConstantsApi { + registrar::constants::ConstantsApi + } + pub fn slots(&self) -> slots::constants::ConstantsApi { + slots::constants::ConstantsApi + } + pub fn auctions(&self) -> auctions::constants::ConstantsApi { + auctions::constants::ConstantsApi + } + pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { + crowdloan::constants::ConstantsApi + } } pub struct StorageApi<'a, T: ::subxt::Config> { client: &'a ::subxt::Client, @@ -21840,6 +27676,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) } @@ -21971,6 +27810,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, @@ -21988,6 +27830,9 @@ 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) } @@ -22112,5 +27957,8 @@ 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/subxt/tests/integration/events.rs b/subxt/tests/integration/events.rs new file mode 100644 index 00000000000..e7625ab8af4 --- /dev/null +++ b/subxt/tests/integration/events.rs @@ -0,0 +1,139 @@ +// 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 crate::{ + node_runtime::{ + balances, + system, + }, + pair_signer, + test_context, +}; +use futures::StreamExt; +use sp_keyring::AccountKeyring; +use subxt::Signer; + +// Check that we can subscribe to non-finalized block events. +#[async_std::test] +async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> { + env_logger::try_init().ok(); + let ctx = test_context().await; + + let mut event_sub = ctx.api.events().subscribe().await?; + + // Wait for the next set of events, and check that the + // associated block hash is not finalized yet. + let events = event_sub.next().await.unwrap()?; + let event_block_hash = events.block_hash(); + let finalized_hash = ctx.api.client.rpc().finalized_head().await?; + + assert_ne!(event_block_hash, finalized_hash); + Ok(()) +} + +// Check that we can subscribe to finalized block events. +#[async_std::test] +async fn finalized_block_subscription() -> Result<(), subxt::BasicError> { + env_logger::try_init().ok(); + let ctx = test_context().await; + + let mut event_sub = ctx.api.events().subscribe_finalized().await?; + + // Wait for the next set of events, and check that the + // associated block hash is the one we just finalized. + // (this can be a bit slow as we have to wait for finalization) + let events = event_sub.next().await.unwrap()?; + let event_block_hash = events.block_hash(); + let finalized_hash = ctx.api.client.rpc().finalized_head().await?; + + assert_eq!(event_block_hash, finalized_hash); + Ok(()) +} + +// Check that our subscription actually keeps producing events for +// a few blocks. +#[async_std::test] +async fn subscription_produces_events_each_block() -> Result<(), subxt::BasicError> { + env_logger::try_init().ok(); + let ctx = test_context().await; + + let mut event_sub = ctx.api.events().subscribe().await?; + + for i in 0..3 { + let events = event_sub + .next() + .await + .expect("events expected each block")?; + let success_event = events + .find_first_event::() + .expect("decode error"); + // Every now and then I get no bytes back for the first block events; + // I assume that this might be the case for the genesis block, so don't + // worry if no event found (but we should have no decode errors etc either way). + if i > 0 && success_event.is_none() { + let n = events.len(); + panic!("Expected an extrinsic success event on iteration {i} (saw {n} other events)") + } + } + + Ok(()) +} + +// Check that our subscription receives events, and we can filter them based on +// it's Stream impl, and ultimately see the event we expect. +#[async_std::test] +async fn balance_transfer_subscription() -> Result<(), subxt::BasicError> { + env_logger::try_init().ok(); + let ctx = test_context().await; + + // Subscribe to balance transfer events, ignoring all else. + let event_sub = ctx.api.events().subscribe().await?.filter_map(|events| { + async move { + let events = events.ok()?; + events + .find_first_event::() + .ok()? + } + }); + + // Calling `.next()` on the above borrows it, and the `filter_map` + // means it's no longer `Unpin`, so we pin it on the stack: + futures::pin_mut!(event_sub); + + // Make a transfer: + let alice = pair_signer(AccountKeyring::Alice.pair()); + let bob = AccountKeyring::Bob.to_account_id(); + ctx.api + .tx() + .balances() + .transfer(bob.clone().into(), 10_000) + .sign_and_submit_then_watch(&alice) + .await?; + + // Wait for the next balance transfer event in our subscription stream + // and check that it lines up: + let event = event_sub.next().await.unwrap(); + assert_eq!( + event, + balances::events::Transfer { + from: alice.account_id().clone(), + to: bob.clone(), + amount: 10_000 + } + ); + + Ok(()) +} diff --git a/subxt/tests/integration/frame/balances.rs b/subxt/tests/integration/frame/balances.rs index 405ca90fc13..14372522b61 100644 --- a/subxt/tests/integration/frame/balances.rs +++ b/subxt/tests/integration/frame/balances.rs @@ -31,9 +31,7 @@ use sp_core::{ }; use sp_keyring::AccountKeyring; use subxt::{ - DefaultConfig, Error, - EventSubscription, Signer, }; @@ -189,38 +187,6 @@ async fn transfer_error() { } } -#[async_std::test] -async fn transfer_subscription() { - env_logger::try_init().ok(); - let alice = pair_signer(AccountKeyring::Alice.pair()); - let bob = AccountKeyring::Bob.to_account_id(); - let bob_addr = bob.clone().into(); - let cxt = test_context().await; - let sub = cxt.client().rpc().subscribe_events().await.unwrap(); - let decoder = cxt.client().events_decoder(); - let mut sub = EventSubscription::::new(sub, decoder); - sub.filter_event::(); - - cxt.api - .tx() - .balances() - .transfer(bob_addr, 10_000) - .sign_and_submit_then_watch(&alice) - .await - .unwrap(); - - let raw = sub.next().await.unwrap().unwrap(); - let event = balances::events::Transfer::decode(&mut &raw.data[..]).unwrap(); - assert_eq!( - event, - balances::events::Transfer { - from: alice.account_id().clone(), - to: bob.clone(), - amount: 10_000 - } - ); -} - #[async_std::test] async fn transfer_implicit_subscription() { env_logger::try_init().ok(); diff --git a/subxt/tests/integration/frame/contracts.rs b/subxt/tests/integration/frame/contracts.rs index 72b106f8bc7..169b92c55f6 100644 --- a/subxt/tests/integration/frame/contracts.rs +++ b/subxt/tests/integration/frame/contracts.rs @@ -18,6 +18,7 @@ use sp_keyring::AccountKeyring; use crate::{ node_runtime::{ + self, contracts::{ calls::TransactionApi, events, @@ -150,8 +151,10 @@ impl ContractsTestContext { &self, contract: AccountId, input_data: Vec, - ) -> Result, Error> - { + ) -> Result< + TransactionProgress<'_, DefaultConfig, DispatchError, node_runtime::Event>, + Error, + > { log::info!("call: {:?}", contract); let result = self .contracts_tx() diff --git a/subxt/tests/integration/frame/staking.rs b/subxt/tests/integration/frame/staking.rs index b34ae5fcca1..e9bf8edd487 100644 --- a/subxt/tests/integration/frame/staking.rs +++ b/subxt/tests/integration/frame/staking.rs @@ -180,7 +180,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { .await? .wait_for_finalized_success() .await? - .has_event::()?; + .has::()?; assert!(is_chilled); Ok(()) diff --git a/subxt/tests/integration/frame/sudo.rs b/subxt/tests/integration/frame/sudo.rs index eb8495c08c7..10e85ff6496 100644 --- a/subxt/tests/integration/frame/sudo.rs +++ b/subxt/tests/integration/frame/sudo.rs @@ -48,7 +48,7 @@ async fn test_sudo() -> Result<(), subxt::Error> { .await? .wait_for_finalized_success() .await? - .has_event::()?; + .has::()?; assert!(found_event); Ok(()) @@ -74,7 +74,7 @@ async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> .await? .wait_for_finalized_success() .await? - .has_event::()?; + .has::()?; assert!(found_event); Ok(()) diff --git a/subxt/tests/integration/frame/system.rs b/subxt/tests/integration/frame/system.rs index 8be7a7d3b6c..dbc66121a65 100644 --- a/subxt/tests/integration/frame/system.rs +++ b/subxt/tests/integration/frame/system.rs @@ -56,7 +56,7 @@ async fn tx_remark_with_event() -> Result<(), subxt::Error> { .await? .wait_for_finalized_success() .await? - .has_event::()?; + .has::()?; assert!(found_event); Ok(()) diff --git a/subxt/tests/integration/main.rs b/subxt/tests/integration/main.rs index 796df152fa8..6540d250290 100644 --- a/subxt/tests/integration/main.rs +++ b/subxt/tests/integration/main.rs @@ -20,7 +20,9 @@ mod utils; #[cfg(test)] mod client; #[cfg(test)] +mod events; +#[cfg(test)] mod frame; -pub use test_runtime::node_runtime; -pub use utils::*; +use test_runtime::node_runtime; +use utils::*; diff --git a/subxt/tests/integration/utils/context.rs b/subxt/tests/integration/utils/context.rs index 1a56a168c11..3c2bd1f0d1c 100644 --- a/subxt/tests/integration/utils/context.rs +++ b/subxt/tests/integration/utils/context.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with subxt. If not, see . -pub use crate::{ +pub(crate) use crate::{ node_runtime, TestNodeProcess, };